** First Order Equations**

**2.6 INTEGRATING FACTORS**

In Section 2.5 we saw that ifM,N,My andNxare continuous andMy =Nxon an open rectangleR then

M(x, y)dx+N(x, y)dy= 0 (2.6.1)

is exact onR. Sometimes an equation that isn’t exact can be made exact by multiplying it by an appro- priate function. For example,

(3x+ 2y2_{)}_{dx}_{+ 2}_{xy dy}_{= 0} _{(2.6.2)}

is not exact, sinceMy(x, y) = 4y6=Nx(x, y) = 2yin (2.6.2). However, multiplying (2.6.2) byxyields

(3x2_{+ 2}_{xy}2_{)}_{dx}_{+ 2}_{x}2_{y dy}_{= 0}_{,} _{(2.6.3)}

which is exact, sinceMy(x, y) =Nx(x, y) = 4xyin (2.6.3). Solving (2.6.3) by the procedure given in Section 2.5 yields the implicit solution

x3+x2y2=c. A functionµ=µ(x, y)is anintegrating factorfor (2.6.1) if

µ(x, y)M(x, y)dx+µ(x, y)N(x, y)dy= 0 (2.6.4)

is exact. If we know an integrating factorµ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 solutiony = y(x)of (2.6.4) such thatµ(x, y(x)) = 0on some intervala < x < bcould fail to be a solution of (2.6.1) (Exercise 1), while (2.6.1) may have a solutiony =y(x)such thatµ(x, y(x))isn’t even defined (Exercise2). Similar comments apply ifyis the independent variable andxis the dependent variable in (2.6.1) and (2.6.4). However, if µ(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 Theorem2.5.2(withM andNreplaced byµMandµN), we see that (2.6.4) is exact on an open rectangleRifµM,µN,(µM)y, and(µN)xare continuous and

∂

∂y(µM) = ∂

∂x(µN) or, equivalently, µyM +µMy =µxN+µNx onR. It’s better to rewrite the last equation as

µ(My−Nx) =µxN−µyM, (2.6.5)

which reduces to the known result for exact equations; that is, ifMy=Nxthen (2.6.5) holds withµ= 1, so (2.6.1) is exact.

You may think (2.6.5) is of little value, since it involvespartialderivatives of the unknown integrating factorµ, 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 ofxand a

function ofy; that is,µ(x, y) =P(x)Q(y). We’re not saying that every equationM dx+N dy = 0

has an integrating factor of this form; rather, we’re saying thatsome 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µ(x, y) =P(x)Q(y), thenµx(x, y) =P0(x)Q(y)andµy(x, y) =P(x)Q0(y), so (2.6.5) becomes

P(x)Q(y)(My−Nx) =P0(x)Q(y)N−P(x)Q0(y)M, (2.6.6) or, after dividing through byP(x)Q(y),

My−Nx= P
0_{(}_{x}_{)}
P(x)N−
Q0_{(}_{y}_{)}
Q(y)M. (2.6.7)
Now let
p(x) = P
0_{(}_{x}_{)}
P(x) and q(y) =
Q0_{(}_{y}_{)}
Q(y),
so (2.6.7) becomes
My−Nx=p(x)N−q(y)M. (2.6.8)

We obtained (2.6.8) byassumingthatM dx+N dy= 0has an integrating factorµ(x, y) =P(x)Q(y). However, we can now view (2.6.7) differently: If there are functionsp=p(x)andq=q(y)that satisfy (2.6.8) and we define P(x) =±e R p(x)dx and Q(y) =±e R q(y)dy , (2.6.9)

then reversing the steps that led from (2.6.6) to (2.6.8) shows thatµ(x, y) =P(x)Q(y)is an integrating factor forM 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 functionsp=p(x)andq=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 variablesxandy, and for finding an integrating factor in this case.

Theorem 2.6.1 LetM, N, My,andNxbe continuous on an open rectangleR.Then:

(a) If(My−Nx)/Nis independent ofyonRand we define

p(x) =My−Nx N then µ(x) =±e R p(x)dx (2.6.10)

is an integrating factor for

M(x, y)dx+N(x, y)dy= 0 (2.6.11)

onR.

(b) If(Nx−My)/M is independent ofxonRand we define

q(y) =Nx−My M , then µ(y) =±e R q(y)dy (2.6.12)

Section 2.6Exact Equations 85

Proof (a) If(My−Nx)/Nis independent ofy, then (2.6.8) holds withp= (My−Nx)/Nandq≡0. Therefore P(x) =±e R p(x)dx and Q(y) =±e R q(y)dy =±e0=±1, so (2.6.10) is an integrating factor for (2.6.11) onR.

(b) If(Nx−My)/Mis independent ofxthen eqrefeq:2.6.8 holds withp≡0andq= (Nx−My)/M, and a similar argument shows that (2.6.12) is an integrating factor for (2.6.11) onR.

The next two examples show how to apply Theorem2.6.1. Example 2.6.1 Find an integrating factor for the equation

(2xy3−2x3y3−4xy2+ 2x)dx+ (3x2y2+ 4y)dy= 0 (2.6.13) and solve the equation.

Solution In (2.6.13)

M = 2xy3_{−}_{2}_{x}3_{y}3_{−}_{4}_{xy}2_{+ 2}_{x, N} _{= 3}_{x}2_{y}2_{+ 4}_{y,}
and

My−Nx= (6xy2−6x3y2−8xy)−6xy2=−6x3y2−8xy, so (2.6.13) isn’t exact. However,

My−Nx

N =−

6x3_{y}2_{+ 8}_{xy}

3x2_{y}2_{+ 4}_{y} =−2x
is independent ofy, so Theorem2.6.1(a)applies withp(x) =−2x. Since

Z

p(x)dx=− Z

2x dx=−x2, µ(x) =e−x2

is an integrating factor. Multiplying (2.6.13) byµyields the exact equation

e−x2

(2xy3_{−}_{2}_{x}3_{y}3_{−}_{4}_{xy}2_{+ 2}_{x}_{)}_{dx}_{+}_{e}−x2

(3x2_{y}2_{+ 4}_{y}_{)}_{dy}_{= 0}_{.} _{(2.6.14)}
To solve this equation, we must find a functionF such that

Fx(x, y) =e−x 2 (2xy3−2x3y3−4xy2+ 2x) (2.6.15) and Fy(x, y) =e−x 2 (3x2y2+ 4y). (2.6.16)

Integrating (2.6.16) with respect toyyields

F(x, y) =e−x2

(x2y3+ 2y2) +ψ(x). (2.6.17) Differentiating this with respect toxyields

Fx(x, y) =e−x

2

(2xy3−2x3y3−4xy2) +ψ0_{(}_{x}_{)}_{.}

Comparing this with (2.6.15) shows thatψ0_{(}_{x}_{) = 2}_{xe}−x2

; therefore, we can let ψ(x) = −e−x2

in (2.6.17) and conclude that

e−x2

y2(x2y+ 2)−1

=c is an implicit solution of (2.6.14). It is also an implicit solution of (2.6.13).

−2 −1.5 −1 −0.5 0 0.5 1 1.5 2
−4
−3
−2
−1
0
1
2
3
4
* y*
* x*

Figure 2.6.1 A direction field and integral curves for

(2xy3−2x3y3−4xy2+ 2x)dx+ (3x2y2+ 4y)dy= 0

Example 2.6.2 Find an integrating factor for

2xy3dx+ (3x2y2+x2y3+ 1)dy= 0 (2.6.18)

and solve the equation.

Solution In (2.6.18),

M = 2xy3, N = 3x2y2+x2y3+ 1, and

My−Nx= 6xy2−(6xy2+ 2xy3) =−2xy3, so (2.6.18) isn’t exact. Moreover,

My−Nx

N =−

2xy3

3x2_{y}2_{+}_{x}2_{y}2_{+ 1}

is not independent ofy, so Theorem2.6.1(a) does not apply. However, Theorem2.6.1(b) does apply, since

Nx−My

M =

2xy3

2xy3 = 1 is independent ofx, so we can takeq(y) = 1. Since

Z

q(y)dy=

Z

Section 2.6Exact Equations 87

µ(y) =ey_{is an integrating factor. Multiplying (2.6.18) by}_{µ}_{yields the exact equation}

2xy3eydx+ (3x2y2+x2y3+ 1)eydy= 0. (2.6.19)

To solve this equation, we must find a functionF such that

Fx(x, y) = 2xy3ey (2.6.20)

and

Fy(x, y) = (3x2y2+x2y3+ 1)ey. (2.6.21) Integrating (2.6.20) with respect toxyields

F(x, y) =x2y3ey+φ(y). (2.6.22)

Differentiating this with respect toyyields

Fy= (3x2y2+x2y3)ey+φ0(y),

and comparing this with (2.6.21) shows thatφ0_{(}_{y}_{) =} _{e}y_{. Therefore we set}_{φ}_{(}_{y}_{) =} _{e}y _{in (2.6.22) and}
conclude that

(x2y3+ 1)ey=c

is an implicit solution of (2.6.19). It is also an implicit solution of (2.6.18). Figure2.6.2shows a direction field and some integral curves for (2.6.18).

−4 −3 −2 −1 0 1 2 3 4
−4
−3
−2
−1
0
1
2
3
4
* y*
* x*

Figure 2.6.2 A direction field and integral curves for2xy3_{e}y_{dx}_{+ (3}_{x}2_{y}2_{+}_{x}2_{y}3_{+ 1)}_{e}y_{dy}_{= 0}

Theorem2.6.1does not apply in the next example, but the more general argument that led to Theo- rem2.6.1provides an integrating factor.

Example 2.6.3 Find an integrating factor for

(3xy+ 6y2)dx+ (2x2+ 9xy)dy= 0 (2.6.23)

and solve the equation.

Solution In (2.6.23)
M = 3xy+ 6y2_{, N} _{= 2}_{x}2_{+ 9}_{xy,}
and
My−Nx= (3x+ 12y)−(4x+ 9y) =−x+ 3y.
Therefore
My−Nx
M =
−x+ 3y
3xy+ 6y2 and
Nx−My
N =
x−3y
2x2_{+ 9}_{xy},

so Theorem2.6.1does not apply. Following the more general argument that led to Theorem2.6.1, we look for functionsp=p(x)andq=q(y)such that

My−Nx=p(x)N−q(y)M; that is,

−x+ 3y=p(x)(2x2_{+ 9}_{xy}_{)}_{−}_{q}_{(}_{y}_{)(3}_{xy}_{+ 6}_{y}2_{)}_{.}

Since the left side contains only first degree terms inxandy, we rewrite this equation as

xp(x)(2x+ 9y)−yq(y)(3x+ 6y) =−x+ 3y. This will be an identity if

xp(x) =A and yq(y) =B, (2.6.24)

whereAandBare constants such that

−x+ 3y=A(2x+ 9y)−B(3x+ 6y), or, equivalently,

−x+ 3y= (2A−3B)x+ (9A−6B)y.

Equating the coefficients ofxandyon both sides shows that the last equation holds for all(x, y)if

2A−3B = −1 9A−6B = 3, which has the solutionA= 1,B= 1. Therefore (2.6.24) implies that

p(x) = 1
x and q(y) =
1
y.
Since _{Z}
p(x)dx= ln|x| and
Z
q(y)dy= ln|y|,

we can letP(x) = xandQ(y) =y; hence,µ(x, y) =xyis an integrating factor. Multiplying (2.6.23) byµyields the exact equation

Section 2.6Exact Equations 89
−4 −3 −2 −1 0 1 2 3 4
−2
−1.5
−1
−0.5
0
0.5
1
1.5
2
* y*
* x*

Figure 2.6.3 A direction field and integral curves for(3xy+ 6y2)dx+ (2x2+ 9xy)dy= 0

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

x3y2+ 3x2y3=c. (2.6.25)

This is also an implicit solution of (2.6.23). Sincex≡0andy≡0satisfy (2.6.25), you should check to see thatx≡0andy≡0are also solutions of (2.6.23). (Why is it necesary to check this?)

Figure2.6.3shows a direction field and integral curves for (2.6.23). See Exercise28for a general discussion of equations like (2.6.23). Example 2.6.4 The separable equation

−y dx+ (x+x6)dy= 0 (2.6.26)

can be converted to the exact equation

−_{x}_{+}dx_{x}6+
dy

y = 0 (2.6.27)

by multiplying through by the integrating factor

µ(x, y) = 1

y(x+x6_{)}.

However, to solve (2.6.27) by the method of Section 2.5 we would have to evaluate the nasty integral

Z _{dx}

x+x6.

−1 −0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8 1
−1
−0.8
−0.6
−0.4
−0.2
0
0.2
0.4
0.6
0.8
1
* y*
* x*

Figure 2.6.4 A direction field and integral curves for_{−}y dx+ (x+x6)dy= 0

Solution In (2.6.26)

M =−y, N =x+x6, and

My−Nx=−1−(1 + 6x5) =−2−6x5. We look for functionsp=p(x)andq=q(y)such that

My−Nx=p(x)N−q(y)M; that is,

−2−6x5=p(x)(x+x6) +q(y)y. (2.6.28)
The right side will contain the term_{−}6x5_{if}_{p}_{(}_{x}_{) =}_{−}_{6}_{/x. Then (2.6.28) becomes}

−2−6x5=−6−6x5+q(y)y,
soq(y) = 4/y. Since
Z
p(x)dx=−
Z _{6}
xdx=−6 ln|x|= ln
1
x6,
and
Z
q(y)dy=
Z _{4}
ydy= 4 ln|y|= lny
4_{,}

we can takeP(x) = x−6_{and}_{Q}_{(}_{y}_{) =}_{y}4_{, which yields the integrating factor}_{µ}_{(}_{x, y}_{) =}_{x}−6_{y}4_{. Multi-}
plying (2.6.26) byµyields the exact equation

−y 5 x6dx+ y4 x5 +y 4 dy= 0.

Section 2.6Exact Equations 91

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

y

x

5

+y5 _{=}_{k.}
Solving foryyields

y=k1/5_{x}_{(1 +}_{x}5_{)}−1/5_{,}
which we rewrite as

y=cx(1 +x5)−1/5

by renaming the arbitrary constant. This is also a solution of (2.6.26). Figure2.6.4shows a direction field and some integral curves for (2.6.26).

### 2.6 Exercises

1. (a) Verify thatµ(x, y) =yis an integrating factor for y dx+ 2x+1 y dy= 0 (A)

on any open rectangle that does not intersect thexaxis or, equivalently, that

y2dx+ (2xy+ 1)dy= 0 (B)

is exact on any such rectangle.

(b) Verify thaty≡0is a solution of (B), but not of (A). (c) Show that

y(xy+ 1) =c (C)

is an implicit solution of (B), and explain why every differentiable functiony =y(x)other thany≡0that satisfies (C) is also a solution of (A).

2. (a) Verify thatµ(x, y) = 1/(x−y)2_{is an integrating factor for}

−y2dx+x2dy= 0 (A)

on any open rectangle that does not intersect the liney =xor, equivalently, that

− y

2

(x−y)2dx+ x2

(x−y)2 dy= 0 (B)

is exact on any such rectangle. (b) Use Theorem2.2.1to show that

xy

(x−y) =c (C)

is an implicit solution of (B), and explain why it’s also an implicit solution of (A) (c) Verify thaty=xis a solution of (A), even though it can’t be obtained from (C).

In Exercises3–16find an integrating factor; that is a function of only one variable, and solve the given equation.

3. y dx−x dy= 0 4. 3x2_{y dx}_{+ 2}_{x}3_{dy}_{= 0}

7. (xy+x+ 2y+ 1)dx+ (x+ 1)dy= 0
8. (27xy2_{+ 8}_{y}3_{)}_{dx}_{+ (18}_{x}2_{y}_{+ 12}_{xy}2_{)}_{dy}_{= 0}
9. (6xy2_{+ 2}_{y}_{)}_{dx}_{+ (12}_{x}2_{y}_{+ 6}_{x}_{+ 3)}_{dy}_{= 0}
10. y2_{dx}_{+}
xy2+ 3xy+1
y
dy= 0
11. (12x3_{y}_{+ 24}_{x}2_{y}2_{)}_{dx}_{+ (9}_{x}4_{+ 32}_{x}3_{y}_{+ 4}_{y}_{)}_{dy}_{= 0}
12. (x2_{y}_{+ 4}_{xy}_{+ 2}_{y}_{)}_{dx}_{+ (}_{x}2_{+}_{x}_{)}_{dy}_{= 0}
13. _{−}y dx+ (x4_{−}_{x}_{)}_{dy}_{= 0}

14. cosxcosy dx+ (sinxcosy−sinxsiny+y)dy= 0

15. (2xy+y2_{)}_{dx}_{+ (2}_{xy}_{+}_{x}2_{−}_{2}_{x}2_{y}2_{−}_{2}_{xy}3_{)}_{dy}_{= 0}
16. ysiny dx+x(siny−ycosy)dy= 0

In Exercises 17–23 find an integrating factor of the formµ(x, y) = P(x)Q(y) and solve the given equation.

17. y(1 + 5 ln|x|)dx+ 4xln|x|dy= 0

18. (αy+γxy)dx+ (βx+δxy)dy= 0

19. (3x2_{y}3_{−}_{y}2_{+}_{y}_{)}_{dx}_{+ (}_{−}_{xy}_{+ 2}_{x}_{)}_{dy}_{= 0}
20. 2y dx+ 3(x2_{+}_{x}2_{y}3_{)}_{dy}_{= 0}

21. (acosxy−ysinxy)dx+ (bcosxy−xsinxy)dy= 0

22. x4y4dx+x5y3dy= 0

23. y(xcosx+ 2 sinx)dx+x(y+ 1) sinx dy= 0

In Exercises 24–27find an integrating factor and solve the equation. Plot a direction field and some

integral curves for the equation in the indicated rectangular region.

24. C/G (x4_{y}3_{+}_{y}_{)}_{dx}_{+ (}_{x}5_{y}2_{−}_{x}_{)}_{dy}_{= 0;} _{{−}_{1}_{≤}_{x}_{≤}_{1}_{,}_{−}_{1}_{≤}_{y}_{≤}_{1}_{}}

25. C/G (3xy+ 2y2_{+}_{y}_{)}_{dx}_{+ (}_{x}2_{+ 2}_{xy}_{+}_{x}_{+ 2}_{y}_{)}_{dy}_{= 0;} _{{−}_{2}_{≤}_{x}_{≤}_{2}_{,}_{−}_{2}_{≤}_{y}_{≤}_{2}_{}}
26. C/G (12xy+ 6y3_{)}_{dx}_{+ (9}_{x}2_{+ 10}_{xy}2_{)}_{dy}_{= 0;} _{{−}_{2}_{≤}_{x}_{≤}_{2}_{,}_{−}_{2}_{≤}_{y}_{≤}_{2}_{}}

27. C/G (3x2_{y}2_{+ 2}_{y}_{)}_{dx}_{+ 2}_{x dy}_{= 0;} _{{−}_{4}_{≤}_{x}_{≤}_{4}_{,}_{−}_{4}_{≤}_{y}_{≤}_{4}_{}}

28. Supposea,b, c, anddare constants such thatad−bc 6= 0, and letmandnbe arbitrary real numbers. Show that

(axm_{y}_{+}_{by}n+1_{)}_{dx}_{+ (}_{cx}m+1_{+}_{dxy}n_{)}_{dy}_{= 0}
has an integrating factorµ(x, y) =xα_{y}β_{.}

29. SupposeM,N,Mx, andNyare continuous for all(x, y), andµ=µ(x, y)is an integrating factor for

M(x, y)dx+N(x, y)dy= 0. (A)

Assume that µxandµy are continuous for all (x, y), and suppose y = y(x)is a differentiable function such thatµ(x, y(x)) = 0andµx(x, y(x))6= 0for allxin some intervalI. Show thatyis a solution of (A) onI.

Section 2.6Exact Equations 93

30. According to Theorem2.1.2, the general solution of the linear nonhomogeneous equation

y0_{+}_{p}_{(}_{x}_{)}_{y}_{=}_{f}_{(}_{x}_{)} _{(A)}
is
y=y1(x)
c+
Z
f(x)/y1(x)dx
, (B)

wherey1is any nontrivial solution of the complementary equationy0_{+}_{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.

(a) Rewrite (A) as

[p(x)y−f(x)]dx+ dy= 0, (C)

and show thatµ=±eR p(x)dxis an integrating factor for (C).

(b) Multiply (A) through byµ=±eR p(x)dxand verify that the resulting equation can be rewrit- ten as

(µ(x)y)0 _{=}_{µ}_{(}_{x}_{)}_{f}_{(}_{x}_{)}_{.}

Then integrate both sides of this equation and solve foryto show that the general solution of (A) is y = 1 µ(x) c+ Z f(x)µ(x)dx . Why is this form of the general solution equivalent to (B)?