logo

Integrating Factor Method for First Order Linear Differential Equations 📂Odinary Differential Equations

Integrating Factor Method for First Order Linear Differential Equations

Theorem1

The solution to the first order linear differential equation $\dfrac{dy}{dx}+p(x)y=q(x)$ is given as follows.

$$ \begin{align*} y(x)&=\dfrac{1}{e^{\int p(x) dx}} \left[ \int e^{\int p(x) dx} q(x) dx +C \right] \\ &=e^{-\int p(x) dx}\int e^{\int p(x) dx} q(x) dx + e^{-\int p(x) dx}C \end{align*} $$

Description

A differential equation of form $y^\prime+p(x)y=q(x)$ is called a first order linear differential equation. Here, if $q(x)=0$, we can directly apply variable separation and solve it as we would for separable differential equations. However, if it is $q(x) \ne 0$, variable separation can’t be applied directly. When explaining separable differential equations, it was mentioned that if variable separation is not possible, we should make it possible and solve it accordingly. One such method is the method of integrating factor.

Proof

First, let’s examine the given differential equation:

$$ \dfrac{dy}{dx}+p(x)y=q(x) $$

As it stands, we can’t perform variable separation, so our goal is to make this equation separable. Let’s first multiply both sides by $\lambda (x)$.

$$ \lambda (x) \dfrac{dy}{dx} + \lambda (x) p(x) y = \lambda (x) q(x) $$

Let’s say the multiplied $\lambda (x)$ satisfies the following condition:

$$ \dfrac{d}{dx} \left( \lambda (x) y \right) = \lambda (x) \dfrac{dy}{dx} + \lambda (x) p(x) y $$

Then, the given differential equation is transformed into a separable form as $\dfrac{d}{dx} \left( \lambda (x) y \right)=\lambda (x) q(x)$. If we then integrate both sides we get:

$$ \begin{align*} && \int \dfrac{d}{dx} \left(\lambda (x) y \right) &= \int \lambda (x) q(x) dx \\ \implies && \lambda (x) y&=\int \lambda (x) q(x) dx +C \\ \implies && y&=\dfrac{1}{\lambda (x)} \left[ \int \lambda (x) q(x) dx +C \right] \\ && &=\dfrac{1}{\lambda (x)} \int \lambda (x) q(x) dx + \dfrac{C}{\lambda (x)} \end{align*} $$

By multiplying the differential equation with $\lambda (x)$, we found the general formula for $y$ regarding $x$. Note that the term including the integration constant $C$ should be considered carefully. For instance, if multiple integration constants arise from indefinite integrals, they are all combined into a new single integration constant as commonly represented by $C_{1}+C_2=C_{3}$. However, in $\lambda (x) ^{-1}C$, since $\lambda (x)$ is not a constant, the whole term cannot be represented as a new constant $C_{1}$.

The remaining question is what exactly is $\lambda (x)$ that allows us to solve the differential equation. From the condition of $\lambda (x)$, we derive the following:

$$ \dfrac{d}{dx} \left( \lambda (x) y \right) = \dfrac{d \lambda (x)}{dx}y + \lambda (x) \dfrac{dy}{dx}=\lambda (x) \dfrac{dy}{dx} + \lambda (x) p(x) y $$

Therefore,

$$ \begin{align*} && \dfrac{d \lambda (x)}{dx}&=\lambda (x) p(x) \\ \implies && \dfrac{1}{\lambda (x) } d \lambda (x)&=p(x) dx \\ \implies && \ln \lambda (x) &=\int p(x) dx +C_{1} \\ \implies &&\lambda (x) &= Ce^{\int p(x) dx} \end{align*} $$

At this point, the integration constant $C_{1}$ can be ignored and written as $\lambda (x) = e^{\int p(x) dx}$ since it will be eliminated anyway. Remembering that we initially multiplied both sides by $\lambda (x)$, it’s easy to see that the integration constant will be simply cancelled out. By substituting the derived $\lambda (x)$ into $y(x)$ we obtained earlier,

$$ \begin{align*} y(x)&=\dfrac{1}{e^{\int p(x) dx}} \left[ \int e^{\int p(x) dx} q(x) dx +C \right] \\ &=e^{-\int p(x) dx}\int e^{\int p(x) dx} q(x) dx + e^{-\int p(x) dx}C \end{align*} $$


At first glance, it might seem that this method can solve all first order ordinary differential equations, yet it is not possible if the indefinite integrals appearing in the solution cannot be calculated. In other words, solutions can only be found when $\displaystyle \int p(x) dx$ and $\int e^{\int p(x) dx} q(x) dx $ exist.


  1. William E. Boyce, Boyce’s Elementary Differential Equations and Boundary Value Problems (11th Edition, 2017), p24-31 ↩︎