Math 233. Directional Derivatives and Gradients Basics Given a function f(x, y) and a unit vector u = a, b we define the directional derivative of f at (x 0, y 0 ) in the direction u by f(x 0 + ta, y 0 + tb) f(x 0, y 0 ) lim t 0 t provided the limit exists. In particular, the directional derivatives in the directions u =, 0 and u = 0, are, respectively, the partial derivatives f f and x y. When f is differentiable on an open disk containing (x 0, y 0 ), the chain rule implies for any unit vector u = a, b that () D u f(x 0, y 0 ) = af x (x 0, y 0 ) + bf y (x 0, y 0 ). Note that unit vectors will often be denoted by u = cos θ, sin θ, and these are indeed unit vectors, because u = cos 2 θ + sin 2 θ =. Example. Let f(x, y) = 2xy 3y 2. Find the directional derivative of f in the direction A = 3i + 4j at the point (, 2). The unit vector in the direction of A is u = 3i + 4j. Now f 5 5 x = 2y and so f x (, 2) = 4; f y = 2x 6y and so f y (, 2) = 0. Therefore, using the equation () we find ( D u (, 2) = f x (, 2) 3 ) ( ) ( 4 + f y (, 2) = 4 3 ) ( ) 4 + ( 0) = 52 5 5 5 5 5. The gradient of a function f(x, y) at a point (x 0, y 0 ) is defined by f(x 0, y 0 ) = f x (x 0, y 0 ), f y (x 0, y 0 ). For example, if f(x, y) = y 2 e 3x then f(x, y) = 3y 2 e 3x, 2ye 3x and so f(0, ) = 3, 2. Using gradients, equation () can be written (2) D u f(x 0, y 0 ) = af x (x 0, y 0 ) + bf y (x 0, y 0 ) = f(x 0, y 0 ) a, b = f(x 0, y 0 ) u Further, recalling that u v = cos θ u v where 0 θ80 is the angle between u and v we rewrite () as (3) D u f(x 0, y 0 ) = f(x 0, y 0 ) u = cos θ f(x 0, y 0 ) u = cos θ f(x 0, y 0 ) because u = since u is a unit vector. Because the maximum of cos θ is when θ = 0 and the minimum of cos θ = when θ = 80 this yields several interesting properties of gradients.
Properties of Gradients. Let f be differentiable on an open disk containing (x 0, y 0 ). Then. D u f(x 0, y 0 ) = f(x 0, y 0 ) u 2. The direction of maximum increase of f at the point (x 0, y 0 ) is u = f(x 0, y 0 ) f(x 0, y 0 ) when f(x 0, y 0 ) 0 and the directional derivative in this direction is f(x 0, y 0 ). 3. The direction of maximum decrease of f at the point (x 0, y 0 ) is u = f(x 0, y 0 ) f(x 0, y 0 ) when f(x 0, y 0 ) 0 and the directional derivative in this direction is f(x 0, y 0 ). 4. Given that f(x 0, y 0 ) = k, the gradient f(x 0, y 0 ) is a normal vector to the level curve f(x, y) = k at the point (x 0, y 0 ). For a function f(x, y, z) of three variables, we define f = f x, f y, f z, and we have the following properties. Properties of Gradients. Let f be differentiable on an open ball containing (x 0, y 0, z 0 ) and let u = a, b, c be a unit vector. Then. D u f(x 0, y 0, z 0 ) = f(x 0, y 0, z 0 ) u 2. The direction of maximum increase of f at the point (x 0, y 0, z 0 ) is u = f(x 0, y 0, z 0 ) f(x 0, y 0, z 0 ) when f(x 0, y 0, z 0 ) 0 and the directional derivative in this direction is f(x 0, y 0, z 0 ). 3. The direction of maximum decrease of f at the point (x 0, y 0, z 0 ) is u = f(x 0, y 0, z 0 ) f(x 0, y 0, z 0 ) when f(x 0, y 0, z 0 ) 0 and the directional derivative in this direction is f(x 0, y 0, z 0 ). 4. Given that f(x 0, y 0, z 0 ) = k, the gradient f(x 0, y 0, z 0 ) is a normal vector to the level surface f(x, y, z) = k at the point (x 0, y 0, z 0 ). Several of the above properties are illustrated in the following example. Example 2. Consider the function f(x, y, z) = z 7 4x 2 y (a) Find the gradient f. (b) Find the gradient f at the point (3, 4, 3). (c) Find the directional derivative of f at that point in the direction of the vector, 6, 3. (d) In what unit vector direction does the function f increase the fastest at the point (3, 4, 3), and what is the rate of increase?
(e) In what unit vector direction does the function f decrease the fastest at the point (3, 4, 3), and what is the rate? Answer. (a) f = 8xy, 4x 2, 7z 6. (b) f(3, 4, 3) = 96, 36, 503. (c) The directional derivative of f in the direction of the unit vector u = 46, 6, 3 at the point is D u f = f(3, 4, 3) u = 96, 36, 503, 6, 3 = 4997 46 46 (d) The direction is the unit vector in the direction of f(3, 4, 3) which is 26052 96, 36, 503 and the rate of increase is f(3, 4, 3) = 26052. (e) The direction is the unit vector in the direction of f(3, 4, 3) which is 26052 96, 36, 503 and the rate of change is f(3, 4, 3) = 26052. Example 3. The axis of a light in a lighthouse is tilted. When the light points east, it is inclined upward at 5.0 degree(s). When it points north it is inclined upward at 2.0 degree(s). What is the maximum angle of elevation of the light? Round your answer to the nearest 0.000 degree. Answer. Use the fact that a line that is inclined at an angle of θ degrees, has a slope of m = tan θ. The lighthouse beams lie in some plane described by z = f(x, y) where the light is at the origin. Now, east points in the direction of the positive x-axis, so f x = tan(5.0 ) and north points in the direction of the positive z-axis, so f y = tan(2.0 ). The maximum angle of inclination, will be inverse tangent of the maximum directional derivative. Thus we find the gradient is f = tan(5.0 ), tan(2.0 ) 0.08748866, 0.03492077 Then max angle = arctan( f ) 5.384
Practice Exercises on Gradients. Let f(x, y) be a function that is differentiable in the plane. For the point (, 3) we are given that the directional derivative of f is: 24 in the direction of the vector 3, 7 ; 6 in the direction of the vector 7, 3. (a) Use this information to find f(, 3). (b) Then find D u f(, 3) where u is the unit vector in the direction of 3, 3. (c) Find direction u for D u f(, 3) is a maximum, and determine D u f(, 3) for this direction u. 2. Answer the following questions regarding the function (a) Find the gradient f. f(x, y, z) = z 7 9x 2 y (b) Find the gradient f at the point (5, 5, 5). (c) Find the directional derivative of f at that point in the direction of the vector, 6, 5. (d) In what unit vector direction does the function f increase the fastest at the point (5, 5, 5), and what is the rate of increase? (e) In what unit vector direction does the function f decrease the fastest at the point (5, 5, 5), and what is the rate? 3. For this problem, let f(x, y) = 3xy 4y 2. (a) Find the gradient of f at the point ( 2, 2). (b) Find the directional derivative D u f( 2, 2) in the direction of the vector 2, 8. (c) Find the unit vector direction in which f increases the fastest at ( 2, 2). What is the rate of increase of f in that direction? (d) Find the two unit vector directions for which D u f( 2, 2) = 0. 4. The axis of a light in a lighthouse is tilted. When the light points east, it is inclined upward at 4.9 degrees. When it points north it is inclined upward at 2.4 degrees. What is the maximum angle of elevation of the light? Round your answer to the nearest 0.000 degree.
Practice Exercises on Gradients with Solutions.. Let f(x, y) be a function that is differentiable in the plane. For the point (, 3) we are given that the directional derivative of f is: 24 in the direction of the vector 3, 7 ; 6 in the direction of the vector 7, 3. (a) Use this information to find f(, 3). (b) Then find D u f(, 3) where u is the unit vector in the direction of 3, 3. (c) Find direction u for D u f(, 3) is a maximum, and determine D u f(, 3) for this direction u. Solution: (a) Let us denote f(, 3) = x, y. Then x, y 3, 7 = 24 and x, y 7, 3 = 6 Therefore, 3x + 7y = 24 and 7x + 3y = 6. The solution to this system of equations is x = and y = 3. Consequently, f(, 3) =, 3. (b) First, u =, and so 2 D u f(, 3) =, 3 2, = 4 2 2 (c) The direction is u = f(, 3) f(, 3) =, 3 and in that direction 0 D u f(, 3) = f(, 3) = 0. 2. Answer the following questions regarding the function (a) Find the gradient f. f(x, y, z) = z 7 9x 2 y (b) Find the gradient f at the point (5, 5, 5). (c) Find the directional derivative of f at that point in the direction of the vector, 6, 5. (d) In what unit vector direction does the function f increase the fastest at the point (5, 5, 5), and what is the rate of increase? (e) In what unit vector direction does the function f decrease the fastest at the point (5, 5, 5), and what is the rate?
Solution: (a) f = 8xy, 9x 2, 7z 6. (b) f(5, 5, 5) = 450, 225, 09375. (c) The directional derivative of f in the direction of the unit vector u = 62, 6, 5 at the point is D u f = f(5, 5, 5) u = 450, 225, 09375, 6, 5 = 545075 62 62 (d) The direction is the unit vector in the direction of f(5, 5, 5) which is 96343750 450, 225, 09375 and the rate of increase is f(5, 5, 5) = 96343750. (e) The direction is the unit vector in the direction of f(5, 5, 5) which is 96343750 450, 225, 09375 and the rate of change is f(5, 5, 5) = 96343750. 3. For this problem, let f(x, y) = 3xy 4y 2. (a) Find the gradient of f at the point ( 2, 2). (b) Find the directional derivative D u f( 2, 2) in the direction of the vector 2, 8. (c) Find the unit vector direction in which f increases the fastest at ( 2, 2). What is the rate of increase of f in that direction? (d) Find the two unit vector directions for which D u f( 2, 2) = 0. Solution: (a) First, f = 3y, 3x 8y. Therefore, f( 2, 2) = (3)( 2), (3)( 2) (8)( 2) = 6, 0 (b) Observe that u = 7, 4, and so D u f( 2, 2) = f( 2, 2) u = 6, 0 7, 4 = 34 7
(c) The unit vector direction of fastest increase is u = 36 6, 0 and the rate of increase is f( 2, 2) = 36. (d) These are the two unit vectors that are perpendicular to the gradient, namely 36 0, 6 and 36 0, 6 4. The axis of a light in a lighthouse is tilted. When the light points east, it is inclined upward at 4.9 degrees. When it points north it is inclined upward at 2.4 degrees. What is the maximum angle of elevation of the light? Round your answer to the nearest 0.000 degree. Solution: Use the fact that a line that is inclined at an angle of θ degrees, has a slope of m = tan θ. The lighthouse beams lie in some plane described by z = f(x, y) where the light is at the origin. Now, east points in the direction of the positive x-axis, so f x = tan(4.9 ) and north points in the direction of the positive z-axis, so f y = tan(2.4 ). The maximum angle of inclination, will be inverse tangent of the maximum directional derivative. Thus we find the gradient is f = tan(4.9 ), tan(2.4 ) 0.08573024, 0.049242 Then max angle = arctan( f ) 5.45