← MATH 347 MathScape 0 MATH347

Integrating Factor Method

2 min read

Jump to a section
Reference: Stewart §9.5

Textbook Reference

Primary source OpenStax Calculus Volume 2, Section 4.5: “First-Order Linear Equations”
Direct link https://openstax.org/books/calculus-volume-2/pages/4-5-first-order-linear-equations
Textbook used in class Stewart, Calculus, Section 9.5: “Linear Equations” (Examples 1-4)

Quick Reference

Procedure for $y' + P(x)y = Q(x)$:

  1. Compute the integrating factor $\mu(x) = e^{\int P(x)\,dx}$ (no constant needed).
  2. Multiply both sides by $\mu$: the left side becomes $(\mu y)'$.
  3. Integrate: $\mu y = \int \mu(x)\,Q(x)\,dx + C$.
  4. Solve for $y$: $y = \dfrac{1}{\mu(x)}\left[\int\mu(x)\,Q(x)\,dx + C\right]$.

Motivation

The key idea is to find a multiplier $\mu(x)$ that turns the left side $\mu(y' + Py)$ into an exact derivative $(\mu y)'$. Once the left side is a derivative, you can integrate both sides directly -- no further tricks needed.

The product rule says $(\mu y)' = \mu' y + \mu y'$. Comparing with $\mu(y' + Py) = \mu y' + \mu Py$, you need $\mu' = \mu P$, which is a separable equation for $\mu$: its solution is $\mu = e^{\int P\,dx}$. The integrating factor is built precisely to make the left side “click” into a product rule.


Key Concept: Why the Left Side Becomes a Derivative

After multiplying by $\mu = e^{\int P\,dx}$, the left side satisfies: $$\mu(y' + Py) = \mu y' + \mu P y = (\mu y)',$$ because $\frac{d}{dx}(\mu y) = \mu' y + \mu y' = \mu P y + \mu y'$ (using $\mu' = \mu P$).

So the equation $y' + Py = Q$ becomes: $$(\mu y)' = \mu Q.$$

Both sides are now explicit functions of $x$. Integrating gives $\mu y = \int \mu Q\,dx + C$, and dividing by $\mu$ gives the general solution.


Worked Example

Solve $y' + 2xy = x$.

Step 1: Integrating factor. $P(x) = 2x$, so $\int P\,dx = x^2$ and $\mu = e^{x^2}$.

Step 2: Multiply both sides by $\mu$. $$(e^{x^2}\,y)' = x\,e^{x^2}.$$

Step 3: Integrate the right side. Let $u = x^2$, $du = 2x\,dx$: $$\int x\,e^{x^2}\,dx = \frac{1}{2}e^{x^2} + C.$$

So $e^{x^2}\,y = \dfrac{1}{2}e^{x^2} + C$.

Step 4: Solve for $y$. $$y = \frac{1}{2} + Ce^{-x^2}.$$

Check: $y' = -2Cxe^{-x^2}$. Then $y' + 2xy = -2Cxe^{-x^2} + 2x(\frac{1}{2} + Ce^{-x^2}) = -2Cxe^{-x^2} + x + 2Cxe^{-x^2} = x$. Check.

Mixing application: A 100-liter tank holds pure water. Brine at 0.1 kg/L flows in at 5 L/min, and well-mixed brine flows out at 5 L/min. Find the amount of salt $Q(t)$ at time $t$.

Rate in: $0.1 \times 5 = 0.5$ kg/min. Rate out: $(Q/100)\times 5 = Q/20$ kg/min.

DE: $Q' = 0.5 - Q/20$, or $Q' + Q/20 = 0.5$.

$\mu = e^{t/20}$. $(e^{t/20}Q)' = 0.5e^{t/20}$. Integrate: $e^{t/20}Q = 10e^{t/20} + C$. So $Q = 10 + Ce^{-t/20}$.

With $Q(0) = 0$: $C = -10$. Thus $Q(t) = 10(1 - e^{-t/20})$.

As $t \to \infty$, $Q \to 10$ kg (steady state: 0.1 kg/L $\times$ 100 L).


Common misconception

the integrating factor must be computed with a constant of integration. When computing $\mu = e^{\int P\,dx}$, you omit the constant of integration. Any choice of constant produces $\mu = K e^{\int P\,dx}$; multiplying through by $K$ is harmless (it cancels in $(\mu y)'/\mu$), so choosing $K = 1$ (no constant) gives the simplest $\mu$ and produces the same general solution. Adding a constant in this step is unnecessary and makes the algebra harder.


Leveled Practice

Problem 1. Solve $y' - y = e^{2x}$.

Show answer

$P = -1$, $\mu = e^{-x}$.

$(e^{-x}y)' = e^{2x}\cdot e^{-x} = e^x$.

$e^{-x}y = e^x + C$.

$y = e^{2x} + Ce^x$.

Check: $y' = 2e^{2x} + Ce^x$. $y' - y = 2e^{2x}+Ce^x - e^{2x} - Ce^x = e^{2x}$. Check.


Mastery Checklist


Next: Lotka-Volterra Equations