Gradient and Directional Derivatives MATH 311, Calculus III J. Robert Buchanan Department of Mathematics Fall 2011
Background Given z = f (x, y) we understand that f : gives the rate of change of z in the positive x x-direction. f : gives the rate of change of z in the positive y y-direction. Question: what about rates of change in other directions?
Illustration 1.0 5 4 2 0.5 3 1 a, b u 0 y 0.0 1 0.5 1 2 4 6 1.0 0 3 5 1.0 0.5 0.0 0.5 x 7
Numerical Example Suppose f (x, y) = x 3 3xy + 4y 2, (a, b) = ( 1 2, 1 2), and u = 1, 1 2, then ( 1 2 + h, 1 2 h ) ( f 1 2 2, 1 ) 2 = f ( 1 2 + h, 1 2 h ) ( 2 f 1 2, 1 ) 2 h z = f z h z h h 0.1 3.39 0.01 3.4899 0.001 3.499 0.0001 3.4999
Directional Derivative Definition The directional derivative of f (x, y) at the point (a, b) and in the direction of the vector u = u 1, u 2 is given by D u f (a, b) = lim h 0 f (a + hu 1, b + hu 2 ) f (a, b) h provided the limit exists.
Unit Vectors and Directional Derivatives (1 of 2) Theorem Suppose that f is differentiable at (a, b) and u = u 1, u 2 is any unit vector. Then D u f (a, b) = f x (a, b)u 1 + f y (a, b)u 2
Unit Vectors and Directional Derivatives (2 of 2) Define g(h) = f (a + hu 1, b + hu 2 ), then D u f (a, b) = f (a + hu 1, b + hu 2 ) f (a, b) lim h 0 h = g(h) g(0) lim = g (0). h 0 h According to the Chain Rule When h = 0, g (h) = f dx x dh + f dy y dh = f x u 1 + f y u 2. D u f (a, b) = g (0) = f x (a, b)u 1 + f y (a, b)u 2.
Examples (1 of 2) Find the derivative of f (x, y) = sin x + e xy in the direction of v = 1, 1.
Examples (1 of 2) Find the derivative of f (x, y) = sin x + e xy in the direction of v = 1, 1. D 2 1 1,1 f (x, y) = (cos x + yexy ) 1 + (xe xy ) 1 2 2 = 1 (cos x + ye xy + xe xy ) 2
Examples (2 of 2) Find the derivative of f (x, y) = x 3 sin 3y in the direction of v = 2, π/3.
Examples (2 of 2) Find the derivative of f (x, y) = x 3 sin 3y in the direction of v = 2, π/3. f (x, y) = (3x 2 2 sin 3y) + (3x 3 π/3 cos 3y) v 4 + π2 9 4 + π2 9 D v = 6x 2 4 + π2 9 sin 3y + πx 3 4 + π2 9 cos 3y
Gradient Definition The gradient of f (x, y) is the vector-valued function f f (x, y) = x, f = f y x i + f y j, provided both partial derivatives exist.
Gradient Definition The gradient of f (x, y) is the vector-valued function f f (x, y) = x, f = f y x i + f y j, provided both partial derivatives exist. Theorem If f is a differentiable function of x and y and u is a unit vector, then D u f (x, y) = f (x, y) u.
Examples Find the gradient of f (x, y) = x 2 y 3 4y. If g(x, y) = x/y and v = 1, 3, find D v g(x, y).
Examples Find the gradient of f (x, y) = x 2 y 3 4y. f (x, y) = 2xy 3, 3x 2 y 2 4 If g(x, y) = x/y and v = 1, 3, find D v g(x, y).
Examples Find the gradient of f (x, y) = x 2 y 3 4y. f (x, y) = 2xy 3, 3x 2 y 2 4 If g(x, y) = x/y and v = 1, 3, find D v g(x, y). D v g(x, y) = g(x, y) 1 3, = 1 3x v 10 10 10y 10y 2
Gradient Theorem (1 of 2) Theorem Suppose that f is a differentiable function of x and y at the point (a, b). Then, 1 the maximum rate of change of f at (a, b) is f (a, b), occurring in the direction of the gradient, 2 the minimum rate of change of f at (a, b) is f (a, b), occurring in the direction opposite the gradient, 3 the rate of change of f at (a, b) is 0 in the directions orthogonal to f (a, b), and 4 the gradient f (a, b) is orthogonal to the level curve f (x, y) = c at the point (a, b) where c = f (a, b).
Gradient Theorem (2 of 2) Proof. Recall the formula for the directional derivative, D u f (a, b) = f (a, b) u = f (a, b) u cos θ = f (a, b) cos θ Maximized when θ = 0 with maximum f (a, b). Minimized when θ = π with minimum f (a, b). Rate of change is zero when θ = π/2.
Example Consider the function g(x, y) = 4x 2 + 9y 2. 4 2 y 0 2 4 4 2 0 2 4 x
Example Consider the function h(x, y) = sin(xy). 3 2 1 y 0 1 2 3 3 2 1 0 1 2 3 x
Functions of Three Variables Definition The directional derivative of f (x, y, z) at the point (a, b, c) in the direction of the unit vector u = u 1, u 2, u 3 is given by D u f (a, b, c) = lim h 0 f (a + hu 1, b + hu 2, c + hu 3 ) f (a, b, c) h provided the limit exists. The gradient of f (x, y, z) is the vector-valued function f f (x, y, z) = x, f y, f = f z x i + f y j + f z k provided all the partial derivatives are defined.
Functions of Three Variables (continued) Theorem If f is a differentiable function of x, y, and z and u is a unit vector, then D u f (x, y, z) = f (x, y, z) u.
Example (1 of 2) Suppose f (x, y, z) = x sin(yz). Find the gradient of f and the directional derivative in the direction of v = i + 2j k.
Example (2 of 2) f (x, y, z) = sin(yz), xz cos(yz), xy cos(yz) 1 D v f (x, y, z) = f (x, y, z) 2 6,, 1 v 6 6 = 1 6 sin(yz) + 2 6 xz cos(yz) 1 6 xy cos(yz)
Example (1 of 2) Suppose the temperature at point (x, y, z) is given by the function T (x, y, z) = 4x 2 y 2 + 16z 2. At the point with coordinates (x, y, z) = (4, 2, 1), 1 in what direction does the temperature change most rapidly? 2 what is the maximum rate of change in temperature?
Example (2 of 2) The temperature increases most rapidly in the direction of the gradient. T (x, y, z) = 8x, 2y, 32z T (4, 2, 1) = 32, 4, 32 The maximum rate of increase is the magnitude of the gradient. T (4, 2, 1) = (32) 2 + (4) 2 + (32) 2 = 2064 = 4 129
Normal Lines and Tangent Planes Theorem Suppose that f (x, y, z) has continuous partial derivatives at the point (a, b, c) and that f (a, b, c) 0. Then, f (a, b, c) is a normal vector to the tangent plane to the surface f (x, y, z) = k at the point (a, b, c). The equation of the tangent plane is 0 = f x (a, b, c)(x a) + f y (a, b, c)(y b) + f z (a, b, c)(z c). The normal line to the surface through the point (a, b, c) is given parametrically by x = a + f x (a, b, c)t y = b + f y (a, b, c)t z = c + f z (a, b, c)t
Example (1 of 2) Find the equations of the tangent plane and normal line through the surface 4x 2 y 2 + 16z 2 = 76 at the point (4, 2, 1).
Example (2 of 2) Note that if f (x, y, z) = 4x 2 y 2 + 16z 2 then f (x, y, z) = 8x, 2y, 32z. The equation of the tangent plane at (x, y, z) = (4, 2, 1) is 0 = 32(x 4) + 4(y + 2) + 32(z 1) while the parametric equations of the normal line are x = 4 + 32t y = 2 + 4t z = 1 + 32t
Example: Illustration 1.0 y 1.5 2.0 2.5 3.0 2.0 1.5 z 1.0 0.5 0.0 3.0 3.5 4.0 x 4.5 5.0
Homework Read Section 12.6. Exercises: 1 35 odd, 41 49 odd, 57, 59