# 2.6: Integrating Factors

- Page ID
- 9402

\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

\( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

In Section 2.5 we saw that if \(M\), \(N\), \(M_y\) and \(N_x\) are continuous and \(M_y=N_x\) on an open rectangle \(R\) then

\[\label{eq:2.6.1} M(x,y)\,dx+N(x,y)\,dy=0\]

is exact on \(R\). Sometimes an equation that isn’t exact can be made exact by multiplying it by an appropriate function. For example,

\[\label{eq:2.6.2} (3x+2y^2)\,dx+2xy\,dy=0\]

is not exact, since \(M_y(x,y)=4y\ne N_x(x,y)=2y\) in Equation \ref{eq:2.6.2}. However, multiplying Equation \ref{eq:2.6.2} by \(x\) yields

\[\label{eq:2.6.3} (3x^2+2xy^2)\,dx+2x^2y\,dy=0,\]

which is exact, since \(M_y(x,y)=N_x(x,y)=4xy\) in Equation \ref{eq:2.6.3}. Solving Equation \ref{eq:2.6.3} by the procedure given in Section 2.5 yields the implicit solution

\[x^3+x^2y^2=c.\]

A function \(\mu=\mu(x,y)\) is an *integrating factor* for Equation \ref{eq:2.6.1] if \[\label{eq:2.6.4} \mu(x,y)M (x,y)\,dx+\mu(x,y)N (x,y)\,dy=0\] is exact. If we know an integrating factor \(\mu\) for Equation \ref{eq:2.6.1}, we can solve the exact equation Equation \ref{eq:2.6.4} by the method of Section 2.5. It would be nice if we could say that Equation \ref{eq:2.6.1} and Equation \ref{eq:2.6.4} always have the same solutions, but this isn’t so. For example, a solution \(y=y(x)\) of Equation \ref{eq:2.6.4] such that \(\mu(x,y(x))=0\) on some interval \(a<x<b\) could fail to be a solution of Equation \ref{eq:2.6.1} (Exercise [exer:2.6.1]), while Equation \ref{eq:2.6.1} may have a solution \(y=y(x)\) such that \(\mu(x,y(x))\) isn’t even defined (Exercise [exer:2.6.2]). Similar comments apply if \(y\) is the independent variable and \(x\) is the dependent variable in Equation \ref{eq:2.6.1} and Equation \ref{eq:2.6.4}. However, if \(\mu(x,y)\) is defined and nonzero for all \((x,y)\), Equation \ref{eq:2.6.1} and Equation \ref{eq:2.6.4} are equivalent; that is, they have the same solutions.

By applying Theorem [thmtype:2.5.2] (with \(M\) and \(N\) replaced by \(\mu M\) and \(\mu N\)), we see that Equation \ref{eq:2.6.4} is exact on an open rectangle \(R\) if \(\mu M\), \(\mu N\), \((\mu M)_y\), and \((\mu N)_x\) are continuous and \[{\partial\over\partial y}(\mu M)={\partial\over\partial x} (\mu N) \mbox{\quad or, equivalently, \quad} \mu_yM+\mu M_y=\mu_xN+\mu N_x\] on \(R\). It’s better to rewrite the last equation as \[\label{eq:2.6.5} \mu(M_y-N_x)=\mu_xN-\mu_yM,\] which reduces to the known result for exact equations; that is, if \(M_y=N_x\) then Equation \ref{eq:2.6.5} holds with \(\mu=1\), so Equation \ref{eq:2.6.1} is exact.

You may think Equation \ref{eq:2.6.5} is of little value, since it involves *partial* derivatives of the unknown integrating factor \(\mu\), and we haven’t studied methods for solving such equations. However, we’ll now show that Equation \ref{eq:2.6.5} is useful if we restrict our search to integrating factors that are products of a function of \(x\) and a function of \(y\); that is, \(\mu(x,y)=P(x)Q(y)\). We’re not saying that *every* equation \(M\,dx+N\,dy=0\) has an integrating factor of this form; rather, we’re saying that *some* equations have such integrating factors.We’llnow develop a way to determine whether a given equation has such an integrating factor, and a method for finding the integrating factor in this case.

If \(\mu(x,y)=P(x)Q(y)\), then \(\mu_x(x,y)=P'(x)Q(y)\) and \(\mu_y(x,y)=P(x)Q'(y)\), so Equation \ref{eq:2.6.5} becomes

\[\label{eq:2.6.6} P(x)Q(y)(M_y-N_x)=P'(x)Q(y)N-P(x)Q'(y)M,\] or, after dividing through by \(P(x)Q(y)\),

\[\label{eq:2.6.7} M_y-N_x={P'(x)\over P(x)}N-{Q'(y)\over Q(y)}M.\] Now let \[p(x)={P'(x)\over P(x)} \mbox{\quad and \quad} q(y)={Q'(y)\over Q(y)},\] so Equation \ref{eq:2.6.7} becomes

\[\label{eq:2.6.8} M_y-N_x=p(x)N-q(y)M.\]

We obtained Equation \ref{eq:2.6.8} by *assuming* that \(M\,dx+N\,dy=0\) has an integrating factor \(\mu(x,y)=P(x)Q(y)\). However, we can now view Equation \ref{eq:2.6.7} differently: If there are functions \(p=p(x)\) and \(q=q(y)\) that satisfy Equation \ref{eq:2.6.8} and we define

\[\label{eq:2.6.9} P(x)=\pm e^{\int p(x)\,dx}\mbox{\quad and \quad} Q(y)=\pm e^{\int q(y)\,dy},\]

then reversing the steps that led from Equation \ref{eq:2.6.6} to Equation \ref{eq:2.6.8} shows that \(\mu(x,y)=P(x)Q(y)\) is an integrating factor for \(M\,dx+N\,dy=0\). In using this result, we take the constants of integration in Equation \ref{eq:2.6.9} to be zero and choose the signs conveniently so the integrating factor has the simplest form.

There’s no simple general method for ascertaining whether functions \(p=p(x)\) and \(q=q(y)\) satisfying Equation \ref{eq:2.6.8} exist. However, the next theorem gives simple sufficient conditions for the given equation to have an integrating factor that depends on only one of the independent variables \(x\) and \(y\), and for finding an integrating factor in this case.

[thmtype:2.6.1] Let \(M,\) \(N,\) \(M_y,\) and \(N_x\) be continuous on an open rectangle \(R.\) Then\(:\)

If \((M_y-N_x)/N\) is independent of \(y\) on \(R\) and we define \[p(x)={M_y-N_x\over N}\] then \[\label{eq:2.6.10} \mu(x)=\pm e^{\int p(x)\,dx}\] is an integrating factor for \[\label{eq:2.6.11} M(x,y)\,dx+N(x,y)\,dy=0\] on \(R.\)

If \((N_x-M_y)/M\) is independent of \(x\) on \(R\) and we define \[q(y)={N_x-M_y\over M},\] then \[\label{eq:2.6.12} \mu(y)=\pm e^{\int q(y)\,dy}\] is an integrating factor for Equation \ref{eq:2.6.11} on \(R.\)

(a) If \((M_y-N_x)/N\) is independent of \(y\), then Equation \ref{eq:2.6.8} holds with \(p=(M_y-N_x)/N\) and \(q\equiv0\). Therefore \[P(x)=\pm e^{\int p(x)\,dx}\mbox{\quad and\quad}Q(y)=\pm e^{\int q(y)\,dy}=\pm e^0=\pm1,\] so Equation \ref{eq:2.6.10} is an integrating factor for Equation \ref{eq:2.6.11} on \(R\).

(b) If \((N_x-M_y)/M\) is independent of \(x\) then eqrefeq:2.6.8 holds with \(p\equiv0\) and \(q=(N_x-M_y)/M\), and a similar argument shows that Equation \ref{eq:2.6.12} is an integrating factor for Equation \ref{eq:2.6.11} on \(R\).

The next two examples show how to apply Theorem [thmtype:2.6.1].

[example:2.6.1] Find an integrating factor for the equation \[\label{eq:2.6.13} (2xy^3-2x^3y^3-4xy^2+2x)\,dx+(3x^2y^2+4y)\,dy=0\] and solve the equation.

In Equation \ref{eq:2.6.13} \[M=2xy^3-2x^3y^3-4xy^2+2x,\ N=3x^2y^2+4y,\] and \[M_y-N_x=(6xy^2-6x^3y^2-8xy)-6xy^2=-6x^3y^2-8xy,\] so Equation \ref{eq:2.6.13} isn’t exact. However, \[{M_y-N_x\over N}=-{6x^3y^2+8xy\over 3x^2y^2+4y}=-2x\] is independent of \(y\), so Theorem [thmtype:2.6.1] a

applies with \(p(x)=-2x\). Since \[\int p (x)\,dx=-\int 2x\,dx=-x^2,\] \(\mu(x)=e^{-x^2}\) is an integrating factor. Multiplying Equation \ref{eq:2.6.13} by \(\mu\) yields the exact equation \[\label{eq:2.6.14} e^{-x^2}(2xy^3-2x^3y^3-4xy^2+2x)\,dx+ e^{-x^2}(3x^2y^2+4y)\,dy=0.\]

To solve this equation, we must find a function \(F\) such that \[\label{eq:2.6.15} F_x(x,y)=e^{-x^2}(2xy^3-2x^3y^3-4xy^2+2x)\] and \[\label{eq:2.6.16} F_y(x,y)=e^{-x^2}(3x^2y^2+4y).\] Integrating Equation \ref{eq:2.6.16} with respect to \(y\) yields \[\label{eq:2.6.17} F(x,y)=e^{-x^2}(x^2y^3+2y^2)+\psi(x).\] Differentiating this with respect to \(x\) yields \[F_x(x,y)=e^{-x^2}(2xy^3-2x^3y^3-4xy^2)+\psi'(x).\] Comparing this with Equation \ref{eq:2.6.15} shows that \(\psi'(x)= 2xe^{-x^2}\); therefore, we can let \(\psi(x)=-e^{-x^2}\) in Equation \ref{eq:2.6.17} and conclude that \[e^{-x^2}\left(y^2(x^2y+2)-1\right)=c\] is an implicit solution of Equation \ref{eq:2.6.14}. It is also an implicit solution of Equation \ref{eq:2.6.13}.

Figure [figure:2.6.1] shows a direction field and some integral curves for Equation \ref{eq:2.6.13}

In Equation \ref{eq:2.6.26}

\[M=-y,\ N=x+x^6,\]

and

\[M_y-N_x=-1-(1+6x^5)=-2-6x^5.\]

We look for functions \(p=p(x)\) and \(q=q(y)\) such that

\[M_y-N_x=p(x)N-q(y)M;\]

that is,

\[\label{eq:2.6.28} -2-6x^5=p(x)(x+x^6)+q(y)y.\]

The right side will contain the term \(-6x^5\) if \(p(x)=-6/x\). Then Equation \ref{eq:2.6.28} becomes

\[-2-6x^5=-6-6x^5+q(y)y,\]

so \(q(y)=4/y\). Since

\[\int p(x)\,dx=-\int{6\over x}\,dx=-6\ln|x|=\ln{1\over x^6},\]

and

\[\int q(y)\,dy=\int{4\over y}\,dy=4\ln |y|=\ln{y^4},\]

we can take \(P(x)=x^{-6}\) and \(Q(y)=y^4\), which yields the integrating factor \(\mu(x,y)=x^{-6}y^4\). Multiplying Equation \ref{eq:2.6.26} by \(\mu\) yields the exact equation

\[-{y^5\over x^6}\,dx+\left({y^4\over x^5}+y^4\right) \,dy=0.\]

We leave it to you to use the method of the Section 2.5 to show that this equation has the implicit solution

\[\left({y\over x}\right)^5+y^5=k.\]

Solving for \(y\) yields

\[y=k^{1/5}x(1+x^5)^{-1/5},\]

which we rewrite as

\[y=cx(1+x^5)^{-1/5}\]

by renaming the arbitrary constant. This is also a solution of Equation \ref{eq:2.6.26}.

Figure [figure:2.6.4} shows a direction field and some integral curves for Equation \ref{eq:2.6.26}.