Integrating Factor Method 
PPLATO @  
PPLATO / Tutorials / Differential equations 


Consider an ordinary differential equation (o.d.e.) that we wish to solve to find out how the variable y depends on the variable x.
If the equation is first order then the highest derivative involved is a first derivative.
If it is also a linear equation then this means that each term can involve y either as the derivative dydx OR through a single factor of y.
Any such linear first order o.d.e. can be rearranged to give the following standard form:
dydx + P(x) y = Q(x) 
 where P(x) and Q(x) are functions of x, and in some cases may be constants.
A linear first order o.d.e. can be solved using the integrating factor method.
After writing the equation in standard form, P(x) can be identified. One then multiplies the equation by the following 'integrating factor':
This factor is defined so that the equation becomes equivalent to:
Integrating both sides with respect to x gives:
Finally, division by the integrating factor (IF) gives y explicitly in terms of x, i.e. gives the solution to the equation.
In each case, derive the general solution. When a boundary condition is also given, derive the particular solution.
Click on questions to reveal their solutions
Exercise 1:
dydx + y = x ; y(0) = 2
Solution:
Compare with the form: dydx + P(x) y = Q(x) ⇒ P(x) = 1.
Integrating factor:  IF  =  e^{∫P(x) dx} = e^{∫dx} = e^{x}  
Multiply equation by IF:  e^{x} dydx + e^{x}y  =  e^{x}x  
i.e.  d dx [ e^{x}y]  =  e^{x}x  
Integrate both sides with respect to x:  e^{x}y  =  e^{x}(x − 1) + C  
{ Note: integrate by parts, i.e.: 
∫u
dvdx dx
= uv −
dudx dx
withu ≡ x and
dvdx ≡ e^{x} 

→  xe^{x} − ∫e^{x}dx  
→  xe^{x} − e^{x} = e^{x}(x  1) }  
i.e.  y  =  (x − 1) + Ce^{−x} 
Particular solution with y(0) = 2:
2  =  (0 − 1) + Ce^{0}  
=  −1 + C  
i.e.  C  =  3 
∴  y  =  (x − 1) + 3 e^{−x}_{ } 
Exercise 2:
Solution:
P(x) = 1.
Integrating factor:  IF  =  e^{∫P(x) dx} = e^{∫dx} = e^{x}  
Multiply equation by IF:  e^{x} dydx + e^{x}y  =  e^{x} e^{−x}  
i.e.  ddx [ e^{x}y]  =  1  
Integrate:  e^{x}y  =  x + C  
i.e.  y  =  e^{−x} (x + C) 
Particular solution with x = 0, y = 1:
1  =  e^{0} (0 + C)_{ }  
=  1⋅C  
i.e.  C  =  1 
∴  y  =  e^{−x} (x + 1)_{ } 
Exercise 3:
Solution:
Equation is linear, 1st order, i.e. dydx + P(x) y = Q(x) ⇒ dydx + 2xy = 10x, so: P(x) = 2x, Q(x) = 10
Integrating factor:  IF  =  e^{∫P(x) dx} = e^{2∫ dx/x} = e^{2 ln x} = e^{ ln x2} = x^{2}  
Multiply equation by IF:  x^{2}dydx + 2xy  =  10x^{3}  
i.e.  ddx [ x^{2}⋅y]  =  10x^{3}  
Integrate:  x^{2}y  =  52x^{4} + C  
i.e.  y  =  52x^{2} + Cx^{2} 
Particular solution: y(1) = 3, i.e. y(x) = 3 when x = 1:
i.e.  3  =  52⋅1 + 12 
i.e.  62  =  52 + C 
i.e.  C  =  12 
∴  y  =  52x^{2} + 12x^{2} = 12 (5x^{2} + 1x^{2}) 
Exercise 4:
Solution:
Put the equation into standard form: dydx − ( 1x) y = x
Compare with: dydx + P(x) y = Q(x) ⇒ P(x) = − 1x
Integrating factor:  IF  =  e^{∫P(x) dx} = e^{− ∫ dx/x} = e^{− ln x} = e^{ ln (x−1)} = 1x  
Multiply equation by IF:  1x dydx − 1x^{2} y  =  1  
i.e.  ddx [ 1xy]  =  1  
Integrate:  1xy  =  x + C  
i.e.  y  =  x^{2} + Cx 
Particular solution with y(1) = 3:
i.e.  3  =  1 + C 
i.e.  C  =  2 
∴  y  =  x^{2} + 2x) 
Exercise 5:
Solution:
Make equation linear in y: dydx − 2xy = x^{3} sin x ⇒ P(x) = − 2x .
Integrating factor:  IF  =  e^{∫P(x) dx} = e^{−2∫dx/x} = e^{−2 ln x} = e^{ ln (x−2)} = 1x^{2}  
Multiply equation by IF:  1x^{2} dydx − 2x^{3} y  =  x sin x  
i.e.  d dx [ 1x^{2}y ]  =  x sin x  
Integrate:  yx^{2}  =  −x cos x − ∫1⋅(− cos x) dx + C'  
{ Note: integrate by parts, i.e.:  ∫u dvdx dx = uv − dudx dx withu ≡ x and dvdx ≡ sin x}  
i.e.  yx^{2}  =  −x cos x + sin x + C  
i.e.  y  =  x^{3} cos x + x^{2} sin x + Cx^{2} 
Exercise 6:
Solution:
Standard form: dydx − (2x)y = x ⇒ P(x) = − 2x .
Integrating factor:  IF  =  e^{∫P(x) dx} = e^{−2 ∫ dx/x} = e^{−2 ln x} = e^{ ln (x−2)} = 1x^{2}  
Multiply equation by IF:  1x^{2} dydx − 2x^{3} y  =  1x  
i.e.  d dx [ 1x^{2}y ]  =  1x  
Integrate:  1x^{2}y  =  ∫ dxx  
i.e.  1x^{2}y  =  ln x + C  
i.e.  y  =  x^{2} ln x + Cx^{2}_{ } 
Exercise 7:
Solution:
The equation is already in standard form: dydx + P(x)y = Q(x), i.e. linear 1st order o.d.e. , so P(x) = cot x
Integrating factor:  IF  =  e^{∫P(x) dx} = e^{∫ cos x/sin x dx} ≡ e^{∫ ƒ′(x)/ƒ(x) dx} = e^{ln (sin x)} = sin x  
Multiply equation:  sin x⋅dydx + sin x (cos xsin x) y  =  sin xsin x  
i.e.  sin x⋅dydx + cos x⋅y  =  1  
i.e.  ddx [ sin x⋅y ]  =  1  
Integrate:  sin x⋅y  =  x + C 
Exercise 8:
Solution:
P(x) = cot x = cos xsin x
Integrating factor:  IF  =  e^{∫P(x) dx} = e^{∫ cos x/sin x dx} ≡ e^{∫ ƒ′(x)/ƒ(x) dx} = e^{ln (sin x)} = sin x  
Multiply equation:  sin x⋅dydx + sin x (cos xsin x) y  =  sin x⋅cos x  
i.e.  ddx [ sin x⋅y ]  =  sin x⋅cos x  
Integrate:  y sin x  =  ∫sin x⋅cos x  
{ Note: ∫sin x cos x ≡ ∫ƒ(x) ƒ′(x) dx ≡ ∫ƒ(x) dƒdx⋅dx ≡ ∫ƒ dƒ = 12ƒ^{2} + C}  
i.e.  y sin x  =  12 sin^{2} x + C  
=  12⋅ 12 (1 − cos 2x) + C  
i.e.  4y sin x + cos 2x  =  C' = 4C + 1 
Exercise 9:
Solution:
Standard form: dydx + (2xx^{2} − 1)y = xx^{2} − 1 ⇒ P(x) = 2xx^{2} − 1
Integrating factor:  IF  =  e^{∫P(x) dx} = e^{∫2x/x2 − 1 dx} = e^{ln x2 − 1} = x^{2} − 1  
Multiply equation by IF:  (x^{2} − 1) dydx + 2xy  =  x  
i.e.  ddx [ (x^{2} − 1)y ]  =  x  
Integrate:  (x^{2} − 1)y  =  12x^{2} + C 
Exercise 10:
Solution:
P(x) = − tan x and Q(x) = − sec x
Integrating factor IF = e^{−∫tan x dx} = e^{−∫ sin x/cos x dx} = e^{+∫ − sin x/cos x dx} = e^{ln (cos x)} = cos x
Multiply equation by IF:  cos x dydx − cos x⋅ sin xcos xy  =  − cos x⋅sec x  
i.e.  ddx [ cos x⋅y ]  =  −1  
Integrate:  y cos x  =  −x + C 
Particular solution with y(0) = 1, i.e. y = 1 when x = 0:
cos 0  =  0 + C  
∴  C  =  1 
i.e.  y cos x  =  −x + 1 
ƒ(x)  ∫ƒ(x) dx  ƒ(x)  ∫ƒ(x) dx  

x^{n}  x^{n+1} n+1 (n ≠ −1)  [g(x)]^{n} g'(x)  [g(x)]^{n+1} n+1 (n ≠ −1)  
1x ^{}  ln x  g'(x)g(x)  ln g(x)  
e^{x}  e^{x}  a^{x}  a^{x}ln a (a > 0)  
sin x  −cos x  sinh x  cosh x  
cos x  sin x  cosh x  sinh x  
tan x  − ln cosx  tanh x  ln cosh x  
cosec x  ln tan x2  cosech x  ln tanh x2  
sec x  ln sec x + tan x  sec x  2 tan^{−1}e^{x}  
sec^{2} x  tan x  sec^{2} x  tanh x  
cot x  ln sin x  cot x  ln sinh x  
sin^{2} x  x2 − sin 2x4  sinh^{2} x  sinh 2x4 − x2  
cos^{2} x  x2 + sin 2x4  cosh^{2} x  sinh 2x4 + x2  
1a^{2} + x^{2}  1a tan ^{−1} xa (a > 0)  √a^{2} + x^{2}  a^{2}2 [ sinh^{−1}( xa ) + x √a^{2}−x^{2} a^{2} ]  
1a^{2} − x^{2}  12a ln a + xa − x (0 < x < a)  √a^{2}−x^{2}  a^{2}2 [ sin^{−1}( xa ) + x √a^{2}−x^{2} a^{2} ]  
1x^{2} − a^{2}  12a ln x − ax + a (x > a > 0)  √x^{2} − a^{2}  a^{2}2 [−cosh^{−1}( xa ) + x √x^{2}−a^{2} a^{2} ]  
1 √ a^{2} + x^{2}  ln x + √a^{2} + x^{2} a (a > 0)  
1 √ a^{2} − x^{2}  sin^{−1} xa (−a < x < a)  1 √ x^{2} − a^{2}  ln x + √x^{2} − a^{2} a (x > a > 0) 
The linear first order differential equation:
has the integrating factor IF = e^{∫P(x) dx}.
The integrating factor method is sometimes explained in terms of simpler forms of differential equation. For example, when constant coefficients a and b are involved, the equation may be written as:
In our standard form this is:
 with an integrating factor of: