 # How to Use The Integrating Factor Method for Differential Equations

The order of a differential equation is determined by the highest order derivative involved! Therefore, first order differential equations consist only of a function and its derivative.

A first order differential equation can be written as

 ${y}^{\prime }+f\left(x\right)y=g\left(x\right)$

You solve these types of equations using integrating factors.

Theory

### IntegratingFactor

The integrating factor is ${e}^{F\left(x\right)}$, where

 $F\left(x\right)=\int f\left(x\right)\phantom{\rule{0.17em}{0ex}}dx$

and ${F}^{\prime }\left(x\right)=f\left(x\right)$ without $C$.

By using the product rule, you see that

 $\phantom{\rule{-0.17em}{0ex}}{\left({e}^{F\left(x\right)}y\right)}^{\prime }={e}^{F\left(x\right)}{y}^{\prime }+f\left(x\right){e}^{F\left(x\right)}y$

This is what you want to introduce into the original equation. Then the differential equation can be solved by integrating factors.

Rule

### InstructionsforUsingtheIntegratingFactortoSolveDifferentialEquations

$\begin{array}{llll}\hfill {y}^{\prime }+f\left(x\right)y& =g\left(x\right)\phantom{\rule{2em}{0ex}}|\cdot {e}^{F\left(x\right)}\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill {e}^{F\left(x\right)}{y}^{\prime }+f\left(x\right){e}^{F\left(x\right)}y& =\phantom{\rule{-0.17em}{0ex}}{\left({e}^{F\left(x\right)}y\right)}^{\prime }={e}^{F\left(x\right)}g\left(x\right)\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill \int \phantom{\rule{-0.17em}{0ex}}{\left({e}^{F\left(x\right)}y\right)}^{\prime }\phantom{\rule{0.17em}{0ex}}dx& =\int {e}^{F\left(x\right)}g\left(x\right)\phantom{\rule{0.17em}{0ex}}dx\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill {e}^{F\left(x\right)}y& =\int {e}^{F\left(x\right)}g\left(x\right)\phantom{\rule{0.17em}{0ex}}dx\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill y& =\int {e}^{F\left(x\right)}g\left(x\right)\phantom{\rule{0.17em}{0ex}}dx\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill & \phantom{\rule{2em}{0ex}}\cdot {e}^{-F\left(x\right)}\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\end{array}$

$\begin{array}{llll}\hfill {y}^{\prime }+f\left(x\right)y& =g\left(x\right)\phantom{\rule{2em}{0ex}}|\cdot {e}^{F\left(x\right)}\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill {e}^{F\left(x\right)}{y}^{\prime }+f\left(x\right){e}^{F\left(x\right)}y& =\phantom{\rule{-0.17em}{0ex}}{\left({e}^{F\left(x\right)}y\right)}^{\prime }={e}^{F\left(x\right)}g\left(x\right)\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill \int \phantom{\rule{-0.17em}{0ex}}{\left({e}^{F\left(x\right)}y\right)}^{\prime }\phantom{\rule{0.17em}{0ex}}dx& =\int {e}^{F\left(x\right)}g\left(x\right)\phantom{\rule{0.17em}{0ex}}dx\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill {e}^{F\left(x\right)}y& =\int {e}^{F\left(x\right)}g\left(x\right)\phantom{\rule{0.17em}{0ex}}dx\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill y& =\int {e}^{F\left(x\right)}g\left(x\right)\phantom{\rule{0.17em}{0ex}}dx\cdot {e}^{-F\left(x\right)}\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\end{array}$

Example 1

Solve the differential equation ${y}^{\prime }+2xy={e}^{x}$ by using integrating factors

$\begin{array}{lllllll}\hfill {y}^{\prime }+2xy& ={e}^{x}\phantom{\rule{2em}{0ex}}& \hfill |\cdot {e}^{{x}^{2}}& \phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}& \hfill \\ \hfill {e}^{{x}^{2}}{y}^{\prime }+2x{e}^{{x}^{2}}y& =2x{e}^{{x}^{2}}\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill \phantom{\rule{-0.17em}{0ex}}{\left({e}^{{x}^{2}}y\right)}^{\prime }& =2x{e}^{{x}^{2}}\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill \int \phantom{\rule{-0.17em}{0ex}}{\left({e}^{{x}^{2}}y\right)}^{\prime }\phantom{\rule{0.17em}{0ex}}dx& =\int 2x{e}^{{x}^{2}}\phantom{\rule{0.17em}{0ex}}dx\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill {e}^{{x}^{2}}y& =\int 2x{e}^{{x}^{2}}\phantom{\rule{0.17em}{0ex}}dx\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill {e}^{{x}^{2}}y& \stackrel{\ast }{=}\int \text{2x}{e}^{u}\frac{1}{\text{2x}}\phantom{\rule{0.17em}{0ex}}du\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill {e}^{{x}^{2}}y& =\int {e}^{u}\phantom{\rule{0.17em}{0ex}}du\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill {e}^{{x}^{2}}y& ={e}^{u}+C\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill {e}^{{x}^{2}}y& ={e}^{{x}^{2}}+C\phantom{\rule{2em}{0ex}}& \hfill |\cdot {e}^{-{x}^{2}}& \phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}& \hfill \\ \hfill y& =1+C{e}^{-{x}^{2}}\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\end{array}$

$\begin{array}{llllllll}\hfill {y}^{\prime }+2xy& ={e}^{x}\phantom{\rule{2em}{0ex}}& \hfill & |\cdot {e}^{{x}^{2}}\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill {e}^{{x}^{2}}{y}^{\prime }+2x{e}^{{x}^{2}}y& =2x{e}^{{x}^{2}}\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill \phantom{\rule{-0.17em}{0ex}}{\left({e}^{{x}^{2}}y\right)}^{\prime }& =2x{e}^{{x}^{2}}\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill \int \phantom{\rule{-0.17em}{0ex}}{\left({e}^{{x}^{2}}y\right)}^{\prime }\phantom{\rule{0.17em}{0ex}}dx& =\int 2x{e}^{{x}^{2}}\phantom{\rule{0.17em}{0ex}}dx\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill {e}^{{x}^{2}}y& =\int 2x{e}^{{x}^{2}}\phantom{\rule{0.17em}{0ex}}dx\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill {e}^{{x}^{2}}y& \stackrel{\ast }{=}\int \text{2x}{e}^{u}\frac{1}{\text{2x}}\phantom{\rule{0.17em}{0ex}}du\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill {e}^{{x}^{2}}y& =\int {e}^{u}\phantom{\rule{0.17em}{0ex}}du\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill {e}^{{x}^{2}}y& ={e}^{u}+C\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill {e}^{{x}^{2}}y& ={e}^{{x}^{2}}+C\phantom{\rule{2em}{0ex}}& \hfill & |\cdot {e}^{-{x}^{2}}\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill y& =1+C{e}^{-{x}^{2}}\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\end{array}$

*

$\begin{array}{ccc}\hfill u& ={x}^{2}\hfill & \hfill \\ \hfill \frac{\phantom{\rule{0.17em}{0ex}}du}{\phantom{\rule{0.17em}{0ex}}dx}& =2x\hfill \\ \hfill \phantom{\rule{0.17em}{0ex}}du& =2x\phantom{\rule{0.17em}{0ex}}dx\hfill \\ \hfill \frac{1}{2x}\phantom{\rule{0.17em}{0ex}}du& =\phantom{\rule{0.17em}{0ex}}dx\hfill \end{array}$