The Method of Integrating Factors

# The Method of Integrating Factors

Let $p$ and $g$ be functions of $t$ and consider the following first order differential equation:

(1)
\begin{align} \quad \frac{dy}{dt} + p(t) y = g(t) \end{align}

If we multiply the both sides of the equation above by the function $\mu (t)$ we get that:

(2)
\begin{align} \quad \mu (t) \frac{dy}{dt} + \mu (t) p(t) y = \mu (t) g(t) \end{align}

If we can guarantee that $\mu ' (t) = \mu (t) p(t)$, then notice that by applying the product rule for differentiation that we get: $\frac{d}{dt} \left ( \mu (t) y \right ) = \mu (t) \frac{dy}{dt} + \mu ' (t) y$ and substituting $\mu ' (t) = \mu (t) y$ and we get that $\frac{d}{dt} \left ( \mu (t) y \right ) = \mu (t) \frac{dy}{dt} + \mu (t) p(t) y$ which is exactly the lefthand side of the equation above. Thus we get that:

(3)
\begin{align} \frac{d}{dt} \left ( \mu (t) y \right ) = \mu (t) g(t) \\ \end{align}

The above differential equation can be solved by integrating both sides of the equation with respect to $t$ and isolating $y$. The question now arises on how we can find such a function $\mu (t)$.

 Definition: If $\frac{dy}{dt} + p(t) y = g(t)$ is a first order differential equation, then $\mu (t)$ is called an Integrating Factor if for $\mu (t) \frac{dy}{dt} + \mu (t) p(t) y = \mu (t) g(t)$ we have that $\mu ' (t) = \mu (t) p(t)$.

The following proposition will give us a formula for obtaining the integrating factor for differential equations in the form $\frac{dy}{dt} + p(t) y = g(t)$.

 Proposition 1: If $\frac{dy}{dt} + p(t) y = g(t)$ is a differential equation, then an integrating factor $\mu (t)$ of this equation is given by the formula $\mu (t) = e^{\int p(t) \: dt}$.
• Proof: We want to find $\mu (t)$ such that $\mu ' (t) = \mu (t) p(t)$. We can rewrite this equation as as $\frac{\mu '(t)}{\mu (t)} = p(t)$ and then:
(4)
\begin{align} \quad \frac{ \mu '(t)}{ \mu (t)} = p(t) \\ \quad \frac{d}{dt} \ln \mid \mu (t) \mid = p(t) \\ \quad \int \frac{d}{dt} \ln \mid \mu (t) \mid \: dt = \int p(t) \: dt \\ \quad \ln \mid \mu (t) \mid = \int p(t) \: dt \\ \quad \mu (t) = \pm e^{\int p(t) \: dt} \end{align}
• Since we only need one integrating factor to solve differential equations in the form $\frac{dy}{dt} + p(t) y = g(t)$, we can more generally note that $\mu (t) = e^{\int p(t) \: dt}$ is an integrating factor of this differential equation. $\blacksquare$

Notice that from proposition 1 that integrating factors $\mu (t)$ are not unique. In fact, there are infinitely many integrating factors. This can be see when evaluating the indefinite integral in $\mu (t) = e^{\int p(t) \: dt}$ which will result in getting $\mu (t) = e^{P(t) + C}$ where $P$ is any antiderivative if $p$ and where $C$ is a constant. We will always use the simplest integrating factor in solving differential equations of this type.

Let's now look at some examples of applying the method of integrating factors.

## Example 1

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

We first notice that our differential equation is in the appropriate form $\frac{dy}{dt} + p(t) y = g(t)$ where $p(t) = \frac{2}{t}$ and $g(t) = \frac{\sin t}{t^2}$. We compute our integrating factor as:

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

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

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

## Example 2

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

We first rewrite our differential equation as $\frac{dy}{dt} - \frac{y}{t} = - te^{-t}$. We note that in this form we have $p(t) = - \frac{1}{t}$ and $g(t) = -t e^{-t}$. We now find an integrating factor:

(7)
\begin{align} \quad \mu (t) = e^{\int p(t) \: dt} = e^{\int -\frac{1}{t} \: dt} = e^{-\ln t} = e^{\ln \left ( \frac{1}{t} \right)} = \frac{1}{t} \end{align}

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

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