Section10.6Directional Derivatives and the Gradient
Motivating Questions
The partial derivatives of a function tell us the rate of change of in the direction of the coordinate axes. How can we measure the rate of change of in other directions?
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.
and suppose that measures the temperature, in degrees Celsius, at a given point in the plane, where and are measured in feet. Assume that the positive -axis points due east, while the positive -axis points due north. A contour plot of is shown in Figure 10.6.1
Suppose that a person is walking due east, and thus parallel to the -axis. At what instantaneous rate is the temperature changing with respect to at the moment the walker passes the point ? What are the units on this rate of change?
Next, determine the instantaneous rate of change of temperature with respect to distance at the point if the person is instead walking due north. Again, include units on your result.
Now, rather than walking due east or due north, let’s suppose that the person is walking with velocity given by the vector , where time is measured in seconds. Note that the person’s speed is thus feet per second. Find parametric equations for the person’s path; that is, parameterize the line through using the direction vector . Let denote the -coordinate of the line, and its -coordinate. Make sure your parameterization places the walker at the point when .
With the parameterization in (c), we can now view the temperature as not only a function of and , but also of time, . Hence, use the chain rule to determine the value of . What are the units on your answer? What is the practical meaning of this result?
Given a function , the partial derivative measures the instantaneous rate of change of as only the variable changes; likewise, measures the rate of change of at as only changes. Note particularly that is measured in “units of per unit of change in ,” and that the units on are similar.
In Preview Activity 10.6.1, we saw how we could measure the rate of change of in a situation where both and were changing; in that activity, however, we found that this rate of change was measured in “units of 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.1, in each unit increase in time we move a distance of 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 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 for a given unit change in the direction of motion. We can represent this unit change in direction with a unit vector, say . If we move a distance in the direction of from a fixed point , we then arrive at the new point . It now follows that the slope of the secant line to the curve on the surface through in the direction of through the points and is
To get the instantaneous rate of change of in the direction , we must take the limit of the quantity in Equation (10.6.1) as . Doing so results in the formal definition of the directional derivative.
The quantity is called a directional derivative. When we evaluate the directional derivative at a point , the result tells us the instantaneous rate at which changes at per unit increase in the direction of the vector . In addition, the quantity tells us the slope of the line tangent to the surface in the direction of at the point .
Subsection10.6.2Computing 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 (10.6.2). We do so using a very similar approach to our work in Preview Activity 10.6.1.
Suppose we consider the situation where we are interested in the instantaneous rate of change of at a point in the direction , where is a unit vector. The variables and are therefore changing according to the parameterization
Observe that and for all values of . Since 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 with respect to change in the direction .
Note well: To use Equation (10.6.3), we must have a unit vector 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.
Use Equation (10.6.3) to determine and . What familiar function is ? What familiar function is ? (Recall that is the unit vector in the positive -direction and is the unit vector in the positive -direction.)
Recalling that the dot product of two vectors and is computed by
we see that we may recast Equation (10.6.4) in a way that has geometric meaning. In particular, we see that is the dot product of the vector and the vector .
For each of the following points , evaluate the gradient and sketch the gradient vector with its tail at . 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.
Remember that the dot product also conveys information about the angle between the two vectors. If is the angle between and (where is a unit vector), then we also have that
In particular, when is a right angle, as shown on the left of Figure 10.6.4, then , because . Since the value of the directional derivative is 0, this means that is unchanging in this direction, and hence must be tangent to the contour of that passes through . In other words, is orthogonal to the contour through . 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.3 holds in general.
Moreover, when is an acute angle, it follows that so since
and therefore , as shown in the middle image in Figure 10.6.4. This means that is increasing in any direction where is acute. In a similar way, when is an obtuse angle, then so , as seen on the right in Figure 10.6.4. This means that is decreasing in any direction for which 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.
In this activity we investigate how the gradient is related to the directions of greatest increase and decrease of a function. Let be a differentiable function and a unit vector.
Let be the angle between and . Use the relationship between the dot product and the angle between two vectors to explain why
When , in what direction does the unit vector point relative to ? Why? What does this tell us about the direction of greatest increase of at the point ?
State the unit vectors and (in terms of ) that provide the directions of greatest increase and decrease for the function at the point . What important assumption must we make regarding in order for these vectors to exist?
Having established in Activity 10.6.4 that the direction in which a function increases most rapidly at a point is the unit vector in the direction of the gradient, (that is, , provided that ), it is also natural to ask, “in the direction of greatest increase for at , what is the value of the rate of increase?” In this situation, we are asking for the value of where .
Next, we recall two important facts about the dot product: (i) for any scalar , and (ii) . Applying these properties to the most recent equation involving the directional derivative, we find that
Let be a differentiable function and a point for which . Then points in the direction of greatest increase of at , and the instantaneous rate of change of in that direction is the length of the gradient vector. That is, if , then is a unit vector in the direction of greatest increase of at , and .
Consider the vector and sketch on Figure 10.6.5 with its tail at . Find a unit vector pointing in the same direction of . Without computing , what do you know about the sign of this directional derivative? Now verify your observation by computing .
Suppose you are standing at the point . In which direction should you move to cause to increase as rapidly as possible? At what rate does increase in this direction?
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 defined by
where is a point in the plane of the fighter jet and is measured in degrees Celsius. Some contours and gradients are shown on the left in Figure 10.6.6.
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 . If a missile is fired from the point , then its path will be that shown on the right in Figure 10.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.
Suppose that a different function has a local maximum value at . Sketch the behavior of some possible contours near this point. What is ? (Hint: What is the direction of greatest increase in at the local maximum?)
The directional derivative of at the point in the direction of the unit vector is
for those values of and for which the limit exists. In addition, measures the slope of the graph of when we move in the direction . Alternatively, measures the instantaneous rate of change of in the direction at .
At any point where the gradient is nonzero, gradient is orthogonal to the contour through that point and points in the direction in which increases most rapidly; moreover, the slope of in this direction equals the length of the gradient . 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.
The temperature at a point (x,y,z) is given by , where is measured in degrees Celsius and x,y, and z in meters. There are lots of places to make silly errors in this problem; just try to keep track of what needs to be a unit vector.
At a certain point on a heated metal plate, the greatest rate of temperature increase, 5 degrees Celsius per meter, is toward the northeast. If an object at this point moves directly north, at what rate is the temperature increasing?
Find the direction of greatest increase in at the point . Explain. A graph of the surface defined by is shown at left in Figure 10.6.7. Illustrate this direction on the surface.
The properties of the gradient that we have observed for functions of two variables also hold for functions of more variables. In this problem, we consider a situation where there are three independent variables. Suppose that the temperature in a region of space is described by
and that you are standing at the point .
Find the instantaneous rate of change of the temperature in the direction of at the point . Remember that you should first find a unit vector in the direction of .