- 4.6.1
Determine the directional derivative in a given direction for a function of two variables.
- 4.6.2
Determine the gradient vector of a given real-valued function.
- 4.6.3
Explain the significance of the gradient vector with regard to direction of change along a surface.
- 4.6.4
Use the gradient to find the tangent to a level curve of a given function.
- 4.6.5
Calculate directional derivatives and gradients in three dimensions.
In Partial Derivatives we introduced the partial derivative. A function has two partial derivatives: and These derivatives correspond to each of the independent variables and can be interpreted as instantaneous rates of change (that is, as slopes of a tangent line). For example, represents the slope of a tangent line passing through a given point on the surface defined by assuming the tangent line is parallel to the x-axis. Similarly, represents the slope of the tangent line parallel to the Now we consider the possibility of a tangent line parallel to neither axis.
Directional Derivatives
We start with the graph of a surface defined by the equation Given a point in the domain of we choose a direction to travel from that point. We measure the direction using an angle which is measured counterclockwise in the x, y-plane, starting at zero from the positive x-axis (Figure 4.39). The distance we travel is and the direction we travel is given by the unit vector Therefore, the z-coordinate of the second point on the graph is given by
We can calculate the slope of the secant line by dividing the difference in by the length of the line segment connecting the two points in the domain. The length of the line segment is Therefore, the slope of the secant line is
To find the slope of the tangent line in the same direction, we take the limit as approaches zero.
Suppose is a function of two variables with a domain of Let and define Then the directional derivative of in the direction of is given by
(4.36)
provided the limit exists.
Equation 4.36 provides a formal definition of the directional derivative that can be used in many cases to calculate a directional derivative.
Finding a Directional Derivative from the Definition
Let Find the directional derivative of in the direction of What is
Solution
First of all, since and is acute, this implies
Using we first calculate
We substitute this expression into Equation 4.36:
To calculate we substitute and into this answer:
(See the following figure.)
Another approach to calculating a directional derivative involves partial derivatives, as outlined in the following theorem.
Directional Derivative of a Function of Two Variables
Let be a function of two variables and assume that and exist and is differentiable everywhere. Then the directional derivative of in the direction of is given by
(4.37)
Proof
Equation 4.36 states that the directional derivative of f in the direction of is given by
Let and and define Since and both exist, and therefore is differentiable, we can use the chain rule for functions of two variables to calculate
If then and so
By the definition of it is also true that
Therefore,
□
Finding a Directional Derivative: Alternative Method
Let Find the directional derivative of in the direction of What is
Solution
First, we must calculate the partial derivatives of
Then we use Equation 4.37 with
To calculate let and
This is the same answer obtained in Example 4.31.
Gradient
The right-hand side of Equation 4.37 is equal to which can be written as the dot product of two vectors. Define the first vector as and the second vector as Then the right-hand side of the equation can be written as the dot product of these two vectors:
(4.38)
The first vector in Equation 4.38 has a special name: the gradient of the function The symbol is called nabla and the vector is read
Let be a function of such that and exist. The vector is called the gradient of and is defined as
(4.39)
The vector is also written as
Find the directional derivative of in the direction of using Equation 4.37. What is
If the vector that is given for the direction of the derivative is not a unit vector, then it is only necessary to divide by the norm of the vector. For example, if we wished to find the directional derivative of the function in Example 4.32 in the direction of the vector we would first divide by its magnitude to get This gives us Then
Finding Gradients
Find the gradient of each of the following functions:
Solution
For both parts a. and b., we first calculate the partial derivatives and then use Equation 4.39.
Find the gradient of
The gradient has some important properties. We have already seen one formula that uses the gradient: the formula for the directional derivative. Recall from The Dot Product that if the angle between two vectors and is then Therefore, if the angle between and is we have
The disappears because is a unit vector. Therefore, the directional derivative is equal to the magnitude of the gradient evaluated at multiplied by Recall that ranges from to If then and and both point in the same direction. If then and and point in opposite directions. In the first case, the value of is maximized; in the second case, the value of is minimized. If then for any vector These three cases are outlined in the following theorem.
Properties of the Gradient
Suppose the function is differentiable at (Figure 4.41).
- If then for any unit vector
- If then is maximized when points in the same direction as The maximum value of is
- If then is minimized when points in the opposite direction from The minimum value of is
Finding a Maximum Directional Derivative
Find the direction for which the directional derivative of at is a maximum. What is the maximum value?
Solution
The maximum value of the directional derivative occurs when and the unit vector point in the same direction. Therefore, we start by calculating
Next, we evaluate the gradient at
We need to find a unit vector that points in the same direction as so the next step is to divide by its magnitude, which is Therefore,
This is the unit vector that points in the same direction as To find the angle corresponding to this unit vector, we solve the equations
for Since cosine is negative and sine is positive, the angle must be in the second quadrant. Therefore,
The maximum value of the directional derivative at is (see the following figure).
Find the direction for which the directional derivative of at is a maximum. What is the maximum value?
Figure 4.43 shows a portion of the graph of the function Given a point in the domain of the maximum value of the gradient at that point is given by This would equal the rate of greatest ascent if the surface represented a topographical map. If we went in the opposite direction, it would be the rate of greatest descent.
When using a topographical map, the steepest slope is always in the direction where the contour lines are closest together (see Figure 4.44). This is analogous to the contour map of a function, assuming the level curves are obtained for equally spaced values throughout the range of that function.
Gradients and Level Curves
Recall that if a curve is defined parametrically by the function pair then the vector is tangent to the curve for every value of in the domain. Now let’s assume is a differentiable function of and is in its domain. Let’s suppose further that and for some value of and consider the level curve Define and calculate on the level curve. By the chain Rule,
But because for all Therefore, on the one hand,
on the other hand,
Therefore,
Thus, the dot product of these vectors is equal to zero, which implies they are orthogonal. However, the second vector is tangent to the level curve, which implies the gradient must be normal to the level curve, which gives rise to the following theorem.
Gradient Is Normal to the Level Curve
Suppose the function has continuous first-order partial derivatives in an open disk centered at a point If then is normal to the level curve of at
We can use this theorem to find tangent and normal vectors to level curves of a function.
Finding Tangents to Level Curves
For the function find a tangent vector to the level curve at point Graph the level curve corresponding to and draw in and a tangent vector.
Solution
First, we must calculate
Next, we evaluate at
This vector is orthogonal to the curve at point We can obtain a tangent vector by reversing the components and multiplying either one by Thus, for example, is a tangent vector (see the following graph).
For the function find the tangent to the level curve at point Draw the graph of the level curve corresponding to and draw and a tangent vector.
Three-Dimensional Gradients and Directional Derivatives
The definition of a gradient can be extended to functions of more than two variables.
Let be a function of three variables such that exist. The vector is called the gradient of and is defined as
(4.40)
can also be written as
Calculating the gradient of a function in three variables is very similar to calculating the gradient of a function in two variables. First, we calculate the partial derivatives and and then we use Equation 4.40.
Finding Gradients in Three Dimensions
Find the gradient of each of the following functions:
Solution
For both parts a. and b., we first calculate the partial derivatives and then use Equation 4.40.
Find the gradient of
The directional derivative can also be generalized to functions of three variables. To determine a direction in three dimensions, a vector with three components is needed. This vector is a unit vector, and the components of the unit vector are called directional cosines. Given a three-dimensional unit vector in standard form (i.e., the initial point is at the origin), this vector forms three different angles with the positive and z-axes. Let’s call these angles and Then the directional cosines are given by and These are the components of the unit vector since is a unit vector, it is true that
Suppose is a function of three variables with a domain of Let and let be a unit vector. Then, the directional derivative of in the direction of is given by
(4.41)
provided the limit exists.
We can calculate the directional derivative of a function of three variables by using the gradient, leading to a formula that is analogous to Equation 4.38.
Directional Derivative of a Function of Three Variables
Let be a differentiable function of three variables and let be a unit vector. Then, the directional derivative of in the direction of is given by
(4.42)
The three angles determine the unit vector In practice, we can use an arbitrary (nonunit) vector, then divide by its magnitude to obtain a unit vector in the desired direction.
Finding a Directional Derivative in Three Dimensions
Calculate in the direction of for the function
Solution
First, we find the magnitude of
Therefore, is a unit vector in the direction of so Next, we calculate the partial derivatives of
then substitute them into Equation 4.42:
Last, to find we substitute
Calculate and in the direction of for the function
Section 4.6 Exercises
For the following exercises, find the directional derivative using the limit definition only.
260.
at point in the direction of
261.
at point in the direction of
262.
Find the directional derivative of at point in the direction of
For the following exercises, find the directional derivative of the function at point in the direction of or as appropriate.
263.
264.
265.
266.
267.
268.
269.
270.
271.
272.
273.
For the following exercises, find the directional derivative of the function in the direction of the unit vector
274.
275.
276.
277.
278.
279.
For the following exercises, find the gradient.
280.
Find the gradient of Then, find the gradient at point
281.
Find the gradient of at point
282.
Find the gradient of at and the directional derivative in the direction of
283.
For the following exercises, find the directional derivative of the function at point in the direction of
284.
285.
For the following exercises, find the derivative of the function at in the direction of
286.
287.
288.
[T] Use technology to sketch the level curve of that passes through and draw the gradient vector at
289.
[T] Use technology to sketch the level curve of that passes through and draw the gradient vector at
For the following exercises, find the gradient vector at the indicated point.
290.
291.
292.
293.
For the following exercises, find the derivative of the function.
294.
at point in the direction the function increases most rapidly
295.
at point in the direction the function increases most rapidly
296.
at point in the direction the function increases most rapidly
297.
at point in the direction the function increases most rapidly
298.
at point in the direction the function increases most rapidly
For the following exercises, find the maximum rate of change of at the given point and the direction in which it occurs.
299.
300.
301.
For the following exercises, find equations of
- the tangent plane and
- the normal line to the given surface at the given point.
302.
The level surface for at point
303.
at point
304.
at point
305.
at point
For the following exercises, solve the problem.
306.
The temperature in a metal sphere is inversely proportional to the distance from the center of the sphere (the origin: The temperature at point is
- Find the rate of change of the temperature at point in the direction toward point
- Show that, at any point in the sphere, the direction of greatest increase in temperature is given by a vector that points toward the origin.
307.
The electrical potential (voltage) in a certain region of space is given by the function
- Find the rate of change of the voltage at point in the direction of the vector
- In which direction does the voltage change most rapidly at point
- What is the maximum rate of change of the voltage at point
308.
If the electric potential at a point in the xy-plane is then the electric intensity vector at is
- Find the electric intensity vector at
- Show that, at each point in the plane, the electric potential decreases most rapidly in the direction of the vector
309.
In two dimensions, the motion of an ideal fluid is governed by a velocity potential The velocity components of the fluid in the x-direction and in the y-direction, are given by Find the velocity components associated with the velocity potential