1 Section 11.5: Directional Derivatives and Gradients Practice HW from LarsonTextbook (not to hand in) p. 701 # 1-7 odd, 11, 13, 21-25 odd, The Directional Derivative Recall that f x ( a, b) Slope of the tangent line to the surface at the z point (a, b, f (a, b)) in the x direction x ( a,b) f y ( a, b) z y Slope of the tangent line to the surface at the point (a, b, f (a, b)) in the y direction ( a ,b ) Instead of restricting ourselves to the x and y axis, suppose we want to find a method for finding the slope of the surface in any desired direction. z ( x0 , y 0 , z 0 ) z f ( x, y ) f y ( x 0 , y 0 ) Slope in y dir f x ( x0 , y 0 ) Slope in x dir Du ( x0 , y 0 ) Slope in u dir y0 y x0 x ( x0 , y 0 ,0) u a, b 2 Let u = < a, b > be the unit vector (a vector of length one) on the x-y plane which indicates the direction we are moving. Then we define the following: Definition of the Directional Derivative The directional derivative of a function z = f (x, y) in the direction of the unit vector u = < a, b >, denoted by Du f ( x, y ) , is defined the be the following: Du f ( x, y ) f x ( x, y )a f y ( x, y )b Notes 1. Geometrically, the directional derivative is used to calculate the slope of the surface z = f (x, y). That is, to calculate the slope of the surface at the point ( x0 , y0 , z 0 ) , where z 0 f ( x0 , y0 ) , we compute the following: Slope of Surface at po int ( x0 , y0 , z 0 ) Du f ( x0 , y0 ) f x ( x0 , y0 )a f y ( x0 , y0 )b in direction of unit vector u a.b 2. The vector u = < a, b > must be a unit vector. If we want to compute the directional derivative of a function in the direction of the vector v and v is not a unit vector, we compute v 1 u v. || v || || v || 3. The direction of the unit vector u can be expressed in terms of the angle between the vector u and the x-axis. In this case, u cos , sin (note, u is a unit vector since || u || cos 2 sin 2 1 1 ) and the directional derivative can be expressed as Du f ( x, y ) f x ( x, y ) cos f y ( x, y ) sin . 4. Computationally, the directional derivative represents the rate of change of the function f in the direction of the unit vector u. 3 Example 1: Find the directional derivative of the function f ( x, y ) 3 y 4 xy 6 x at the point (1, 2) in the direction of the unit vector that makes an angle of radians with 3 the x-axis. Solution: █ 4 Example 2: Find the directional derivative of the function f ( x, y ) 3 y 4 xy 6 x at the point (-3, -4) in the direction of the vector v 2i 3j . Solution: █ 5 Example 3: Find the directional derivative of the function f ( x, y ) e x P = (1, 1) in the direction of the point Q = (0, 0). 2 y2 at the point Solution: We first need to find a unit vector u that travels in the same direction is the vector with an initial point P and terminal point Q. First, we see that v PQ 0 1,0 1 1, 1 i j Then, since || v || (1) 2 (1) 2 2 , we can find the unit vector u to be u Hence, a v 1, 1 1 1 i jaibj || v || 2 2 2 2 2 1 1 and b . For f ( x, y ) e x y , we have that 2 2 f x ( x, y ) 2 xex 2 y2 and f x ( x, y ) 2 ye x 2 y2 . Hence, Directiona l Derivative Du f ( x, y ) f x ( x, y )a f y ( x, y )b 2 xe x 2 y2 ( 2 2 2 xe x y 2 2 2 1 1 ) 2 ye x y ( ) 2 2 2 2 2 ye x y 2 Hence, Directiona l 2 2 2 2 Derivative D f (1,1) 2 (1)e (1) ( 1) 2 (1)e (1) ( 1) u 2 2 at (1,1) 2 0 2 e ( 0) e 0 2 2 2 2 2 2 2 2 (1) (0) 2 2 2 2 2 2 █ 6 Gradient of a Function Given a function of two variables z = f (x, y), the gradient vector, denoted by f ( x, y ) , is a vector in the x-y plane denoted by f ( x, y ) f x ( x, y ) i f y ( x, y ) j Facts about Gradients 1. The directional derivative of the function z = f (x, y) in the direction of the unit vector u = < a, b > can be expressed in terms of gradient using the dot product. That is, Du f ( x, y ) f ( x, y ) u f x ( x, y ), f y ( x, y ) a, b f x ( x, y )a f y ( x, y )b 2. The gradient vector f ( x, y ) gives the direction of maximum increase of the surface z = f (x, y). The length of the gradient vector is the maximum value of the directional derivative (the maximum rate of change of f). That is, Maximum Value of the Directiona l Derivative Du f ( x, y ) || f ( x, y ) || 3. The negation of the gradient vector f ( x, y ) gives the direction of maximum decrease. of the surface z = f (x, y). The negation of the length of the gradient vector is the minimum value of the directional derivative. That is, Minimum Value of the Directiona l Derivative Du f ( x, y ) || f ( x, y ) || 7 Example 4: Given the function f ( x, y ) y cos( x y ) . a. Find the gradient of f b. Evaluate the gradient at the point P ( ,0) . 3 c. Use the gradient to find a formula for the directional derivative of f in the direction of the 3 4 vector u , . Use the result to result to find maximum value of the directional 5 5 derivative at P in the direction of the vector u. Solution: 8 █ 9 Directional Derivative and Gradient for Functions of 3 variables The directional derivative of a function f (x, y, z) of 3 variables in the direction of the unit vector u = < a, b, c >, denoted by Du f ( x, y, z ) , is defined to be the following: Du f ( x, y, z ) f x ( x, y, z )a f y ( x, y, z )b f z ( x, y, z )c The gradient vector, denoted by f ( x, y, z ) , is a vector denoted by f ( x, y , z ) f x ( x, y , z ) i f y ( x, y , z ) j f z ( x, y , z ) k 10 Example 4: Find the gradient and directional derivative of f ( x, y, z) 5x 2 3xy xyz at P(1, 2, 4) in the direction of the point Q(-3, 1, 2). Solution: We first compute the first order partial derivatives with respect to x, y, and z. They are as follows. f x ( x, y, z ) 10 x 3 y(1) yz (1) 10 x 3 y yz f y ( x, y, z ) 0 3 x(1) xz(1) 3x xz f z ( x, y, z) 0 0 xy(1) xy . Then the formula for the gradient is computed as follows: f ( x, y, z ) f x ( x, y, z ) i f y ( x, y, z ) j f z ( x, y, z ) k (10 x 3 y yz ) i (3x xz) j xy k Hence, at the point P(1, 2, 4), the gradient is f (1,2,4) (10(1) 3(2) (2)( 4)) i (3(1) (1)( 4)) j (1)( 2) k 12 i j 2 k 12,1, 2 To find the directional derivative, we must first find the unit vector u specifying the direction at the point P(1, 2, 4) in the direction of the point Q(-3, 1, 2). To do this, we find the vector v PQ . This is found to be v PQ 3 1,1 2,2 4 4,1,2 . This must be a unit vector, so we compute the following: u 1 1 1 4 1 2 v 4,1,2 4,1,2 , || v || 21 21 21 21 ( 4) 2 ( 1) 2 ( 2) 2 Then, using the dot product formula involving the gradient for the directional derivative and the results for the gradient at the point P(1,2,4) and u given above, we obtain The directiona l derivative Du f (1,2,4) f (1,2,4) u at the po int P(1,24) 4 1 12, 1, 2 , , 21 21 4 1 (12)( ) (1)( ) 2( 21 21 48 1 4 21 21 21 53 11.6 21 2 21 2 21 ) █