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.

A graph. A function labeled z = f(x y), is graphed on a three dimensional x y z coordinate system. Three vectors beginning from a common point are graphed on the x y plane. The first vector is parallel to the x axis and the following information is given: rate of change of f in the i-direction is (delta z) over (delta x). The second vector is parallel to the y axis and the following information is given: rate of change of f in the j-direction is (delta z) over (delta y). The third vector is labeled u, and is graphed between the first 2 vectors. The following question is asked beside: What is the rate of change of f in the direction given by the vector u? A dashed vertical line connects the common starting point of the vectors in the x y plane to a point on the graphed function above. Three more vectors similar to the three vectors in the x y plane are graphed, beginning at the second point.

FIGURE 9.5.1 An arbitrary direction is denoted by the vector u

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) = 5yx3y2.

SOLUTION

From (1),

f(x, y) = (5yx3y2)i + (5yx3y2)j; therefore

f(x, y) = –3x2y2i + (5 – 2x3y)j.

EXAMPLE 2 Gradient at a Point

If F(x, y, z) = xy2 + 3x2z3, 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)

A graph. A function, a plane, and 2 vectors are graphed on a three dimensional x y z coordinate system. The first vector, labeled u, is graphed in the x y plane, and forms an angle theta with the x axis. The second vector, labeled v = h u, begins at the point (x y, 0) and ends at the point (x + delta x y + delta y, 0). The 2 vectors point toward the same direction. A dashed line, labeled delta x, parallel to the x axis, a dashed line labeled delta y, parallel to the y axis, and the vector v = h u, form a right triangle. The angle formed by the sides delta x and v = h u, is labeled theta. The graphed plane is vertical and is determined by the vector v. A function, labeled surface, z = f(x y), intersects the graphed plane. The intersection is a curve labeled C that goes upward with decreasing steepness. A dashed vertical line begins at the point (x y, 0), and ends on the curve C at a point labeled P. A second dashed vertical line begins at the point (x + delta x y + delta y, 0), and ends on the curve C at a second marked point. The horizontal distance between the 2 marked points is labeled h, and the vertical distance between the 2 marked points is labeled f(x + delta x y + delta y) minus f(x y). A tangent line to the curve C passes through the point C. A secant line intersects the curve C at the point P and the second marked point.

FIGURE 9.5.2 C is the curve of intersection of the surface and the plane determined by vector v

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) = compuf(x, y) and Du F(x, y, z) = compuF(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 ff . In other words:

The maximum value of the directional derivative is and it occurs when u has the same direction asf (when cos ϕ = −1). (10)

The minimum value of the directional derivative is − and it occurs when u andf 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 vectorf 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 = –xiyj 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 = compuf, a bicyclist will zigzag, or seek a direction u other than ∇f, in order to reduce this component.

2 right circular cones. Cone a. A model of a hill represented by a circular cone. A dashed vertical line connecting the vertex to the center of the circular base, a radius of the circular base, and a line labeled road, going down the lateral side of the cone from the vertex to the base, form a right triangle. A vector on the radius pointing toward the center of the base is labeled nabla f. Cone b. A model of a hill represented by a circular cone. A dashed vertical line connecting the vertex to the center of the circular base, a radius of the circular base, and a line going down the lateral side of the cone from the vertex to the base, form a right triangle. A zigzag line begins at the bottom, goes along the lateral line, and ends at the vertex of the cone. A vector labeled u on the radius points to the left of the center of the base.

FIGURE 9.5.3 Model of a hill in Example 7

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.

  1. f(x, y) = x2x3y2 + y4
  2. f(x, y) = y
  3. F(x, y, z) =
  4. F(x, y, z) = xy cos yz

In Problems 5–8, find the gradient of the given function at the indicated point.

  1. f(x, y) = x2 – 4y2; (2, 4)
  2. f(x, y) =
  3. F(x, y, z) = x2z2 sin 4y; (–2, π/3, 1)
  4. 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.

  1. f(x, y) = x2 + y2; θ = 30°
  2. f(x, y) = 3xy2; θ = 45°

In Problems 11–20, find the directional derivative of the given function at the given point in the indicated direction.

  1. f(x, y) = 5x3y6; (–1, 1), θ = π/6
  2. f(x, y) = 4x + xy2 – 5y; (3, –1), θ = π/4
  3. f(x, y) = tan−1 ; (2, –2), i – 3j
  4. f(x, y) = ; (2, –1), 6i + 8j
  5. f(x, y) = (xy + 1)2; (3, 2), in the direction of (5, 3)
  6. f(x, y) = x2 tan y; , in the direction of the negative x-axis
  7. F(x, y, z) = x2y2(2z + 1)2; (1, –1, 1), 〈0, 3, 3〉
  8. F(x, y, z) = ; (2, 4, –1), i – 2j + k
  9. F(x, y, z) = (–2, 2, 1), in the direction of the negative z-axis
  10. F(x, y, z) = 2xy2 + 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.

  1. f(x, y) = (xy)2; P(4, 2), Q(0, 1); (4, 2, 4)
  2. 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.

  1. f(x, y) = e2x sin y; (0, π/4)
  2. f(x, y) = xyexy; (5, 5)
  3. F(x, y, z) = x2 + 4xz + 2yz2; (1, 2, –1)
  4. 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.

  1. f(x, y) = tan(x2 + y2);
  2. f(x, y) = x3y3; (2, –2)
  3. F(x, y, z) = ey; (16, 0, 9)
  4. F(x, y, z) = ln
  5. 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).
  6. If f(x, y) = x2 + xy + y2x, find all points where Du f(x, y) in the direction of u = (1/)(i +j) is zero.
  7. 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.

  8. Suppose Duf(a, b) = 6. What is the value of D−uf(a, b)?
    1. 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).
    2. If F(x, y) = Du f(x, y) in part (a), find DuF(x, y).
  9. Consider the gravitational potential

    where G and m are constants. Show that U increases or decreases most rapidly along a line through the origin.

  10. If f(x, y) = x3 – 12x + y2 – 10y, find all points at which f = 0.
  11. Suppose

    Du f(a, b) = 7, Dv f(a, b) = 3

    Find ∇f(a, b).

  12. 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.
    A graph. A dashed curve, representing the path of an insect, is graphed on an x y coordinate plane. The curve begins at the marked point (4, 2), goes down and to the left with increasing steepness, and ends at the origin.

    FIGURE 9.5.4 Insect in Problem 39

  13. 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?]
  14. The temperature at a point (x, y) on a rectangular metal plate is given by T(x, y) = 100 – 2x2y2. 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.
  15. 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?
  16. Find a function f such that

    f = (3x2 + y3 + yexy)i + (–2y2 + 3xy2 + xexy)j.

  17. 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.

  1. ∇(cf) = cf
  2. ∇(f + g) = ∇f + ∇g
  3. ∇(fg) = fg + gf
  4. 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) − α.