Linear first order differential equations 457
48.2 Procedure to solve differential
equations of the form
dy
dx
+ Py = Q
(i) Rearrange the differential equation into the form
dy
dx
+ P y = Q, where P and Q are functions of x.
(ii) Determine
P dx.
(iii) Determine the integrating factor e
P dx .
(iv) Substitute e
P dx into equation (3).
(v) Integrate the right hand side of equation (3) to
give the general solution of the differential equation. Given boundary conditions, the particular
solution may be determined.
48.3 Worked problems on linear first
order differential equations
Problem 1. Solve
1
x
dy
dx
+ 4y = 2 given the
boundary conditions x = 0 when y = 4.
Using the above procedure:
(i) Rearranging gives
dy
dx
+ 4x y = 2x, which is of the
form
dy
dx
+ P y = Q where P = 4x and Q = 2x.
(ii)
Pdx =
4xdx = 2x 2 .
(iii) Integrating factor e
P dx = e 2x 2 .
(iv) Substituting into equation (3) gives:
ye
2x 2 =
e
2x 2 (2x) dx
(v) Hence the general solution is:
ye
2x 2 =
1
2 e
2x 2 + c,
by using the substitution u = 2x 2 When x = 0,
y = 4, thus 4e 0 =
1
2 e 0 + c, from which, c =
7
2 .
Hence the particular solution is
ye
2x 2 =
1
2 e
2x 2 +
7
2
or y =
1
2 +
7
2 e −2x 2 or y =
1
2
1 +7e
−2x 2
Problem 2. Show that the solution of the equation
dy
dx
+ 1 =−
y
x
is given by y =
3 − x 2
2x
, given
x = 1 when y = 1.
Using the procedure of Section 48.2:
(i) Rearranging gives:
dy
dx
+
1
x
y =−1, which is
of the form
dy
dx
+ P y = Q, where P =
1
x
and
Q =−1. (Note that Q can be considered to be
−1x 0 , i.e. a function of x).
(ii)
P dx =
1
x
dx = ln x.
(iii) Integrating factor e
P dx
= e
ln x
= x (from the definition of logarithm).
(iv) Substituting into equation (3) gives:
yx =
x(−1) dx
(v) Hence the general solution is:
yx =
−x 2
2
+ c
When x = 1, y = 1, thus 1 =
−1
2
+ c, from
which, c =
3
2
Hence the particular solution is:
yx =
−x 2
2
+
3
2
i.e. 2yx = 3 − x
2 and y =
3 − x 2
2x
Problem 3. Determine the particular solution of
dy
dx
− x + y = 0, given that x = 0 when y = 2.
Using the procedure of Section 48.2:
(i) Rearranging gives
dy
dx
+ y = x, which is of the
form
dy
dx
+ P, = Q, where P = 1 and Q = x.
(In this case P can be considered to be 1x 0 , i.e. a
function of x).
(ii)
P dx =
1dx = x.
(iii) Integrating factor e
P dx = e x .
48.2 Procedure to solve differential
equations of the form
dy
dx
+ Py = Q
(i) Rearrange the differential equation into the form
dy
dx
+ P y = Q, where P and Q are functions of x.
(ii) Determine
P dx.
(iii) Determine the integrating factor e
P dx .
(iv) Substitute e
P dx into equation (3).
(v) Integrate the right hand side of equation (3) to
give the general solution of the differential equation. Given boundary conditions, the particular
solution may be determined.
48.3 Worked problems on linear first
order differential equations
Problem 1. Solve
1
x
dy
dx
+ 4y = 2 given the
boundary conditions x = 0 when y = 4.
Using the above procedure:
(i) Rearranging gives
dy
dx
+ 4x y = 2x, which is of the
form
dy
dx
+ P y = Q where P = 4x and Q = 2x.
(ii)
Pdx =
4xdx = 2x 2 .
(iii) Integrating factor e
P dx = e 2x 2 .
(iv) Substituting into equation (3) gives:
ye
2x 2 =
e
2x 2 (2x) dx
(v) Hence the general solution is:
ye
2x 2 =
1
2 e
2x 2 + c,
by using the substitution u = 2x 2 When x = 0,
y = 4, thus 4e 0 =
1
2 e 0 + c, from which, c =
7
2 .
Hence the particular solution is
ye
2x 2 =
1
2 e
2x 2 +
7
2
or y =
1
2 +
7
2 e −2x 2 or y =
1
2
1 +7e
−2x 2
Problem 2. Show that the solution of the equation
dy
dx
+ 1 =−
y
x
is given by y =
3 − x 2
2x
, given
x = 1 when y = 1.
Using the procedure of Section 48.2:
(i) Rearranging gives:
dy
dx
+
1
x
y =−1, which is
of the form
dy
dx
+ P y = Q, where P =
1
x
and
Q =−1. (Note that Q can be considered to be
−1x 0 , i.e. a function of x).
(ii)
P dx =
1
x
dx = ln x.
(iii) Integrating factor e
P dx
= e
ln x
= x (from the definition of logarithm).
(iv) Substituting into equation (3) gives:
yx =
x(−1) dx
(v) Hence the general solution is:
yx =
−x 2
2
+ c
When x = 1, y = 1, thus 1 =
−1
2
+ c, from
which, c =
3
2
Hence the particular solution is:
yx =
−x 2
2
+
3
2
i.e. 2yx = 3 − x
2 and y =
3 − x 2
2x
Problem 3. Determine the particular solution of
dy
dx
− x + y = 0, given that x = 0 when y = 2.
Using the procedure of Section 48.2:
(i) Rearranging gives
dy
dx
+ y = x, which is of the
form
dy
dx
+ P, = Q, where P = 1 and Q = x.
(In this case P can be considered to be 1x 0 , i.e. a
function of x).
(ii)
P dx =
1dx = x.
(iii) Integrating factor e
P dx = e x .
