456 DIFFERENTIAL EQUATIONSequation. Given boundary conditions, the par-
ticular solution may be determined.48.3 Worked problems on linear first
order differential equationsProblem 1. Solve1
xdy
dx+ 4 y=2 given the
boundary conditionsx=0 wheny=4.Using the above procedure:(i) Rearranging givesdy
dx+ 4 xy= 2 x, which isof the formdy
dx+Py=QwhereP= 4 xand
Q= 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
(2x)dx(v) Hence the general solution is:ye^2 x2
=^12 e^2 x2
+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 equa-tiondy
dx+ 1 =−y
xis given byy=3 −x^2
2 x,given
x=1 wheny=1.Using the procedure of Section 48.2:(i) Rearranging gives:dy
dx+(
1
x)
y=−1, whichis of the formdy
dx+Py=Q, whereP=1
xandQ=−1. (Note thatQcan be considered to be
− 1 x^0 , i.e. a function ofx).(ii)∫
Pdx=∫
1
xdx=lnx.(iii) Integrating factor e∫
Pdx=elnx=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+cWhen x=1, y=1, thus 1=− 1
2+c, fromwhich,c=3
2
Hence the particular solution is:yx=−x^2
2+3
2i.e. 2yx= 3 −x^2 andy=3 −x^2
2 xProblem 3. Determine the particular solutionofdy
dx−x+y=0, given thatx=0 wheny=2.Using the procedure of Section 48.2:(i) Rearranging givesdy
dx+y=x, which is of theformdy
dx+P,=Q, whereP=1 andQ=x. (Inthis casePcan be considered to be 1x^0 , i.e. a
function ofx).(ii)∫
Pdx=∫
1dx=x.(iii) Integrating factor e∫
Pdx=ex.(iv) Substituting in equation (3) gives:yex=∫
ex(x)dx (4)(v)∫
ex(x)dxis determined using integration by
parts (see Chapter 43).
∫
xexdx=xex−ex+c