d x d y + P ( x ) y = Q ( x ) ⇒ μ = e ∫ P d x , μ y = ∫ μ Q d x
On this page
Before you start
This page is easier if you are comfortable with:
What First order linear: integrating factor means
The integrating factor is chosen so that d x d ( μ y ) = μ y ′ + μ ′ y = μ ( y ′ + P y ) , using the product rule . Then the equation becomes d x d ( μ y ) = μ Q , which is solved by integration . The integral of P comes from the integral of 1 over x and the integral of e to the power kx .
For y ′ + 2 y = e − x : μ = e 2 x , so ( e 2 x y ) ′ = e x , e 2 x y = e x + C , and y = e − x + C e − 2 x . The constant C is fixed by an initial condition. If y ( 0 ) = 3 then C = 2 and y ( 1 ) = e − 1 + 2 e − 2 ≈ 0.6386 .
The method handles models such as cooling and mixing, related to growth and decay models . If the equation is separable, use separation of variables instead; for non-exact equations see integrating factors for non-exact equations . Second-order equations are in the auxiliary equation .
What is it used for? The integrating factor turns a first-order linear equation into one that can be integrated directly.
Cooling and heating models. Mixing problems and electrical circuits. Any equation of the form y' + P y = Q.
How to use first order linear: integrating factor
Write the equation as y ′ + P ( x ) y = Q ( x ) . Compute μ = e ∫ P d x . Integrate ∫ μ Q d x and divide by μ . Use the initial condition to find the constant.
Graph The solution of y' + 2y = e⁻ˣ with y(0) = 3 start y(0) = 3 y(1) = 0.6386 0 0.5 1 1.5 2 2.5 3 0 0.5 1 1.5 2 2.5 3 The solution of y' + 2y = e⁻ˣ with y(0) = 3 x y y = e^(−x) + 2e^(−2x) Graph with x from 0 to 3 and y from 0 to 3.2. Shows the curve y = e^(−x) + 2e^(−2x); point start y(0) = 3 at (0, 3); point y(1) = 0.6386 at (1, 0.6386). The solution decays towards zero from its starting value.
Worked examples
These examples are worked by hand, step by step, so you can compare your own working.
Example 1: an exponential forcing Solve y ′ + 2 y = e − x with y ( 0 ) = 3 , and find y ( 1 ) .
Worked example
Answer
y ( 1 ) = e − 1 + 2 e − 2 ≈ 0.6386 y(1)=e^{-1}+2e^{-2}\approx0.6386 y ( 1 ) = e − 1 + 2 e − 2 ≈ 0.6386 μ = e^{2x}
( e 2 x y ) ′ = e x
General solution
y = e − x + C e − 2 x
y(0) = 3 gives C = 2
y = e − x + 2 e − 2 x
Example 2: with a 1/x term Solve x y ′ + y = x 2 with y ( 1 ) = 2 , and find y ( 2 ) .
Worked example
Answer
y ( 2 ) = 4 3 + 5 6 = 13 6 y(2)=\tfrac43+\tfrac56=\tfrac{13}{6} y ( 2 ) = 3 4 + 6 5 = 6 13 Divide by x
y ′ + x 1 y = x , μ = x
(xy)' = x²
x y = 3 x 3 + C
y(1) = 2 gives C = 5/3
y = 3 x 2 + 3 x 5
Example 3: a linear forcing Solve y ′ − y = x with y ( 0 ) = 0 , and find y ( 1 ) .
Worked example
Answer
y ( 1 ) = e − 2 ≈ 0.7183 y(1)=e-2\approx0.7183 y ( 1 ) = e − 2 ≈ 0.7183 μ = e^{−x}
( e − x y ) ′ = x e − x
Integrate by parts
e − x y = − ( x + 1 ) e − x + C
y(0) = 0 gives C = 1
y = e x − x − 1
Special cases
A few situations come up again and again. Knowing them saves time and helps you spot answers that cannot be right.
y′ + y = x, y(0) = 2 IF = eˣ, y = x − 1 + 3e⁻ˣ
y(1) = 3e⁻¹.
y′ + 2y = 4, y(0) = 0 y = 2 − 2e⁻²ˣ
y(1) = 1.7293.
IF for y′ + 2y e^{2x}
At x = 1: 7.3891.
Constant C y(0) = 2: 0 − 1 + C
3.
Word problems
For y′ + P y = Q multiply by μ = e^{∫P dx}; then (μy)′ = μQ and y = (1/μ)∫μQ dx.
Integrating factor P = 2: μ = e^{2x} at x = 1.
e² Check: ✓ 7.3891
Constant y′ + y = x, y(0) = 2: y = x − 1 + Ce⁻ˣ gives C.
2 = −1 + C Check: ✓ 3
Value Higher y(1) = 0 + 3e⁻¹.
3 × 0.3679 Check: ✓ 1.1036
Second equation Higher y′ + 2y = 4, y(0) = 0: y(1) = 2 − 2e⁻².
2 − 0.2707 Check: ✓ 1.7293
Common mistakes
μ = ∫P missing exponential ✗
e^{∫P} ✓
Exponentiate.
Forgetting C no constant ✗
add C ✓
Use y(0).
Not in standard form coefficient of y′ ≠ 1 ✗
divide first ✓
Normalise.
Sign of P wrong exponent ✗
e^{+∫P} ✓
Check.
Exam tips
y′ + Py = Q.
μ = e^{∫P}.
(μy)′ = μQ.
Add C.
Use the initial value.
Practice questions
Try each one on paper, then open the answer. Use the solver above to see the full working.
1. IF for P = 3 at x = 1 to 4 d.p. Foundation 20.0855
2. y(1) for y′ + y = 1, y(0) = 0 to 4 d.p. Foundation 0.6321
3. y(2) for y′ + 2y = 2, y(0) = 0 to 4 d.p. Foundation 0.9817
4. Steady state of y′ + 3y = 6 Higher 2
5. y(1) for y′ + y = 2, y(0) = 5 to 4 d.p. Higher 3.1036
6. IF for P = 1/x at x = 5 (μ = x) Higher 5
Practice generator Unlimited fresh questions with instant marking. Choose a level, work it out on paper, then type your answer.
Foundation Higher Mixed New question
Solve: …
The practice generator needs JavaScript.
Key terms
Integrating factor (μ) e^{∫P dx}. Standard form y′ + Py = Q. General solution With C. Particular solution Fitted to data. Steady state Limit as x → ∞. Transient Decaying part.
Frequently asked questions
How do I solve y′ + Py = Q? Multiply by μ = e^{∫P dx} and integrate.
Why does it work? The left side becomes (μy)′.
What is μ for P = 2? e^{2x}.
Do I need the initial value? To fix C.
Which page covers second-order equations? second-order constant coefficients.
Which page covers Newton–Raphson? Newton–Raphson.