The Method of Integrating Factors Examples 1

# The Method of Integrating Factors Examples 1

Recall from The Method of Integrating Factors page that we can solve first order linear differential equations of the form $\frac{dy}{dt} + p(t) y = g(t)$ by multiplying both sides of the equation by the integrating factor $\mu (t) = e^{\int p(t) \: dt}$ so that:

(1)
\begin{align} \quad \mu (t) \frac{dy}{dt} + \mu (t) p(t) y = \mu (t) g(t) \\ \quad \frac{d}{dt} \left ( \mu (t) y \right ) = \mu (t) g(t) \\ \quad \int \frac{d}{dt} \left ( \mu (t) y \right ) \: dt = \int \mu (t) g(t) \: dt \\ \quad \mu (t) y = \int \mu (t) g(t) \: dt \\ \quad y = \frac{\int \mu (t) g(t) \: dt}{\mu (t)} \end{align}

We will now look at some more examples of applying this method of integrating factors.

More examples can be found on The Method of Integrating Factors Examples 2 page.

## Example 1

Find all solutions to the differential equation $\frac{dy}{dt} - \frac{3y}{t + 1} = (t + 1)^4$.

Our differential equation is in the correct form and we note that $p(t) = - \frac{3}{t+1}$ and $g(t) = (t+1)^4$. Thus we obtain our integrating factor as:

(2)
\begin{align} \quad \mu (t) = e^{\int p(t) \:dt} = e^{\int -\frac{3}{t+1} \: dt} = e^{-3 \ln (t + 1)} = e^{\ln ((t + 1)^{-3})} = (t+1)^{-3} \end{align}

Thus for $C$ as a constant we get that:

(3)
\begin{align} \quad \mu \frac{dy}{dt} + \mu (t) p(t) y = \mu (t) g(t) \\ \quad (t+1)^{-3} \frac{dy}{dt} - \frac{3}{(t+1)^4} y = t + 1 \\ \quad \frac{d}{dt} \left ( (t + 1)^{-3} y \right ) = t + 1 \\ \quad \int \frac{d}{dt} \left ( (t + 1)^{-3} y \right ) \: dt = \int t + 1 \: dt \\ \quad (t + 1)^{-3} y = \frac{t^2}{2} + t + C \\ \quad y = (t+1)^3 \left ( \frac{t^2}{2} + t + C \right ) \end{align}

## Example 2

Find all solutions to the differential equation $\frac{dy}{dt} + 2t y = 2te^{-t^2}$.

Our differential equation is in the correct form and we note that $p(t) = 2t$ and $g(t) = 2te^{-t^2}$. Thus we obtain our integrating factor as:

(4)
\begin{align} \quad \mu (t) = e^{\int p(t) \: dt} = e^{\int 2t \: dt} = e^{t^2} \end{align}

Thus for $C$ as a constant we have that:

(5)
\begin{align} \quad \mu (t) \frac{dy}{dt} + \mu (t) p(t) y = \mu (t) g(t) \\ \quad e^{t^2} \frac{dy}{dt} + 2te^{t^2} y = 2t \\ \quad \frac{d}{dt} \left ( e^{t^2} y \right ) = 2t \\ \quad \int \frac{d}{dt} \left ( e^{t^2} y \right ) \: dt = \int 2t \: dt \\ \quad e^{t^2}y = t^2 + C \\ \quad y = t^2 e^{-t^2} + Ce^{-t^2} \end{align}

## Example 3

Find all solutions to the differential equation $\frac{dy}{dt} + y = 5 \sin 2t$.

Our differential equation is in the correct form and we note that $p(t) = 1$ and $g(t) = 5 \sin 2t$. Thus we obtain our integrating factor as:

(6)
\begin{align} \quad \mu (t) = e^{\int p(t) \:dt} = e^{\int 1 \:dt} = e^t \end{align}

Thus for $C$ as a constant we get that:

(7)
\begin{align} \quad \mu (t) \frac{dy}{dt} + \mu (t) p(t) y = \mu (t) g(t) \\ \quad e^t \frac{dy}{dt} + e^t y = 5 e^t \sin 2t \\ \quad \frac{d}{dt} \left ( e^t y \right ) = 5e^t \sin 2t \\ \quad \int \frac{d}{dt} \left ( e^t y \right ) \: dt = \int 5e^t \sin 2t \: dt \\ \quad e^t y = \int 5e^t \sin 2t \: dt \end{align}

We can evaluate the righthand integral by using integration by parts. Recall that $\int u \: dv = uv - \int v \: du$. Let $u = \sin 2t$ and let $dv = 5 e^t dt$. Then $du = 2 \cos 2t$ and $v = 5e^t$ Then we have that:

(8)
\begin{align} \quad \int 5e^t \sin 2t \: dt = 5e^t\sin 2t - 2 \int 5e^t \cos 2t \: dt \end{align}

We can get rid of the integral $\int 5e^t \cos 2t \: dt$ by applying integration by parts again. Let $u = \cos 2t$ and $dv = 5e^t \: dt$. Then $du = -2 \sin 2t$ and $v = 5e^t$. Thus we get that:

(9)
\begin{align} \quad \int 5e^t \cos 2t = 5 e^t \cos 2t + 2 \int 5e^t \sin 2t \: dt \end{align}

Substituting in the integral above and we get that:

(10)
\begin{align} \quad \int 5e^t \sin 2t \: dt = 5e^t\sin 2t - 2 \left ( 5 e^t \cos 2t + 2 \int 5e^t \sin 2t \: dt \right ) \\ \quad \int 5e^t \sin 2t \: dt = 5e^t \sin 2t - 10 e^t \cos 2t - 4 \int 5e^t \sin 2t \: dt \\ \quad 5 \int 5e^t \sin 2t \: dt = 5e^t \sin 2t - 10 e^t \cos 2t \\ \quad \int 5e^t \sin 2t \: dt = e^t \sin 2t - 2 e^t \cos 2t + C \end{align}

Therefore, going back to our differential equation we have that:

(11)
\begin{align} \quad e^t y = e^t \sin 2t - 2e^t \cos 2t \\ \quad y = \sin 2t - 2 \cos 2t + \frac{C}{e^t} \end{align}