9.5 Directional Derivative
INTRODUCTION
We saw in the last section that for a function f of two variables x and y, the partial derivatives ∂z/∂x and ∂z/∂y give the slope of the tangent to the trace, or curve of intersection of the surface defined by z = f(x, y) and vertical planes that are, respectively, parallel to the x- and y-coordinates axes. Equivalently, we can think of the partial derivative ∂z/∂x as the rate of change of the function f in the direction given by the vector i, and ∂z/∂y as the rate of change of the function f in the j-direction. There is no reason to confine our attention to just two directions. In this section we shall see how to find the rate of change of a differentiable function in any direction. See FIGURE 9.5.1.
The Gradient of a Function
In this and the next sections it is convenient to introduce a new vector based on partial differentiation. When the vector differential operator
is applied to a differentiable function z = f(x, y) or w = F(x, y, z), we say that the vectors
(1)
(2)
are the gradients of the respective functions. The symbol ∇, an inverted capital Greek delta, is called “del” or “nabla.” The vector ∇f is usually read “grad f.”
EXAMPLE 1 Gradient
Compute ∇f(x, y) for f(x, y) = 5y – x3y2.
SOLUTION
From (1),
∇f(x, y) = (5y – x3y2)i + (5y – x3y2)j; therefore
∇f(x, y) = –3x2y2i + (5 – 2x3y)j. ≡
EXAMPLE 2 Gradient at a Point
If F(x, y, z) = xy2 + 3x2 – z3, find ∇F(x, y, z) at (2, –1, 4).
SOLUTION
From (2), ∇F(x, y, z) = (y2 + 6x)i + 2xyj – 3z2k and so
∇F(2, –1, 4) = 13i – 4j – 48k. ≡
A Generalization of Partial Differentiation
Suppose u = cos θi + sin θj is a unit vector in the xy-plane that makes an angle θ with the positive x-axis and is parallel to the vector v from (x, y, 0) to (x + Δx, y + Δy, 0). If h = > 0, then v = hu. Furthermore, let the plane perpendicular to the xy-plane that contains these points slice the surface z = f(x, y) in a curve C. We ask: What is the slope of the tangent line to C at a point P with coordinates (x, y, f(x, y)) in the direction given by v? See FIGURE 9.5.2.
From the figure we see that Δx = h cos θ and Δy = h sin θ so that the slope of the indicated secant line is
(3)
We expect the slope of the tangent at P to be the limit of (3) as h → 0. This slope is the rate of change of f at P in the direction specified by the unit vector u. This leads us to the following definition:
DEFINITION 9.5.1 Directional Derivative
The directional derivative of z = f(x, y) in the direction of a unit vector u = cos θi + sin θj is
(4)
provided the limit exists.
Observe that (4) is truly a generalization of partial differentiation, since
and
Method for Computing the Directional Derivative
While (4) could be used to find Duf(x, y) for a given function, as usual we seek a more efficient procedure. The next theorem will show how the concept of the gradient of a function plays a key role in computing a directional derivative.
THEOREM 9.5.1 Computing a Directional Derivative
If z = f(x, y) is a differentiable function of x and y and u = cos θ i + sin θ j, then
Du f(x, y) = ∇f(x, y) · u. (5)
PROOF:
Let x, y, and θ be fixed so that g(t) = f(x + t cos θ, y + t sin θ) is a function of one variable. We wish to compare the value of g′(0), which is found by two different methods. First, by the definition of a derivative,
(6)
Second, by the Chain Rule, (8) of Section 9.4,
(7)
Here the subscripts 1 and 2 refer to the partial derivatives of f(x + t cos θ, y + t sin θ) with respect to x + t cos θ and y + t sin θ, respectively. When t = 0, we note that x + t cos θ and y + t sin θ are simply x and y, and therefore (7) becomes
g′(0) = fx(x, y) cos θ + fy(x, y) sin θ. (8)
Comparing (4), (6), and (8) then gives
≡
EXAMPLE 3 Directional Derivative
Find the directional derivative of f(x, y) = 2x2y3 + 6xy at (1, 1) in the direction of a unit vector whose angle with the positive x-axis is π/6.
SOLUTION
Since = 4xy3 + 6y and = 6x2y2 + 6x, we have
∇f(x, y) = (4xy3 + 6y)i + (6x2y2 + 6x)j and ∇f(1, 1) = 10i + 12j.
Now, at θ = π/6, u = cos θi + sin θj becomes u = i + j. Therefore,
≡
EXAMPLE 4 Directional Derivative
Consider the plane that is perpendicular to the xy-plane and passes through the points P(2, 1) and Q(3, 2). What is the slope of the tangent line to the curve of intersection of this plane with the surface f(x, y) = 4x2 + y2 at (2, 1, 17) in the direction of Q?
SOLUTION
We want Du f(2, 1) in the direction given by the vector = i + j. But since is not a unit vector, we form u = (1/)i + (1/)j. Now,
∇f(x, y) = 8xi + 2yj and ∇f(2, 1) = 16i + 2j.
Therefore, the required slope is
Du f(2, 1) = (16i + 2j) · . ≡
Functions of Three Variables
For a function w = F(x, y, z) the directional derivative is defined by
where α, β, and γ are the direction angles of the unit vector u measured relative to the positive x-, y-, and z-axes, respectively.* But in the same manner as before, we can show that
Du F(x, y, z) = ∇F(x, y, z) · u. (9)
Notice that since u is a unit vector, it follows from (10) of Section 7.3 that
Du f(x, y) = compu∇f(x, y) and Du F(x, y, z) = compu∇F(x, y, z).
In addition, (9) reveals that
Dk F(x, y, z) = .
EXAMPLE 5 Directional Derivative
Find the directional derivative of F(x, y, z) = xy2 – 4x2y + z2 at (1, –1, 2) in the direction of 6i + 2j + 3k.
SOLUTION
We have
= y2 – 8xy, = 2xy – 4x2, and = 2z so that
∇F(x, y, z) = (y2 – 8xy)i + (2xy – 4x2)j + 2zk
∇F(1, –1, 2) = 9i – 6j + 4k.
Since 6i + 2j + 3k = 7 then u = i + j + k is a unit vector in the indicated direction. It follows from (9) that
DuF(1, –1, 2) = (9i – 6j + 4k) · . ≡
Maximum Value of the Directional Derivative
Let f represent a function of either two or three variables. Since (5) and (9) express the directional derivative as a dot product, we see from (5) of Theorem 7.3.2 that
where ϕ is the angle between ∇f and u. Because 0 ≤ ϕ ≤ π, we have –1 ≤ cos ϕ ≤ 1 and, consequently, –∇f ≤ Du f ≤ ∇f . In other words:
The maximum value of the directional derivative is and it occurs when u has the same direction as ∇f (when cos ϕ = −1). (10)
The minimum value of the directional derivative is − and it occurs when u and ∇f have opposite directions (when cos φ = −1). (11)
EXAMPLE 6 Max/Min of Directional Derivative
In Example 5 the maximum value of the directional derivative of F of (1, –1, 2) is ∇F(1, –1, 2) = . The minimum value of DuF(1, –1, 2) is then –. ≡
Gradient Points in Direction of Most Rapid Increase of f
Put yet another way, (10) and (11) state:
The gradient vector ∇f points in the direction in which f increases most rapidly, whereas −∇f points in the direction of the most rapid decrease of f.
EXAMPLE 7 Direction of Steepest Ascent
Each year in Los Angeles there is a bicycle race up to the top of a hill by a road known to be the steepest in the city. To understand why a bicyclist with a modicum of sanity will zigzag up the road, let us suppose the graph of f(x, y) = 4 – , 0 ≤ z ≤ 4, shown in FIGURE 9.5.3(a) is a mathematical model of the hill. The gradient of f is
where r = –xi – yj is a vector pointing to the center of the circular base.
Thus the steepest ascent up the hill is a straight road whose projection in the xy-plane is a radius of the circular base. Since Du f = compu∇f, a bicyclist will zigzag, or seek a direction u other than ∇f, in order to reduce this component. ≡
EXAMPLE 8 Direction to Cool Off Fastest
The temperature in a rectangular box is approximated by
T(x, y, z) = xyz(1 – x)(2 – y)(3 – z), 0 ≤ x ≤ 1, 0 ≤ y ≤ 2, 0 ≤ z ≤ 3.
If a mosquito is located at (, 1, 1), in which direction should it fly to cool off as rapidly as possible?
SOLUTION
The gradient of T is
∇T(x, y, z) = yz(2 – y)(3 – z)(1 – 2x)i + xz(1 – x)(3 – z)(2 – 2y)j + xy(1 – x)(2 – y)(3 – 2z)k.
Therefore, ∇T (, 1, 1) = k. To cool off most rapidly, the mosquito should fly in the direction of –k; that is, it should dive for the floor of the box, where the temperature is T(x, y, 0) = 0. ≡
9.5 Exercises Answers to selected odd-numbered problems begin on page ANS-24.
In Problems 1–4, compute the gradient for the given function.
- f(x, y) = x2 – x3y2 + y4
- f(x, y) = y –
- F(x, y, z) =
- F(x, y, z) = xy cos yz
In Problems 5–8, find the gradient of the given function at the indicated point.
- f(x, y) = x2 – 4y2; (2, 4)
- f(x, y) =
- F(x, y, z) = x2z2 sin 4y; (–2, π/3, 1)
- F(x, y, z) = ln(x2 + y2 + z2); (–4, 3, 5)
In Problems 9 and 10, use Definition 9.5.1 to find Du f(x, y) given that u makes the indicated angle with the positive x-axis.
- f(x, y) = x2 + y2; θ = 30°
- f(x, y) = 3x – y2; θ = 45°
In Problems 11–20, find the directional derivative of the given function at the given point in the indicated direction.
- f(x, y) = 5x3y6; (–1, 1), θ = π/6
- f(x, y) = 4x + xy2 – 5y; (3, –1), θ = π/4
- f(x, y) = tan−1 ; (2, –2), i – 3j
- f(x, y) = ; (2, –1), 6i + 8j
- f(x, y) = (xy + 1)2; (3, 2), in the direction of (5, 3)
- f(x, y) = x2 tan y; , in the direction of the negative x-axis
- F(x, y, z) = x2y2(2z + 1)2; (1, –1, 1), 〈0, 3, 3〉
- F(x, y, z) = ; (2, 4, –1), i – 2j + k
- F(x, y, z) = (–2, 2, 1), in the direction of the negative z-axis
- F(x, y, z) = 2x – y2 + z2; (4, –4, 2), in the direction of the origin
In Problems 21 and 22, consider the plane through the points P and Q that is perpendicular to the xy-plane. Find the slope of the tangent at the indicated point to the curve of intersection of this plane and the graph of the given function in the direction of Q.
- f(x, y) = (x – y)2; P(4, 2), Q(0, 1); (4, 2, 4)
- f(x, y) = x3 – 5xy + y2; P(1, 1), Q(–1, 6); (1, 1, –3)
In Problems 23–26, find a vector that gives the direction in which the given function increases most rapidly at the indicated point. Find the maximum rate.
- f(x, y) = e2x sin y; (0, π/4)
- f(x, y) = xyex−y; (5, 5)
- F(x, y, z) = x2 + 4xz + 2yz2; (1, 2, –1)
- F(x, y, z) = xyz; (3, 1, –5)
In Problems 27–30, find a vector that gives the direction in which the given function decreases most rapidly at the indicated point. Find the minimum rate.
- f(x, y) = tan(x2 + y2);
- f(x, y) = x3 – y3; (2, –2)
- F(x, y, z) = ey; (16, 0, 9)
- F(x, y, z) = ln
- Find the directional derivative(s) of f(x, y) = x + y2 at (3, 4) in the direction of a tangent vector to the graph of 2x2 + y2 = 9 at (2, 1).
- If f(x, y) = x2 + xy + y2 – x, find all points where Du f(x, y) in the direction of u = (1/)(i +j) is zero.
- Suppose ∇f(a, b) = 4i + 3j. Find a unit vector u so that
(a) Du f(a, b) = 0,
(b) Du f(a, b) is a maximum, and
(c) Du f(a, b) is a minimum.
- Suppose Duf(a, b) = 6. What is the value of D−uf(a, b)?
-
- If f(x, y) = x3 – 3x2y2 + y3, find the directional derivative of f at a point (x, y) in the direction of u = (1/ +j).
- If F(x, y) = Du f(x, y) in part (a), find DuF(x, y).
- Consider the gravitational potential
where G and m are constants. Show that U increases or decreases most rapidly along a line through the origin.
- If f(x, y) = x3 – 12x + y2 – 10y, find all points at which ∇f = 0.
- Suppose
Du f(a, b) = 7, Dv f(a, b) = 3
Find ∇f(a, b).
- Consider the rectangular plate shown in FIGURE 9.5.4. The temperature at a point (x, y) on the plate is given by T(x, y) = 5 + 2x2 + y2. Determine the direction an insect should take, starting at (4, 2), in order to cool off as rapidly as possible.
- In Problem 39, observe that (0, 0) is the coolest point of the plate. Find the path the cold-seeking insect, starting at (4, 2), will take to the origin. If 〈x(t), y(t)〉 is the vector equation of the path, then use the fact that −∇T(x, y) = 〈x′(t), y′(t)〉. Why is this? [Hint: Remember separation of variables?]
- The temperature at a point (x, y) on a rectangular metal plate is given by T(x, y) = 100 – 2x2 – y2. Find the path a heat-seeking particle will take, starting at (3, 4), as it moves in the direction in which the temperature increases most rapidly.
- The temperature T at a point (x, y, z) in space is inversely proportional to the square of the distance from (x, y, z) to the origin. It is known that T(0, 0, 1) = 500. Find the rate of change of T at (2, 3, 3) in the direction of (3, 1, 1). In which direction from (2, 3, 3) does the temperature T increase most rapidly? At (2, 3, 3) what is the maximum rate of change of T?
- Find a function f such that
∇f = (3x2 + y3 + yexy)i + (–2y2 + 3xy2 + xexy)j.
- Let fx, fy, fxy, fyx be continuous and u and v be unit vectors. Show that DuDv f = DvDu f.
In Problems 45–48, assume that f and g are differentiable functions of two variables. Prove the given identity.
- ∇(cf) = c ∇f
- ∇(f + g) = ∇f + ∇g
- ∇(fg) = f ∇g + g∇f
- If F(x, y, z) = f1(x, y, z)i + f2(x, y, z)j + f3(x, y, z)k and
,
show that
.
* Note that the numerator in (4) can be written f(x + h cos α, y + h cos β) − f(x, y), where β = (π/2) − α.