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. Solve1
xdy
dx+ 4 y=2giventhe
boundary conditionsx=0wheny=4.Using the above procedure:
(i) Rearranging givesdy
dx+ 4 xy= 2 x, which is of theformdy
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 x2
=∫
e^2 x2
( 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 isye^2 x2
=^12 e^2 x2
+^72ory=^12 +^72 e−^2 x2
ory=^12(
1 +7e−^2 x2 )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 isof the formdy
dx+Py=Q,whereP=1
xand
Q=−1. (Note thatQcan be considered to be
− 1 x^0 ,i.e.afunctionofx).(ii)∫
Pdx=∫
1
xdx=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+cWhen x=1, y=1, thus 1=− 1
2+c, fromwhich,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 xProblem 3. Determine the particular solution of
dy
dx−x+y=0, given thatx=0wheny=2.Using the procedure of Section 48.2:(i) Rearranging givesdy
dx+y=x, which is of theformdy
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.