Dierential Equations
INTEGRATING FACTOR METHOD
Graham S McDonald
A Tutorial Module for learning to solve 1storder linear dierential equations
Table of contents Begin Tutorial
c 2004 [email protected]
Table of contents1. Theory2. Exercises3. Answers4. Standard integrals5. Tips on using solutions6. Alternative notation
Full worked solutions
Section 1: Theory 3
1. Theory
Consider an ordinary dierential equation (o.d.e.) that we wish tosolve to find out how the variable y depends on the variable x.
If the equation is first order then the highest derivative involved isa first derivative.
If it is also a linear equation then this means that each term caninvolve y either as the derivative dydx OR through a single factor of y .
Any such linear first order o.d.e. can be re-arranged to give the fol-lowing standard form:
dy
dx+ P (x)y = Q(x)
where P (x) and Q(x) are functions of x, and in some cases may beconstants.
Toc JJ II J I Back
Section 1: Theory 4
A linear first order o.d.e. can be solved using the integrating factormethod.
After writing the equation in standard form, P (x) can be identified.One then multiplies the equation by the following integrating factor:
IF= eRP (x)dx
This factor is defined so that the equation becomes equivalent to:
ddx (IF y) = IFQ(x),
whereby integrating both sides with respect to x, gives:
IF y =RIFQ(x) dx
Finally, division by the integrating factor (IF) gives y explicitly interms of x, i.e. gives the solution to the equation.
Toc JJ II J I Back
Section 2: Exercises 5
2. Exercises
In each case, derive the general solution. When a boundarycondition is also given, derive the particular solution.Click on Exercise links for full worked solutions (there are 10exercises in total)
Exercise 1.
dy
dx+ y = x ; y(0) = 2
Exercise 2.
dy
dx+ y = ex ; y(0) = 1
Exercise 3.
xdy
dx+ 2y = 10x2 ; y(1) = 3
Theory Answers Integrals Tips Notation
Toc JJ II J I Back
Section 2: Exercises 6
Exercise 4.
xdy
dx y = x2 ; y(1) = 3
Exercise 5.
xdy
dx 2y = x4 sinx
Exercise 6.
xdy
dx 2y = x2
Exercise 7.
dy
dx+ y cotx = cosecx
Theory Answers Integrals Tips Notation
Toc JJ II J I Back
Section 2: Exercises 7
Exercise 8.
dy
dx+ y cotx = cosx
Exercise 9.
(x2 1)dydx
+ 2xy = x
Exercise 10.
dy
dx= y tanx secx ; y(0) = 1
Theory Answers Integrals Tips Notation
Toc JJ II J I Back
Section 3: Answers 8
3. Answers
1. General solution is y = (x 1) + Cex , and particularsolution is y = (x 1) + 3ex ,
2. General solution is y = ex(x+ C) , and particular solution isy = ex(x+ 1) ,
3. General solution is y = 52x2 + Cx2 , and particular solution is
y = 12 (5x2 + 1x2 ) ,
4. General solution is y = x2 + Cx , and particular solution isy = x2 + 2x ,
5. General solution is y = x3 cosx+ x2 sinx+ Cx2 ,
6. General solution is y = x2 ln x+ C x2 ,
Toc JJ II J I Back
Section 3: Answers 9
7. General solution is y sinx = x+ C ,
8. General solution is 4y sinx+ cos 2x = C ,
9. General solution is (x2 1)y = x22 + C ,
10. General solution is y cosx = C x , and particular solution isy cosx = 1 x .
Toc JJ II J I Back
Section 4: Standard integrals 10
4. Standard integrals
f (x)Rf(x)dx f (x)
Rf(x)dx
xn xn+1
n+1 (n 6= 1) [g (x)]n g0 (x) [g(x)]n+1
n+1 (n 6= 1)1x ln |x| g
0(x)g(x) ln |g (x)|
ex ex ax ax
ln a (a > 0)sinx cosx sinhx coshxcosx sinx coshx sinhxtanx ln |cosx| tanhx ln coshxcosecx ln
tan x2 cosechx ln tanh x2 secx ln |secx+ tanx| sechx 2 tan1 exsec2 x tanx sech2 x tanhxcotx ln |sinx| cothx ln |sinhx|sin2 x x2 sin 2x4 sinh2 x sinh 2x4 x2cos2 x x2 +
sin 2x4 cosh
2 x sinh 2x4 +x2
Toc JJ II J I Back
Section 4: Standard integrals 11
f (x)Rf (x) dx f (x)
Rf (x) dx
1a2+x2
1a tan
1 xa
1a2x2
12a ln
a+xax (0< |x| 0) 1x2a2
12a ln
xax+a (|x| > a>0)1p
a2x2 sin1 x
a1p
a2+x2lnx+pa2+x2a (a > 0)
(a < x < a) 1px2a2 ln
x+px2a2a (x>a>0)pa2 x2 a22
sin1
xa
pa2+x2 a
2
2
hsinh1
xa
+ x
pa2+x2
a2
i+x
pa2x2a2
i px2a2 a22
h cosh1 xa+ xpx2a2a2 i
Toc JJ II J I Back
Section 5: Tips on using solutions 12
5. Tips on using solutions
When looking at the THEORY, ANSWERS, INTEGRALS, TIPSor NOTATION pages, use the Back button (at the bottom of thepage) to return to the exercises.
Use the solutions intelligently. For example, they can help you getstarted on an exercise, or they can allow you to check whether yourintermediate results are correct.
Try to make less use of the full solutions as you work your waythrough the Tutorial.
Toc JJ II J I Back
Section 6: Alternative notation 13
6. Alternative notation
The linear first order dierential equation:dy
dx+ P (x) y = Q(x)
has the integrating factor IF=eRP (x) dx.
The integrating factor method is sometimes explained in terms ofsimpler forms of dierential equation. For example, when constantcoecients a and b are involved, the equation may be written as:
ady
dx+ b y = Q(x)
In our standard form this is:dy
dx+
b
ay =
Q(x)a
with an integrating factor of:
IF = eR
ba dx = e
bxa
Toc JJ II J I Back
Solutions to exercises 14
Full worked solutions
Exercise 1.
Compare with form:dy
dx+ P (x)y = Q(x) (P,Q are functions of x)
Integrating factor: P (x) = 1.
Integrating factor, IF = eRP (x)dx
= eRdx
= ex
Multiply equation by IF:
exdy
dx+ exy = exx
i.e.d
dx[exy] = exx
Toc JJ II J I Back
Solutions to exercises 15
Integrate both sides with respect to x:
exy = ex(x 1) + C
{ Note:Z
udv
dxdx = uv
Zvdu
dxdx i.e. integration by parts with
u x, dvdx ex
! xex Z
exdx
! xex ex = ex(x 1) }i.e. y = (x 1) + Cex .
Particular solution with y(0) = 2:
2 = (0 1) + Ce0= 1 + C i.e. C = 3 and y = (x 1) + 3ex .
Return to Exercise 1
Toc JJ II J I Back
Solutions to exercises 16
Exercise 2.Integrating Factor: P (x) = 1 , IF = e
RPdx = e
Rdx = ex
Multiply equation:
exdy
dx+ exy = exex
i.e.d
dx[exy] = 1
Integrate:exy = x+ C
i.e. y = ex(x+ C) .
Particular solution:
y = 1x = 0 gives 1 = e
0(0 + C)
= 1.C i.e. C = 1and y = ex(x+ 1) .
Return to Exercise 2Toc JJ II J I Back
Solutions to exercises 17
Exercise 3.
Equation is linear, 1st order i.e.dy
dx+ P (x)y = Q(x)
i.e. dydx +2xy = 10x, where P (x) =
2x , Q(x) = 10x
Integrating factor : IF = eRP (x)dx = e2
Rdxx = e2 ln x = eln x
2= x2 .
Multiply equation: x2dy
dx+ 2xy = 10x3
i.e.d
dx
x2 y = 10x3
Integrate: x2y =52x4 + C
i.e. y =52x2 +
C
x2
Toc JJ II J I Back
Solutions to exercises 18
Particular solution y(1) = 3 i.e. y(x) = 3 when x = 1.
i.e. 3 = 52 1 + C1i.e. 62 =
52 + C
i.e. C = 12
) y = 52x2 + 12x2 = 125x2 + 1x2
.
Return to Exercise 3
Toc JJ II J I Back
Solutions to exercises 19
Exercise 4.
Standard form:dy
dx1x
y = x
Compare withdy
dx+ P (x)y = Q(x) , giving P (x) = 1
x
Integrating Factor: IF = eRP (x)dx = e
Rdxx = e ln x = eln(x
1) =1x.
Multiply equation:1x
dy
dx 1
x2y = 1
i.e.d
dx
1xy
= 1
Integrate:1xy = x+ C
i.e. y = x2 + Cx .
Toc JJ II J I Back
Solutions to exercises 20
Particular solution with y(1) = 3:
3 = 1 + Ci.e. C = 2
Particular solution is y = x2 + 2x .
Return to Exercise 4
Toc JJ II J I Back
Solutions to exercises 21
Exercise 5.Linear in y : dydx 2xy = x3 sinxIntegrating factor: IF = e2
Rdxx = e2 ln x = eln x
2= 1x2
Multiply equation:1x2
dy
dx 2
x3y = x sinx
i.e.d
dx
1x2
y
= x sinx
Integrate:y
x2= x cosx
Z1 ( cosx)dx+C 0
[Note: integration by parts,Ru dvdxdx = uv
Rv dudxdx, u = x,
dvdx = sinx]
i.e.y
x2= x cosx+ sinx+ C
i.e. y = x3 cosx+ x2 sinx+ Cx2.Return to Exercise 5
Toc JJ II J I Back
Solutions to exercises 22
Exercise 6.
Standard form:dy
dx2x
y = x
Integrating Factor: P (x) = 2x
IF = eRPdx = e2
Rdxx = e2 ln x = eln x
2=
1x2
Multiply equation:1x2
dy
dx 2
x3y =
1x
i.e.d
dx
1x2
y
=
1x
Toc JJ II J I Back
Solutions to exercises 23
Integrate:1x2
y =Z
dx
x
i.e.1x2
y = ln x+ C
i.e. y = x2 ln x+ Cx2 .Return to Exercise 6
Toc JJ II J I Back
Solutions to exercises 24
Exercise 7.
Of the form:dy
dx+ P (x)y = Q(x) (i.e. linear, 1st order o.d.e.)
where P (x) = cotx.
Integrating factor : IF = eRP (x)dx = e
R cos xsin x dx
e
R f0(x)f(x) dx
= eln(sin x) = sinx
Multiply equation : sinx dydx + sinxcos xsin x
y = sin xsin x
i.e. sinx dydx + cosx y = 1
i.e. ddx [sinx y] = 1
Integrate: (sinx)y = x+ C . Return to Exercise 7
Toc JJ II J I Back
Solutions to exercises 25
Exercise 8.Integrating factor: P (x) = cotx =
cosxsinx
IF = eRPdx = e
R cos xsin x dx = eln(sin x) = sinx
Note:
cosxsinx
f0(x)f(x)
Multiply equation:
sinx dydx
+ sinx y cosxsinx
= sinx cosx
i.e.d
dx[sinx y] = sinx cosx
Integrate: y sinx =Z
sinx cosx dx
Toc JJ II J I Back
Solutions to exercises 26
{ Note:Z
sinx cosx dx Z
f(x)f 0(x)dx Z
fdf
dx dx
Z
fdf =12f2 + C }
i.e. y sinx = 12 sin2 x+ C
= 12 12 (1 cos 2x) + Ci.e. 4y sinx +cos 2x = C 0where C 0 = 4C + 1
= constant
.
Return to Exercise 8
Toc JJ II J I Back
Solutions to exercises 27
Exercise 9.
Standard form:dy
dx+
2xx2 1
y =
x
x2 1
Integrating factor: P (x) =2x
x2 1
IF = eRPdx = e
R 2xx21dx = eln(x
21)
= x2 1Multiply equation: (x2 1)dy
dx+ 2x y = x
(the original form of the equation was half-way there!)
i.e.d
dx
(x2 1)y = x
Integrate: (x2 1)y = 12x2 + C .
Return to Exercise 9
Toc JJ II J I Back
Solutions to exercises 28
Exercise 10.P (x) = tanxQ(x) = secx IF = e
R tan x dx = e R sin xcos xdx = e+ R sin xcos x dx= eln(cos x) = cosx
Multiply by IF: cosx dydx cosx sin xcos xy = cosx secx
i.e. ddx [cosx y] = 1 i.e. y cosx = x+ C .
y(0) = 1 i.e. y = 1 when x = 0 gives
cos(0) = 0 + C ) C = 1
i.e. y cosx = x+ 1 .Return to Exercise 10
Toc JJ II J I Back
Table of contents1 Theory2 Exercises3 Answers4 Standard integrals5 Tips on using solutions6 Alternative notation Full worked solutions