First Order Linear: Integrating Factor Explained with Worked Examples

To solve , multiply by the integrating factor . The left side becomes , so .

Write 2x or 2*x to multiply, ^ for powers, and ; between simultaneous equations. You can also type factor, expand, derivative of, integrate … from a to b, limit … as x->0 or 15% of 80.

Try an example

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 , using the product rule. Then the equation becomes , which is solved by integration. The integral of comes from the integral of 1 over x and the integral of e to the power kx.

For : , so , , and . The constant is fixed by an initial condition. If then and .

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.

How to use first order linear: integrating factor

  1. Write the equation as .
  2. Compute .
  3. Integrate and divide by .
  4. Use the initial condition to find the constant.

Graph

The solution of y' + 2y = e⁻ˣ with y(0) = 3start y(0) = 3y(1) = 0.638600.511.522.5300.511.522.53The solution of y' + 2y = e⁻ˣ with y(0) = 3xyy = 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 with , and find .

Worked example
Answer
y(1)=e−1+2e−2≈0.6386y(1)=e^{-1}+2e^{-2}\approx0.6386
  1. μ = e^{2x}
  2. General solution
  3. y(0) = 3 gives C = 2

Example 2: with a 1/x term

Solve with , and find .

Worked example
Answer
y(2)=43+56=136y(2)=\tfrac43+\tfrac56=\tfrac{13}{6}
  1. Divide by x
  2. (xy)' = x²
  3. y(1) = 2 gives C = 5/3

Example 3: a linear forcing

Solve with , and find .

Worked example
Answer
y(1)=e−2≈0.7183y(1)=e-2\approx0.7183
  1. μ = e^{−x}
  2. Integrate by parts
  3. y(0) = 0 gives C = 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.

  1. e²
  2. Check: ✓7.3891

Constant

y′ + y = x, y(0) = 2: y = x − 1 + Ce⁻ˣ gives C.

  1. 2 = −1 + C
  2. Check: ✓3

Value Higher

y(1) = 0 + 3e⁻¹.

  1. 3 × 0.3679
  2. Check: ✓1.1036

Second equation Higher

y′ + 2y = 4, y(0) = 0: y(1) = 2 − 2e⁻².

  1. 2 − 0.2707
  2. 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

  1. y′ + Py = Q.
  2. μ = e^{∫P}.
  3. (μy)′ = μQ.
  4. Add C.
  5. 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.

Solve: …

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.

More in Differential equations and transforms and the formula sheets.