### 7 Finding the integrating factor for linear ODEs

The differential equation governing the current $i$ in a circuit with inductance $L$ and resistance $R$ in series subject to a constant applied electromotive force $Ecos\omega t$ , where $E$ and $\omega$ are constants, is

$\phantom{\rule{2em}{0ex}}L\phantom{\rule{1em}{0ex}}\frac{di}{dt}+Ri=Ecos\omega t$ (1)

This is an example of a linear differential equation in which $i$ is the dependent variable and $t$ is the independent variable. The general standard form of a linear first order differential equation is normally written with ‘ $y$ ’ as the dependent variable and with ‘ $x$ ’ as the independent variable and arranged so that the coefficient of $\frac{dy}{dx}$ is 1. That is, it takes the form:

$\phantom{\rule{2em}{0ex}}\frac{dy}{dx}+f\left(x\right)\phantom{\rule{1em}{0ex}}y=g\left(x\right)$ (2)

in which $f\left(x\right)$ and $g\left(x\right)$ are functions of $x$ .

Comparing (1) and (2), $x$ is replaced by $t$ and $y$ by $i$ to produce $\frac{di}{dt}+f\left(t\right)\phantom{\rule{1em}{0ex}}i=g\left(t\right)$ . The function $f\left(t\right)$ is the coefficient of the dependent variable in the differential equation. We shall describe the method of finding the integrating factor for (1) and then generalise it to a linear differential equation written in standard form.

Step 1 Write the differential equation in standard form i.e. with the coefficient of the derivative equal to 1. Here we need to divide through by $L$ :

$\phantom{\rule{2em}{0ex}}\frac{di}{dt}+\frac{R}{L}i=\frac{E}{L}cos\omega t.$

Step 2 Integrate the coefficient of the dependent variable (that is, $f\left(t\right)=R∕L$ ) with respect to the independent variable (that is, $t$ ), and ignoring the constant of integration

$\phantom{\rule{2em}{0ex}}\int \frac{R}{L}\phantom{\rule{1em}{0ex}}dt=\frac{R}{L}\phantom{\rule{1em}{0ex}}t.$

Step 3 Take the exponential of the function obtained in Step 2.

This is the integrating factor (I.F.)

$\phantom{\rule{2em}{0ex}}\text{I.F.}={\text{e}}^{Rt∕L}.$

This leads to the following Key Point on integrating factors:

##### Key Point 4

The linear differential equation (written in standard form):

Find the integrating factors for the equations

1. $x\phantom{\rule{1em}{0ex}}\frac{dy}{dx}+2x\phantom{\rule{1em}{0ex}}y=x{\text{e}}^{-2x}$
2. $t\phantom{\rule{1em}{0ex}}\frac{di}{dt}+2t\phantom{\rule{0.3em}{0ex}}i=t{\text{e}}^{-2t}$
3. $\frac{dy}{dx}-\left(tanx\right)y=1.$
1. Step 1 Divide by $x$ to obtain $\frac{dy}{dx}+2y={\text{e}}^{-2x}$

Step 2 The coefficient of the independent variable is 2 hence $\int 2\phantom{\rule{1em}{0ex}}dx=2x$

Step 3 $\text{I.F.}={\text{e}}^{2x}$

2. The only difference from (1) is that $i$ replaces $y$ and $t$ replaces $x$ . Hence $\text{I.F.}={\text{e}}^{2t}$ .
3. Step 1 This is already in the standard form.

Step 2 $\int -tanx\phantom{\rule{1em}{0ex}}dx=\int \frac{-sinx}{cosx}\phantom{\rule{1em}{0ex}}dx=lncosx.$

Step 3 $\text{I.F.}={\text{e}}^{lncosx}=cosx$