Method of integrating factor (HL)

This solves first order linear differential equations, which look like

dydx+P(x)y=Q(x)\frac{\d y}{\d x} + P(x)y = Q(x)

You may need to do one or two steps of algebra before seeing the differential equation in this form.

Contents

Theory

The integrating factor is

eP(x)dx\e^{\int P(x)\d x}

which is multiplied to both sides of the first order linear differential equation.

This is one of the few cases when the +C+C does not matter, as it would results multiplying both sides by eC\e^C, which does not affect the calculus.

eP(x)dx(dydx+P(x)y)=Q(x)eP(x)dx\e^{\int P(x)\d x}\left(\frac{\d y}{\d x} + P(x)y\right) = Q(x)\e^{\int P(x)\d x}

Comparing the left side to product rule, it is very conveniently

ddx(yeP(x)dx)=Q(x)eP(x)dx\frac{\d }{\d x}\left(y\e^{\int P(x)\d x}\right) = Q(x)\e^{\int P(x)\d x}

This can be solved with integrating both sides then divide by the integrating factor.

Yes, you may have noticed that this requires two steps of integration, once for the integrating factor, and once to solve the differential equation.

Practice

Example: (May 2018 HL Paper 3 Calculus #5) Consider the differential equation

xdydxy=xp+1x\frac{\d y}{\d x} - y = x^p + 1

where xR,x0x\in\mathbb R, x\neq0 and pp is a positive integer, p>1p>1. Given y=1y = -1 when x=1x = 1, solve for yy as a function of xx.


We first need to get it in the desired form

dydx+y1x=xp1+1x\begin{align*}\frac{\d y}{\d x} + y\frac {-1}{x} =x^{p-1} + \frac1x\end{align*}

The integrating factor is e1xdx\e^{\int \frac{-1}{x} \d x}

The purpose of 1xdx=lnx+C\int \frac1x \d x = \ln \lvert x\rvert + C is to keep the domain to all x0x \neq 0. Integrating factor is we multiply by it then divide by it later, so it does not change the domain and we do not need the absolute values.

So the integrating factor is elnx=x1\e^{-\ln x} = x^{-1}

ddx(yx1)=x1(xp1+1x)ddx(yx1)=xp2+1x2yx1=1p1xp11x+Cy=1p1xp1+Cx\begin{align*}\frac{\d }{\d x}(yx^{-1}) &= x^{-1}\left(x^{p-1} + \frac{1}{x}\right) \\ \frac{\d }{\d x}(yx^{-1}) &= x^{p-2} + \frac{1}{x^2} \\ yx^{-1} &= \frac{1}{p-1}x^{p - 1} - \frac1x + C \\ y &= \frac{1}{p-1}x^p - 1 + Cx \end{align*}

Then substitute in (1,1)(1, -1) to solve for CC

1=1p1(1)p1+C(1)1+1=1p1+C1p1=C\begin{align*}-1 &= \frac{1}{p-1}(1)^{p} - 1 + C(1) \\ -1 + 1 &= \frac{1}{p-1} + C \\ -\frac{1}{p-1} &= C \end{align*}

Putting everything together

y=xpp11xp1y = \frac{x^p}{p-1} - 1 - \frac{x}{p - 1} \qed

Déja vu? Yes, this question can also be solved with the y=vxy = vx substitution.

Tips

The integrating factor may occasionally require integrating by parts and other integration techniques to simplify.