80 CHAPTER 2. FUNCTIONS OF SEVERAL VARIABLES Definition 2.6. For a real-valued function f(x,y), the gradient of f, denoted by∇f, is the vector ( ∂f ) ∇f= ∂x ,∂f (2.12) ∂y in 2 . For a real-valued function f(x,y,z), the gradient is the vector ∇f= in 3 . The symbol∇is pronounced “del”. 5 Corollary 2.3. D v f= v·∇f ( ∂f ) ∂x ,∂f ∂y ,∂f ∂z (2.13) Example 2.15. Find ( the directional derivative of f(x,y)= xy 2 +x 3 y at the point (1,2) in 1 the direction of v= √, √2 1 ). 2 Solution: We see that∇f= (y 2 +3x 2 y,2xy+ x 3 ), so ( ) 1 D v f(1,2)=v·∇f(1,2)= √ 1 , √2 ·(2 2 +3(1) 2 (2),2(1)(2)+1 3 )= √ 15 2 2 A real-valued function z= f(x,y) whose partial derivatives ∂f ∂f ∂x and ∂y exist and are continuous is called continuously differentiable. Assume that f(x,y) is such a function and that∇f 0. Let c be a real number in the range of f and let v be a unit vector in 2 which is tangent to the level curve f(x,y)=c(see Figure 2.4.1). y v ∇f f(x,y)=c 0 x Figure 2.4.1 5 Sometimes the notation grad(f) is used instead of∇f.
2.4 Directional Derivatives and the Gradient 81 The value of f(x,y) is constant along a level curve, so since v is a tangent vector to this curve, then the rate of change of f in the direction of v is 0, i.e. D v f= 0. But we know that D v f = v·∇f =‖v‖‖∇f‖ cosθ, whereθis the angle between v and∇f. So since‖v‖=1then D v f=‖∇f‖ cosθ. So since∇f 0 then D v f= 0⇒cosθ=0⇒θ=90 ◦ . In other words,∇f⊥ v, which means that∇f is normal to the level curve. In general, for any unit vector v in 2 , we still have D v f=‖∇f‖ cosθ, whereθis the angle between v and∇f. At a fixed point (x,y) the length‖∇f‖ is fixed, and the value of D v f then varies asθvaries. The largest value that D v f can take is when cosθ=1 (θ=0 ◦ ), while the smallest value occurs when cosθ=−1 (θ=180 ◦ ). In other words, the value of the function f increases the fastest in the direction of∇f (sinceθ=0 ◦ in that case), and the value of f decreases the fastest in the direction of−∇f (sinceθ=180 ◦ in that case). We have thus proved the following theorem: Theorem 2.4. Let f(x,y) be a continuously differentiable real-valued function, with ∇f 0. Then: (a) The gradient∇f is normal to any level curve f(x,y)=c. (b) The value of f(x,y) increases the fastest in the direction of∇f. (c) The value of f(x,y) decreases the fastest in the direction of−∇f. Example 2.16. In which direction does the function f(x,y)= xy 2 + x 3 y increase the fastest from the point (1,2)? In which direction does it decrease the fastest? Solution: Since∇f = (y 2 + 3x ( 2 y,2xy+ x 3 ), then∇f(1,2)=(10,5)0. A unit vector in that direction is v= ∇f ‖∇f‖ = √ 2, √5 1 ). Thus, f increases the fastest in the direction of ( ) 5 ( √ 2 1 , √5 −2 and decreases the fastest in the direction of √, −1 √ ). 5 5 5 Though we proved Theorem 2.4 for functions of two variables, a similar argument can be used to show that it also applies to functions of three or more variables. Likewise, the directional derivative in the three-dimensional case can also be defined by the formula D v f= v·∇f. Example 2.17. The temperature T of a solid is given by the function T(x,y,z)=e −x + e −2y +e 4z ,where x,y,zarespacecoordinatesrelativetothecenterofthesolid. Inwhich direction from the point (1,1,1) will the temperature decrease the fastest? Solution: Since∇f= (−e −x ,−2e −2y ,4e 4z ), thenthetemperaturewilldecreasethefastest in the direction of−∇f(1,1,1)=(e −1 ,2e −2 ,−4e 4 ).