### 8 Solving equations via the integrating factor

Having found the integrating factor for a linear equation we now proceed to solve the equation.

Returning to the differential equation, written in standard form:

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

for which the integrating factor is

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

we multiply the equation by the integrating factor to obtain

$\phantom{\rule{2em}{0ex}}{\text{e}}^{Rt∕L}\phantom{\rule{1em}{0ex}}\frac{di}{dt}+\frac{R}{L}\phantom{\rule{1em}{0ex}}{\text{e}}^{Rt∕L}\phantom{\rule{1em}{0ex}}i=\frac{E}{L}\phantom{\rule{1em}{0ex}}{\text{e}}^{Rt∕L}cos\omega t$

At this stage the left-hand side of this equation can always be simplified as follows:

$\phantom{\rule{2em}{0ex}}\frac{d}{dt}\left({\text{e}}^{Rt∕L}\phantom{\rule{1em}{0ex}}i\right)=\frac{E}{L}\phantom{\rule{1em}{0ex}}{\text{e}}^{Rt∕L}cos\omega t.$

Now this is in the form of an exact differential equation and so we can integrate both sides to obtain the solution:

$\phantom{\rule{2em}{0ex}}{\text{e}}^{Rt∕L}\phantom{\rule{1em}{0ex}}i=\frac{E}{L}\int {\text{e}}^{Rt∕L}cos\omega t\phantom{\rule{1em}{0ex}}dt.$

All that remains is to complete the integral on the right-hand side. Using the method of integration by parts we find

$\phantom{\rule{2em}{0ex}}\int {\text{e}}^{Rt∕L}cos\omega t\phantom{\rule{1em}{0ex}}dt=\frac{L}{{L}^{2}{\omega }^{2}+{R}^{2}}\left[\omega L\phantom{\rule{1em}{0ex}}sin\omega t+Rcos\omega t\right]{\text{e}}^{Rt∕L}$

Hence

$\phantom{\rule{2em}{0ex}}{\text{e}}^{Rt∕L}\phantom{\rule{1em}{0ex}}i=\frac{E}{{L}^{2}{\omega }^{2}+{R}^{2}}\left[\omega Lsin\omega t+Rcos\omega t\right]\phantom{\rule{1em}{0ex}}{\text{e}}^{Rt∕L}+C.$

Finally

$\phantom{\rule{2em}{0ex}}i=\frac{E}{{L}^{2}{\omega }^{2}+{R}^{2}}\left[\omega Lsin\omega t+Rcos\omega t\right]+C\phantom{\rule{1em}{0ex}}{\text{e}}^{-Rt∕L}.$

is the solution to the original differential equation (1). Note that, as we should expect for the solution to a first order differential equation, it contains a single arbitrary constant $C$ .

Using the integrating factors found earlier in the Task on pages 22-23, find the general solutions to the differential equations

1. ${x}^{2}\phantom{\rule{1em}{0ex}}\frac{dy}{dx}+2{x}^{2}y={x}^{2}{\text{e}}^{-2x}$
2. ${t}^{2}\phantom{\rule{1em}{0ex}}\frac{di}{dt}+2{t}^{2}i={t}^{2}{\text{e}}^{-2t}$
3. $\frac{dy}{dx}-\left(tanx\right)y=1.$
1. The standard form is $\frac{dy}{dx}+2y={\text{e}}^{-2x}$ for which the integrating factor is ${\text{e}}^{2x}$ .
2. The general solution is $i=\left(t+C\right){\text{e}}^{-2t}$ as this problem is the same as (1) with different variables.
3. The equation is in standard form and the integrating factor is $cosx$ .