4.6 Directional Derivatives and the Gradient

In Partial Derivatives we introduced the partial derivative. A function z = f ( x , y ) z = f ( x , y ) has two partial derivatives: ∂ z / ∂ x ∂ z / ∂ x and ∂ z / ∂ y . ∂ z / ∂ y . 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, ∂ z / ∂ x ∂ z / ∂ x represents the slope of a tangent line passing through a given point on the surface defined by z = f ( x , y ) , z = f ( x , y ) , assuming the tangent line is parallel to the x-axis. Similarly, ∂ z / ∂ y ∂ z / ∂ y represents the slope of the tangent line parallel to the y -axis. y -axis. 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 z = f ( x , y ) . z = f ( x , y ) . Given a point ( a , b ) ( a , b ) in the domain of f , f , 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 h h and the direction we travel is given by the unit vector u = ( cos θ ) i + ( sin θ ) j . u = ( cos θ ) i + ( sin θ ) j . Therefore, the z-coordinate of the second point on the graph is given by z = f ( a + h cos θ , b + h sin θ ) . z = f ( a + h cos θ , b + h sin θ ) .

A shape in xyz space with point (a, b, f(a, b)). From the point, there is an arrow that represents the directional derivative. On the xy plane, the point (a, b) is marked and an angle of size θ is made between the projection of the directional derivative onto the plane and a line parallel to the x axis.

Figure 4.39 Finding the directional derivative at a point on the graph of z = f ( x , y ) . z = f ( x , y ) . The slope of the blue arrow on the graph indicates the value of the directional derivative at that point.

We can calculate the slope of the secant line by dividing the difference in z -values z -values by the length of the line segment connecting the two points in the domain. The length of the line segment is h . h . Therefore, the slope of the secant line is

m sec = f ( a + h cos θ , b + h sin θ ) − f ( a , b ) h . m sec = f ( a + h cos θ , b + h sin θ ) − f ( a , b ) h .

To find the slope of the tangent line in the same direction, we take the limit as h h approaches zero.

Definition

Suppose z = f ( x , y ) z = f ( x , y ) is a function of two variables with a domain of D . D . Let ( a , b ) ∈ D ( a , b ) ∈ D and define u = cos θ i + sin θ j . u = cos θ i + sin θ j . Then the directional derivative of f f in the direction of u u is given by

D u f ( a , b ) = lim h → 0 f ( a + h cos θ , b + h sin θ ) − f ( a , b ) h , D u f ( a , b ) = lim h → 0 f ( a + h cos θ , b + h sin θ ) − f ( a , b ) h ,

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.

Example 4.31

Finding a Directional Derivative from the Definition

Let θ = arccos ( 3 / 5 ) . θ = arccos ( 3 / 5 ) . Find the directional derivative D u f ( x , y ) D u f ( x , y ) of f ( x , y ) = x 2 − x y + 3 y 2 f ( x , y ) = x 2 − x y + 3 y 2 in the direction of u = ( cos θ ) i + ( sin θ ) j . u = ( cos θ ) i + ( sin θ ) j . What is D u f ( −1 , 2 ) ? D u f ( −1 , 2 ) ?

Solution

First of all, since cos θ = 3 / 5 cos θ = 3 / 5 and θ θ is acute, this implies

sin θ = 1 − ( 3 5 ) 2 = 16 25 = 4 5 . sin θ = 1 − ( 3 5 ) 2 = 16 25 = 4 5 .

Using f ( x , y ) = x 2 − x y + 3 y 2 , f ( x , y ) = x 2 − x y + 3 y 2 , we first calculate f ( x + h cos θ , y + h sin θ ) : f ( x + h cos θ , y + h sin θ ) :

f ( x + h cos θ , y + h sin θ ) = ( x + h cos θ ) 2 − ( x + h cos θ ) ( y + h sin θ ) + 3 ( y + h sin θ ) 2 = x 2 + 2 x h cos θ + h 2 cos 2 θ − x y − x h sin θ − y h cos θ −h 2 sin θ cos θ + 3 y 2 + 6 y h sin θ + 3 h 2 sin 2 θ = x 2 + 2 x h ( 3 5 ) + 9 h 2 25 − x y − 4 x h 5 − 3 y h 5 − 12 h 2 25 + 3 y 2 + 6 y h ( 4 5 ) + 3 h 2 ( 16 25 ) = x 2 − x y + 3 y 2 + 2 x h 5 + 9 h 2 5 + 21 y h 5 . f ( x + h cos θ , y + h sin θ ) = ( x + h cos θ ) 2 − ( x + h cos θ ) ( y + h sin θ ) + 3 ( y + h sin θ ) 2 = x 2 + 2 x h cos θ + h 2 cos 2 θ − x y − x h sin θ − y h cos θ −h 2 sin θ cos θ + 3 y 2 + 6 y h sin θ + 3 h 2 sin 2 θ = x 2 + 2 x h ( 3 5 ) + 9 h 2 25 − x y − 4 x h 5 − 3 y h 5 − 12 h 2 25 + 3 y 2 + 6 y h ( 4 5 ) + 3 h 2 ( 16 25 ) = x 2 − x y + 3 y 2 + 2 x h 5 + 9 h 2 5 + 21 y h 5 .

We substitute this expression into Equation 4.36:

D u f ( a , b ) = lim h → 0 f ( a + h cos θ , b + h sin θ ) − f ( a , b ) h = lim h → 0 ( x 2 − x y + 3 y 2 + 2 x h 5 + 9 h 2 5 + 21 y h 5 ) − ( x 2 − x y + 3 y 2 ) h = lim h → 0 2 x h 5 + 9 h 2 5 + 21 y h 5 h = lim h → 0 2 x 5 + 9 h 5 + 21 y 5 = 2 x + 21 y 5 . D u f ( a , b ) = lim h → 0 f ( a + h cos θ , b + h sin θ ) − f ( a , b ) h = lim h → 0 ( x 2 − x y + 3 y 2 + 2 x h 5 + 9 h 2 5 + 21 y h 5 ) − ( x 2 − x y + 3 y 2 ) h = lim h → 0 2 x h 5 + 9 h 2 5 + 21 y h 5 h = lim h → 0 2 x 5 + 9 h 5 + 21 y 5 = 2 x + 21 y 5 .

To calculate D u f ( −1 , 2 ) , D u f ( −1 , 2 ) , we substitute x = −1 x = −1 and y = 2 y = 2 into this answer:

D u f ( −1 , 2 ) = 2 ( −1 ) + 21 ( 2 ) 5 = −2 + 42 5 = 8 . D u f ( −1 , 2 ) = 2 ( −1 ) + 21 ( 2 ) 5 = −2 + 42 5 = 8 .

(See the following figure.)

The shape f(x, y) = x2 – xy + 3y2 in xyz space with tangent plane at point (–1, 2, 15). There are two arrows from the point, one seemingly along the surface of the shape and the other in a direction on the plane. The one that corresponds to the plane is marked u = 3/5 i + 4/5 j.

Figure 4.40 Finding the directional derivative in a given direction u u at a given point on a surface. The plane is tangent to the surface at the given point ( −1 , 2 , 15 ) . ( −1 , 2 , 15 ) .

Another approach to calculating a directional derivative involves partial derivatives, as outlined in the following theorem.

Theorem 4.12

Directional Derivative of a Function of Two Variables

Let z = f ( x , y ) z = f ( x , y ) be a function of two variables x and y , x and y , and assume that f x f x and f y f y exist and f ( x , y ) f ( x , y ) is differentiable everywhere. Then the directional derivative of f f in the direction of u = cos θ i + sin θ j u = cos θ i + sin θ j is given by

D u f ( x , y ) = f x ( x , y ) cos θ + f y ( x , y ) sin θ . D u f ( x , y ) = f x ( x , y ) cos θ + f y ( x , y ) sin θ .

Proof

Equation 4.36 states that the directional derivative of f in the direction of u = cos θ i + sin θ j u = cos θ i + sin θ j is given by

D u f ( a , b ) = lim t → 0 f ( a + t cos θ , b + t sin θ ) − f ( a , b ) t . D u f ( a , b ) = lim t → 0 f ( a + t cos θ , b + t sin θ ) − f ( a , b ) t .

Let x = a + t cos θ x = a + t cos θ and y = b + t sin θ , y = b + t sin θ , and define g ( t ) = f ( x , y ) . g ( t ) = f ( x , y ) . Since f x f x and f y f y both exist, and therefore f f is differentiable, we can use the chain rule for functions of two variables to calculate g ′ ( t ) : g ′ ( t ) :

g ′ ( t ) = ∂ f ∂ x d x d t + ∂ f ∂ y d y d t = f x ( x , y ) cos θ + f y ( x , y ) sin θ . g ′ ( t ) = ∂ f ∂ x d x d t + ∂ f ∂ y d y d t = f x ( x , y ) cos θ + f y ( x , y ) sin θ .

If t = 0 , t = 0 , then x = x 0 ( = a ) x = x 0 ( = a ) and y = y 0 ( = b ) , y = y 0 ( = b ) , so

g ′ ( 0 ) = f x ( x 0 , y 0 ) cos θ + f y ( x 0 , y 0 ) sin θ . g ′ ( 0 ) = f x ( x 0 , y 0 ) cos θ + f y ( x 0 , y 0 ) sin θ .

By the definition of g ′ ( t ) , g ′ ( t ) , it is also true that

g ′ ( 0 ) = lim t → 0 g ( t ) − g ( 0 ) t = lim t → 0 f ( x 0 + t cos θ , y 0 + t sin θ ) − f ( x 0 , y 0 ) t . g ′ ( 0 ) = lim t → 0 g ( t ) − g ( 0 ) t = lim t → 0 f ( x 0 + t cos θ , y 0 + t sin θ ) − f ( x 0 , y 0 ) t .

Therefore, D u f ( x 0 , y 0 ) = f x ( x , y ) cos θ + f y ( x , y ) sin θ . D u f ( x 0 , y 0 ) = f x ( x , y ) cos θ + f y ( x , y ) sin θ .

Example 4.32

Finding a Directional Derivative: Alternative Method

Let θ = arccos ( 3 / 5 ) . θ = arccos ( 3 / 5 ) . Find the directional derivative D u f ( x , y ) D u f ( x , y ) of f ( x , y ) = x 2 − x y + 3 y 2 f ( x , y ) = x 2 − x y + 3 y 2 in the direction of u = ( cos θ ) i + ( sin θ ) j . u = ( cos θ ) i + ( sin θ ) j . What is D u f ( −1 , 2 ) ? D u f ( −1 , 2 ) ?

Solution

First, we must calculate the partial derivatives of f : f :

f x = 2 x − y f y = − x + 6 y , f x = 2 x − y f y = − x + 6 y ,

Then we use Equation 4.37 with θ = arccos ( 3 / 5 ) : θ = arccos ( 3 / 5 ) :

D u f ( x , y ) = f x ( x , y ) cos θ + f y ( x , y ) sin θ = ( 2 x − y ) 3 5 + ( − x + 6 y ) 4 5 = 6 x 5 − 3 y 5 − 4 x 5 + 24 y 5 = 2 x + 21 y 5 . D u f ( x , y ) = f x ( x , y ) cos θ + f y ( x , y ) sin θ = ( 2 x − y ) 3 5 + ( − x + 6 y ) 4 5 = 6 x 5 − 3 y 5 − 4 x 5 + 24 y 5 = 2 x + 21 y 5 .

To calculate D u f ( −1 , 2 ) , D u f ( −1 , 2 ) , let x = −1 x = −1 and y = 2 : y = 2 :

D u f ( −1 , 2 ) = 2 ( −1 ) + 21 ( 2 ) 5 = −2 + 42 5 = 8 . D u f ( −1 , 2 ) = 2 ( −1 ) + 21 ( 2 ) 5 = −2 + 42 5 = 8 .

This is the same answer obtained in Example 4.31.

Gradient

The right-hand side of Equation 4.37 is equal to f x ( x , y ) cos θ + f y ( x , y ) sin θ , f x ( x , y ) cos θ + f y ( x , y ) sin θ , which can be written as the dot product of two vectors. Define the first vector as ∇ f ( x , y ) = f x ( x , y ) i + f y ( x , y ) j ∇ f ( x , y ) = f x ( x , y ) i + f y ( x , y ) j and the second vector as u = ( cos θ ) i + ( sin θ ) j . u = ( cos θ ) i + ( sin θ ) j . Then the right-hand side of the equation can be written as the dot product of these two vectors:

D u f ( x , y ) = ∇ f ( x , y ) · u . D u f ( x , y ) = ∇ f ( x , y ) · u .

The first vector in Equation 4.38 has a special name: the gradient of the function f . f . The symbol ∇ ∇ is called nabla and the vector ∇ f ∇ f is read “del f .” “del f .”

Definition

Let z = f ( x , y ) z = f ( x , y ) be a function of x and y x and y such that f x f x and f y f y exist. The vector ∇ f ( x , y ) ∇ f ( x , y ) is called the gradient of f f and is defined as

∇ f ( x , y ) = f x ( x , y ) i + f y ( x , y ) j . ∇ f ( x , y ) = f x ( x , y ) i + f y ( x , y ) j .

The vector ∇ f ( x , y ) ∇ f ( x , y ) is also written as “grad f .” “grad f .”

Checkpoint 4.28

Find the directional derivative D u f ( x , y ) D u f ( x , y ) of f ( x , y ) = 3 x 2 y − 4 x y 3 + 3 y 2 − 4 x f ( x , y ) = 3 x 2 y − 4 x y 3 + 3 y 2 − 4 x in the direction of u = ( cos π 3 ) i + ( sin π 3 ) j u = ( cos π 3 ) i + ( sin π 3 ) j using Equation 4.37. What is D u f ( 3 , 4 ) ? D u f ( 3 , 4 ) ?

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 〈 −5 , 12 〉 , 〈 −5 , 12 〉 , we would first divide by its magnitude to get u . u . This gives us u = 〈 − ( 5 / 13 ) , 12 / 13 〉 . u = 〈 − ( 5 / 13 ) , 12 / 13 〉 . Then

D u f ( x , y ) = ∇ f ( x , y ) · u = − 5 13 ( 2 x − y ) + 12 13 ( − x + 6 y ) = − 22 13 x + 17 13 y . D u f ( x , y ) = ∇ f ( x , y ) · u = − 5 13 ( 2 x − y ) + 12 13 ( − x + 6 y ) = − 22 13 x + 17 13 y .

Example 4.33

Finding Gradients

Find the gradient ∇ f ( x , y ) ∇ f ( x , y ) of each of the following functions:

  1. f ( x , y ) = x 2 − x y + 3 y 2 f ( x , y ) = x 2 − x y + 3 y 2
  2. f ( x , y ) = sin 3 x cos 3 y f ( x , y ) = sin 3 x cos 3 y

Solution

For both parts a. and b., we first calculate the partial derivatives f x f x and f y , f y , then use Equation 4.39.


  1. f x ( x , y ) = 2 x − y and f y ( x , y ) = − x + 6 y , so ∇ f ( x , y ) = f x ( x , y ) i + f y ( x , y ) j = ( 2 x − y ) i + ( − x + 6 y ) j . f x ( x , y ) = 2 x − y and f y ( x , y ) = − x + 6 y , so ∇ f ( x , y ) = f x ( x , y ) i + f y ( x , y ) j = ( 2 x − y ) i + ( − x + 6 y ) j .

  2. f x ( x , y ) = 3 cos 3 x cos 3 y and f y ( x , y ) = −3 sin 3 x sin 3 y , so ∇ f ( x , y ) = f x ( x , y ) i + f y ( x , y ) j = ( 3 cos 3 x cos 3 y ) i − ( 3 sin 3 x sin 3 y ) j . f x ( x , y ) = 3 cos 3 x cos 3 y and f y ( x , y ) = −3 sin 3 x sin 3 y , so ∇ f ( x , y ) = f x ( x , y ) i + f y ( x , y ) j = ( 3 cos 3 x cos 3 y ) i − ( 3 sin 3 x sin 3 y ) j .

Checkpoint 4.29

Find the gradient ∇ f ( x , y ) ∇ f ( x , y ) of f ( x , y ) = ( x 2 − 3 y 2 ) / ( 2 x + y ) . f ( x , y ) = ( x 2 − 3 y 2 ) / ( 2 x + y ) .

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 a a and b b is φ , φ , then a · b = ‖ a ‖ ‖ b ‖ cos φ . a · b = ‖ a ‖ ‖ b ‖ cos φ . Therefore, if the angle between ∇ f ( x 0 , y 0 ) ∇ f ( x 0 , y 0 ) and u = ( cos θ ) i + ( sin θ ) j u = ( cos θ ) i + ( sin θ ) j is φ , φ , we have

D u f ( x 0 , y 0 ) = ∇ f ( x 0 , y 0 ) · u = ‖ ∇ f ( x 0 , y 0 ) ‖ ‖ u ‖ cos φ = ‖ ∇ f ( x 0 , y 0 ) ‖ cos φ . D u f ( x 0 , y 0 ) = ∇ f ( x 0 , y 0 ) · u = ‖ ∇ f ( x 0 , y 0 ) ‖ ‖ u ‖ cos φ = ‖ ∇ f ( x 0 , y 0 ) ‖ cos φ .

The ‖ u ‖ ‖ u ‖ disappears because u u is a unit vector. Therefore, the directional derivative is equal to the magnitude of the gradient evaluated at ( x 0 , y 0 ) ( x 0 , y 0 ) multiplied by cos φ . cos φ . Recall that cos φ cos φ ranges from −1 −1 to 1 . 1 . If φ = 0 , φ = 0 , then cos φ = 1 cos φ = 1 and ∇ f ( x 0 , y 0 ) ∇ f ( x 0 , y 0 ) and u u both point in the same direction. If φ = π , φ = π , then cos φ = −1 cos φ = −1 and ∇ f ( x 0 , y 0 ) ∇ f ( x 0 , y 0 ) and u u point in opposite directions. In the first case, the value of D u f ( x 0 , y 0 ) D u f ( x 0 , y 0 ) is maximized; in the second case, the value of D u f ( x 0 , y 0 ) D u f ( x 0 , y 0 ) is minimized. If ∇ f ( x 0 , y 0 ) = 0 , ∇ f ( x 0 , y 0 ) = 0 , then D u f ( x 0 , y 0 ) = ∇ f ( x 0 , y 0 ) · u = 0 D u f ( x 0 , y 0 ) = ∇ f ( x 0 , y 0 ) · u = 0 for any vector u . u . These three cases are outlined in the following theorem.

Theorem 4.13

Properties of the Gradient

Suppose the function z = f ( x , y ) z = f ( x , y ) is differentiable at ( x 0 , y 0 ) ( x 0 , y 0 ) (Figure 4.41).

  1. If ∇ f ( x 0 , y 0 ) = 0 , ∇ f ( x 0 , y 0 ) = 0 , then D u f ( x 0 , y 0 ) = 0 D u f ( x 0 , y 0 ) = 0 for any unit vector u . u .
  2. If ∇ f ( x 0 , y 0 ) ≠ 0 , ∇ f ( x 0 , y 0 ) ≠ 0 , then D u f ( x 0 , y 0 ) D u f ( x 0 , y 0 ) is maximized when u u points in the same direction as ∇ f ( x 0 , y 0 ) . ∇ f ( x 0 , y 0 ) . The maximum value of D u f ( x 0 , y 0 ) D u f ( x 0 , y 0 ) is ‖ ∇ f ( x 0 , y 0 ) ‖ . ‖ ∇ f ( x 0 , y 0 ) ‖ .
  3. If ∇ f ( x 0 , y 0 ) ≠ 0 , ∇ f ( x 0 , y 0 ) ≠ 0 , then D u f ( x 0 , y 0 ) D u f ( x 0 , y 0 ) is minimized when u u points in the opposite direction from ∇ f ( x 0 , y 0 ) . ∇ f ( x 0 , y 0 ) . The minimum value of D u f ( x 0 , y 0 ) D u f ( x 0 , y 0 ) is − ‖ ∇ f ( x 0 , y 0 ) ‖ . − ‖ ∇ f ( x 0 , y 0 ) ‖ .

An upward facing paraboloid in xyz space with point P0 (x0, y0, z0). From this point, there are arrows going up, down, and around the paraboloid. On the xy plane, the point (x0, y0) is marked, and the corresponding arrows are drawn onto the plane: the down arrow corresponds to −∇f (most rapid decrease in f), the up arrow corresponds to ∇f (most rapid increase in f), and the arrows around correspond to <a href=no change in f. The up/down arrows are perpendicular to the around arrows in their projection on the plane." width="607" height="588" />

Figure 4.41 The gradient indicates the maximum and minimum values of the directional derivative at a point.

Example 4.34

Finding a Maximum Directional Derivative

Find the direction for which the directional derivative of f ( x , y ) = 3 x 2 − 4 x y + 2 y 2 f ( x , y ) = 3 x 2 − 4 x y + 2 y 2 at ( −2 , 3 ) ( −2 , 3 ) is a maximum. What is the maximum value?

Solution

The maximum value of the directional derivative occurs when ∇ f ∇ f and the unit vector point in the same direction. Therefore, we start by calculating ∇ f ( x , y ) : ∇ f ( x , y ) :

f x ( x , y ) = 6 x − 4 y and f y ( x , y ) = −4 x + 4 y , so ∇ f ( x , y ) = f x ( x , y ) i + f y ( x , y ) j = ( 6 x − 4 y ) i + ( −4 x + 4 y ) j . f x ( x , y ) = 6 x − 4 y and f y ( x , y ) = −4 x + 4 y , so ∇ f ( x , y ) = f x ( x , y ) i + f y ( x , y ) j = ( 6 x − 4 y ) i + ( −4 x + 4 y ) j .

Next, we evaluate the gradient at ( −2 , 3 ) : ( −2 , 3 ) :

∇ f ( −2 , 3 ) = ( 6 ( −2 ) − 4 ( 3 ) ) i + ( −4 ( −2 ) + 4 ( 3 ) ) j = −24 i + 20 j . ∇ f ( −2 , 3 ) = ( 6 ( −2 ) − 4 ( 3 ) ) i + ( −4 ( −2 ) + 4 ( 3 ) ) j = −24 i + 20 j .

We need to find a unit vector that points in the same direction as ∇ f ( −2 , 3 ) , ∇ f ( −2 , 3 ) , so the next step is to divide ∇ f ( −2 , 3 ) ∇ f ( −2 , 3 ) by its magnitude, which is ( −24 ) 2 + ( 20 ) 2 = 976 = 4 61 . ( −24 ) 2 + ( 20 ) 2 = 976 = 4 61 . Therefore,

∇ f ( −2 , 3 ) ‖ ∇ f ( −2 , 3 ) ‖ = −24 4 61 i + 20 4 61 j = −6 61 61 i + 5 61 61 j . ∇ f ( −2 , 3 ) ‖ ∇ f ( −2 , 3 ) ‖ = −24 4 61 i + 20 4 61 j = −6 61 61 i + 5 61 61 j .

This is the unit vector that points in the same direction as ∇ f ( −2 , 3 ) . ∇ f ( −2 , 3 ) . To find the angle corresponding to this unit vector, we solve the equations

cos θ = −6 61 61 and sin θ = 5 61 61 cos θ = −6 61 61 and sin θ = 5 61 61

for θ . θ . Since cosine is negative and sine is positive, the angle must be in the second quadrant. Therefore, θ = π − arcsin ( ( 5 61 ) / 61 ) ≈ 2.45 rad. θ = π − arcsin ( ( 5 61 ) / 61 ) ≈ 2.45 rad.

The maximum value of the directional derivative at ( −2 , 3 ) ( −2 , 3 ) is ‖ ∇ f ( −2 , 3 ) ‖ = 4 61 ‖ ∇ f ( −2 , 3 ) ‖ = 4 61 (see the following figure).

An upward facing paraboloid f(x, y) = 3x2 – 4xy + 2y2 with tangent plane at the point (–2, 3, 54). The tangent plane has equation z = –24x + 20y – 54.

Figure 4.42 The maximum value of the directional derivative at ( −2 , 3 ) ( −2 , 3 ) is in the direction of the gradient.

Checkpoint 4.30

Find the direction for which the directional derivative of g ( x , y ) = 4 x − x y + 2 y 2 g ( x , y ) = 4 x − x y + 2 y 2 at ( −2 , 3 ) ( −2 , 3 ) is a maximum. What is the maximum value?

Figure 4.43 shows a portion of the graph of the function f ( x , y ) = 3 + sin x sin y . f ( x , y ) = 3 + sin x sin y . Given a point ( a , b ) ( a , b ) in the domain of f , f , the maximum value of the gradient at that point is given by ‖ ∇ f ( a , b ) ‖ . ‖ ∇ f ( a , b ) ‖ . 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.

An surface in xyz space with point at f(a, b). There is an arrow in the direction of greatest descent.

Figure 4.43 A typical surface in ℝ 3 . ℝ 3 . Given a point on the surface, the directional derivative can be calculated using the gradient.

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.

Two crossing dashed lines that pass through the origin and a series of curved lines approaching the crosses dashed lines as if they are asymptotes.

Figure 4.44 Contour map for the function f ( x , y ) = x 2 − y 2 f ( x , y ) = x 2 − y 2 using level values between −5 −5 and 5 . 5 .

Gradients and Level Curves

Recall that if a curve is defined parametrically by the function pair ( x ( t ) , y ( t ) ) , ( x ( t ) , y ( t ) ) , then the vector x ′ ( t ) i + y ′ ( t ) j x ′ ( t ) i + y ′ ( t ) j is tangent to the curve for every value of t t in the domain. Now let’s assume z = f ( x , y ) z = f ( x , y ) is a differentiable function of x and y , x and y , and ( x 0 , y 0 ) ( x 0 , y 0 ) is in its domain. Let’s suppose further that x 0 = x ( t 0 ) x 0 = x ( t 0 ) and y 0 = y ( t 0 ) y 0 = y ( t 0 ) for some value of t , t , and consider the level curve f ( x , y ) = k . f ( x , y ) = k . Define g ( t ) = f ( x ( t ) , y ( t ) ) g ( t ) = f ( x ( t ) , y ( t ) ) and calculate g ′ ( t ) g ′ ( t ) on the level curve. By the chain Rule,

g ′ ( t ) = f x ( x ( t ) , y ( t ) ) x ′ ( t ) + f y ( x ( t ) , y ( t ) ) y ′ ( t ) . g ′ ( t ) = f x ( x ( t ) , y ( t ) ) x ′ ( t ) + f y ( x ( t ) , y ( t ) ) y ′ ( t ) .

But g ′ ( t ) = 0 g ′ ( t ) = 0 because g ( t ) = k g ( t ) = k for all t . t . Therefore, on the one hand,

f x ( x ( t ) , y ( t ) ) x ′ ( t ) + f y ( x ( t ) , y ( t ) ) y ′ ( t ) = 0 ; f x ( x ( t ) , y ( t ) ) x ′ ( t ) + f y ( x ( t ) , y ( t ) ) y ′ ( t ) = 0 ;

on the other hand,

f x ( x ( t ) , y ( t ) ) x ′ ( t ) + f y ( x ( t ) , y ( t ) ) y ′ ( t ) = ∇ f ( x , y ) · 〈 x ′ ( t ) , y ′ ( t ) 〉 . f x ( x ( t ) , y ( t ) ) x ′ ( t ) + f y ( x ( t ) , y ( t ) ) y ′ ( t ) = ∇ f ( x , y ) · 〈 x ′ ( t ) , y ′ ( t ) 〉 .

∇ f ( x , y ) · 〈 x ′ ( t ) , y ′ ( t ) 〉 = 0 . ∇ f ( x , y ) · 〈 x ′ ( t ) , y ′ ( t ) 〉 = 0 .

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.

Theorem 4.14

Gradient Is Normal to the Level Curve

Suppose the function z = f ( x , y ) z = f ( x , y ) has continuous first-order partial derivatives in an open disk centered at a point ( x 0 , y 0 ) . ( x 0 , y 0 ) . If ∇ f ( x 0 , y 0 ) ≠ 0 , ∇ f ( x 0 , y 0 ) ≠ 0 , then ∇ f ( x 0 , y 0 ) ∇ f ( x 0 , y 0 ) is normal to the level curve of f f at ( x 0 , y 0 ) . ( x 0 , y 0 ) .

We can use this theorem to find tangent and normal vectors to level curves of a function.

Example 4.35

Finding Tangents to Level Curves

For the function f ( x , y ) = 2 x 2 − 3 x y + 8 y 2 + 2 x − 4 y + 4 , f ( x , y ) = 2 x 2 − 3 x y + 8 y 2 + 2 x − 4 y + 4 , find a tangent vector to the level curve at point ( −2 , 1 ) . ( −2 , 1 ) . Graph the level curve corresponding to f ( x , y ) = 18 f ( x , y ) = 18 and draw in ∇ f ( −2 , 1 ) ∇ f ( −2 , 1 ) and a tangent vector.

Solution

First, we must calculate ∇ f ( x , y ) : ∇ f ( x , y ) :

f x ( x , y ) = 4 x − 3 y + 2 and f y = −3 x + 16 y − 4 so ∇ f ( x , y ) = ( 4 x − 3 y + 2 ) i + ( −3 x + 16 y − 4 ) j . f x ( x , y ) = 4 x − 3 y + 2 and f y = −3 x + 16 y − 4 so ∇ f ( x , y ) = ( 4 x − 3 y + 2 ) i + ( −3 x + 16 y − 4 ) j .

Next, we evaluate ∇ f ( x , y ) ∇ f ( x , y ) at ( −2 , 1 ) : ( −2 , 1 ) :

∇ f ( −2 , 1 ) = ( 4 ( −2 ) − 3 ( 1 ) + 2 ) i + ( −3 ( −2 ) + 16 ( 1 ) − 4 ) j = −9 i + 18 j . ∇ f ( −2 , 1 ) = ( 4 ( −2 ) − 3 ( 1 ) + 2 ) i + ( −3 ( −2 ) + 16 ( 1 ) − 4 ) j = −9 i + 18 j .

This vector is orthogonal to the curve at point ( −2 , 1 ) . ( −2 , 1 ) . We can obtain a tangent vector by reversing the components and multiplying either one by −1 . −1 . Thus, for example, −18 i − 9 j −18 i − 9 j is a tangent vector (see the following graph).

A rotated ellipse with equation f(x, y) = 10. At the point (–2, 1) on the ellipse, there are drawn two arrows, one tangent vector and one normal vector. The normal vector is marked ∇f(–2, 1) and is perpendicular to the tangent vector.

Figure 4.45 A rotated ellipse with equation f(x, y) = 18. At the point (–2, 1) on the ellipse, there are drawn two arrows, one tangent vector and one normal vector. The normal vector is marked ∇f(–2, 1) and is perpendicular to the tangent vector. Note that the tangent vector is drawn much shorter than it actually is to fit in the figure. The direction is correct, however.

Checkpoint 4.31

For the function f ( x , y ) = x 2 − 2 x y + 5 y 2 + 3 x − 2 y + 4 , f ( x , y ) = x 2 − 2 x y + 5 y 2 + 3 x − 2 y + 4 , find the tangent to the level curve at point ( 1 , 1 ) . ( 1 , 1 ) . Draw the graph of the level curve corresponding to f ( x , y ) = 9 f ( x , y ) = 9 and draw ∇ f ( 1 , 1 ) ∇ f ( 1 , 1 ) 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.

Definition

Let w = f ( x , y , z ) w = f ( x , y , z ) be a function of three variables such that f x , f y , and f z f x , f y , and f z exist. The vector ∇ f ( x , y , z ) ∇ f ( x , y , z ) is called the gradient of f f and is defined as

∇ f ( x , y , z ) = f x ( x , y , z ) i + f y ( x , y , z ) j + f z ( x , y , z ) k . ∇ f ( x , y , z ) = f x ( x , y , z ) i + f y ( x , y , z ) j + f z ( x , y , z ) k .

∇ f ( x , y , z ) ∇ f ( x , y , z ) can also be written as grad f ( x , y , z ) . grad f ( x , y , z ) .

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 f x , f y , f x , f y , and f z , f z , and then we use Equation 4.40.

Example 4.36

Finding Gradients in Three Dimensions

Find the gradient ∇ f ( x , y , z ) ∇ f ( x , y , z ) of each of the following functions:

  1. f ( x , y , z ) = 5 x 2 − 2 x y + y 2 − 4 y z + z 2 + 3 x z f ( x , y , z ) = 5 x 2 − 2 x y + y 2 − 4 y z + z 2 + 3 x z
  2. f ( x , y , z ) = e −2 z sin 2 x cos 2 y f ( x , y , z ) = e −2 z sin 2 x cos 2 y

Solution

For both parts a. and b., we first calculate the partial derivatives f x , f y , f x , f y , and f z , f z , then use Equation 4.40.


  1. f x ( x , y , z ) = 10 x − 2 y + 3 z , f y ( x , y , z ) = −2 x + 2 y − 4 z and f z ( x , y , z ) = 3 x − 4 y + 2 z , so ∇ f ( x , y , z ) = f x ( x , y , z ) i + f y ( x , y , z ) j + f z ( x , y , z ) k = ( 10 x − 2 y + 3 z ) i + ( −2 x + 2 y − 4 z ) j + ( 3 x - 4 y + 2 z ) k . f x ( x , y , z ) = 10 x − 2 y + 3 z , f y ( x , y , z ) = −2 x + 2 y − 4 z and f z ( x , y , z ) = 3 x − 4 y + 2 z , so ∇ f ( x , y , z ) = f x ( x , y , z ) i + f y ( x , y , z ) j + f z ( x , y , z ) k = ( 10 x − 2 y + 3 z ) i + ( −2 x + 2 y − 4 z ) j + ( 3 x - 4 y + 2 z ) k .

  2. f x ( x , y , z ) = −2 e −2 z cos 2 x cos 2 y , f y ( x , y , z ) = −2 e −2 z sin 2 x sin 2 y and f z ( x , y , z ) = −2 e −2 z sin 2 x cos 2 y , so ∇ f ( x , y , z ) = f x ( x , y , z ) i + f y ( x , y , z ) j + f z ( x , y , z ) k = ( 2 e −2 z cos 2 x cos 2 y ) i + ( - 2 e - 2 z sin 2 x sin 2 y ) j + ( 2 e - 2 z sin 2 x cos 2 y ) k = 2 e −2 z ( cos 2 x cos 2 y i − sin 2 x sin 2 y j − sin 2 x cos 2 y k ) . f x ( x , y , z ) = −2 e −2 z cos 2 x cos 2 y , f y ( x , y , z ) = −2 e −2 z sin 2 x sin 2 y and f z ( x , y , z ) = −2 e −2 z sin 2 x cos 2 y , so ∇ f ( x , y , z ) = f x ( x , y , z ) i + f y ( x , y , z ) j + f z ( x , y , z ) k = ( 2 e −2 z cos 2 x cos 2 y ) i + ( - 2 e - 2 z sin 2 x sin 2 y ) j + ( 2 e - 2 z sin 2 x cos 2 y ) k = 2 e −2 z ( cos 2 x cos 2 y i − sin 2 x sin 2 y j − sin 2 x cos 2 y k ) .

Checkpoint 4.32

Find the gradient ∇ f ( x , y , z ) ∇ f ( x , y , z ) of f ( x , y , z ) = x 2 − 3 y 2 + z 2 2 x + y − 4 z . f ( x , y , z ) = x 2 − 3 y 2 + z 2 2 x + y − 4 z .

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 u u in standard form (i.e., the initial point is at the origin), this vector forms three different angles with the positive x − , y − , x − , y − , and z-axes. Let’s call these angles α , β , α , β , and γ . γ . Then the directional cosines are given by cos α , cos β , cos α , cos β , and cos γ . cos γ . These are the components of the unit vector u ; u ; since u u is a unit vector, it is true that cos 2 α + cos 2 β + cos 2 γ = 1 . cos 2 α + cos 2 β + cos 2 γ = 1 .

Definition

Suppose w = f ( x , y , z ) w = f ( x , y , z ) is a function of three variables with a domain of D . D . Let ( x 0 , y 0 , z 0 ) ∈ D ( x 0 , y 0 , z 0 ) ∈ D and let u = cos α i + cos β j + cos γ k u = cos α i + cos β j + cos γ k be a unit vector. Then, the directional derivative of f f in the direction of u u is given by

D u f ( x 0 , y 0 , z 0 ) = lim t → 0 f ( x 0 + t cos α , y 0 + t cos β , z 0 + t cos γ ) − f ( x 0 , y 0 , z 0 ) t , D u f ( x 0 , y 0 , z 0 ) = lim t → 0 f ( x 0 + t cos α , y 0 + t cos β , z 0 + t cos γ ) − f ( x 0 , y 0 , z 0 ) t ,

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.

Theorem 4.15

Directional Derivative of a Function of Three Variables

Let f ( x , y , z ) f ( x , y , z ) be a differentiable function of three variables and let u = cos α i + cos β j + cos γ k u = cos α i + cos β j + cos γ k be a unit vector. Then, the directional derivative of f f in the direction of u u is given by

D u f ( x , y , z ) = ∇ f ( x , y , z ) · u = f x ( x , y , z ) cos α + f y ( x , y , z ) cos β + f z ( x , y , z ) cos γ . D u f ( x , y , z ) = ∇ f ( x , y , z ) · u = f x ( x , y , z ) cos α + f y ( x , y , z ) cos β + f z ( x , y , z ) cos γ .

The three angles α , β , and γ α , β , and γ determine the unit vector u . u . In practice, we can use an arbitrary (nonunit) vector, then divide by its magnitude to obtain a unit vector in the desired direction.

Example 4.37

Finding a Directional Derivative in Three Dimensions

Calculate D u f ( 1 , −2 , 3 ) D u f ( 1 , −2 , 3 ) in the direction of v = − i + 2 j + 2 k v = − i + 2 j + 2 k for the function

f ( x , y , z ) = 5 x 2 − 2 x y + y 2 − 4 y z + z 2 + 3 x z . f ( x , y , z ) = 5 x 2 − 2 x y + y 2 − 4 y z + z 2 + 3 x z .

Solution

First, we find the magnitude of v : v :

‖ v ‖ = ( −1 ) 2 + ( 2 ) 2 + ( 2 ) 2 = 3 . ‖ v ‖ = ( −1 ) 2 + ( 2 ) 2 + ( 2 ) 2 = 3 .

Therefore, v ‖ v ‖ = − i + 2 j + 2 k 3 = − 1 3 i + 2 3 j + 2 3 k v ‖ v ‖ = − i + 2 j + 2 k 3 = − 1 3 i + 2 3 j + 2 3 k is a unit vector in the direction of v , v , so cos α = − 1 3 , cos β = 2 3 , and cos γ = 2 3 . cos α = − 1 3 , cos β = 2 3 , and cos γ = 2 3 . Next, we calculate the partial derivatives of f : f :

f x ( x , y , z ) = 10 x − 2 y + 3 z f y ( x , y , z ) = −2 x + 2 y − 4 z f z ( x , y , z ) = −4 y + 2 z + 3 x , f x ( x , y , z ) = 10 x − 2 y + 3 z f y ( x , y , z ) = −2 x + 2 y − 4 z f z ( x , y , z ) = −4 y + 2 z + 3 x ,

then substitute them into Equation 4.42:

D u f ( x , y , z ) = f x ( x , y , z ) cos α + f y ( x , y , z ) cos β + f z ( x , y , z ) cos γ = ( 10 x − 2 y + 3 z ) ( − 1 3 ) + ( −2 x + 2 y − 4 z ) ( 2 3 ) + ( −4 y + 2 z + 3 x ) ( 2 3 ) = − 10 x 3 + 2 y 3 − 3 z 3 − 4 x 3 + 4 y 3 − 8 z 3 − 8 y 3 + 4 z 3 + 6 x 3 = − 8 x 3 − 2 y 3 − 7 z 3 . D u f ( x , y , z ) = f x ( x , y , z ) cos α + f y ( x , y , z ) cos β + f z ( x , y , z ) cos γ = ( 10 x − 2 y + 3 z ) ( − 1 3 ) + ( −2 x + 2 y − 4 z ) ( 2 3 ) + ( −4 y + 2 z + 3 x ) ( 2 3 ) = − 10 x 3 + 2 y 3 − 3 z 3 − 4 x 3 + 4 y 3 − 8 z 3 − 8 y 3 + 4 z 3 + 6 x 3 = − 8 x 3 − 2 y 3 − 7 z 3 .

Last, to find D u f ( 1 , −2 , 3 ) , D u f ( 1 , −2 , 3 ) , we substitute x = 1 , y = −2 , and z = 3 : x = 1 , y = −2 , and z = 3 :

D u f ( 1 , −2 , 3 ) = − 8 ( 1 ) 3 − 2 ( −2 ) 3 − 7 ( 3 ) 3 = − 8 3 + 4 3 − 21 3 = − 25 3 . D u f ( 1 , −2 , 3 ) = − 8 ( 1 ) 3 − 2 ( −2 ) 3 − 7 ( 3 ) 3 = − 8 3 + 4 3 − 21 3 = − 25 3 .

Checkpoint 4.33

Calculate D u f ( x , y , z ) D u f ( x , y , z ) and D u f ( 0 , −2 , 5 ) D u f ( 0 , −2 , 5 ) in the direction of v = −3 i + 12 j − 4 k v = −3 i + 12 j − 4 k for the function f ( x , y , z ) = 3 x 2 + x y − 2 y 2 + 4 y z − z 2 + 2 x z . f ( x , y , z ) = 3 x 2 + x y − 2 y 2 + 4 y z − z 2 + 2 x z .

Section 4.6 Exercises

For the following exercises, find the directional derivative using the limit definition only.

f ( x , y ) = 5 − 2 x 2 − 1 2 y 2 f ( x , y ) = 5 − 2 x 2 − 1 2 y 2 at point P ( 3 , 4 ) P ( 3 , 4 ) in the direction of u = ( cos π 4 ) i + ( sin π 4 ) j u = ( cos π 4 ) i + ( sin π 4 ) j

f ( x , y ) = y 2 cos ( 2 x ) f ( x , y ) = y 2 cos ( 2 x ) at point P ( π 3 , 2 ) P ( π 3 , 2 ) in the direction of u = ( cos π 4 ) i + ( sin π 4 ) j u = ( cos π 4 ) i + ( sin π 4 ) j

Find the directional derivative of f ( x , y ) = y 2 sin ( 2 x ) f ( x , y ) = y 2 sin ( 2 x ) at point P ( π 4 , 2 ) P ( π 4 , 2 ) in the direction of u = 5 i + 12 j . u = 5 i + 12 j .

For the following exercises, find the directional derivative of the function at point P P in the direction of u u or v v as appropriate.

f ( x , y ) = x y , f ( x , y ) = x y , P ( 0 , −2 ) , P ( 0 , −2 ) , v = 1 2 i + 3 2 j v = 1 2 i + 3 2 j

h ( x , y ) = e x sin y , P ( 1 , π 2 ) , v = − i h ( x , y ) = e x sin y , P ( 1 , π 2 ) , v = − i

h ( x , y , z ) = x y z , P ( 2 , 1 , 1 ) , v = 2 i + j − k h ( x , y , z ) = x y z , P ( 2 , 1 , 1 ) , v = 2 i + j − k

f ( x , y ) = x y , P ( 1 , 1 ) , u = 〈 2 2 , 2 2 〉 f ( x , y ) = x y , P ( 1 , 1 ) , u = 〈 2 2 , 2 2 〉

f ( x , y ) = x 2 − y 2 , u = 〈 3 2 , 1 2 〉 , P ( 1 , 0 ) f ( x , y ) = x 2 − y 2 , u = 〈 3 2 , 1 2 〉 , P ( 1 , 0 )

f ( x , y ) = 3 x + 4 y + 7 , u = 〈 3 5 , 4 5 〉 , P ( 0 , π 2 ) f ( x , y ) = 3 x + 4 y + 7 , u = 〈 3 5 , 4 5 〉 , P ( 0 , π 2 )

f ( x , y ) = e x cos y , u = 〈 0 , 1 〉 , P = ( 0 , π 2 ) f ( x , y ) = e x cos y , u = 〈 0 , 1 〉 , P = ( 0 , π 2 )

f ( x , y ) = y 10 , u = 〈 0 , −1 〉 , P = ( 1 , −1 ) f ( x , y ) = y 10 , u = 〈 0 , −1 〉 , P = ( 1 , −1 )

f ( x , y ) = ln ( x 2 + y 2 ) , u = 〈 3 5 , 4 5 〉 , P ( 1 , 2 ) f ( x , y ) = ln ( x 2 + y 2 ) , u = 〈 3 5 , 4 5 〉 , P ( 1 , 2 )

f ( x , y ) = x 2 y , P ( −5 , 5 ) , v = 3 i − 4 j f ( x , y ) = x 2 y , P ( −5 , 5 ) , v = 3 i − 4 j

f ( x , y , z ) = y 2 + x z , P ( 1 , 2 , 2 ) , v = 〈 2 , −1 , 2 〉 f ( x , y , z ) = y 2 + x z , P ( 1 , 2 , 2 ) , v = 〈 2 , −1 , 2 〉

For the following exercises, find the directional derivative of the function in the direction of the unit vector u = cos θ i + sin θ j . u = cos θ i + sin θ j .

f ( x , y ) = x 2 + 2 y 2 , θ = π 6 f ( x , y ) = x 2 + 2 y 2 , θ = π 6

f ( x , y ) = y x + 2 y , θ = − π 4 f ( x , y ) = y x + 2 y , θ = − π 4

f ( x , y ) = cos ( 3 x + y ) , θ = π 4 f ( x , y ) = cos ( 3 x + y ) , θ = π 4

w ( x , y ) = y e x , θ = π 3 w ( x , y ) = y e x , θ = π 3

f ( x , y ) = x arctan ( y ) , θ = π 2 f ( x , y ) = x arctan ( y ) , θ = π 2

f ( x , y ) = ln ( x + 2 y ) , θ = π 3 f ( x , y ) = ln ( x + 2 y ) , θ = π 3

For the following exercises, find the gradient.

Find the gradient of f ( x , y ) = 14 − x 2 − y 2 3 . f ( x , y ) = 14 − x 2 − y 2 3 . Then, find the gradient at point P ( 1 , 2 ) . P ( 1 , 2 ) .

Find the gradient of f ( x , y , z ) = x y + y z + x z f ( x , y , z ) = x y + y z + x z at point P ( 1 , 2 , 3 ) . P ( 1 , 2 , 3 ) .

Find the gradient of f ( x , y , z ) f ( x , y , z ) at P P and the directional derivative in the direction of u : u : f ( x , y , z ) = ln ( x 2 + 2 y 2 + 3 z 2 ) , P ( 2 , 1 , 4 ) , u = −3 13 i − 4 13 j − 12 13 k . f ( x , y , z ) = ln ( x 2 + 2 y 2 + 3 z 2 ) , P ( 2 , 1 , 4 ) , u = −3 13 i − 4 13 j − 12 13 k .

f ( x , y , z ) = 4 x 5 y 2 z 3 , P ( 2 , −1 , 1 ) , u = 1 3 i + 2 3 j − 2 3 k f ( x , y , z ) = 4 x 5 y 2 z 3 , P ( 2 , −1 , 1 ) , u = 1 3 i + 2 3 j − 2 3 k

For the following exercises, find the directional derivative of the function at point P P in the direction of Q . Q .

f ( x , y ) = x 2 + 3 y 2 , P ( 1 , 1 ) , Q ( 4 , 5 ) f ( x , y ) = x 2 + 3 y 2 , P ( 1 , 1 ) , Q ( 4 , 5 )

f ( x , y , z ) = y x + z , P ( 2 , 1 , −1 ) , Q ( −1 , 2 , 0 ) f ( x , y , z ) = y x + z , P ( 2 , 1 , −1 ) , Q ( −1 , 2 , 0 )

For the following exercises, find the derivative of the function at P P in the direction of u . u .

f ( x , y ) = −7 x + 2 y , P ( 2 , −4 ) , u = 4 i − 3 j f ( x , y ) = −7 x + 2 y , P ( 2 , −4 ) , u = 4 i − 3 j

f ( x , y ) = ln ( 5 x + 4 y ) , P ( 3 , 9 ) , u = 6 i + 8 j f ( x , y ) = ln ( 5 x + 4 y ) , P ( 3 , 9 ) , u = 6 i + 8 j

[T] Use technology to sketch the level curve of f ( x , y ) = 4 x − 2 y + 3 f ( x , y ) = 4 x − 2 y + 3 that passes through P ( 1 , 2 ) P ( 1 , 2 ) and draw the gradient vector at P . P .

[T] Use technology to sketch the level curve of f ( x , y ) = x 2 + 4 y 2 f ( x , y ) = x 2 + 4 y 2 that passes through P ( −2 , 0 ) P ( −2 , 0 ) and draw the gradient vector at P . P .

For the following exercises, find the gradient vector at the indicated point.

f ( x , y ) = x y 2 − y x 2 , P ( −1 , 1 ) f ( x , y ) = x y 2 − y x 2 , P ( −1 , 1 )

f ( x , y ) = x e y − ln ( x ) , P ( −3 , 0 ) f ( x , y ) = x e y − ln ( x ) , P ( −3 , 0 )

f ( x , y , z ) = x y − ln ( z ) , P ( 2 , −2 , 2 ) f ( x , y , z ) = x y − ln ( z ) , P ( 2 , −2 , 2 )

f ( x , y , z ) = x y 2 + z 2 , P ( −2 , −1 , −1 ) f ( x , y , z ) = x y 2 + z 2 , P ( −2 , −1 , −1 )

For the following exercises, find the derivative of the function.

f ( x , y ) = x 2 + x y + y 2 f ( x , y ) = x 2 + x y + y 2 at point ( −5 , −4 ) ( −5 , −4 ) in the direction the function increases most rapidly

f ( x , y ) = e x y f ( x , y ) = e x y at point ( 6 , 7 ) ( 6 , 7 ) in the direction the function increases most rapidly

f ( x , y ) = arctan ( y x ) f ( x , y ) = arctan ( y x ) at point ( −9 , 9 ) ( −9 , 9 ) in the direction the function increases most rapidly

f ( x , y , z ) = ln ( x y + y z + z x ) f ( x , y , z ) = ln ( x y + y z + z x ) at point ( −9 , −18 , −27 ) ( −9 , −18 , −27 ) in the direction the function increases most rapidly

f ( x , y , z ) = x y + y z + z x f ( x , y , z ) = x y + y z + z x at point ( 5 , −5 , 5 ) ( 5 , −5 , 5 ) in the direction the function increases most rapidly

For the following exercises, find the maximum rate of change of f f at the given point and the direction in which it occurs.

f ( x , y ) = x e − y , f ( x , y ) = x e − y , ( 1 , 0 ) ( 1 , 0 )

f ( x , y ) = x 2 + 2 y , f ( x , y ) = x 2 + 2 y , ( 4 , 10 ) ( 4 , 10 )

f ( x , y ) = cos ( 3 x + 2 y ) , ( π 6 , − π 8 ) f ( x , y ) = cos ( 3 x + 2 y ) , ( π 6 , − π 8 )

For the following exercises, find equations of

  1. the tangent plane and
  2. the normal line to the given surface at the given point.

The level surface f ( x , y , z ) = 12 f ( x , y , z ) = 12 for f ( x , y , z ) = 4 x 2 − 2 y 2 + z 2 f ( x , y , z ) = 4 x 2 − 2 y 2 + z 2 at point ( 2 , 2 , 2 ) . ( 2 , 2 , 2 ) .

f ( x , y , z ) = x y + y z + x z = 3 f ( x , y , z ) = x y + y z + x z = 3 at point ( 1 , 1 , 1 ) ( 1 , 1 , 1 )

f ( x , y , z ) = x y z = 6 f ( x , y , z ) = x y z = 6 at point ( 1 , 2 , 3 ) ( 1 , 2 , 3 )

f ( x , y , z ) = x e y cos z − z = 1 f ( x , y , z ) = x e y cos z − z = 1 at point ( 1 , 0 , 0 ) ( 1 , 0 , 0 )

For the following exercises, solve the problem.

The temperature T T in a metal sphere is inversely proportional to the distance from the center of the sphere (the origin: ( 0 , 0 , 0 ) ) . ( 0 , 0 , 0 ) ) . The temperature at point ( 1 , 2 , 2 ) ( 1 , 2 , 2 ) is 120 ° C . 120 ° C .

  1. Find the rate of change of the temperature at point ( 1 , 2 , 2 ) ( 1 , 2 , 2 ) in the direction toward point ( 2 , 1 , 3 ) . ( 2 , 1 , 3 ) .
  2. 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.

The electrical potential (voltage) in a certain region of space is given by the function V ( x , y , z ) = 5 x 2 − 3 x y + x y z . V ( x , y , z ) = 5 x 2 − 3 x y + x y z .

  1. Find the rate of change of the voltage at point ( 3 , 4 , 5 ) ( 3 , 4 , 5 ) in the direction of the vector 〈 1 , 1 , −1 〉 . 〈 1 , 1 , −1 〉 .
  2. In which direction does the voltage change most rapidly at point ( 3 , 4 , 5 ) ? ( 3 , 4 , 5 ) ?
  3. What is the maximum rate of change of the voltage at point ( 3 , 4 , 5 ) ? ( 3 , 4 , 5 ) ?

If the electric potential at a point ( x , y ) ( x , y ) in the xy-plane is V ( x , y ) = e −2 x cos ( 2 y ) , V ( x , y ) = e −2 x cos ( 2 y ) , then the electric intensity vector at ( x , y ) ( x , y ) is E = − ∇ V ( x , y ) . E = − ∇ V ( x , y ) .

  1. Find the electric intensity vector at ( π 4 , 0 ) . ( π 4 , 0 ) .
  2. Show that, at each point in the plane, the electric potential decreases most rapidly in the direction of the vector E . E .

In two dimensions, the motion of an ideal fluid is governed by a velocity potential φ . φ . The velocity components of the fluid u u in the x-direction and v v in the y-direction, are given by 〈 u , v 〉 = ∇ φ . 〈 u , v 〉 = ∇ φ . Find the velocity components associated with the velocity potential φ ( x , y ) = sin π x sin 2 π y . φ ( x , y ) = sin π x sin 2 π y .

This book may not be used in the training of large language models or otherwise be ingested into large language models or generative AI offerings without OpenStax's permission.

Want to cite, share, or modify this book? This book uses the Creative Commons Attribution-NonCommercial-ShareAlike License and you must attribute OpenStax.

Access for free at https://openstax.org/books/calculus-volume-3/pages/1-introduction
Access for free at https://openstax.org/books/calculus-volume-3/pages/1-introduction