Functions of Several Variables Directional Derivatives and the Gradient Vector Philippe B Laval KSU April 7, 2012 Philippe B Laval (KSU) Functions of Several Variables April 7, 2012 1 / 19
Introduction Partial derivatives allow us to find the rate of change of a function in the direction of its independent variables In this section we will learn how to find derivatives (rate of change) in any direction We will also learn about the very important gradient vector and study some of its applications Philippe B Laval (KSU) Functions of Several Variables April 7, 2012 2 / 19
Directional Derivatives Definition The directional derivative of f at a point (x 0, y 0 ) in the direction of the unit vector u = a, b is given by: D u f (x 0, y 0 ) = lim h 0 f (x 0 + ah, y 0 + bh) f (x 0, y 0 ) h assuming this limit exists Definition The directional derivative of f at any point (x, y) in the direction of the unit vector u = a, b is given by: assuming this limit exists D u f (x, y) = lim h 0 f (x + ah, y + bh) f (x, y) h Philippe B Laval (KSU) Functions of Several Variables April 7, 2012 3 / 19
Directional Derivatives Example Find the derivative of f (x, y) = x 2 + y 2 in the direction of u = 1, 2 at the point (1, 1, 2) Remark: It is important to use a unit vector for the direction in which we want to compute the derivative Theorem If f is a differentiable function in x and y, then f has a directional derivative in the direction of any unit vector u = a, b and D u f (x, y) = f x (x, y) a + f y (x, y) b If u makes an angle θ with the positive x-axis, then we also have D u f (x, y) = f x (x, y) cos θ + f y (x, y) sin θ Philippe B Laval (KSU) Functions of Several Variables April 7, 2012 4 / 19
Gradient Vector The above formula, f x (x, y) a + f y (x, y) b can be written as f x (x, y), f y (x, y) a, b The vector on the left has a special name: the gradient vector Definition If f is a function of two variables in x and y, then the gradient of f, denoted f (read grad f or del f ) is defined by: f (x, y) = f x (x, y), f y (x, y) Example Compute the gradient of f (x, y) = sin xe y Example Compute f (0, 1) for f (x, y) = x 2 + y 2 + 2xy Philippe B Laval (KSU) Functions of Several Variables April 7, 2012 5 / 19
Gradient Vector We can express the directional derivative in terms of the gradient Theorem If f is a differentiable function in x and y, then f has a directional derivative in the direction of any unit vector u = a, b and D u f (x, y) = f (x, y) u Remark: From the previous formulas, we can recover the formulas for the partials of f with respect to x and y For example, the partial of f with respect to x is the directional derivative of f in the direction of i = 1, 0 So, we have D i f (x, y) = f x (x, y), f y (x, y) 1, 0 = f x (x, y) Philippe B Laval (KSU) Functions of Several Variables April 7, 2012 6 / 19
Higher Dimensions What we have derived above also applies to functions of three variables Given a function f (x, y, z) and a vector u = a, b, c, we have the following: f (x+ah,y+bh,z+ch) f (x,y,z) D u f (x, y, z) = lim h 0 h If we write x = (x, y, z), then we can write D u f ( x ) = lim variables h 0 f ( x +h u ) f ( x ) f (x, y, z) = f x, f y, f z h and this works for functions of 2 or 3 We can write D u f (x, y, z) = f (x, y, z) u Example Find the directional derivative of f (x, y, z) = x cos y sin z at ( 1, π, π ) 4 in the direction of u = 2, 1, 4 Philippe B Laval (KSU) Functions of Several Variables April 7, 2012 7 / 19
Maximizing the Directional Derivative As we saw above, the gradient can be used to find the directional derivative It has many more applications One such application is that we can use the gradient to find the direction in which a function has the largest rate of change If you think of the graph of a function as a 2-D surface in 3-D, or a terrain on which you are walking, then the gradient can be used to find the direction in which the terrain is the steepest Of course, depending on what you are trying to achieve, this may be the direction you want to avoid!! This can be accomplished as follows Theorem Suppose that f is a differentiable function and u is a unit vector The maximum value of D u f at a given point is f and it occurs when u has the same direction as f at the given point The minimum value of D u f at a given point is f and it occurs when u has the direction of f at the given point Philippe B Laval (KSU) Functions of Several Variables April 7, 2012 8 / 19
Maximizing the Directional Derivative Example Suppose that the temperature at each point of a metal plate is given by T (x, y) = e x cos y + e y cos x 1 In what direction does the temperature increase most rapidly at the point (0, 0)? What is the rate on increase? 2 In what direction does the temperature decrease most rapidly at the point (0, 0)? Philippe B Laval (KSU) Functions of Several Variables April 7, 2012 9 / 19
The Gradient Vector and Level Curves Theorem Let z = f (x, y) be a function whose partial derivatives in x and y exist Let k be any constant Let C denote the level curves f (x, y) = k Let P = (x 0, y 0 ) be a point on C Then f (x 0, y 0 ) is orthogonal to C at P Example The graph of z = f (x, y) = x 2 + y 2 is a paraboloid 1 Find the level curves of this function Describe these level curves ( ) 2 In the case k = 4, verify that the points (2, 0) and 2, 2 are points on the corresponding level curve and find a vector perpendicular to the level curve at each of these points Philippe B Laval (KSU) Functions of Several Variables April 7, 2012 10 / 19
The Gradient Vector and Level Curves Figure : Graph of z = x 2 + y 2 and level curves Philippe B Laval (KSU) Functions of Several Variables April 7, 2012 11 / 19
The Gradient Vector and Level Curves 50 40 z 30 20 4 2 4 y 10 0 2 4 0 0 2 2 4 x Figure : Graph of a surface, its level curves and 2 gradient vectors Philippe B Laval (KSU) Functions of Several Variables April 7, 2012 12 / 19
The Gradient Vector and Level Surfaces There is a similar result for level surfaces Given a function of three variables F (x, y, z), the graph of F (x, y, z) = k is a surface It is called the level surface of the function F (x, y, z) Suppose that S is a level surface of a function F (x, y, z) with equation F (x, y, z) = k where k is a constant Let P = (x 0, y 0, z 0 ) be a point on S We have the following theorem: Theorem F (x 0, y 0, z 0 ) is orthogonal to S at P Example Find a vector perpendicular to the surface 4x 2 + 2y 2 + z 2 = 16 at the point (1, 2, 2) Philippe B Laval (KSU) Functions of Several Variables April 7, 2012 13 / 19
Tangent Plane to a Level Surface The technique developed here is not to be confused with work done in previous sections Earlier, we learned how to find the tangent plane to a surface given by z = f (x, y) at the point (x 0, y 0, z 0 ) You will recall that the equation of such a plane is z z 0 = f x (x 0, y 0 ) (x x 0 ) + f y (x 0, y 0 ) (y y 0 ) In this subsection, we learn how to find the equation of the tangent plane to a level surface S of a function F (x, y, z) at a point P = (x 0, y 0, z 0 ), that is a surface given by F (x, y, z) = k where k is a constant This plane is defined by P and a vector perpendicular to S at P Such a vector is F (x 0, y 0, z 0 ) Now that we have a point on the tangent plane: (x 0, y 0, z 0 ) and a normal vector F (x 0, y 0, z 0 ), it follows that the equation of the plane tangent to S at P is: F x (x 0, y 0, z 0 ) (x x 0 ) + F y (x 0, y 0, z 0 ) (y y 0 ) + F z (x 0, y 0, z 0 ) (z z 0 ) = 0 Philippe B Laval (KSU) Functions of Several Variables April 7, 2012 14 / 19
Tangent Plane to a Level Surface Example Find an equation for the tangent plane to the elliptic cone x 2 + 4y 2 = z 2 at the point (3, 2, 5) 4 4 2 4 2 z 0 0 2 02 2 4 4 y x 2 4 Figure Philippe : Graph B Laval of (KSU) x 2 + 4y 2 zfunctions 2 = 0 of and Several itsvariables tangent plane 3x + 8y April 7, 5z 2012= 0 15 at/ 19
Normal Line to a Level Surface Since F (x 0, y 0, z 0 ) is orthogonal to S at P, it is the direction vector of the line normal to S at P The equation of such a line is x x 0 F x (x 0, y 0, z 0 ) = y y 0 F y (x 0, y 0, z 0 ) = z z 0 F z (x 0, y 0, z 0 ) (1) Example Find the parametric equations for the normal line to the elliptic cone x 2 + 4y 2 = z 2 at the point (3, 2, 5) Philippe B Laval (KSU) Functions of Several Variables April 7, 2012 16 / 19
Summary About the Gradient Vector f = f x, f y for functions of two variables and f = f x, f y, f z for functions of 3 variables The derivative of f in the direction of the unit vector u is D u f (x) = f (x) u The maximum value of D u f (x) is f (x), it happens in the direction of f (x) In other words, f (x) gives the direction of fastest increase for f f (x 0, y 0 ) is orthogonal to the level curves f (x, y) = k that passes through P = (x 0, y 0 ) F (x 0, y 0, z 0 ) is orthogonal to the tangent vector of any curve in S through P where S is the level surface F (x, y, z) = k and P = (x 0, y 0, z 0 ) F (x 0, y 0, z 0 ) is orthogonal to S at P The equation of the tangent plane to S at P is F x (x 0, y 0, z 0 ) (x x 0 ) + F y (x 0, y 0, z 0 ) (y y 0 ) + F z (x 0, y 0, z 0 ) (z z 0 ) = 0 Philippe B Laval (KSU) Functions of Several Variables April 7, 2012 17 / 19
Summary About the Gradient Vector F (x 0, y 0, z 0 ) is the direction vector of the line normal to S at P The equation of the normal line to S at P is x x 0 F x (x 0, y 0, z 0 ) = y y 0 F y (x 0, y 0, z 0 ) = z z 0 F z (x 0, y 0, z 0 ) If f and g are functions of 2 or 3 variables and c is a constant, it can be shown that the gradient satisfies the following properties (what do these properties remind you of?): 1 (f + g) = f + g 2 (f g) = f g 3 (cf ) = c f 4 (fg) ( ) = f g + g f 5 fg g f f g = g 2 6 f n = nf n 1 f Philippe B Laval (KSU) Functions of Several Variables April 7, 2012 18 / 19
Exercises See the problems at the end of section 36 in my notes on directional derivatives and the gradient vector Philippe B Laval (KSU) Functions of Several Variables April 7, 2012 19 / 19