- Home
- >
- Integrating Factor – Definition, Method, and Examples

Contents

# Integrating Factor – Definition, Method, and Examples

The**integrating factor method**allows us to work on ordinary differential equations that are more complex than exact equations. Since there is no guarantee that the first-order differential equation that we’re dealing with is an exact equation, it’s important that we learn supplementary methods such as utilizing integrating factors.

**This article covers the fundamentals of integrating factors including its definition, conditions, and formula. We’ll also show you how to find integrating factors from differential equations and how to use utilize this method when solving non-exact differential equations. This discussion will require an understanding of the exact equation, so make sure you have your notes handy or are familiar with the process of solving exact equations. For now, we’ll begin slowly – doing a quick recap on an equation’s exactness then diving into the definition of integrating factor and the method itself.**

*The integrating factor represents the factor that we multiply on both sides of the differential equation to make a non-exact DE into an exact equation. Once we have the integrating factor, we can use previous methods to solve the new exact equation.***What Is an Integrating Factor?**

An integrating factor is a function that we use to solve differential equations that are not exact equations. Suppose that we have $P(x, y)$ and $Q(x, y)$ forming the differential equation written in the form shown below.
\begin{aligned}P(x, y) \phantom{x}dx + Q(x, y) \phantom{x}dy = 0 \end{aligned}
We’ve learned how separable equations like the ones shown above can be solved by separating terms based on their variables. In the past, we’ve established how to identify differential equations based on their “exactness”.
Exact |
\begin{aligned}\dfrac{\partial P}{\partial y} = \dfrac{\partial Q}{\partial x} \end{aligned} |

Not Exact |
\begin{aligned}\dfrac{\partial P}{\partial y} \neq \dfrac{\partial Q}{\partial x} \end{aligned} |

**factor that is multiplied on both sides of the differential equation to make the differential equation exact**. \begin{aligned}\mu (x, y)P(x, y) \phantom{x}dx +\mu (x, y) Q(x, y) \phantom{x}dy = 0 \end{aligned} The factor, $\mu (x, y)$, is what we call the integrating factor of the differential equation. Once we’ve rewritten the equation into an exact equation, we can then apply the appropriate steps to solve the resulting differential equation.

**Integrating factor formula**

Let’s now establish the integrating factor’s general expression given a differential equation, $ P(x, y) \phantom{x}dx + Q(x, y) \phantom{x}dy = 0$. The goal of this method is to rewrite the equation so that it has an exact form.
\begin{aligned}\mu (x, y)P(x, y) \phantom{x}dx +\mu (x, y) Q(x, y) \phantom{x}dy = 0 \end{aligned}
If we want this to be an exact equation, the partial derivatives of the expression must also satisfy the condition we’ve established for exact equations.
\begin{aligned}\dfrac{\partial}{\partial y} [\mu (x, y)P(x, y)] = \dfrac{\partial}{\partial x}[ \mu (x, y) Q(x, y)]\end{aligned}
Apply the product rule for derivatives and rearrange the equation as shown below.
\begin{aligned}P\dfrac{\partial \mu}{\partial y} + \mu\dfrac{\partial P}{\partial y} &= Q\dfrac{\partial \mu}{\partial x} + \mu\dfrac{\partial Q}{\partial x}\\P\dfrac{\partial \mu}{\partial y} -Q\dfrac{\partial \mu}{\partial y}&= \mu \left(\dfrac{\partial Q}{\partial x} – \dfrac{\partial P}{\partial y}\right ) \end{aligned}
The expression for the integrating factor will depend on whether $\mu$ depends on $x$ or $y$. When $\mu$ is defined by $x$, we’ll be isolating $\dfrac{\partial \mu}{\partial x}$ and when $\mu$ is dependent on $y$, we isolate $\dfrac{\partial \mu}{\partial y}$ instead. Here are the two possible outcomes on how the differential equation reduces to- accounting for both $\mu(x)$ and $\mu(y)$:
\begin{aligned}\boldsymbol{\dfrac{\partial \mu}{\partial x}}\end{aligned} | \begin{aligned}\boldsymbol{\dfrac{\partial \mu}{\partial y}}\end{aligned} |

\begin{aligned}-Q\dfrac{\partial \mu}{\partial x}&= \mu \left(\dfrac{\partial Q}{\partial x} – \dfrac{\partial P}{\partial y}\right )\\\dfrac{\partial \mu}{\partial x}&= \dfrac{\mu \left(\dfrac{\partial Q}{\partial x} – \dfrac{\partial P}{\partial y}\right )}{-Q}\\\dfrac{\partial \mu}{\partial x}&= \dfrac{\mu \left(\dfrac{\partial P}{\partial y} -\dfrac{\partial Q}{\partial x}\right )}{Q} \end{aligned} | \begin{aligned}P\dfrac{\partial \mu}{\partial y} &= \mu \left(\dfrac{\partial Q}{\partial x} – \dfrac{\partial P}{\partial y}\right ) \\\dfrac{\partial \mu}{\partial y} &= \dfrac{\mu \left(\dfrac{\partial Q}{\partial x} – \dfrac{\partial P}{\partial y}\right )}{P} \end{aligned} |

\begin{aligned}\boldsymbol{\mu(x)}\end{aligned} | \begin{aligned}\boldsymbol{\mu(y)}\end{aligned} |

\begin{aligned}\mu&= \text{exp}\left[\int\dfrac{ \left(\partial P/\partial y -\partial Q/\partial x \right )}{Q} \phantom{x}dx\right ]\end{aligned} | \begin{aligned}\mu&= \text{exp} \left[\int\dfrac{ \left(\partial Q/\partial x – \partial P/\partial y\right )}{P} \phantom{x}dy \right ] \end{aligned} |

INTEGRATING FACTOR FORMULA
If we have a first-order differential equation, $P(x, y) \phantom{x}dx + Q(x, y) \phantom{x}dy = 0$, we can make it an exact equation by multiplying both sides by $\mu$. We call this the integrating factor is defined by a single variable (either $x$ or $y$).
\begin{aligned}\textbf{Defined by }\boldsymbol{x} &: \mu= \text{exp}\left[\int\dfrac{\left(\partial P/\partial y -\partial Q/\partial x \right )}{Q} \phantom{x}dx\right ]\\\textbf{Defined by }\boldsymbol{y} &: \mu= \text{exp} \left[\int\dfrac{\left(\partial Q/\partial x – \partial P/\partial y\right )}{P} \phantom{x}dy \right ]\end{aligned} |

**How To Find the Integrating Factor?**

Use the formula for integrating factors to find the expression for $\mu$ – we want the integrating factor to be defined by one variable. Here is a guideline to keep in mind when finding the right integrating factor for your differential equation:
- Identify the expressions for $P(x, y)$ and $Q(x, y)$ given our differential equation.
- Take the partial derivative of $P$ with respect to $x$ and the partial derivative of $Q$ with respect to $y$.
- Use either of the two formulas and select the one that reduced the expression in terms of one variable.

\begin{aligned}\boldsymbol{\mu(x)}\end{aligned} | \begin{aligned}\boldsymbol{\mu(y)}\end{aligned} |

\begin{aligned}\mu&= \text{exp}\left[\int\dfrac{ \left(\partial P/\partial y -\partial Q/\partial x \right )}{Q} \phantom{x}dx\right ]\end{aligned} | \begin{aligned}\mu&= \text{exp} \left[\int\dfrac{ \left(\partial Q/\partial x – \partial P/\partial y\right )}{P} \phantom{x}dy \right ] \end{aligned} |

\begin{aligned}\boldsymbol{\dfrac{\partial \mu}{\partial y}} &: \dfrac{\partial}{\partial y}(2x^2 + y)\\&= 1\end{aligned} | \begin{aligned}\boldsymbol{\dfrac{\partial \mu}{\partial x}} &: \dfrac{\partial}{\partial x}(x^2y – x)\\&= 2xy – 1\end{aligned} |

\begin{aligned}\boldsymbol{\mu(x)}\end{aligned} | \begin{aligned}\boldsymbol{\mu(y)}\end{aligned} |

\begin{aligned}\mu (x)&= \text{exp}\left[\int\dfrac{ \left(\partial P/\partial y -\partial Q/\partial x \right )}{Q} \phantom{x}dx\right ]\\&= \text{exp}\left[\int\dfrac{ \left(1 -2xy +1\right )}{x^2y -x} \phantom{x}dx\right ]\\&= \text{exp}\left[\int\dfrac{ 2\left(1 -xy\right )}{-x(1 – xy)} \phantom{x}dx\right ]\\&= \text{exp}\left(\int -\dfrac{2}{x} \phantom{x}dx \right ) \end{aligned} | \begin{aligned}\mu(y) &= \text{exp} \left[\int\dfrac{ \left(\partial Q/\partial x – \partial P/\partial y\right )}{P} \phantom{x}dy \right ]\\&= \text{exp} \left[\int\dfrac{ \left(2xy – 1 – 1\right )}{2x^2 + y} \phantom{x}dy \right ]\\&= \text{exp} \left[\int\dfrac{ 2\left(xy – 1\right )}{2x^2 + y} \phantom{x}dy \right ] \end{aligned} |

**How To Use Integrating Factor?**

As we have discussed earlier, we can use the integrating factor to solve non-exact differential equations by multiplying $\mu$ on both sides of the equation. Before working on the integrating factor, check the differential equation for its exactness. When the differential equation is an exact equation, you can use a simpler approach as we have discussed in this article right away.
When the equation is not exact, use the guide below to solve the differential equation with the help of the integrating factor.
- Check the expression for $\mu(x)$ by evaluating the expression, $\mu = \text{exp}\left[\int\dfrac{ \left(\partial P/\partial y -\partial Q/\partial x \right )}{Q} \phantom{x}dx\right ]$. If the expression is in terms of $x$, skip the next bullet.
- If $\mu(x)$ is not a function of $x$ alone, evaluate $\mu(y)$. Check if the resulting expression is a function of $y$ alone.
- Evaluate and simplify the integrating factor’s expression.
- Multiply both sides of the equation by $mu$ then see whether this addresses the exactness issue.
- Use the resulting exact equation and apply the techniques we’ve learned to solve exact equations.

\begin{aligned}\boldsymbol{\dfrac{\partial P}{\partial y}}\end{aligned} | \begin{aligned}\boldsymbol{\dfrac{\partial Q}{\partial x}}\end{aligned} |

\begin{aligned}\dfrac{\partial P}{\partial y} &= \dfrac{\partial}{\partial y} (2+ yx^{-2}) \\&= x^{-2}\end{aligned} | \begin{aligned}\dfrac{\partial Q}{\partial x} &= \dfrac{\partial}{\partial x} (y -x^{-1}) \\&= x^{-2}\end{aligned} |

**Does the differential equation, $(12x^2 + 2xy + 4y^3) \phantom{x}dx + (x^2 + y^2) \phantom{x} dy =0$, need an integrating factor? If so, find the expression for $\mu$.**

*Example 1*__Solution__If the equation is exact, there is no need for us to work on its integrating factor. However, when $\dfrac{\partial P}{\partial y}$ and $\dfrac{\partial Q}{\partial x}$ are not equal, then the differential equation is not exact and needs an integrating factor. \begin{aligned}P(x, y) = 12x^2y + 2xy + 4y^3\\ Q(x, y) = x^2 + y^2\end{aligned} After writing down the expression for $P$ and $Q$, let’s go ahead and evaluate their partial derivatives with respect to $y$ and $x$, respectively.

\begin{aligned}\boldsymbol{\dfrac{\partial P}{\partial y}}\end{aligned} | \begin{aligned}\boldsymbol{\dfrac{\partial Q}{\partial x}}\end{aligned} |

\begin{aligned}\dfrac{\partial P}{\partial y} &= \dfrac{\partial}{\partial y} (= 12x^2 y + 2xy + 4y^3) \\&=12x^2+ 2x + 12y^2\end{aligned} | \begin{aligned}\dfrac{\partial Q}{\partial x} &= \dfrac{\partial}{\partial x} (x^2 + y^2) \\&= 2x\end{aligned} |

**needs an integrating factor**. Observe that the difference between the two partial derivatives: the difference is a multiple of $x^2 + y^2$. This means that it is easier to find $\mu(x)$, in which we are required to divide $\dfrac{\partial P}{\partial y} – \dfrac{\partial Q}{\partial x}$ by $Q(x, y)$. \begin{aligned}\mu(x) &= \text{exp}\left[\int\dfrac{ \left(\partial P/\partial y -\partial Q/\partial x \right )}{Q} \phantom{x}dx\right ]\\ &= \text{exp}\left[\int\dfrac{ 12x^2+ 2x + 12y^2 – 2x}{x^2 + y^2} \phantom{x}dx\right ]\\&= \text{exp}\left(\int \dfrac{12(x^2 + y^2)}{x^2 + y^2} \phantom{x}dx\right)\\&=\text{exp}\left(\int 12 \phantom{x}dx \right )\\&= e^{12x}\end{aligned} This shows that we can use the integrating factor, $\boldsymbol{\mu(x) = e^{12x}}$, to rewrite the equation and make it exact.

**Solve the differential equation, $\sin y \phantom{x}dy = (x – \cos y) \phantom{x}dx$.**

*Example 2*__Solution__Let’s first check the exactness of the differential equation. Once we rewrite the equation, we’ll have the following expressions for $P(x, y)$ and $Q(x, y)$.

\begin{aligned}\sin y \phantom{x}dy &= (x – \cos y) \phantom{x}dx\\-(x – \cos y) \phantom{x}dx + \sin y \phantom{x}dy &= 0\\(\cos y – x) \phantom{x}dx + \sin y \phantom{x}dy &= 0\end{aligned} | \begin{aligned}P(x, y) &= \cos y – x\\Q(x, y) &= \sin y\end{aligned} |

\begin{aligned}\boldsymbol{\dfrac{\partial P}{\partial y}}\end{aligned} | \begin{aligned}\boldsymbol{\dfrac{\partial Q}{\partial x}}\end{aligned} |

\begin{aligned}\dfrac{\partial P}{\partial y} &= \dfrac{\partial}{\partial y} (\cos y – x) \\&= -\sin y\end{aligned} | \begin{aligned}\dfrac{\partial Q}{\partial x} &= \dfrac{\partial}{\partial x} (\sin y) \\&= 0\end{aligned} |

\begin{aligned}\boldsymbol{\dfrac{\partial P}{\partial y}}\end{aligned} | \begin{aligned}\boldsymbol{\dfrac{\partial Q}{\partial x}}\end{aligned} |

\begin{aligned}\dfrac{\partial P}{\partial y} &= \dfrac{\partial}{\partial y} (e^{-x}\cos y – e^{-x}x) \\&= -e^{-x}\sin y\end{aligned} | \begin{aligned}\dfrac{\partial Q}{\partial x} &= \dfrac{\partial}{\partial x} (e^{-x}\sin y) \\&= -e^{-x}\sin y\end{aligned} |

### Practice Questions

1. Does the differential equation, $x \phantom{x}dy – y \phantom{x} dx =0$, need an integrating factor? If so, find the expression for $\mu$. 2. Solve the differential equation, $\dfrac{dy}{dx} = \dfrac{y^2 – 3xy}{x^2 + xy}$. 3. Solve the differential equation, $(x \sin y + x) \phantom{x}dy = (y – x\cos y) \phantom{x} dx$.### Answer Key

1. Yes, the equation is not exact, so it needs an integrating factor. It is equal to $\mu(x) = \dfrac{1}{x^2}$. 2. $x^3y + \dfrac{1}{2}x^2y^2= C$ 3. $\dfrac{1}{2} e^{2x} + \dfrac{1}{3}y^3 + x\cos xy = C$
Rate this page