Section 15.6 Directional Derivatives and te Gradient Vector Finding rates of cange in different directions Recall tat wen we first started considering derivatives of functions of more tan one variable, we ad to introduce te concept of a partial derivative since tere is more tan one variable we can differentiate wit respect to. For a function of two variables, te partial derivatives f x and f y ad a geometric interpretation - specifically, tey represented te rate of cange of f in te i direction and j directions respectively. In tis section we consider te more general case of determining te rate of cange of a function f in te direction of any arbitrary vector v by using partial derivaitives. 1. Directional Derivatives As wit single variable calculus, by te rate of cange of f in te direction of te vector v, we mean te slope of a tangent line to f at te point (a, b) in te direction of v. In order to calculate tis, we simply generalize te ideas from single variable calculus. Suppose tat we want to find te rate of cange of f(x, y) in te direction of some unit vector u = u 1 j at te point P(a, b) (it is important tat u is a unit vector or tis will not work). Let Q = (a + u 1, b + u ) (so te point in te xy-plane a distance from P along te vector u). 00 11 00 11 00 11 Q P Te average rate of cange from P to Q can be calculated using a difference quotient. Specifically, te average rate of cange will equal f(q) f(p) PQ = f(a + u 1, b + u ) f(a, b) 1
(observe tat since u is a unit vector, te lengt of PQ will be (WHY?)). As wit single variable, we can take te limit 0, and as gets smaller, te difference quotient approximates te slope of f at P in te direction of u more accurately. Tis motivates te following definition. Definition 1.1. Te directional derivative of f(x, y) at (a, b) in te direction of a unit vector u is if tis limit exists. D u f(a, b) = lim 0 f(a + u 1, b + u ) f(a, b) Example 1.. For an arbitrary function f(x, y), determine te directional derivatives D i f(x, y) and D j f(x, y). By definition, and f(x +, y) f(x, y) D if(x, y) = lim = f x 0 f(x + u 1, y) f(x, y) D jf(x, y) = lim = f y. 0 Example 1.3. If te following is a contour diagram for f(x, y) wit te z = 0 contour at te origin, going up by 1 for eac concentric circle, approximate te rate of cange of f(x, y) at (1, 1) in te direction of u = i + j. 3 y 1 K3 K K1 0 1 3 x K1 K K3 Drawing a vector out from te point (1, 1) in te direction of u = i+ j, we can use a difference quotient to approximate te rate of cange. Specifically, te vector u wit its tail at (1, 1) as its ead at (, ) and at tis point, it looks like f(, ) 8. Ten we ave D u f(, ) f(, ) f(1, 1) u = 8 1 = 7
In general, we do not want to ave to calculate limits wen determining directional derivatives, or approximate directional derivatives using difference quotients, so we need to find a way to avoid doing tis. From te previous examples, it is clear tat directional derivatives are closely related to partial derivatives. In fact, we can use partial derivatives to determine directional derivatives as te following suggests. By definition, te directional derivative of f at (a, b) in te direction of u is f(a + u 1, b + u ) f(a, b) D u f(a, b) = lim. 0 Te numerator of tis fraction measures te rate of cange of f of f. Using linear approximations, we know f f x (a, b) x + f y (a, b) y were x and y are te cange in x and y respectively. Observe owever tat we know te cange in x and y. Specifically, we ave x = u 1 and y = u. Substituting in, we ave 3 f(a + u 1, b + u ) f(a, b) f x(a, b)u 1 + f y (a, b)u = f x (a, b)u 1 + f y (a, b)u = (f x (a, b) i + f y (a, b) j) (u 1 j) Tus we ave proved te following very important result on ow to calculate directional derivatives. Result 1.4. If f is a differentiable function of x and y, ten f as a directional derivative in te direction of any unit vector u = u 1 j at any point (a, b) wic can be calculated using te formula D u f(a, b) = f x (a, b)u 1 + f y (a, b)u = (f x (a, b) i + f y (a, b) j) (u 1 j). Note tat u must be a unit vector to apply tis formula. We illustrate wit some examples. Example 1.5. (i) Find te directional derivative of f(x, y) = x e y at (, 0) in te direction of u = i + j. First, we need to make v into a unit vector: u = i/ + j/. Ten we calculate partial derivatives and evaluate: f x = xe y so f x (, 0) = 4, and f y = x e y, so f y (a, b) = 4. Ten applying te formula, we ave D u f(, 0) = (4 i + 4 j) ( i/ + j/ ) = 8/. (ii) Find te direction(s) in wic te directional derivative of f(x, y) = x + sin (xy) at te point (1, 0) as value 1. Let u = u 1 i+u j denote an arbitrary unit vector. We know f x = x + y cos (xy) so f x (1, 0) = and f y = x cos (xy) so
4 f y (1, 0) = 1. Tus, te directional derivative in te direction of u at (1, 0) will be D u f(1, 0) = ( i + j) (u 1 j) = u 1 + u and we want tis to equal 1. Tis means tat u = 1 u 1. However, we also want u to be a unit vector, so u 1 + u = u 1 + 1 4u 1 + 4u 1 = 5u 1 4u 1 + 1 = 1. Tis implies u 1 (5u 1 4) = 0, so u 1 = 0 and u = 1 or u 1 = 4/5 and u = 3/5. So te directions are j and 4 i/5 3 j/5. Example 1.6. Determine a formula for te tangent line to f(x, y) = xe y at te point (1, 0) in te direction of u = 3 i 4 j. In order to determine te equation for te tangent line, we need a direction and a point. We know point will be (1, 0, 1) since f(1, 0) = 1, so we just need te direction. However, D u f(1, 0) will tell use te rate of cange of f in te direction of u. Specifically, if we move a distance 1 in te direction of u, ten te cange along te tangent line will be D u f(1, 0). We ave f x (1, 0) = 1 and f y (1, 0) = 1, so D u f(1, 0) = ( i + j) ( 3 5 i 4 5 j) = 1 5. Terefore, te tangent line will point in te direction of 3 i 4 j 1 k 5 5 5 and tus a vector equation for te tangent line will be ( i + 3 k + t 5 i 4 5 j 1 ) 5 k. Remark 1.7. Note tat we can consider te directional derivative D u f(x, y) as an operator on two different objects - bot vectors and points. Specifically, to obtain a value, we need to input bot a point and a vector i.e. a point and a direction.. Te Gradient Vector In te last section, te vector f x i + f y j played a very important role wen finding directional derivatives. For tis reason, we give it a special name. Definition.1. If f is a function of two variables, ten te gradient vector function of f denoted by f is defined by f = f x i + f y j Tis means tat to find a directional derivative, we can use te following formula: D u f(a, b) = f(a, b) u. In addition to telling us about directional derivatives, te gradient vector also tells us certain information about te function f.
Result.. If f(x, y) is differentiable at (a, b) and f(a, b) 0 ten te direction of f is (i) in te direction in wic f is increasing te most (ii) perpendicular to te contours at (a, b) and te magnitude f is (i) te greatest rate of cange of f at (a, b) (ii) large wen contours are close togeter and small wen contours are far apart. Proof. Observe tat for any unit vector u, we ave D u f(a, b) = f(a, b) u = f u cos (ϑ) = f cos(ϑ) were ϑ is te angle between tem. Tis is largest wen ϑ = 0, so u is pointing in te direction of f and in tis case, we ave D u f(a, b) = f(a, b). Tis means tat te gradient can be used to find te greatest rate of cange at a point. It can also be used to find te direction of greatest decrease f and te directions were te directional derivative is 0 (at points perpendicular to f). We illustrate wit some examples. Example.3. (i) Find te direction of greatest increase of f(x, y) = y /x at te point (, 4) and find te value of greatest increase. Te direction of greatest increase is f(, 4). Calculating, we ave f x = y /x, so f x (, 4) = 16/4 = 4, and f y = y/x, so f y (, 4) = 8/ = 4. So te direction of greatest increase is f = 4 i + 4 j. Te greatest value of increase if f(, 4) = 16 + 16 = 4. (ii) Sketc te gradient vector on te following contour diagram at te point (1, ) (contours are getting larger as we move out from te origin). 5.0 1.6 1. 0.8 0.4 0.0 1 x 0.4 0 1 0.8 y 1. 1.6.0
6 3. Functions of Tree Variables For a function of tree variables, we define te directional derivative in exactly te same way as a directional derivative for a function of two variables. Moreover, all te same results old: (i) f = f x i + f y j + f z k (ii) D u = f u if u is a unit vector in 3-space (iii) Te rate of cange of f is most in te direction of f (iv) f increases most in tat direction. (v) f points in te direction perpendicular to te contours We illustrate wit an example. Example 3.1. Find te maximum rate of increase and its direction of f(x, y, z) = ln (xy z 3 ) at te point (1, 1, 1). First we simplify: f(x, y, z) = ln (x) + ln(y) + 3 ln (z), so f x = 1/x, f y = /y and f z = 3/z giving f x (1, 1, 1) = 1, f y (1, 1, 1) = and f z (1, 1, 1) = 3. Tus we ave f = i j + 3 k as te direction of greatest increase and f = 1 + 4 + 9 = 14. Recall tat a contour of a function of tree variables is a surface in 3- space. Tis means tat te gradient vector gives us a way to determine a normal vector to a surface at a point and in particular, it will allow us to determine an equation for a tangent plane at any point of a contour. Specifically, we ave te following: Suppose f(x, y, z) is a function of tree variables and S is te surface wic is te contour f(x, y, z) = c. Let (x 0, y 0, z 0 ) be a point on te contour (so f(x 0, y 0, z 0 ) = c). Ten, f(x 0, y 0, z 0 ) will be a vector pointing perpendicular to S at te point (x 0, y 0, z 0 ). Tis means we ave a point and a vector, so we can form te equation of te tangent plane to S at te point (x 0, y 0, z 0 ). Specifically, f(x 0, y 0, z 0 ) = f x (x 0, y 0, z 0 ) i + f y (x 0, y 0, z 0 ) j + f z (x 0, y 0, z 0 ) k is te vector, (x 0, y 0, z 0 ) is te point, so te plane will ave equation 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. Definition 3.. Te normal line to a surface S at a point P is defined to be a line tat passes troug te point P perpendicular to te tangent plane at P to S. Observe tat calculation of te normal line and tangent planes is straigt forward. Example 3.3. Find te equation for te tangent plane and normal line to te spere centered at te origin wit radius 5 at te point (4, 3, 0).
Tis surface is te contour to te function f(x, y, z) = x +y +z wit f = 5. Te gradient vector will be f = x i + y j + z k, so at tis point on te contour will be f(4, 3, 0) = 8 i 6 j. Tus te tangent plane to tis contour at tis point will ave equation 8(x 4) 6(y + 3) = 0 or 8x 6y = 50. Te parametric equations for te normal line are r(t) = (4 + 8t) i + ( 3 6t) j. 7