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
+Py=Q,wherePandQare functions ofx.
(ii) Determine
∫
Pdx.
(iii) Determine the integrating factor e
∫
Pdx.
(iv) Substitute e
∫
Pdxinto equation (3).
(v) Integrate the right hand side of equation (3) to
give the general solution of the differential equa-
tion. 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
+ 4 y=2giventhe
boundary conditionsx=0wheny=4.
Using the above procedure:
(i) Rearranging gives
dy
dx
+ 4 xy= 2 x, which is of the
form
dy
dx
+Py=QwhereP= 4 xandQ= 2 x.
(ii)
∫
Pdx=
∫
4 xdx= 2 x^2.
(iii) Integrating factor e
∫
Pdx=e 2 x^2.
(iv) Substituting into equation (3) gives:
ye^2 x
2
=
∫
e^2 x
2
( 2 x)dx
(v) Hence the general solution is:
ye^2 x
2
=^12 e^2 x
2
+c,
by using the substitutionu= 2 x^2 Whenx=0,
y=4, thus 4e^0 =^12 e^0 +c, from which,c=^72.
Hence the particular solution is
ye^2 x
2
=^12 e^2 x
2
+^72
ory=^12 +^72 e−^2 x
2
ory=^12
(
1 +7e−^2 x
2 )
Problem 2. Show that the solution of the equation
dy
dx
+ 1 =−
y
x
is given byy=
3 −x^2
2 x
,given
x=1wheny=1.
Using the procedure of Section 48.2:
(i) Rearranging gives:
dy
dx
+
(
1
x
)
y=−1, which is
of the form
dy
dx
+Py=Q,whereP=
1
x
and
Q=−1. (Note thatQcan be considered to be
− 1 x^0 ,i.e.afunctionofx).
(ii)
∫
Pdx=
∫
1
x
dx=lnx.
(iii) Integrating factore
∫
Pdx=elnx=x(from the def-
inition 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 andy=
3 −x^2
2 x
Problem 3. Determine the particular solution of
dy
dx
−x+y=0, given thatx=0wheny=2.
Using the procedure of Section 48.2:
(i) Rearranging gives
dy
dx
+y=x, which is of the
form
dy
dx
+P,=Q,whereP=1andQ=x.
(In this casePcan be considered to be 1x^0 ,i.e.a
function ofx).
(ii)
∫
Pdx=
∫
1dx=x.
(iii) Integrating factor e
∫
Pdx=ex.