Active Calculus · 10: Derivatives of Multivariable Functions

10.6: Directional Derivatives and the Gradient

Motivating Questions
  • The partial derivatives of a function ff tell us the rate of change of ff in the direction of the coordinate axes. How can we measure the rate of change of ff in other directions?
  • What is the gradient of a function and what does it tell us?

The partial derivatives of a function tell us the instantaneous rate at which the function changes as we hold all but one independent variable constant and allow the remaining independent variable to change. It is natural to wonder how we can measure the rate at which a function changes in directions other than parallel to a coordinate axes. In what follows, we investigate this question, and see how the rate of change in any given direction is connected to the rates of change given by the standard partial derivatives.

Preview Activity 10.6.110.6.1

Let's consider the function ff defined by

f(x,y)=30−x2−12y2, f(x,y) = 30 - x^2 - \frac 12 y^2,

and suppose that ff measures the temperature, in degrees Celsius, at a given point in the plane, where xx and yy are measured in feet. Assume that the positive xx-axis points due east, while the positive yy-axis points due north. A contour plot of ff is shown in Figure 10.6.110.6.1.

fig_10_6_preview_1.svg

Figure 10.6.110.6.1. A contour plot of f(x,y)=30−x2−12y2.f(x,y) = 30-x^2-\frac12 y^2\text{.}
  1. Suppose that a person is walking due east, and thus parallel to the xx-axis. At what instantaneous rate is the temperature changing with respect to xx at the moment the walker passes the point (2,1)?(2,1)\text{?} What are the units on this rate of change?
  2. Next, determine the instantaneous rate of change of temperature with respect to distance at the point (2,1)(2,1) if the person is instead walking due north. Again, include units on your result.
  3. Now, rather than walking due east or due north, let's suppose that the person is walking with velocity given by the vector v=⟨3,4⟩,\mathbf{v} = \langle 3, 4 \rangle\text{,} where time is measured in seconds. Note that the person's speed is thus ∣v∣=5| \mathbf{v} | = 5 feet per second. Find parametric equations for the person's path; that is, parameterize the line through (2,1)(2,1) using the direction vector v=⟨3,4⟩.\mathbf{v} = \langle 3, 4 \rangle\text{.} Let x(t)x(t) denote the xx-coordinate of the line, and y(t)y(t) its yy-coordinate. Make sure your parameterization places the walker at the point (2,1)(2,1) when t=0.t=0\text{.}
  4. With the parameterization in (c), we can now view the temperature ff as not only a function of xx and y,y\text{,} but also of time, t.t\text{.} Hence, use the chain rule to determine the value of dfdt∣t=0.\frac{df}{dt}\bigm|_{t=0}\text{.} What are the units on your answer? What is the practical meaning of this result?

Directional Derivatives

Given a function z=f(x,y),z = f(x,y)\text{,} the partial derivative fx(x0,y0)f_x(x_0,y_0) measures the instantaneous rate of change of ff as only the xx variable changes; likewise, fy(x0,y0)f_y(x_0,y_0) measures the rate of change of ff at (x0,y0)(x_0,y_0) as only yy changes. Note particularly that fx(x0,y0)f_x(x_0,y_0) is measured in “units of ff per unit of change in x,x\text{,}” and that the units on fy(x0,y0)f_y(x_0,y_0) are similar.

In Preview Activity 10.6.110.6.1, we saw how we could measure the rate of change of ff in a situation where both xx and yy were changing; in that activity, however, we found that this rate of change was measured in “units of ff per unit of time.” In a given unit of time, we may move more than one unit of distance. In fact, in Preview Activity 10.6.110.6.1, in each unit increase in time we move a distance of ∣v∣=5| \mathbf{v} | = 5 feet. To generalize the notion of partial derivatives to any direction of our choice, we instead want to have a rate of change whose units are “units of ff per unit of distance in the given direction.”

In this light, in order to formally define the derivative in a particular direction of motion, we want to represent the change in ff for a given unit change in the direction of motion. We can represent this unit change in direction with a unit vector, say u=⟨u1,u2⟩.\mathbf{u} = \langle u_1, u_2 \rangle\text{.} If we move a distance hh in the direction of u\mathbf{u} from a fixed point (x0,y0),(x_0,y_0)\text{,} we then arrive at the new point (x0+u1h,y0+u2h).(x_0+u_1h, y_0+u_2h)\text{.} It now follows that the slope of the secant line to the curve on the surface through (x0,y0)(x_0,y_0) in the direction of u\mathbf{u} through the points (x0,y0)(x_0,y_0) and (x0+u1h,y0+u2h)(x_0+u_1h, y_0+u_2h) is

msec=f(x0+u1h,y0+u2h)−f(x0,y0)h.  m_{\mbox{sec} } = \frac{f(x_0+u_1h, y_0+u_2h) - f(x_0,y_0)}{h}. 

To get the instantaneous rate of change of ff in the direction u=⟨u1,u2⟩,\mathbf{u} = \langle u_1, u_2 \rangle\text{,} we must take the limit of the quantity in Equation \ref{eq_10_6_diff_quot} as h→0.h \to 0\text{.} Doing so results in the formal definition of the directional derivative.

Definition 10.6.110.6.1

Let f=f(x,y)f = f(x,y) be given. The derivative of ff at the point (x,y)(x,y) in the direction of the unit vector u=⟨u1,u2⟩\mathbf{u} = \langle u_1, u_2 \rangle is denoted Duf(x,y)D_{\mathbf{u}}f(x,y) and is given by

Duf(x,y)=lim⁡h→0f(x+u1h,y+u2h)−f(x,y)h  D_{\mathbf{u}}f(x,y) = \lim_{h \to 0} \frac{f(x+u_1h, y+u_2h) - f(x,y)}{h} 

for those values of xx and yy for which the limit exists.

The quantity Duf(x,y)D_{\mathbf{u}} f(x,y) is called a directional derivative. When we evaluate the directional derivative Duf(x,y)D_{\mathbf{u}} f(x,y) at a point (x0,y0),(x_0, y_0)\text{,} the result Duf(x0,y0)D_{\mathbf{u}} f(x_0,y_0) tells us the instantaneous rate at which ff changes at (x0,y0)(x_0, y_0) per unit increase in the direction of the vector u.\mathbf{u}\text{.} In addition, the quantity Duf(x0,y0)D_{\mathbf{u}} f(x_0,y_0) tells us the slope of the line tangent to the surface in the direction of u\mathbf{u} at the point (x0,y0,f(x0,y0)).(x_0,y_0,f(x_0,y_0))\text{.}

Computing the Directional Derivative

In a similar way to how we developed shortcut rules for standard derivatives in single variable calculus, and for partial derivatives in multivariable calculus, we can also find a way to evaluate directional derivatives without resorting to the limit definition found in Equation \ref{E_DirDerDef}. We do so using a very similar approach to our work in Preview Activity 10.6.110.6.1.

Suppose we consider the situation where we are interested in the instantaneous rate of change of ff at a point (x0,y0)(x_0,y_0) in the direction u=⟨u1,u2⟩,\mathbf{u} = \langle u_1, u_2 \rangle\text{,} where u\mathbf{u} is a unit vector. The variables xx and yy are therefore changing according to the parameterization

x=x0+u1t      and      y=y0+u2t. x = x_0 + u_1t \ \ \ \ \ \text{ and } \ \ \ \ \ y = y_0 + u_2t.

Observe that dxdt=u1\frac{dx}{dt} = u_1 and dydt=u2\frac{dy}{dt} = u_2 for all values of t.t\text{.} Since u\mathbf{u} is a unit vector, it follows that a point moving along this line moves one unit of distance per one unit of time; that is, each single unit of time corresponds to movement of a single unit of distance in that direction. This observation allows us to use the Chain Rule to calculate the directional derivative, which measures the instantaneous rate of change of ff with respect to change in the direction u.\mathbf{u}\text{.}

In particular, by the Chain Rule, it follows that

Duf(x0,y0)=fx(x0,y0)dxdt∣(x0,y0)+fy(x0,y0)dydt∣(x0,y0)=fx(x0,y0)u1+fy(x0,y0)u2.\begin{align*} D_{\mathbf{u}}f(x_0,y_0) & = f_x(x_0,y_0)\frac{dx}{dt}\biggm|_{(x_0,y_0)} + f_y(x_0,y_0)\frac{dy}{dt}\biggm|_{(x_0,y_0)} \\[4pt] & = f_x(x_0,y_0)u_1 + f_y(x_0,y_0)u_2. \end{align*}

This now allows us to compute the directional derivative at an arbitrary point according to the following formula.

Calculating a directional derivative

Given a differentiable function f=f(x,y)f = f(x,y) and a unit vector u=⟨u1,u2⟩,\mathbf{u} = \langle u_1, u_2 \rangle\text{,} we may compute Duf(x,y)D_{\mathbf{u}}f(x,y) by

Duf(x,y)=fx(x,y)u1+fy(x,y)u2.  D_{\mathbf{u}}f(x,y) = f_x(x,y)u_1 + f_y(x,y)u_2. 

Note well: To use Equation \ref{eq_10_6_DD}, we must have a unit vector u=⟨u1,u2⟩\mathbf{u} = \langle u_1, u_2 \rangle in the direction of motion. In the event that we have a direction prescribed by a non-unit vector, we must first scale the vector to have length 1.

Activity 10.6.210.6.2

Let f(x,y)=3xy−x2y3.f(x,y) = 3xy-x^2y^3\text{.}

  1. Determine fx(x,y)f_x(x,y) and fy(x,y).f_y(x,y)\text{.}
  2. Use Equation \ref{eq_10_6_DD} to determine Dif(x,y)D_{\mathbf{i}} f(x,y) and Djf(x,y).D_{\mathbf{j}} f(x,y)\text{.} What familiar function is Dif?D_{\mathbf{i}} f\text{?} What familiar function is Djf?D_{\mathbf{j}} f\text{?} (Recall that i\mathbf{i} is the unit vector in the positive xx-direction and j\mathbf{j} is the unit vector in the positive yy-direction.)
  3. Use Equation \ref{eq_10_6_DD} to find the derivative of ff in the direction of the vector v=⟨2,3⟩\mathbf{v} = \langle 2, 3 \rangle at the point (1,−1).(1,-1)\text{.} Remember that a unit direction vector is needed.

The Gradient

Via the Chain Rule, we have seen that for a given function f=f(x,y),f = f(x,y)\text{,} its instantaneous rate of change in the direction of a unit vector u=⟨u1,u2⟩\mathbf{u} = \langle u_1, u_2 \rangle is given by

Duf(x0,y0)=fx(x0,y0)u1+fy(x0,y0)u2.  D_{\mathbf{u}}f(x_0,y_0) = f_x(x_0,y_0)u_1 + f_y(x_0,y_0)u_2. 

Recalling that the dot product of two vectors v=⟨v1,v2⟩\mathbf{v} = \langle v_1, v_2 \rangle and u=⟨u1,u2⟩\mathbf{u} = \langle u_1, u_2 \rangle is computed by

v⋅u=v1u1+v2u2, \mathbf{v} \cdot \mathbf{u} = v_1 u_1 + v_2 u_2,

we see that we may recast Equation \ref{E_DDrevisited} in a way that has geometric meaning. In particular, we see that Duf(x0,y0)D_{\mathbf{u}}f(x_0,y_0) is the dot product of the vector ⟨fx(x0,y0),fy(x0,y0)⟩\left\langle f_x(x_0,y_0), f_y(x_0,y_0) \right\rangle and the vector u.\mathbf{u}\text{.}

We call this vector formed by the partial derivatives of ff the gradient of ff and denote it

∇f(x0,y0)=⟨fx(x0,y0),fy(x0,y0)⟩. \nabla f(x_0,y_0) = \left\langle f_x(x_0,y_0), f_y(x_0,y_0) \right\rangle.

We read ∇f\nabla f as “the gradient of f,f\text{,}” “grad ff” or “del ff”. 1  Notice that ∇f\nabla f varies from point to point, and also provides an alternate formulation of the directional derivative.

The directional derivative and the gradient

Given a differentiable function f=f(x,y)f = f(x,y) and a unit vector u=⟨u1,u2⟩,\mathbf{u} = \langle u_1, u_2 \rangle\text{,} we may compute Duf(x,y)D_{\mathbf{u}}f(x,y) by

Duf(x,y)=∇f(x,y)⋅u.  D_{\mathbf{u}}f(x,y) = \nabla f(x,y) \cdot \mathbf{u}. 

In the following activity, we investigate some of what the gradient tells us about the behavior of a function f.f\text{.}

The symbol ∇\nabla is called nabla, which comes from a Greek word for a certain type of harp that has a similar shape.
Activity 10.6.310.6.3

Let's consider the function ff defined by f(x,y)=x2−y2.f(x,y) = x^2 - y^2\text{.} Some contours for this function are shown in Figure 10.6.310.6.3.

fig_10_6_contours_1.svg

Figure 10.6.310.6.3. Contours of f(x,y)=x2−y2.f(x,y) = x^2 - y^2\text{.}
  1. Find the gradient ∇f(x,y).\nabla f (x,y)\text{.}
  2. For each of the following points (x0,y0),(x_0,y_0)\text{,} evaluate the gradient ∇f(x0,y0)\nabla f(x_0,y_0) and sketch the gradient vector with its tail at (x0,y0).(x_0,y_0)\text{.} Some of the vectors are too long to fit onto the plot, but we'd like to draw them to scale; to do so, scale each vector by a factor of 1/4.
    • (x0,y0)=(2,0)\displaystyle (x_0,y_0) = (2,0)
    • (x0,y0)=(0,2)\displaystyle (x_0,y_0) = (0,2)
    • (x0,y0)=(2,2)\displaystyle (x_0,y_0) = (2,2)
    • (x0,y0)=(2,1)\displaystyle (x_0,y_0) = (2,1)
    • (x0,y0)=(−3,2)\displaystyle (x_0,y_0) = (-3,2)
    • (x0,y0)=(−2,−4)\displaystyle (x_0,y_0) = (-2,-4)
    • (x0,y0)=(0,0)\displaystyle (x_0,y_0) = (0,0)
  3. What do you notice about the relationship between the gradient at (x0,y0)(x_0,y_0) and the contour passing through that point?
  4. Does ff increase or decrease in the direction of ∇f(x0,y0)?\nabla f(x_0,y_0)\text{?} Provide a justification for your response.

As a vector, ∇f(x0,y0)\nabla f(x_0,y_0) defines a direction and a length. As we will soon see, both of these convey important information about the behavior of ff near (x0,y0).(x_0,y_0)\text{.}

The Direction of the Gradient

Remember that the dot product also conveys information about the angle between the two vectors. If θ\theta is the angle between ∇f(x0,y0)\nabla f(x_0,y_0) and u\mathbf{u} (where u\mathbf{u} is a unit vector), then we also have that

Duf(x0,y0)=∇f(x0,y0)⋅u=∣∇f(x0,y0)∣∣u∣cos⁡(θ). D_{\mathbf{u}}f(x_0,y_0) = \nabla f(x_0,y_0)\cdot\mathbf{u} = |\nabla f(x_0,y_0)||\mathbf{u}| \cos(\theta).

In particular, when θ\theta is a right angle, as shown on the left of Figure 10.6.410.6.4, then Duf(x0,y0)=0,D_{\mathbf{u}}f(x_0,y_0) = 0\text{,} because cos⁡(θ)=0.\cos(\theta) = 0\text{.} Since the value of the directional derivative is 0, this means that ff is unchanging in this direction, and hence u\mathbf{u} must be tangent to the contour of ff that passes through (x0,y0).(x_0,y_0)\text{.} In other words, ∇f(x0,y0)\nabla f(x_0,y_0) is orthogonal to the contour through (x0,y0).(x_0,y_0)\text{.} This shows that the gradient vector at a given point is always perpendicular to the contour passing through the point, confirming that what we saw in part (c) of Activity 10.6.310.6.3 holds in general.

fig_10_6_gradient_angle_1.svg fig_10_6_gradient_angle_2.svg fig_10_6_gradient_angle_3.svg

Figure 10.6.410.6.4. The sign of Duf(x0,y0)D_{\mathbf{u}} f(x_0,y_0) is determined by θ.\theta\text{.}

Moreover, when θ\theta is an acute angle, it follows that cos⁡(θ)>0\cos(\theta) > 0 so since

Duf(x0,y0)=∣∇f(x0,y0)∣∣u∣cos⁡(θ), D_{\mathbf{u}}f(x_0,y_0) = |\nabla f(x_0,y_0)||\mathbf{u}| \cos(\theta),

and therefore Duf(x0,y0)>0,D_{\mathbf{u}}f(x_0,y_0) > 0\text{,} as shown in the middle image in Figure 10.6.410.6.4. This means that ff is increasing in any direction where θ\theta is acute. In a similar way, when θ\theta is an obtuse angle, then cos⁡(θ)<0\cos(\theta) \lt 0 so Duf(x0,y0)<0,D_{\mathbf{u}}f(x_0,y_0) \lt 0\text{,} as seen on the right in Figure 10.6.410.6.4. This means that ff is decreasing in any direction for which θ\theta is obtuse.

Finally, as we can see in the following activity, we may also use the gradient to determine the directions in which the function is increasing and decreasing most rapidly.

Activity 10.6.410.6.4

In this activity we investigate how the gradient is related to the directions of greatest increase and decrease of a function. Let ff be a differentiable function and u\mathbf{u} a unit vector.

  1. Let θ\theta be the angle between ∇f(x0,y0)\nabla f(x_0,y_0) and u.\mathbf{u}\text{.} Use the relationship between the dot product and the angle between two vectors to explain why
    Duf(x0,y0)=∣⟨fx(x0,y0),fy(x0,y0)⟩∣cos⁡(θ).  D_{\mathbf{u}} f(x_0,y_0) = |\langle f_x(x_0,y_0), f_y(x_0,y_0) \rangle | \cos(\theta). 
  2. At the point (x0,y0),(x_0,y_0)\text{,} the only quantity in Equation \ref{eq_10_6_DD_grad2} that can change is θ\theta (which determines the direction u\mathbf{u} of travel). Explain why θ=0\theta = 0 makes the quantity
    ∣⟨fx(x0,y0),fy(x0,y0)⟩∣cos⁡(θ) |\langle f_x(x_0,y_0), f_y(x_0,y_0) \rangle| \cos(\theta)

    as large as possible.

  3. When θ=0,\theta = 0\text{,} in what direction does the unit vector u\mathbf{u} point relative to ∇f(x0,y0)?\nabla f(x_0,y_0)\text{?} Why? What does this tell us about the direction of greatest increase of ff at the point (x0,y0)?(x_0,y_0)\text{?}
  4. In what direction, relative to ∇f(x0,y0),\nabla f(x_0,y_0)\text{,} does ff decrease most rapidly at the point (x0,y0)?(x_0,y_0)\text{?}
  5. State the unit vectors u\mathbf{u} and v\mathbf{v} (in terms of ∇f(x0,y0)\nabla f(x_0,y_0)) that provide the directions of greatest increase and decrease for the function ff at the point (x0,y0).(x_0,y_0)\text{.} What important assumption must we make regarding ∇f(x0,y0)\nabla f(x_0,y_0) in order for these vectors to exist?

The Length of the Gradient

Having established in Activity 10.6.410.6.4 that the direction in which a function increases most rapidly at a point (x0,y0)(x_0,y_0) is the unit vector u\mathbf{u} in the direction of the gradient, (that is, u=1∣∇f(x0,y0)∣∇f(x0,y0),\mathbf{u} = \frac{1}{|\nabla f(x_0,y_0)|} \nabla f(x_0,y_0)\text{,} provided that ∇f(x0,y0)≠0\nabla f(x_0,y_0) \ne \mathbf{0}), it is also natural to ask, “in the direction of greatest increase for ff at (x0,y0),(x_0,y_0)\text{,} what is the value of the rate of increase?” In this situation, we are asking for the value of Duf(x0,y0)D_{\mathbf{u}} f(x_0,y_0) where u=1∣∇f(x0,y0)∣∇f(x0,y0).\mathbf{u} = \frac{1}{|\nabla f(x_0,y_0)|} \nabla f(x_0,y_0)\text{.}

Using the now familiar way to compute the directional derivative, we see that

Duf(x0,y0)=∇f(x0,y0)⋅(1∣∇f(x0,y0)∣∇f(x0,y0)). D_{\mathbf{u}} f(x_0,y_0) = \nabla f(x_0,y_0) \cdot \left(\frac{1}{|\nabla f(x_0,y_0)|} \nabla f(x_0,y_0) \right).

Next, we recall two important facts about the dot product: (i) w⋅(cv)=c(w⋅v)\mathbf{w}\cdot (c \mathbf{v}) = c (\mathbf{w} \cdot \mathbf{v}) for any scalar c,c\text{,} and (ii) w⋅w=∣w∣2.\mathbf{w} \cdot \mathbf{w} = |\mathbf{w}|^2\text{.} Applying these properties to the most recent equation involving the directional derivative, we find that

Duf(x0,y0)=1∣∇f(x0,y0)∣(∇f(x0,y0)⋅∇f(x0,y0))=1∣∇f(x0,y0)∣∣∇f(x0,y0)∣2. D_{\mathbf{u}} f(x_0,y_0) = \frac{1}{|\nabla f(x_0,y_0)|} (\nabla f(x_0,y_0) \cdot \nabla f(x_0,y_0)) = \frac{1}{|\nabla f(x_0,y_0)|} |\nabla f(x_0,y_0)|^2.

Finally, since ∇f(x0,y0)\nabla f(x_0,y_0) is a nonzero vector, its length ∣∇f(x0,y0)∣|\nabla f(x_0,y_0)| is a nonzero scalar, and thus we can simplify the preceding equation to establish that

Duf(x0,y0)=∣∇f(x0,y0)∣. D_{\mathbf{u}} f(x_0,y_0) = |\nabla f(x_0,y_0)|.

We summarize our most recent work by stating two important facts about the gradient.

Important facts about the gradient

Let ff be a differentiable function and (x0,y0)(x_0,y_0) a point for which ∇f(x0,y0)≠0.\nabla f(x_0,y_0) \ne \mathbf{0}\text{.} Then ∇f(x0,y0)\nabla f(x_0,y_0) points in the direction of greatest increase of ff at (x0,y0),(x_0,y_0)\text{,} and the instantaneous rate of change of ff in that direction is the length of the gradient vector. That is, if u=1∣∇f(x0,y0)∣∇f(x0,y0),\mathbf{u} = \frac{1}{|\nabla f(x_0,y_0)|} \nabla f(x_0,y_0)\text{,} then u\mathbf{u} is a unit vector in the direction of greatest increase of ff at (x0,y0),(x_0,y_0)\text{,} and Duf(x0,y0)=∣∇f(x0,y0)∣.D_{\mathbf{u}} f(x_0,y_0) = |\nabla f(x_0,y_0)|\text{.}

Activity 10.6.510.6.5

Consider the function ff defined by f(x,y)=−x+2xy−y.f(x,y) = -x + 2xy - y\text{.}

a. Find the gradient ∇f(1,2)\nabla f(1,2) and sketch it on Figure 10.6.510.6.5.

fig_10_6_activity_empty.svg

Figure 10.6.510.6.5. A plot for the gradient ∇f(1,2).\nabla f(1,2)\text{.}

b. Sketch the unit vector z=⟨−12,−12⟩\mathbf{z} = \left\langle-\frac1{\sqrt{2}}, -\frac1{\sqrt{2}}\right\rangle on Figure 10.6.510.6.5 with its tail at (1,2).(1,2)\text{.} Now find the directional derivative Dzf(1,2).D_{\mathbf{z}}f(1,2)\text{.}

c. What is the slope of the graph of ff in the direction z?\mathbf{z}\text{?} What does the sign of the directional derivative tell you?

d. Consider the vector v=⟨2,−1⟩\mathbf{v} = \langle 2,-1\rangle and sketch v\mathbf{v} on Figure 10.6.510.6.5 with its tail at (1,2).(1,2)\text{.} Find a unit vector w\mathbf{w} pointing in the same direction of v.\mathbf{v}\text{.} Without computing Dwf(1,2),D_{\mathbf{w}}f(1,2)\text{,} what do you know about the sign of this directional derivative? Now verify your observation by computing Dwf(1,2).D_{\mathbf{w}}f(1,2)\text{.}

e. In which direction (that is, for what unit vector u\mathbf{u}) is Duf(1,2)D_{\mathbf{u}}f(1,2) the greatest? What is the slope of the graph in this direction?

f. Corresponding, in which direction is Duf(1,2)D_{\mathbf{u}}f(1,2) least? What is the slope of the graph in this direction?

g. Sketch two unit vectors u\mathbf{u} for which Duf(1,2)=0D_{\mathbf{u}}f(1,2) = 0 and then find component representations of these vectors.

h. Suppose you are standing at the point (3,3).(3,3)\text{.} In which direction should you move to cause ff to increase as rapidly as possible? At what rate does ff increase in this direction?

Applications

The gradient finds many natural applications. For example, situations often arise — for instance, constructing a road through the mountains or planning the flow of water across a landscape — where we are interested in knowing the direction in which a function is increasing or decreasing most rapidly.

For example, consider a two-dimensional version of how a heat-seeking missile might work.(This application is borrowed from United States Air Force Academy Department of Mathematical Sciences.) Suppose that the temperature surrounding a fighter jet can be modeled by the function TT defined by

T(x,y)=1001+(x−5)2+4(y−2.5)2, T(x,y) = \frac{100}{1+(x-5)^2 + 4(y-2.5)^2},

where (x,y)(x,y) is a point in the plane of the fighter jet and T(x,y)T(x,y) is measured in degrees Celsius. Some contours and gradients ∇T\nabla T are shown on the left in Figure 10.6.610.6.6.

fig_10_6_missile_grad.svg fig_10_6_missile_path.svg

Figure 10.6.610.6.6. Contours and gradient for T(x,y)T(x,y) and the missile's path.

A heat-seeking missile will always travel in the direction in which the temperature increases most rapidly; that is, it will always travel in the direction of the gradient ∇T.\nabla T\text{.} If a missile is fired from the point (2,4),(2,4)\text{,} then its path will be that shown on the right in Figure 10.6.610.6.6.

In the final activity of this section, we consider several questions related to this context of a heat-seeking missile, and foreshadow some upcoming work in Section 10.7.

Activity 10.6.610.6.6
  1. The temperature T(x,y)T(x,y) has its maximum value at the fighter jet's location. State the fighter jet's location and explain how Figure 10.6.610.6.6 tells you this.
  2. Determine ∇T\nabla T at the fighter jet's location and give a justification for your response.
  3. Suppose that a different function ff has a local maximum value at (x0,y0).(x_0,y_0)\text{.} Sketch the behavior of some possible contours near this point. What is ∇f(x0,y0)?\nabla f(x_0,y_0)\text{?} (Hint: What is the direction of greatest increase in ff at the local maximum?)
  4. Suppose that a function gg has a local minimum value at (x0,y0).(x_0,y_0)\text{.} Sketch the behavior of some possible contours near this point. What is ∇g(x0,y0)?\nabla g(x_0,y_0)\text{?}
  5. If a function gg has a local minimum at (x0,y0),(x_0,y_0)\text{,} what is the direction of greatest increase of gg at (x0,y0)?(x_0,y_0)\text{?}

Summary

  • The directional derivative of ff at the point (x,y)(x,y) in the direction of the unit vector u=⟨u1,u2⟩\mathbf{u} = \langle u_1, u_2 \rangle is
    Duf(x,y)=lim⁡h→0f(x+u1h,y+u2h)−f(x,y)h D_{\mathbf{u}}f(x,y) = \lim_{h \to 0} \frac{f(x+u_1h, y+u_2h) - f(x,y)}{h}

    for those values of xx and yy for which the limit exists. In addition, Duf(x,y)D_{\mathbf{u}}f(x,y) measures the slope of the graph of ff when we move in the direction u.\mathbf{u}\text{.} Alternatively, Duf(x0,y0)D_{\mathbf{u}} f(x_0,y_0) measures the instantaneous rate of change of ff in the direction u\mathbf{u} at (x0,y0).(x_0,y_0)\text{.}

  • The gradient of a function f=f(x,y)f=f(x,y) at a point (x0,y0)(x_0,y_0) is the vector
    ∇f(x0,y0)=⟨fx(x0,y0),fy(x0,y0)⟩. \nabla f(x_0,y_0) = \left\langle f_x(x_0,y_0), f_y(x_0,y_0)\right\rangle.
  • The directional derivative in the direction u\mathbf{u} may be computed by
    Duf(x0,y0)=∇f(x0,y0)⋅u. D_{\mathbf{u}}f(x_0,y_0) = \nabla f(x_0,y_0)\cdot \mathbf{u}.
  • At any point where the gradient is nonzero, gradient is orthogonal to the contour through that point and points in the direction in which ff increases most rapidly; moreover, the slope of ff in this direction equals the length of the gradient ∣∇f(x0,y0)∣.|\nabla f(x_0,y_0)|\text{.} Similarly, the opposite of the gradient points in the direction of greatest decrease, and that rate of decrease is the opposite of the length of the gradient.

Credit and licence

This page titled 10.6: Directional Derivatives and the Gradient was last modified on Fri, 29 Sep 2023 19:32:30 GMT and is shared under a CC BY-SA 4.0 license and was authored, remixed, and/or curated by Matthew Boelkins, David Austin, and Steven Schlicker ( ScholarWorks @Grand Valley State University ) via source content that was edited to the style and standards of the LibreTexts platform.

Source: https://math.libretexts.org/Bookshelves/Calculus/Active_Calculus_(Boelkins_et_al.)/10%3A_Derivatives_of_Multivariable_Functions/10.06%3A_Directional_Derivatives_and_the_Gradient

Licence: CC BY-SA 4.0 (creativecommons.org/licenses/by-sa/4.0/). You may share and adapt it under the same licence, with this credit. WorldClass adapted the formatting only: the text is the authors', with interactive parts and links to other sites left out.

Build status · Flash Infinity AI™ is a trademark of AI-Flash Inc.. WorldClass is not affiliated with, approved or accredited by any exam board, curriculum provider or university unless a page says so.