<<

SECTION 15.1 Exact First-Order Equations 1093

SECTION 15.1 Exact First-Order Equations

Exact Differential Equations • Integrating Factors

Exact Differential Equations In Section 5.6, you studied applications of differential equations to growth and decay problems. In Section 5.7, you learned more about the basic ideas of differential equa- tions and studied the solution technique known as . In this chapter, you will learn more about solving differential equations and using them in real-life applications. This section introduces you to a method for solving the first- order M͑x, y͒ dx ϩ N͑x, y͒ dy ϭ 0 for the special case in which this equation represents the exact differential of a z ϭ f ͑x, y͒.

Definition of an Exact Differential Equation The equation M͑x, y͒ dx ϩ N͑x, y͒ dy ϭ 0 is an exact differential equation if there exists a function f of two variables x and y having continuous partial deriv- atives such that ͑ ͒ ϭ ͑ ͒ ͑ ͒ ϭ ͑ ͒ fx x, y M x, y and fy x, y N x, y . The general solution of the equation is f ͑x, y͒ ϭ C.

From Section 12.3, you know that if f has continuous second partials, then ѨM Ѩ2f Ѩ2f ѨN ϭ ϭ ϭ . Ѩy ѨyѨx ѨxѨy Ѩx This suggests the following test for exactness.

THEOREM 15.1 Test for Exactness Let M and N have continuous partial derivatives on an open disc R. The differen- tial equation M͑x, y͒ dx ϩ N͑x, y͒ dy ϭ 0 is exact if and only if ѨM ѨN ϭ . Ѩy Ѩx

Exactness is a fragile condition in the sense that seemingly minor alterations in an exact equation can destroy its exactness. This is demonstrated in the following example. 1094 CHAPTER 15 Differential Equations

EXAMPLE 1 Testing for Exactness

NOTE Every differential equation of a. The differential equation ͑xy2 ϩ x͒ dx ϩ yx2 dy ϭ 0 is exact because the form ѨM Ѩ ѨN Ѩ ϭ ͓xy2 ϩ x͔ ϭ 2xy and ϭ ͓ yx2͔ ϭ 2xy. M͑x͒ dx ϩ N͑y͒ dy ϭ 0 Ѩy Ѩy Ѩx Ѩx is exact. In other words, a separable vari- But the equation ͑y2 ϩ 1͒ dx ϩ xy dy ϭ 0 is not exact, even though it is obtained ables equation is actually a special type by dividing both sides of the first equation by x. of an exact equation. b. The differential equation cos y dx ϩ ͑y2 Ϫ x sin y͒ dy ϭ 0 is exact because ѨM Ѩ ѨN Ѩ ϭ ͓cos y͔ ϭ Ϫsin y and ϭ ͓ y2 Ϫ x sin y͔ ϭ Ϫsin y. Ѩy Ѩy Ѩx Ѩx But the equation cos y dx ϩ ͑y2 ϩ x sin y͒ dy ϭ 0 is not exact, even though it differs from the first equation only by a single sign.

Note that the test for exactness of M͑x, y͒ dx ϩ N͑x, y͒ dy ϭ 0 is the same as the test for determining whether F͑x, y͒ ϭ M͑x, y͒i ϩ N͑x, y͒j is the gradient of a poten- tial function (Theorem 14.1). This means that a general solution f ͑x, y͒ ϭ C to an exact differential equation can be found by the method used to find a potential function for a conservative vector field.

EXAMPLE 2 Solving an Exact Differential Equation

Solve the differential equation ͑2xy Ϫ 3x2͒ dx ϩ ͑x2 Ϫ 2y͒ dy ϭ 0.

Solution The given differential equation is exact because ѨM Ѩ ѨN Ѩ ϭ ͓2xy Ϫ 3x2͔ ϭ 2x ϭ ϭ ͓x2 Ϫ 2y͔. Ѩy Ѩy Ѩx Ѩx The general solution, f ͑x, y͒ ϭ C, is given by

f ͑x, y͒ ϭ ͵ M͑x, y͒ dx

ϭ ͵ ͑2xy Ϫ 3x2͒ dx ϭ x2y Ϫ x3 ϩ g͑y͒.

In Section 14.1, you determined g͑y͒ by integrating N͑x, y͒ with respect to y and reconciling the two expressions for f ͑x, y͒. An alternative method is to partially differentiate this version of f ͑x, y͒ with respect to y and compare the result with y ͑ ͒ C = 1000 N x, y . In other words, 24 N͑x, y͒ 20 Ѩ ͑ ͒ ϭ ͓ 2 Ϫ 3 ϩ ͑ ͔͒ ϭ 2 ϩ Ј͑ ͒ ϭ 2 Ϫ fy x, y x y x g y x g y x 2y. 16 C = 100 Ѩy

12 gЈ͑y͒ ϭ Ϫ2y

8 C = 10 C = 1 Ј͑ ͒ ϭ Ϫ ͑ ͒ ϭ Ϫ 2 ϩ Thus, g y 2y, and it follows that g y y C1. Therefore, ͑ ͒ ϭ 2 Ϫ 3 Ϫ 2 ϩ x f x, y x y x y C1 −12 −8 −4 4 8 12 and the general solution is x2y Ϫ x3 Ϫ y2 ϭ C. Figure 15.1 shows the solution curves Figure 15.1 that correspond to C ϭ 1, 10, 100, and 1000. SECTION 15.1 Exact First-Order Equations 1095

EXAMPLE 3 Solving an Exact Differential Equation

TECHNOLOGY You can use a Find the particular solution of graphing utility to graph a particular ͑ Ϫ ϩ 2͒ ϩ ϭ solution that satisfies the initial condi- cos x x sin x y dx 2xy dy 0 tion of a differential equation. In that satisfies the initial condition y ϭ 1 when x ϭ ␲. Example 3, the differential equation and initial conditions are satisfied Solution The differential equation is exact because when xy2 ϩ x cos x ϭ 0, which implies that the particular solution ѨM ѨN can be written as x ϭ 0 or Ѩy Ѩx y ϭ ±ΊϪcos x. On a graphing Ѩ Ѩ calculator screen, the solution would ͓cos x Ϫ x sin x ϩ y2͔ ϭ 2y ϭ ͓2xy͔. be represented by Figure 15.2 together Ѩy Ѩx with the y-axis. Because N͑x, y͒ is simpler than M͑x, y͒, it is better to begin by integrating N͑x, y͒. 4 f ͑x, y͒ ϭ ͵ N͑x, y͒ dy ϭ ͵ 2xy dy ϭ xy2 ϩ g͑x͒

−12.57 12.57 M͑x, y͒ Ѩ f ͑x, y͒ ϭ ͓xy2 ϩ g͑x͔͒ ϭ y2 ϩ gЈ͑x͒ ϭ cos x Ϫ x sin x ϩ y2 x Ѩx −4 gЈ͑x͒ ϭ cos x Ϫ x sin x Figure 15.2 Thus, gЈ͑x͒ ϭ cos x Ϫ x sin x and

g͑x͒ ϭ ͵ ͑cos x Ϫ x sin x͒ dx ϭ ϩ x cos x C1 ͑ ͒ ϭ 2 ϩ ϩ which implies that f x, y xy x cos x C1 , and the general solution is xy2 ϩ x cos x ϭ C. General solution Applying the given initial condition produces y ␲͑1͒2 ϩ ␲ cos ␲ ϭ C 4 2 ( π , 1) which implies that C ϭ 0. Hence, the particular solution is x 2 ϩ ϭ − π − π −π π π π xy x cos x 0. Particular solution 3 2 −2 2 3 −4 The graph of the particular solution is shown in Figure 15.3. Notice that the graph consists of two parts: the ovals are given by y2 ϩ cos x ϭ 0, and the y-axis is given Figure 15.3 by x ϭ 0.

In Example 3, note that if z ϭ f ͑x, y͒ ϭ xy2 ϩ x cos x, the total differential of z is given by ϭ ͑ ͒ ϩ ͑ ͒ dz fx x, y dx fy x, y dy ϭ ͑cos x Ϫ x sin x ϩ y2͒ dx ϩ 2xy dy ϭ M͑x, y͒ dx ϩ N͑x, y͒ dy. In other words, M dx ϩ N dy ϭ 0 is called an exact differential equation because M dx ϩ N dy is exactly the differential of f ͑x, y͒. 1096 CHAPTER 15 Differential Equations

Integrating Factors If the differential equation M͑x, y͒ dx ϩ N͑x, y͒ dy ϭ 0 is not exact, it may be possi- ble to make it exact by multiplying by an appropriate factor u͑x, y͒, which is called an for the differential equation.

EXAMPLE 4 Multiplying by an Integrating Factor

a. If the differential equation

2y dx ϩ x dy ϭ 0 Not an exact equation is multiplied by the integrating factor u͑x, y͒ ϭ x, the resulting equation

2xy dx ϩ x2 dy ϭ 0 Exact equation is exact—the left side is the total differential of x2y. b. If the equation

y dx Ϫ x dy ϭ 0 Not an exact equation is multiplied by the integrating factor u͑x, y͒ ϭ 1͞y2, the resulting equation 1 x dx Ϫ dy ϭ 0 Exact equation y y2 is exact—the left side is the total differential of x͞y.

Finding an integrating factor can be difficult. However, there are two classes of differential equations whose integrating factors can be found routinely—namely, those that possess integrating factors that are functions of either x alone or y alone. The following theorem, which we present without proof, outlines a procedure for finding these two special categories of integrating factors.

THEOREM 15.2 Integrating Factors Consider the differential equation M͑x, y͒ dx ϩ N͑x, y͒ dy ϭ 0. 1. If 1 ͓M ͑x, y͒ Ϫ N ͑x, y͔͒ ϭ h͑x͒ N͑x, y͒ y x is a function of x alone, then e͐h͑x͒ dx is an integrating factor. 2. If 1 ͓N ͑x, y͒ Ϫ M ͑x, y͔͒ ϭ k͑y͒ M͑x, y͒ x y is a function of y alone, then e͐k͑y͒ dy is an integrating factor.

STUDY TIP If either h͑x͒ or k͑y͒ is constant, Theorem 15.2 still applies. As an aid to remembering these formulas, note that the subtracted identifies both the denominator and the variable for the integrating factor. SECTION 15.1 Exact First-Order Equations 1097

EXAMPLE 5 Finding an Integrating Factor

Solve the differential equation ͑y2 Ϫ x͒ dx ϩ 2y dy ϭ 0.

͑ ͒ ϭ ͑ ͒ ϭ Solution The given equation is not exact because My x, y 2y and Nx x, y 0. However, because M ͑x, y͒ Ϫ N ͑x, y͒ 2y Ϫ 0 y x ϭ ϭ 1 ϭ h͑x͒ N͑x, y͒ 2y it follows that e͐h͑x͒ dx ϭ e͐ dx ϭ ex is an integrating factor. Multiplying the given differential equation by ex produces the exact differential equation ͑y2ex Ϫ xex͒ dx ϩ 2yex dy ϭ 0 whose solution is obtained as follows.

f ͑x, y͒ ϭ ͵ N͑x, y͒ dy ϭ ͵ 2yex dy ϭ y2ex ϩ g͑x͒

M͑x, y͒ ͑ ͒ ϭ 2 x ϩ Ј͑ ͒ ϭ 2 x Ϫ x fx x, y y e g x y e xe

gЈ͑x͒ ϭ Ϫxex

Ј͑ ͒ ϭ Ϫ x ͑ ͒ ϭ Ϫ x ϩ x ϩ Therefore, g x xe and g x xe e C1, which implies that ͑ ͒ ϭ 2 x Ϫ x ϩ x ϩ f x, y y e xe e C1. The general solution is y2ex Ϫ xex ϩ ex ϭ C, or y2 Ϫ x ϩ 1 ϭ CeϪx.

In the next example, we show how a differential equation can help in sketching a force field given by F͑x, y͒ ϭ M͑x, y͒i ϩ N͑x, y͒j.

EXAMPLE 6 An Application to Force Fields

Force field: Sketch the force field given by 2y y 2 x F ( x ,, y) i j x2 y2 x2 y2 2y y2 Ϫ x F͑x, y͒ ϭ i Ϫ j Family of tangent curves to F:. Ίx2 ϩ y2 Ίx2 ϩ y2 y2 x 1 Ce x y by finding and sketching the family of curves tangent to F.

Solution At the point ͑x, y͒ in the plane, the vector F͑x, y͒ has a slope of dy Ϫ͑y2 Ϫ x͒͞Ίx2 ϩ y2 Ϫ͑y2 Ϫ x͒ 2 ϭ ϭ dx 2y͞Ίx2 ϩ y2 2y which, in , is x 3 1 3 2y dy ϭ Ϫ͑y2 Ϫ x͒ dx 2 ͑ y2 Ϫ x͒ dx ϩ 2y dy ϭ 0. 3 From Example 5, we know that the general solution of this differential equation is y2 Ϫ x ϩ 1 ϭ CeϪx, or y2 ϭ x Ϫ 1 ϩ CeϪx. Figure 15.4 shows several representa- tive curves from this family. Note that the force vector at ͑x, y͒ is tangent to the curve Figure 15.4 passing through ͑x, y͒. 1098 CHAPTER 15 Differential Equations

LAB SERIES E X E R C I S E S F O R S E C T I O N 15.1 Lab 20

In Exercises 1–10, determine whether the differential equation In Exercises 17–26, find the integrating factor that is a function is exact. If it is, find the general solution. of x or y alone and use it to find the general solution of the differential equation. 1. ͑2x Ϫ 3y͒ dx ϩ ͑2y Ϫ 3x͒ dy ϭ 0 Ϫ ͑ ϩ 2͒ ϭ 2. yex dx ϩ ex dy ϭ 0 17. y dx x 6y dy 0 ͑ 3 ϩ ͒ Ϫ ϭ 3. ͑3y2 ϩ 10xy2͒ dx ϩ ͑6xy Ϫ 2 ϩ 10x2y͒ dy ϭ 0 18. 2x y dx x dy 0 ͑ 2 Ϫ ͒ ϩ ϭ 4. 2 cos͑2x Ϫ y͒ dx Ϫ cos͑2x Ϫ y͒ dy ϭ 0 19. 5x y dx x dy 0 ͑ 2 Ϫ 2͒ ϩ ϭ 5. ͑4x3 Ϫ 6xy2͒ dx ϩ ͑4y3 Ϫ 6xy͒ dy ϭ 0 20. 5x y dx 2y dy 0 2 2 ͑ ϩ ͒ ϩ ϭ 6. 2y2exy dx ϩ 2xyexy dy ϭ 0 21. x y dx tan x dy 0 ͑ 2 Ϫ ͒ ϩ 3 ϭ 1 22. 2x y 1 dx x dy 0 7. ͑x dy Ϫ y dx͒ ϭ 0 x2 ϩ y2 23. y2 dx ϩ ͑xy Ϫ 1͒ dy ϭ 0 8. eϪ͑x2ϩy2͒͑x dx ϩ y dy͒ ϭ 0 24. ͑x2 ϩ 2x ϩ y͒ dx ϩ 2 dy ϭ 0 1 25. 2y dx ϩ ͑x Ϫ sinΊy͒ dy ϭ 0 9. ͑y2 dx ϩ x2 dy͒ ϭ 0 ͑x Ϫ y͒2 26. ͑Ϫ2y3 ϩ 1͒ dx ϩ ͑3xy2 ϩ x3͒ dy ϭ 0 10. ey cos xy ͓ydx ϩ ͑x ϩ tan xy͒ dy͔ ϭ 0 In Exercises 27–30, use the integrating factor to find the In Exercises 11 and 12, (a) sketch an approximate solution of general solution of the differential equation. the differential equation satisfying the initial condition by hand 27. ͑4x2y ϩ 2y2͒ dx ϩ ͑3x3 ϩ 4xy͒ dy ϭ 0 on the direction field, (b) find the particular solution that satis- ͑ ͒ ϭ 2 fies the initial condition, and (c) use a graphing utility to graph u x, y xy the particular solution. Compare the graph with the hand- 28. ͑3y2 ϩ 5x2y͒ dx ϩ ͑3xy ϩ 2x3͒ dy ϭ 0 drawn graph of part (a). u͑x, y͒ ϭ x2y Differential Equation Initial Condition 29. ͑Ϫy5 ϩ x2y͒ dx ϩ ͑2xy4 Ϫ 2x3͒ dy ϭ 0 u͑x, y͒ ϭ xϪ2yϪ3 ͑ ϩ ͒ ϩ ͑ 2 2 ͒ ϭ ͑1͒ ϭ ␲͞ 11. 2x tan y 5 dx x sec y dy 0 y 2 4 30. Ϫy3 dx ϩ ͑xy2 Ϫ x2͒ dy ϭ 0 1 12. ͑x dx ϩ y dy͒ ϭ 0 y͑4͒ ϭ 3 u͑x, y͒ ϭ xϪ2yϪ2 Ίx2 ϩ y2

y y 31. Show that each of the following is an integrating factor for the differential equation 4 4 y dx Ϫ x dy ϭ 0. 2 2 1 1 1 1 (a) (b) (c) (d) x x x2 y2 xy x2 ϩ y2 −4 −2 2 4 −4 −2 2 4 32. Show that the differential equation −2 −2 ͑axy2 ϩ by͒ dx ϩ ͑bx2y ϩ ax͒ dy ϭ 0 −4 −4 is exact only if a ϭ b. If a Þ b, show that xmyn is an integrat- Figure for 11 Figure for 12 ing factor, where 2b ϩ a 2a ϩ b In Exercises 13–16, find the particular solution that satisfies the m ϭ Ϫ , n ϭ Ϫ . a ϩ b a ϩ b initial condition. Differential Equation Initial Condition In Exercises 33–36, use a graphing utility to graph the family of tangent curves to the given force field. y ϩ ͓ ͑ Ϫ ͒ ϩ ͔ ϭ ͑ ͒ ϭ 13. Ϫ dx ln x 1 2y dy 0 y 2 4 y x x 1 33. F͑x, y͒ ϭ i Ϫ j Ί 2 ϩ 2 Ί 2 ϩ 2 1 x y x y 14. ͑x dx ϩ y dy͒ ϭ 0 y͑0͒ ϭ 4 x2 ϩ y2 x y 34. F͑x, y͒ ϭ i Ϫ j 15. e3x͑sin 3y dx ϩ cos 3y dy͒ ϭ 0 y͑0͒ ϭ ␲ Ίx2 ϩ y2 Ίx2 ϩ y2 ͑ 2 ϩ 2͒ ϩ ϭ ͑ ͒ ϭ x 16. x y dx 2xy dy 0 y 3 1 35. F͑x, y͒ ϭ 4x2y i Ϫ ΂2xy2 ϩ ΃ j y2 36. F͑x, y͒ ϭ ͑1 ϩ x2͒ i Ϫ 2xy j SECTION 15.1 Exact First-Order Equations 1099

In Exercises 37 and 38, find an equation for the curve with the 42. Programming Write a program for a graphing utility or specified slope passing through the given point. computer that will perform the calculations of Euler’s Method for a specified differential equation, interval, ⌬x, and initial Slope Point condition. The output should be a graph of the discrete points dy y Ϫ x approximating the solution. 37. ϭ ͑2, 1͒ dx 3y Ϫ x Euler’s Method In Exercises 43–46, (a) use the program of dy Ϫ2xy 38. ϭ ͑0, 2͒ Exercise 42 to approximate the solution of the differential equa- dx x2 ϩ y2 tion over the indicated interval with the specified value of ⌬x and the initial condition, (b) solve the differential equation ϭ ͑ ͒ 39. Cost If y C x represents the cost of producing x units in a analytically, and (c) use a graphing utility to graph the particu- manufacturing process, the elasticity of cost is defined as lar solution and compare the result with the graph of part (a). marginal cost CЈ͑x͒ x dy E͑x͒ ϭ ϭ ϭ . Differential Initial average cost C͑x͒͞x y dx Equation Interval ⌬x Condition Find the cost function if the elasticity function is 43. yЈ ϭ xΊ3 y ͓1, 2͔ 0.01 y͑1͒ ϭ 1 20x Ϫ y ␲ E͑x͒ ϭ 44. yЈ ϭ ͑y2 ϩ 1͒ ͓Ϫ1, 1͔ 0.1 y͑Ϫ1͒ ϭ Ϫ1 2y Ϫ 10x 4 Ϫxy where C͑100͒ ϭ 500 and x ≥ 100. 45. yЈ ϭ ͓2, 4͔ 0.05 y͑2͒ ϭ 1 x2 ϩ y2 40. Euler’s Method Consider the differential equation 6x ϩ y2 Ј ϭ ͑ ͒ ͑ ͒ ϭ 46. yЈ ϭ ͓0, 5͔ 0.2 y͑0͒ ϭ 1 y F x, y with the initial condition y x0 y0. At any point ͑ Ϫ ͒ ͑ ͒ ͑ ͒ y 3y 2x xk , yk in the domain of F, F xk , yk yields the slope of the solu- tion at that point. Euler’s Method gives a discrete set of esti- ⌬ ϭ mates of the y values of a solution of the differential equation 47. Euler’s Method Repeat Exercise 45 for x 1 and using the iterative formula discuss how the accuracy of the result changes. 48. Euler’s Method Repeat Exercise 46 for ⌬x ϭ 0.5 and y ϭ y ϩ F͑x , y ͒ ⌬x kϩ1 k k k discuss how the accuracy of the result changes. ⌬ ϭ Ϫ where x xkϩ1 xk. (a) Write a short paragraph describing the general idea of how True or False? In Exercises 49–52, determine whether the Euler’s Method works. statement is true or false. If it is false, explain why or give an example that shows it is false. (b) How will decreasing the magnitude of ⌬x affect the accu- racy of Euler’s Method? 49. The differential equation 2xy dx ϩ ͑y2 Ϫ x2͒ d y ϭ 0 is exact. 41. Euler’s Method Use Euler’s Method (see Exercise 40) to 50. If M dx ϩ N dy ϭ 0 is exact, then xM dx ϩ xN dy ϭ 0 is also approximate y͑1͒ for the values of ⌬x given in the table if exact. yЈ ϭ x ϩ Ίy and y͑0͒ ϭ 2. (Note that the number of iterations 51. If M dx ϩ N dy ϭ 0 is exact, then ͓ f ͑x͒ ϩ M͔ dx ϩ ͓g͑y͒ ϩ increases as ⌬x decreases.) Sketch a graph of the approximate N͔ dy ϭ 0 is also exact. solution on the direction field in the figure. 52. The differential equation f ͑x͒ dx ϩ g͑y͒ dy ϭ 0 is exact. ⌬x 0.50 0.25 0.10 Estimate of y͑1͒

The value of y͑1͒, accurate to three decimal places, is 4.213.

y

5 4 3 2 1 x −4 −3 −2 −1 1 2