Skip to content

Integrating Factor


Method

Consider the linear first-order differential equation

x′(t)+p(t) x(t)=q(t),t∈I,x'(t)+p(t)\,x(t)=q(t),\qquad t\in I,

with p,qp,q continuous on an interval II and x′(t)=dxdt(t)x'(t)=\dfrac{\mathrm{d}x}{\mathrm{d}t}(t).

  1. Choose an antiderivative PP of pp and set μ(t)=eP(t)\mu(t)=\mathrm{e}^{P(t)}, the integrating factor.
  2. Multiply the equation by μ(t)\mu(t). Since μ′(t)=p(t)μ(t)\mu'(t)=p(t)\mu(t), the left-hand side becomes an exact derivative: μx′+μpx=(μx)′\mu x'+\mu p x=(\mu x)'.
  3. Integrate (μx)′=μq(\mu x)'=\mu q:  μ(t)x(t)=∫μ(t)q(t) dt+C\ \mu(t)x(t)=\int\mu(t)q(t)\,\mathrm{d}t+C.
  4. Divide by μ(t)>0\mu(t)>0:  x(t)=e−P(t)(∫eP(t)q(t) dt+C)\ x(t)=\mathrm{e}^{-P(t)}\Big(\int \mathrm{e}^{P(t)}q(t)\,\mathrm{d}t+C\Big), and fix CC from an initial condition.

With x(t0)=x0x(t_0)=x_0 and P(t0)=0P(t_0)=0 this gives the closed form

x(t)=e−P(t)x0+∫t0te−(P(t)−P(s)) q(s) ds.x(t)=\mathrm{e}^{-P(t)}x_0 +\int_{t_0}^{t}\mathrm{e}^{-(P(t)-P(s))}\,q(s)\,\mathrm{d}s.

Interpretation

The left-hand side x′+pxx'+px is not a derivative of anything simple; multiplying by μ\mu turns it into the derivative of the product μx\mu x. Step 2 uses the product rule from differentiation rules and the chain rule for ddteP(t)=P′(t)eP(t)\frac{\mathrm{d}}{\mathrm{d}t}\mathrm{e}^{P(t)}=P'(t)\mathrm{e}^{P(t)}.

The two terms of the closed form have a meaning: e−P(t)x0\mathrm{e}^{-P(t)}x_0 solves the homogeneous equation x′+px=0x'+px=0, and the integral is a particular solution that starts at 00, so the solution is homogeneous part plus particular part, as in the general solution of a linear ODE. For constant p=−ap=-a the formula reads x(t)=ea(t−t0)x0+∫t0tea(t−s)q(s) dsx(t)=\mathrm{e}^{a(t-t_0)}x_0+\int_{t_0}^t \mathrm{e}^{a(t-s)}q(s)\,\mathrm{d}s, the scalar form of the variation-of-constants formula that returns in Week 4 with the matrix exponential.

Common slips: forgetting to write the equation with coefficient 11 in front of x′x' before reading off pp; using e−P\mathrm{e}^{-P} instead of eP\mathrm{e}^{P}; adding the constant CC after dividing by μ\mu instead of before.


Key Results

  • μ(t)=eP(t)\mu(t)=\mathrm{e}^{P(t)} is never zero, so multiplying by it neither loses nor creates solutions.
  • Any antiderivative of pp can be used: replacing PP by P+kP+k multiplies μ\mu by ek\mathrm{e}^{k}, which cancels.
  • If p,qp,q are continuous on II, the method yields the unique solution of each initial value problem on all of II.
  • For constant p≠0p\neq0 and constant qq the solution tends to q/pq/p when p>0p>0; this limit is the equilibrium.

Examples

Constant coefficients. x′+2x=1x'+2x=1, x(0)=0x(0)=0. Take μ=e2t\mu=\mathrm{e}^{2t}: (e2tx)′=e2t(\mathrm{e}^{2t}x)'=\mathrm{e}^{2t}, so e2tx=12e2t+C\mathrm{e}^{2t}x=\tfrac{1}{2}\mathrm{e}^{2t}+C and x=12+Ce−2tx=\tfrac{1}{2}+C\mathrm{e}^{-2t}. From x(0)=0x(0)=0, C=−12C=-\tfrac{1}{2}: x(t)=12(1−e−2t)x(t)=\tfrac{1}{2}(1-\mathrm{e}^{-2t}).

Solution curves x = 1/2 + Ce^(-2t) of x' + 2x = 1 for C = 1, -1/2 and -1, all approaching the dashed line x = 1/2, with the solution through x(0) = 0 highlighted.

The figure plots the general solution x=12+Ce−2tx=\tfrac{1}{2}+C\mathrm{e}^{-2t} for C=1C=1, C=−12C=-\tfrac{1}{2} and C=−1C=-1. The constant CC only shifts the decaying homogeneous part Ce−2tC\mathrm{e}^{-2t}, so every curve approaches the equilibrium x=12=q/px=\tfrac{1}{2}=q/p; the initial condition x(0)=0x(0)=0 picks out the highlighted curve with C=−12C=-\tfrac{1}{2}.

Move x(0)x(0) to change the constant CC in x=q/p+Ce−ptx=q/p+C\mathrm{e}^{-pt}: for p>0p>0 every solution approaches the dashed level q/pq/p. Then change pp and qq.

Variable coefficient. x′+1tx=tx'+\frac{1}{t} x=t on t>0t>0. Here P(t)=ln⁡tP(t)=\ln t and μ=t\mu=t: (tx)′=t2(tx)'=t^2, so tx=t33+Ctx=\tfrac{t^3}{3}+C and x(t)=t23+Ctx(t)=\tfrac{t^2}{3}+\tfrac{C}{t}. Check: x′+xt=2t3−Ct2+t3+Ct2=tx'+\frac{x}{t}=\tfrac{2t}{3}-\tfrac{C}{t^2}+\tfrac{t}{3}+\tfrac{C}{t^2}=t.

With integration by parts. x′−x=tx'-x=t. Here μ=e−t\mu=\mathrm{e}^{-t} and (e−tx)′=te−t(\mathrm{e}^{-t}x)'=t\mathrm{e}^{-t}. Integration by parts gives ∫te−t dt=−te−t−e−t+C\int t\mathrm{e}^{-t}\,\mathrm{d}t=-t\mathrm{e}^{-t}-\mathrm{e}^{-t}+C, so x(t)=−t−1+Cetx(t)=-t-1+C\mathrm{e}^{t}. Check: x′=−1+Cetx'=-1+C\mathrm{e}^t and x+t=−1+Cetx+t=-1+C\mathrm{e}^t.


Prerequisites



Sources

Aliases: integrating factor method, method of integrating factors Keywords: mu(t)=e^{P(t)}, x'+p(t)x=q(t), linear first-order equation, variation of constants, product rule Symbols: element of, integral, mu

Last updated: 22 October 2026 19:04