2.4 Exact Equations

INTRODUCTION

Although the simple differential equation y dx + x dy = 0 is separable, we can solve it in an alternative manner by recognizing that the left-hand side is equivalent to the differential of the product of x and y; that is, y dx + x dy = d(xy). By integrating both sides of the equation we immediately obtain the implicit solution xy = c.

Differential of a Function of Two Variables

If z = f(x, y) is a function of two variables with continuous first partial derivatives in a region R of the xy-plane, then its differential (also called the total differential) is

(1)

Now if f(x, y) = c, it follows from (1) that

(2)

In other words, given a one-parameter family of curves f(x, y) = c, we can generate a first-order differential equation by computing the differential. For example, if x2 − 5xy + y3 = c, then (2) gives

(2x − 5y) dx + (−5x + 3y2) dy = 0.(3)

For our purposes it is more important to turn the problem around; namely, given a first-order DE such as (3), can we recognize that it is equivalent to the differential d(x2 − 5xy + y3) = 0?

DEFINITION 2.4.1 Exact Equation

A differential expression M(x, y) dx + N(x, y) dy is an exact differential in a region R of the xy-plane if it corresponds to the differential of some function f(x, y). A first-order differential equation of the form

is said to be an exact equation if the expression on the left side is an exact differential.

For example, the equation x2y3 dx + x3y2 dy = 0 is exact, because the left side is d(x3y3) = x2y3 dx + x3y2 dy. Notice that if M(x, y) = x2y3 and N(x, y) = x3y2, then ∂M/∂y = 3x2y2 = ∂N/∂x. Theorem 2.4.1 shows that the equality of these partial derivatives is no coincidence.

THEOREM 2.4.1 Criterion for an Exact Differential

Let M(x, y) and N(x, y) be continuous and have continuous first partial derivatives in a rectangular region R defined by a < x < b, c < y < d. Then a necessary and sufficient condition that M(x, y) dx + N(x, y) dy be an exact differential is

.(4)

PROOF: (Proof of the Necessity) For simplicity let us assume that M(x, y) and N(x, y) have continuous first partial derivatives for all (x, y). Now if the expression M(x, y) dx + N(x, y) dy is exact, there exists some function f such that for all x in R,

Therefore, ,

and

The equality of the mixed partials is a consequence of the continuity of the first partial derivatives of M(x, y) and N(x, y).

The sufficiency part of Theorem 2.4.1 consists of showing that there exists a function f for which ∂f/∂x = M(x, y) and ∂f/∂y = N(x, y) whenever (4) holds. The construction of the function f actually reflects a basic procedure for solving exact equations.

Method of Solution

Given an equation of the form M(x, y) dx + N(x, y) dy = 0, determine whether the equality in (4) holds. If it does, then there exists a function f for which

We can find f by integrating M(x, y) with respect to x, while holding y constant:

(5)

where the arbitrary function g(y) is the “constant” of integration. Now differentiate (5) with respect to y and assume ∂f/∂y = N(x, y):

This gives (6)

Finally, integrate (6) with respect to y and substitute the result in (5). The implicit solution of the equation is f(x, y) = c.

Some observations are in order. First, it is important to realize that the expression N(x, y) − (/∂y) ∫ M(x, y) dx in (6) is independent of x, because

Second, we could just as well start the foregoing procedure with the assumption that ∂f/∂y = N(x, y). After integrating N with respect to y and then differentiating that result, we would find the analogues of (5) and (6) to be, respectively,

    and    

If you find that integration of ∂f/∂x = M(x, y) with respect to x is difficult, then try integrating ∂f/∂y = N(x, y) with respect to y. In either case none of these formulas should be memorized.

EXAMPLE 1 Solving an Exact DE

Solve 2xy dx + (x2 − 1) dy = 0.

SOLUTION

With M(x, y) = 2xy and N(x, y) = x2 − 1 we have

Thus the equation is exact, and so, by Theorem 2.4.1, there exists a function f(x, y) such that

    and    

From the first of these equations we obtain, after integrating,

f(x, y) = x2y + g(y).

Taking the partial derivative of the last expression with respect to y and setting the result equal to N(x, y) gives

It follows that g′(y) = −1     and     g(y) = −y.

Hence, f(x, y) = x2yy, and so the solution of the equation in implicit form is The explicit form of the solution is easily seen to be y = c/(x2 − 1) and is defined on any interval not containing either x = 1 or x = −1.

Note the form of the solution. It is f(x, y) = c.

The solution of the DE in Example 1 is not f(x, y) = x2yy. Rather it is f(x, y) = c, or if a constant is used in the integration of g′(y), we can then write the solution as f(x, y) = 0. Note, too, that the equation could be solved by separation of variables.

EXAMPLE 2 Solving an Exact DE

Solve (e2yy cos xy) dx + (2xe2yx cos xy + 2y) dy = 0.

SOLUTION

The equation is exact because

Hence a function f(x, y) exists for which

and

Now for variety we shall start with the assumption that ∂f/∂y = N(x, y);

that is,

Remember, the reason x can come out in front of the symbol ∫ is that in the integration with respect to y, x is treated as an ordinary constant. It follows that

and so h′(x) = 0 or h(x) = c. A family of solutions is

EXAMPLE 3 An Initial-Value Problem

Solve the initial-value problem

SOLUTION

By writing the differential equation in the form

(cos x sin xxy2) dx + y(1 − x2) dy = 0

we recognize that the equation is exact because

The last equation implies that h′(x) = cos x sin x. Integrating gives

Thus or (7)

where 2c1 has been replaced by c. The initial condition y = 2 when x = 0 demands that 4(1) − cos2 (0) = c and so c = 3. An implicit solution of the problem is then .

The solution curve of the IVP in Example 3 is part of an interesting family of curves and is the curve drawn in blue in FIGURE 2.4.1. The graphs of the members of the one-parameter family of solutions given in (7) can be obtained in several ways, two of which are using software to graph level curves as discussed in the last section, or using a graphing utility and carefully graphing the explicit functions obtained for various values of c by solving y2 = (c + cos2 x)/(1 − x2) for y.

A number of solution curves are graphed. There are 3 concentric circles about the origin with the largest one with radius less than 1. Two ellipses lie between (negative 6, 0) and (negative 3.5, 0) and between (3.5, 0) and (6, 0). Two sets of three closed curves are located between (negative 2, 0) and (negative 1, 0) and between (1, 0) and (2, 0). Three curves enter the second quadrant through approximately (negative 1, 5), go down and to the right with decreasing steepness to a low point on the positive vertical axis, then go up and to the right with increasing steepness through approximately (1, 5). The middle curve with a low point at (2, 0) is highlighted. Three similar curves symmetric about the horizontal axis are graphed. Another set of 3 curves are graphed in the second quadrant. One curve goes up and to the right with increasing steepness through approximately (negative 6, 1), (negative 3, 2) and (negative 2, 5). Another curve goes up and to the right with increasing steepness through approximately (negative 4, 0.5), (negative 2, 1) and (negative 1, 5). The third curve begins at approximately (negative 2.7) and goes up and to the right with increasing steepness through approximately (negative 2, 0.5) and (negative 1, 5). The three curves have corresponding symmetric curves about the x and y axes and the origin.

FIGURE 2.4.1 Some solution curves in the family (7)

Integrating Factors

Recall from the last section that the left-hand side of the linear equation y′ + P(x)y = f(x) can be transformed into a derivative when we multiply the equation by an integrating factor. The same basic idea sometimes works for a nonexact differential equation M(x, y) dx + N(x, y) dy = 0. That is, it is sometimes possible to find an integrating factor µ(x, y) so that after multiplying, the left-hand side of

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

is an exact differential. In an attempt to find µ we turn to the criterion (4) for exactness. Equation (8) is exact if and only if (µM)y = (µN)x, where the subscripts denote partial derivatives. By the Product Rule of differentiation the last equation is the same as µMy + µy M = µNx + µx N or

µxNµyM = (MyNx)µ.(9)

Although M, N, My, Nx are known functions of x and y, the difficulty here in determining the unknown µ(x, y) from (9) is that we must solve a partial differential equation. Since we are not prepared to do that we make a simplifying assumption. Suppose µ is a function of one variable; say that µ depends only upon x. In this case µx = du/dx and (9) can be written as

(10)

We are still at an impasse if the quotient (MyNx)/N depends upon both x and y. However, if after all obvious algebraic simplifications are made, the quotient (MyNx)/N turns out to depend solely on the variable x, then (10) is a first-order ordinary differential equation. We can finally determine µ because (10) is separable as well as linear. It follows from either Section 2.2 or Section 2.3 that µ(x) = e. In like manner it follows from (9) that if µ depends only on the variable y, then

(11)

In this case, if (NxMy)/M is a function of y, only then we can solve (11) for µ.

We summarize the results for the differential equation

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

  • If (MyNx)/N is a function of x alone, then an integrating factor for equation (12) is

    (13)

  • If (NxMy)/M is a function of y alone, then an integrating factor for equation (12) is

    (14)

EXAMPLE 4 A Nonexact DE Made Exact

The nonlinear first-order differential equation xy dx + (2x2 + 3y2 − 20) dy = 0 is not exact. With the identifications M = xy, N = 2x2 + 3y2 − 20 we find the partial derivatives My = x and Nx = 4x. The first quotient from (13) gets us nowhere since

depends on x and y. However (14) yields a quotient that depends only on y:

The integrating factor is then After multiplying the given DE by µ(y) = y3 the resulting equation is

xy4dx + (2x2y3 + 3y5 − 20y3) dy = 0.

You should verify that the last equation is now exact as well as show, using the method of this section, that a family of solutions is

REMARKS

(i) When testing an equation for exactness, make sure it is of the precise form M(x, y) dx + N(x, y) dy = 0. Sometimes a differential equation is written G(x, y) dx = H(x, y) dy. In this case, first rewrite it as G(x, y) dxH(x, y) dy = 0, and then identify M(x, y) = G(x, y) and N(x, y) = −H(x, y) before using (4).

(ii) In some texts on differential equations the study of exact equations precedes that of linear DEs. If this were so, the method for finding integrating factors just discussed can be used to derive an integrating factor for y′ + P(x)y = f(x). By rewriting the last equation in the differential form (P(x)yf(x)) dx + dy = 0 we see that

From (13) we arrive at the already familiar integrating factor eP(x)dx used in Section 2.3.

2.4 Exercises Answers to selected odd-numbered problems begin on page ANS-2.

In Problems 1–20, determine whether the given differential equation is exact. If it is exact, solve it.

  1. (2x − 1) dx + (3y + 7) dy = 0
  2. (2x + y) dx − (x + 6y) dy = 0
  3. (5x + 4y) dx + (4x − 8y3) dy = 0
  4. (sin yy sin x) dx + (cos x + x cos yy) dy = 0
  5. (2xy2 − 3) dx + (2x2y + 4) dy = 0
  6. (x2y2) dx + (x2 − 2xy) dy = 0
  7. (xy3 + y2 sin x) dx = (3xy2 + 2y cos x) dy
  8. (x3 + y3) dx + 3xy2 dy = 0
  9. (3x2y + ey) dx + (x3 + xey − 2y) dy = 0
  10. (5y − 2x)y′ − 2y = 0
  11. (tan x − sin x sin y) dx + cos x cos y dy = 0
  12. (4t3y − 15t2y) dt + (t4 + 3y2t) dy = 0

In Problems 21–26, solve the given initial-value problem.

  1. (x + y)2 dx + (2xy + x2 − 1) dy = 0, y(1) = 1
  2. (ex + y) dx + (2 + x + yey) dy = 0, y(0) = 1
  3. (4y + 2t − 5) dt + (6y + 4t − 1) dy = 0, y(−1) = 2
  4. , y(1) = 1
  5. (y2 cos x − 3x2y − 2x) dx + (2y sin xx3 + ln y) dy = 0, y(0) = e

In Problems 27 and 28, find the value of k so that the given differential equation is exact.

  1. (y3 + kxy4 − 2x) dx + (3xy2 + 20x2y3) dy = 0
  2. (6xy3 + cos y) dx + (2kx2y2x sin y) dy = 0

In Problems 29–32, verify that the given differential equation is not exact. Multiply the given differential equation by the indicated integrating factor µ(x, y) and verify that the new equation is exact. Solve.

  1. (−xy sin x + 2y cos x) dx + 2x cos x dy = 0;     µ(x, y) = xy
  2. (x2 + 2xyy2) dx + (y2 + 2xyx2) dy = 0;     µ(x, y) = (x + y)–2
  3. (x3y2 + y) dx + x dy = 0;     µ(x, y) = 1/x2y2
  4. x dx + (yx2y2) dy = 0;     µ(x, y) = 1/(x2 + y2)

In Problems 33–38, solve the given differential equation by finding, as in Example 4, an appropriate integrating factor.

  1. (2y2 + 3x) dx + 2xy dy = 0
  2. y(x + y + 1) dx + (x + 2y) dy = 0
  3. 6xy dx + (4y + 9x2) dy = 0
  4. (10 − 6y + e–3x) dx − 2 dy = 0
  5. (y2 + xy3) dx + (5y2xy + y3 sin y) dy = 0

In Problems 39 and 40, solve the given initial-value problem by finding, as in Example 4, an appropriate integrating factor.

  1. x dx + (x2y + 4y) dy = 0, y(4) = 0
  2. (x2 + y2 − 5) dx = (y + xy) dy, y(0) = 1
  3. (a) Show that a one-parameter family of solutions of the equation

    (4xy + 3x2) dx + (2y + 2x2) dy = 0

    is x3 + 2x2y + y2 = c.

    (b) Show that the initial conditions y(0) = −2 and y(1) = 1 determine the same implicit solution.

    (c) Find explicit solutions y1(x) and y2(x) of the differential equation in part (a) such that y1(0) = −2 and y2(1) = 1. Use a graphing utility to graph y1(x) and y2(x).

Discussion Problems

  1. Consider the concept of an integrating factor used in Problems 29–40. Are the two equations

    M dx + N dy = 0 and µM dx + µN dy = 0

    necessarily equivalent in the sense that a solution of one is also a solution of the other? Discuss.

  2. Reread Example 3 and then discuss why we can conclude that the interval of definition of the explicit solution of the IVP (the blue curve in Figure 2.4.1) is (−1, 1).
  3. Discuss how the functions M(x, y) and N(x, y) can be found so that each differential equation is exact. Carry out your ideas.

    (a)

    (b)

  4. Differential equations are sometimes solved by having a clever idea. Here is a little exercise in cleverness: Although the differential equation

    is not exact, show how the rearrangement

    and the observation d(x2 + y2) = x dx + y dy can lead to a solution.

  5. True or False: Every separable first-order equation dy/dx = g(x)h(y) is exact.

Mathematical Model

  1. Falling Chain     A portion of a uniform chain of length 8 ft is loosely coiled around a peg at the edge of a high horizontal platform and the remaining portion of the chain hangs at rest over the edge of the platform. See FIGURE 2.4.2. Suppose the length of the overhang is 3 ft, that the chain weighs 2 lb/ft, and that the positive direction is downward. Starting at t = 0 seconds, the weight of the overhanging portion causes the chain on the table to uncoil smoothly and fall to the floor. If x(t) denotes the length of the chain overhanging the table at time t > 0, then v = dx/dt is its velocity. When all resistive forces are ignored, it can be shown that a mathematical model relating v and x is

    (a) Rewrite the model in differential form. Proceed as in Problems 33–38 and solve the DE by finding an appropriate integrating factor. Find an explicit solution v(x).

    (b) Determine the velocity with which the chain leaves the platform.

    An illustration represents a chain coiled around a peg at the edge of a platform. Part of the chain hangs a distance x of t.

    FIGURE 2.4.2 Uncoiling chain in Problem 47

Computer Lab Assignment

  1. Streamlines     (a) The solution of the differential equation

    is a family of curves that can be interpreted as streamlines of a fluid flow around a circular object whose boundary is described by the equation x2 + y2 = 1. Solve this DE and note the solution f(x, y) = c for c = 0.

    (b) Use a CAS to plot the streamlines for c = 0, ±0.2, ±0.4, ±0.6, and ±0.8 in three different ways. First, use the contourplot of a CAS. Second, solve for x in terms of the variable y. Plot the resulting two functions of y for the given values of c, and then combine the graphs. Third, use the CAS to solve a cubic equation for y in terms of x.