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
is exact on \(R\). Sometimes an equation that isn’t exact can be made exact by multiplying it by an appropriate function. For example,
is not exact, since \(M_y(x,y)=4y\ne N_x(x,y)=2y\) in (2.6.2). However, multiplying (2.6.2) by \(x\) yields
which is exact, since \(M_y(x,y)=N_x(x,y)=4xy\) in (2.6.3). Solving (2.6.3) by the procedure given in Section 2.5 yields the implicit solution
A function \(\mu=\mu(x,y)\) is an integrating factor for (2.6.1) if
is exact. If we know an integrating factor \(\mu\) for (2.6.1), we can solve the exact equation (2.6.4) by the method of Section 2.5. It would be nice if we could say that (2.6.1) and (2.6.4) always have the same solutions, but this isn’t so. For example, a solution \(y=y(x)\) of (2.6.4) such that \(\mu(x,y(x))=0\) on some interval \(a<x<b\) could fail to be a solution of (2.6.1) (Exercise 1), while (2.6.1) may have a solution \(y=y(x)\) such that \(\mu(x,y(x)) \) isn’t even defined (Exercise 2). Similar comments apply if \(y\) is the independent variable and \(x\) is the dependent variable in (2.6.1) and (2.6.4). However, if \(\mu(x,y)\) is defined and nonzero for all \((x,y)\), (2.6.1) and (2.6.4) are equivalent; that is, they have the same solutions.
Finding Integrating Factors
By applying Theorem 2.5.2 (with \(M\) and \(N\) replaced by \(\mu M\) and \(\mu N\)), we see that (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
on \(R\). It’s better to rewrite the last equation as
which reduces to the known result for exact equations; that is, if \(M_y=N_x\) then (2.6.5) holds with \(\mu=1\), so (2.6.1) is exact.
You may think (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 (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 (2.6.5) becomes
or, after dividing through by \(P(x)Q(y)\),
Now let
so (2.6.7) becomes
We obtained (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 (2.6.7) differently: If there are functions \(p=p(x)\) and \(q=q(y)\) that satisfy (2.6.8) and we define
then reversing the steps that led from (2.6.6) to (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 (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 (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.
Theorem 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
\begin{equation} \mu(x)=\pm e^{\int p(x)\,dx} \tag{2.6.10}\end{equation}is an integrating factor for
\begin{equation} M(x,y)\,dx+N(x,y)\,dy=0 \tag{2.6.11}\end{equation}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
\begin{equation} \mu(y)=\pm e^{\int q(y)\,dy} \tag{2.6.12}\end{equation}is an integrating factor for (2.6.11) on \(R.\)
Proof (a) If \((M_y-N_x)/N\) is independent of \(y\), then (2.6.8) holds with \(p=(M_y-N_x)/N\) and \(q\equiv0\). Therefore
so (2.6.10) is an integrating factor for (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 (2.6.12) is an integrating factor for (2.6.11) on \(R\).∎
The next two examples show how to apply Theorem 2.6.1.
Example 2.6.1
Find an integrating factor for the equation
and solve the equation.
Solution In (2.6.13)
and
so (2.6.13) isn’t exact. However,
is independent of \(y\), so Theorem 2.6.1(a) applies with \(p(x)=-2x\). Since
\(\mu(x)=e^{-x^2}\) is an integrating factor. Multiplying (2.6.13) by \(\mu\) yields the exact equation
To solve this equation, we must find a function \(F\) such that
and
Integrating (2.6.16) with respect to \(y\) yields
Differentiating this with respect to \(x\) yields
Comparing this with (2.6.15) shows that \(\psi'(x)= 2xe^{-x^2}\); therefore, we can let \(\psi(x)=-e^{-x^2}\) in (2.6.17) and conclude that
is an implicit solution of (2.6.14). It is also an implicit solution of (2.6.13).
Figure 2.6.1 shows a direction field and some integal curves for (2.6.13)
Example 2.6.2
Find an integrating factor for
and solve the equation.
Solution In (2.6.18),
and
so (2.6.18) isn’t exact. Moreover,
is not independent of \(y\), so Theorem 2.6.1(a) does not apply. However, Theorem 2.6.1(b) does apply, since
is independent of \(x\), so we can take \(q(y)=1\). Since
\(\mu(y)=e^y\) is an integrating factor. Multiplying (2.6.18) by \(\mu\) yields the exact equation
To solve this equation, we must find a function \(F\) such that
and
Integrating (2.6.20) with respect to \(x\) yields
Differentiating this with respect to \(y\) yields
and comparing this with (2.6.21) shows that \(\phi'(y)=e^y\). Therefore we set \(\phi(y)=e^y\) in (2.6.22) and conclude that
is an implicit solution of (2.6.19). It is also an implicit solution of (2.6.18). Figure 2.6.2 shows a direction field and some integral curves for (2.6.18).∎
Theorem 2.6.1 does not apply in the next example, but the more general argument that led to Theorem 2.6.1 provides an integrating factor.
Example 2.6.3
Find an integrating factor for
and solve the equation.
Solution In (2.6.23)
and
Therefore
so Theorem 2.6.1 does not apply. Following the more general argument that led to Theorem 2.6.1, we look for functions \(p=p(x)\) and \(q=q(y)\) such that
that is,
Since the left side contains only first degree terms in \(x\) and \(y\), we rewrite this equation as
This will be an identity if
where \(A\) and \(B\) are constants such that
or, equivalently,
Equating the coefficients of \(x\) and \(y\) on both sides shows that the last equation holds for all \((x,y)\) if
which has the solution \(A=1\), \(B=1\). Therefore (2.6.24) implies that
Since
we can let \(P(x)=x\) and \(Q(y)=y\); hence, \(\mu(x,y)=xy\) is an integrating factor. Multiplying (2.6.23) by \(\mu\) yields the exact equation
We leave it to you to use the method of Section 2.5 to show that this equation has the implicit solution
This is also an implicit solution of (2.6.23). Since \(x\equiv0\) and \(y\equiv0\) satisfy (2.6.25), you should check to see that \(x\equiv0\) and \(y\equiv0\) are also solutions of (2.6.23). (Why is it necesary to check this?)
Figure 2.6.3 shows a direction field and integral curves for (2.6.23).
See Exercise 28 for a general discussion of equations like (2.6.23).
Example 2.6.4
The separable equation
can be converted to the exact equation
by multiplying through by the integrating factor
However, to solve (2.6.27) by the method of Section 2.5 we would have to evaluate the nasty integral
Instead, we solve (2.6.26) explicitly for \(y\) by finding an integrating factor of the form \(\mu(x,y)=x^ay^b\).
Solution In (2.6.26)
and
We look for functions \(p=p(x)\) and \(q=q(y)\) such that
that is,
The right side will contain the term \(-6x^5\) if \(p(x)=-6/x\). Then (2.6.28) becomes
so \(q(y)=4/y\). Since
and
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 (2.6.26) by \(\mu\) yields the exact equation
We leave it to you to use the method of the Section 2.5 to show that this equation has the implicit solution
Solving for \(y\) yields
which we rewrite as
by renaming the arbitrary constant. This is also a solution of (2.6.26).
Figure 2.6.4 shows a direction field and some integral curves for (2.6.26).
2.6 Exercises
-
Verify that \(\mu(x,y)=y\) is an integrating factor for
\[ y\,dx+\left(2x+{1\over y}\right)\,dy=0 \tag*{\rm (A)} \]on any open rectangle that does not intersect the \(x\) axis or, equivalently, that
\[ y^2\,dx+(2xy+1)\,dy=0 \tag*{\rm (B)} \]is exact on any such rectangle.
Verify that \(y\equiv0\) is a solution of (B), but not of (A).
Show that
\[ y(xy+1)=c \tag*{\rm (C)} \]is an implicit solution of (B), and explain why every differentiable function \(y=y(x)\) other than \(y\equiv0\) that satisfies (C) is also a solution of (A).
-
Verify that \(\mu(x,y)=1/(x-y)^2\) is an integrating factor for
\[ -y^2\,dx+x^2\,dy=0 \tag*{\rm (A)} \]on any open rectangle that does not intersect the line \(y=x\) or, equivalently, that
\[ -{y^2\over(x-y)^2}\,dx+{x^2\over(x-y)^2}\,dy=0 \tag*{\rm (B)} \]is exact on any such rectangle.
Use Theorem 2.2.1 to show that
\[ {xy\over(x-y)}=c \tag*{\rm (C)} \]is an implicit solution of (B), and explain why it’s also an implicit solution of (A)
Verify that \(y=x\) is a solution of (A), even though it can’t be obtained from (C).
In Exercises 3–16 find an integrating factor; that is a function of only one variable, and solve the given equation.
-
\(y\,dx-x\,dy=0\)
Show answer
\(\mu(x)=1/x^2\); \(y=cx\) and \(\mu(y)=1/y^2\); \(x=cy\)
-
\(3x^2y\,dx+2x^3\,dy=0\)
Show answer
\(\mu(x)=x^{-3/2}\); \(x^{3/2}y=c\)
-
\(2y^3\,dx+3y^2\,dy=0\)
Show answer
\(\mu(y)={1/y^3}\); \(y^3e^{2x}=c\)
-
\((5xy+2y+5)\,dx+2x\,dy=0\)
Show answer
\(\mu(x)=e^{5x/2}\); \(e^{5x/2}(xy+1)=c\)
-
\((xy+x+2y+1)\,dx+(x+1)\,dy=0\)
Show answer
\(\mu(x)=e^x\); \(e^x(xy+y+x)=c\)
-
\((27xy^2+8y^3)\,dx+(18x^2y+12xy^2)\,dy=0\)
Show answer
\(\mu(x)=x\); \(x^2y^2(9x+4y)=c\)
-
\((6xy^2+2y)\,dx+(12x^2y+6x+3)\,dy=0\)
Show answer
\(\mu(y)=y^2\); \(y^3(3x^2y+2x+1)=c\)
-
\(y^2\,dx+\dst{\left(xy^2+3xy+{1\over y}\right)\,dy=0}\)
Show answer
\(\mu(y)=ye^y\); \(e^y(xy^3+1)=c\)
-
\((12x^3y+24x^2y^2)\,dx+(9x^4+32x^3y+4y)\,dy=0\)
Show answer
\(\mu(y)=y^2\); \(y^3(3x^4+8x^3y+y)=c\)
-
\((x^2y+4xy+2y)\,dx+(x^2+x)\,dy=0\)
Show answer
\(\mu(x)=xe^x\); \(x^2y(x+1)e^x=c\)
-
\(-y\,dx+(x^4-x)\,dy=0\)
Show answer
\(\mu(x)=(x^3-1)^{-4/3}\); \(xy(x^3-1)^{-1/3}=c\) and \(x\equiv1\)
-
\(\cos x\cos y\,dx +(\sin x\cos y-\sin x\sin y+y)\,dy=0\)
Show answer
\(\mu(y)=e^y\); \(e^y(\sin x\cos y+y-1)=c\)
-
\((2xy+y^2)\,dx+(2xy+x^2-2x^2y^2-2xy^3)\,dy=0\)
Show answer
\(\mu(y)=e^{-y^2}\); \(xye^{-y^2}(x+y)=c\)
-
\(y\sin y\,dx+x(\sin y-y\cos y)\,dy=0\)
Show answer
\(\dst{xy\over\sin y}=c\) and \(y=k\pi\) (\(k=\) integer)
In Exercises 17–23 find an integrating factor of the form \(\mu(x,y)=P(x)Q(y)\) and solve the given equation.
-
\(y(1+5\ln|x|)\,dx+4x\ln|x|\,dy=0\)
Show answer
\(\mu(x,y)=x^4y^3;\; x^5y^4\ln x=c\)
-
\((\alpha y+ \gamma xy)\,dx+(\beta x+ \delta xy)\,dy=0\)
Show answer
\(\mu(x,y)=1/xy;\; |x|^\alpha |y|^\beta e^{\gamma x}e^{\delta y}=c\) and \(x\equiv0\), \(y\equiv0\)
-
\((3x^2y^3-y^2+y)\,dx+(-xy+2x)\,dy=0\)
Show answer
\(\mu(x,y)=x^{-2}y^{-3};\; 3x^2y^2+y=1+cxy^2\) and \(x\equiv0\), \(y\equiv0\)
-
\(2y\,dx+ 3(x^2+x^2y^3)\,dy=0\)
Show answer
\(\dst{\mu(x,y) =x^{-2}y^{-1};\; -{2\over x}+y^3+3\ln |y|=c}\) and \(x\equiv0\), \(y\equiv0\)
-
\((a\cos xy-y\sin xy)\,dx+(b\cos xy-x\sin xy)\, dy=0\)
Show answer
\(\mu(x,y)=e^{ax}e^{by};\; e^{ax}e^{by}\cos xy=c\)
-
\(x^4y^4\,dx+x^5y^3\,dy=0\)
Show answer
\(\mu(x,y)= x^{-4}y^{-3}\) (and others) \(xy=c\)
-
\(y(x\cos x+2\sin x)\,dx+x(y+1)\sin x\,dy=0\)
Show answer
\(\mu(x,y)=xe^y\); \(x^2 ye^y\sin x=c\)
In Exercises 24–27 find an integrating factor and solve the equation. Plot a direction field and some integral curves for the equation in the indicated rectangular region.
-
C/G \((x^4y^3+y)\,dx+(x^5y^2-x)\,dy=0; \quad \{-1\le x\le1,-1\le y\le1\}\)
Show answer
\(\mu(x)=1/x^2\); \(\dst{x^3y^3\over3}-\dst{y\over x}=c\)
-
C/G \((3xy+2y^2+y)\,dx+(x^2+2xy+x+2y)\,dy=0; \quad \{-2\le x\le2,-2\le y\le2\}\)
Show answer
\(\mu(x)=x+1\); \(y(x+1)^2(x+y)=c\)
-
C/G \((12 xy+6y^3)\,dx+(9x^2+10xy^2)\,dy=0; \quad \{-2\le x\le2,-2\le y\le2\}\)
Show answer
\(\mu(x,y)=x^2y^2;\; x^3y^3(3x+2y^2)=c\)
-
C/G \((3x^2y^2+2y)\,dx+ 2x\,dy=0; \quad \{-4\le x\le4,-4\le y\le4\}\)
Show answer
\(\mu(x,y)=x^{-2}y^{-2}\); \(3x^2y=cxy+2\) and \(x\equiv0\), \(y\equiv0\)
-
Suppose \(a\), \(b\), \(c\), and \(d\) are constants such that \(ad-bc\ne0\), and let \(m\) and \(n\) be arbitrary real numbers. Show that
\[ (ax^my+by^{n+1})\,dx+(cx^{m+1}+dxy^n)\,dy=0 \]has an integrating factor \(\mu(x,y)=x^\alpha y^\beta\).
-
Suppose \(M\), \(N\), \(M_x\), and \(N_y\) are continuous for all \((x,y)\), and \(\mu=\mu(x,y)\) is an integrating factor for
\[ M(x,y)\,dx+N(x,y)\,dy=0. \tag*{\rm (A)} \]Assume that \(\mu_x\) and \(\mu_y\) are continuous for all \((x,y)\), and suppose \(y=y(x)\) is a differentiable function such that \(\mu(x,y(x))=0\) and \(\mu_x(x,y(x))\ne0\) for all \(x\) in some interval \(I\). Show that \(y\) is a solution of (A) on \(I\).
-
According to Theorem 2.1.2, the general solution of the linear nonhomogeneous equation
\[ y'+p(x)y=f(x) \tag*{\rm(A)} \]is
\[ y=y_1(x)\left(c+\int f(x)/y_1(x)\,dx\right), \tag*{\rm(B)} \]where \(y_1\) is any nontrivial solution of the complementary equation \(y'+p(x)y=0\). In this exercise we obtain this conclusion in a different way. You may find it instructive to apply the method suggested here to solve some of the exercises in Section 2.1.
Rewrite (A) as
\[ [p(x)y-f(x)]\,dx+\,dy=0, \tag*{\rm(C)} \]and show that \(\mu=\pm e^{\int p(x)\,dx}\) is an integrating factor for (C).
Multiply (A) through by \(\mu=\pm e^{\int p(x)\,dx}\) and verify that the resulting equation can be rewritten as
\[ (\mu(x)y)'=\mu(x)f(x). \]Then integrate both sides of this equation and solve for \(y\) to show that the general solution of (A) is
\[ y={1\over\mu(x)}\left(c+\int f(x)\mu(x)\,dx\right). \]Why is this form of the general solution equivalent to (B)?