# Integrating Factors

Author: John J Weber III, PhD Corresponding Textbook Sections:

• Section 2.5 – Special Integrating Factors

## Expected Educational Results

• Objective 6–1: I can identify an ODE written in exact differential form.

• Objective 6–2: I can determine if an ODE is an exact equation.

• Objective 6–3: I can find the appropriate integrating factor to convert a DE in exact differential form into an exact equation.

• Objection 6–4: I can solve ODEs in exact form by applying the appropriate integrating factor.

## Integrating Factors

### Definition: Integrating Factor

If the equation $M\left(x,y\right)dx+N\left(x,y\right)dy=0$$M(x,y)dx+N(x,y)dy=0$ is not exact, but the equation $\mu \left(x,y\right)M\left(x,y\right)dx+\mu \left(x,y\right)N\left(x,y\right)dy=0$$\mu(x,y)M(x,y)dx+\mu(x,y)N(x,y)dy=0$ for $\mu \left(x,y\right)\ne 0$$\mu(x,y)\ne 0$ is exact, then the function $\mu \left(x,y\right)$$\mu(x,y)$ is an integrating factor of the equation.

#### Derivation

We know from the Test for Exactness that $\mu \left(x,y\right)M\left(x,y\right)dx+\mu \left(x,y\right)N\left(x,y\right)dy=0$$\mu(x,y)M(x,y)dx+\mu(x,y)N(x,y)dy=0$ is an exact equation if and only if $\frac{\partial \left[\mu \left(x,y\right)M\left(x,y\right)\right]}{\partial y}=\frac{\partial \left[\mu \left(x,y\right)N\left(x,y\right)\right]}{\partial x}$$\displaystyle\dfrac{\partial\left[\mu(x,y)M(x,y)\right]}{\partial y}=\dfrac{\partial\left[\mu(x,y)N(x,y)\right]}{\partial x}$

Using the product rule for derivatives:

$M\left(x,y\right)\frac{\partial \mu \left(x,y\right)}{\partial y}+\mu \left(x,y\right)\frac{\partial M\left(x,y\right)}{\partial y}=N\left(x,y\right)\frac{\partial \mu \left(x,y\right)}{\partial x}+\mu \left(x,y\right)\frac{\partial N\left(x,y\right)}{\partial x}$$\displaystyle {\color{gsured}{M(x,y)\frac{\partial\mu(x,y)}{\partial y}}}+{\color{gsured!50!red}{\mu(x,y)}}\frac{\partial M(x,y)}{\partial y}={\color{gsured!70!gsublue}{N(x,y)\frac{\partial\mu(x,y)}{\partial x}}}+{\color{gsured!50!red}{\mu(x,y)}}\frac{\partial N(x,y)}{\partial x}$

Rewriting to isolate for $\mu \left(x,y\right)$$\mu(x,y)$:

$M\left(x,y\right)\frac{\partial \mu \left(x,y\right)}{\partial y}-N\left(x,y\right)\frac{\partial \mu \left(x,y\right)}{\partial x}=\left(\frac{\partial N\left(x,y\right)}{\partial x}-\frac{\partial M\left(x,y\right)}{\partial y}\right)\mu \left(x,y\right)$$\displaystyle {\color{gsured}{M(x,y)\frac{\partial\mu(x,y)}{\partial y}}}-{\color{gsured!70!gsublue}{N(x,y)\frac{\partial\mu(x,y)}{\partial x}}}=\left(\frac{\partial N(x,y)}{\partial x}-\frac{\partial M(x,y)}{\partial y}\right){\color{gsured!50!red}{\mu(x,y)}}$

##### Solving for $\mu \left(x\right)$$\mu(x)$

Suppose the integrating is a function of only $x$$x$, i.e., $\mu \left(x,y\right)=\mu \left(x\right)$$\mu(x,y)=\mu(x)$:

$M\left(x,y\right)\frac{\partial \mu \left(x\right)}{\partial y}-N\left(x,y\right)\frac{\partial \mu \left(x\right)}{\partial x}=\left(\frac{\partial N\left(x,y\right)}{\partial x}-\frac{\partial M\left(x,y\right)}{\partial y}\right)\mu \left(x\right)$$\displaystyle {\color{gsured}{M(x,y)\frac{\partial\mu(x)}{\partial y}}}-{\color{gsured!70!gsublue}{N(x,y)\frac{\partial\mu(x)}{\partial x}}}=\left(\frac{\partial N(x,y)}{\partial x}-\frac{\partial M(x,y)}{\partial y}\right){\color{gsured!50!red}{\mu(x)}}$

We know from Calculus III: $\frac{\partial \mu \left(x\right)}{\partial y}=0$$\displaystyle{\color{gsured}{\frac{\partial\mu(x)}{\partial y}=0}}$ and $\frac{\partial \mu \left(x\right)}{\partial x}=\frac{d\mu \left(x\right)}{dx}$$\displaystyle{\color{gsured!70!gsublue}{\frac{\partial\mu(x)}{\partial x}}}={\color{gsured!70!gsublue}{\frac{d\mu(x)}{dx}}}$. Thus,

$0-N\left(x,y\right)\frac{d\mu \left(x\right)}{dx}=\left(\frac{\partial N\left(x,y\right)}{\partial x}-\frac{\partial M\left(x,y\right)}{\partial y}\right)\mu \left(x\right)$$\displaystyle {\color{gsured}{0}}-{\color{gsured!70!gsublue}{N(x,y)\frac{d\mu(x)}{dx}}}=\left(\frac{\partial N(x,y)}{\partial x}-\frac{\partial M(x,y)}{\partial y}\right){\color{gsured!50!red}{\mu(x)}}$

Solve for $\frac{d\mu \left(x\right)}{dx}$$\displaystyle{\color{gsured!70!gsublue}{\frac{d\mu(x)}{dx}}}$:

$\frac{d\mu \left(x\right)}{dx}=\left(\frac{\frac{\partial N\left(x,y\right)}{\partial x}-\frac{\partial M\left(x,y\right)}{\partial y}}{-N\left(x,y\right)}\right)\mu \left(x\right)$$\displaystyle {\dfrac{d\mu(x)}{dx}}=\left(\frac{\dfrac{\partial N(x,y)}{\partial x}-\dfrac{\partial M(x,y)}{\partial y}}{{-N(x,y)}}\right){\mu(x)}$

Rewriting the expression in the parenthesis:

$\frac{d\mu \left(x\right)}{dx}=\left(\frac{\frac{\partial M\left(x,y\right)}{\partial y}-\frac{\partial N\left(x,y\right)}{\partial x}}{N\left(x,y\right)}\right)\mu \left(x\right)$$\displaystyle {\dfrac{d\mu(x)}{dx}}=\left(\dfrac{\dfrac{\partial M(x,y)}{\partial y}-\dfrac{\partial N(x,y)}{\partial x}}{{N(x,y)}}\right){\mu(x)}$

which is separable if and only if $\left(\frac{\frac{\partial M\left(x,y\right)}{\partial y}-\frac{\partial N\left(x,y\right)}{\partial x}}{N\left(x,y\right)}\right)$$\displaystyle\left(\dfrac{\dfrac{\partial M(x,y)}{\partial y}-\dfrac{\partial N(x,y)}{\partial x}}{{N(x,y)}}\right)$ is a function of only $x$$x$. That is,

$\frac{d\mu \left(x\right)}{\mu \left(x\right)}=\left(\frac{\frac{\partial M\left(x,y\right)}{\partial y}-\frac{\partial N\left(x,y\right)}{\partial x}}{N\left(x,y\right)}\right)dx$$\displaystyle \dfrac{{d\mu(x)}}{{\mu(x)}}=\left(\dfrac{\dfrac{\partial M(x,y)}{\partial y}-\dfrac{\partial N(x,y)}{\partial x}}{{N(x,y)}}\right){dx}$

and

$\mu \left(x\right)={e}^{\int \left(\frac{\frac{\partial M\left(x,y\right)}{\partial y}-\frac{\partial N\left(x,y\right)}{\partial x}}{N\left(x,y\right)}\right)\phantom{\rule{0.167em}{0ex}}dx}$$\displaystyle \mu(x)=e^{{\int{\left(\dfrac{\dfrac{\partial M(x,y)}{\partial y}-\dfrac{\partial N(x,y)}{\partial x}}{N(x,y)}\right)\,dx}}}$

##### Solving for $\mu \left(y\right)$$\mu(y)$

Suppose the integrating is a function of only $x$$x$, i.e., $\mu \left(x,y\right)=\mu \left(y\right)$$\mu(x,y)=\mu(y)$:

$M\left(x,y\right)\frac{\partial \mu \left(y\right)}{\partial y}-N\left(x,y\right)\frac{\partial \mu \left(y\right)}{\partial x}=\left(\frac{\partial N\left(x,y\right)}{\partial x}-\frac{\partial M\left(x,y\right)}{\partial y}\right)\mu \left(y\right)$$\displaystyle {\color{gsured}{M(x,y)\frac{\partial\mu(y)}{\partial y}}}-{\color{gsured!70!gsublue}{N(x,y)\frac{\partial\mu(y)}{\partial x}}}=\left(\frac{\partial N(x,y)}{\partial x}-\frac{\partial M(x,y)}{\partial y}\right){\color{gsured!50!red}{\mu(y)}}$

We know from Calculus III: $\frac{\partial \mu \left(y\right)}{\partial x}=0$$\displaystyle{\color{gsured!70!gsublue}{\frac{\partial\mu(y)}{\partial x}=0}}$ and $\frac{\partial \mu \left(y\right)}{\partial y}=\frac{d\mu \left(y\right)}{dy}$$\displaystyle{\color{gsured}{\frac{\partial\mu(y)}{\partial y}}}={\color{gsured}{\frac{d\mu(y)}{dy}}}$. Thus,

$M\left(x,y\right)\frac{d\mu \left(y\right)}{dy}-0=\left(\frac{\partial N\left(x,y\right)}{\partial x}-\frac{\partial M\left(x,y\right)}{\partial y}\right)\mu \left(y\right)$$\displaystyle {\color{gsured}{M(x,y)\frac{d\mu(y)}{dy}}}-{\color{gsured!70!gsublue}{0}}=\left(\frac{\partial N(x,y)}{\partial x}-\frac{\partial M(x,y)}{\partial y}\right){\color{gsured!50!red}{\mu(y)}}$

Solve for $\frac{d\mu \left(y\right)}{dy}$$\displaystyle{\color{gsured}{\frac{d\mu(y)}{dy}}}$:

$\frac{d\mu \left(y\right)}{dy}=\left(\frac{\frac{\partial N\left(x,y\right)}{\partial x}-\frac{\partial M\left(x,y\right)}{\partial y}}{M\left(x,y\right)}\right)\mu \left(y\right)$$\displaystyle {\dfrac{d\mu(y)}{dy}}=\left(\dfrac{\dfrac{\partial N(x,y)}{\partial x}-\dfrac{\partial M(x,y)}{\partial y}}{{M(x,y)}}\right){\mu(y)}$

which is separable if and only if $\left(\frac{\frac{\partial N\left(x,y\right)}{\partial x}-\frac{\partial M\left(x,y\right)}{\partial y}}{M\left(x,y\right)}\right)$$\displaystyle\left(\dfrac{\dfrac{\partial N(x,y)}{\partial x}-\dfrac{\partial M(x,y)}{\partial y}}{{M(x,y)}}\right)$ is a function of only $y$$y$. That is,

$\frac{d\mu \left(y\right)}{\mu \left(y\right)}=\left(\frac{\frac{\partial N\left(x,y\right)}{\partial x}-\frac{\partial M\left(x,y\right)}{\partial y}}{M\left(x,y\right)}\right)dy$$\displaystyle \dfrac{{d\mu(y)}}{{\mu(y)}}=\left(\dfrac{\dfrac{\partial N(x,y)}{\partial x}-\dfrac{\partial M(x,y)}{\partial y}}{{M(x,y)}}\right){dy}$

and

$\mu \left(y\right)={e}^{\int \left(\frac{\frac{\partial N\left(x,y\right)}{\partial x}-\frac{\partial M\left(x,y\right)}{\partial y}}{M\left(x,y\right)}\right)\phantom{\rule{0.167em}{0ex}}dy}$$\displaystyle \mu(y)=e^{{\int{\left(\dfrac{\dfrac{\partial N(x,y)}{\partial x}-\dfrac{\partial M(x,y)}{\partial y}}{M(x,y)}\right)\,dy}}}$