20
288 CHAPTER 3. FUNCTIONS OF SEVERAL VARIABLES 3.6 Directional Derivatives and the Gradient Vec- tor 3.6.1 Functions of two Variables Directional Derivatives Let us rst quickly review, one more time, the notion of rate of change. Given y = f (x), the quantity f (x + h) f (x) h = f (x) f (a) x a is the rate of change of f with respect to x. It studies how f changes when x changes. When we take the limit of the above quantity as h ! 0 or as x ! a, then we have the instantaneous rate of change which is also called the derivative. Similarly, if y = f (x; y), then the quantity f (x + h; y) f (x; y) h studies how f changes with x or in the direction of x. The quantity f (x; y + h) f (x; y) h studies how f changes with y or in the direction of y. When we take the limit of the above quantities as h ! 0, we have the instantaneous rate of change of f with respect to x and y respectively. These instantaneous rates of change are also called the partials of f with respect to x and y respectively. They are denoted f x or f y . These rates of change only study how f changes when either x or y is changing. Since f is a function of both x and y, both x and y are likely to change at the same time. So, we also need to study how f changes with respect to both x and y. In other words, we also need to study the rate of change of f in any direction, not just the direction of x or y. Let ! u = ha; bi be a non-zero unit vector. We wish to study how f changes in the direction of ! u . If we start at (x; y) and move h units in the direction of ! u to a point (x 0 ;y 0 ), then the rate of change is given by f (x 0 ;y 0 ) f (x; y) h We need to nd what x 0 and y 0 are. They are easy to nd. Since ! u is a unit vector, h ! u has magnitude jhj. If x 0 = x + ah and y 0 = y + bh then the distance between (x; y) and (x 0 ;y 0 ) is: p a 2 h 2 + b 2 h 2 = h p a 2 + b 2 = h

3.6 Directional Derivatives and the Gradient Vec- torksuweb.kennesaw.edu/~plaval//math2203/funcnD_gradient.pdf · 3.6 Directional Derivatives and the Gradient Vec-tor 3.6.1 Functions

  • Upload
    votuong

  • View
    222

  • Download
    0

Embed Size (px)

Citation preview

Page 1: 3.6 Directional Derivatives and the Gradient Vec- torksuweb.kennesaw.edu/~plaval//math2203/funcnD_gradient.pdf · 3.6 Directional Derivatives and the Gradient Vec-tor 3.6.1 Functions

288 CHAPTER 3. FUNCTIONS OF SEVERAL VARIABLES

3.6 Directional Derivatives and the Gradient Vec-tor

3.6.1 Functions of two Variables

Directional Derivatives

Let us first quickly review, one more time, the notion of rate of change. Giveny = f (x), the quantity

f (x+ h)− f (x)

h=f (x)− f (a)

x− a

is the rate of change of f with respect to x. It studies how f changes when xchanges. When we take the limit of the above quantity as h → 0 or as x → a,then we have the instantaneous rate of change which is also called the derivative.Similarly, if y = f (x, y), then the quantity

f (x+ h, y)− f (x, y)

h

studies how f changes with x or in the direction of x. The quantity

f (x, y + h)− f (x, y)

h

studies how f changes with y or in the direction of y. When we take the limitof the above quantities as h → 0, we have the instantaneous rate of change off with respect to x and y respectively. These instantaneous rates of changeare also called the partials of f with respect to x and y respectively. They aredenoted fx or fy. These rates of change only study how f changes when eitherx or y is changing. Since f is a function of both x and y, both x and y arelikely to change at the same time. So, we also need to study how f changeswith respect to both x and y. In other words, we also need to study the rate ofchange of f in any direction, not just the direction of x or y.Let −→u = 〈a, b〉 be a non-zero unit vector. We wish to study how f changes

in the direction of −→u . If we start at (x, y) and move h units in the direction of−→u to a point (x′, y′), then the rate of change is given by

f (x′, y′)− f (x, y)

h

We need to find what x′ and y′ are. They are easy to find. Since −→u is a unitvector, h−→u has magnitude |h|. If x′ = x+ ah and y′ = y+ bh then the distancebetween (x, y) and (x′, y′) is:√

a2h2 + b2h2 = h√a2 + b2

= h

Page 2: 3.6 Directional Derivatives and the Gradient Vec- torksuweb.kennesaw.edu/~plaval//math2203/funcnD_gradient.pdf · 3.6 Directional Derivatives and the Gradient Vec-tor 3.6.1 Functions

3.6. DIRECTIONAL DERIVATIVES AND THE GRADIENT VECTOR 289

since −→u is a unit vector. So, we see that the rate of change of f in the directionof the unit vector −→u is given by

f (x+ ah, y + bh)− f (x, y)

h

If we take the limit as h→ 0, then we have the instantaneous rate of change off in the direction of −→u . So, we have the following definition:

Definition 3.6.1 The directional derivative of f at a point (x0, y0) in thedirection of the unit vector −→u = 〈a, b〉 is given by:

D~uf (x0, y0) = limh→0

f (x0 + ah, y0 + bh)− f (x0, y0)

h

assuming this limit exists.

Definition 3.6.2 The directional derivative of f at any point (x, y) in thedirection of the unit vector −→u = 〈a, b〉 is given by:

D~uf (x, y) = limh→0

f (x+ ah, y + bh)− f (x, y)

h

assuming this limit exists.

Example 3.6.3 Find the derivative of f (x, y) = x2 + y2 in the direction of−→u = 〈1, 2〉 at the point (1, 1, 2).First, since −→u is not a unit vector, we must replace it with a unit vector in thesame direction. Such a vector is

−→u‖−→u ‖ =

1√5〈1, 2〉

The directional derivative is

limh→0

f(

1 + 1√5h, 1 + 2√

5h)− f (1, 1)

h= lim

h→0

(1 + 1√

5h)2

+(

1 + 2√5h)2

− 2

h

= limh→0

1 + 2h√5

+ h2

5 + 1 + 4h√5

+ 4h2

5 − 2

h

= limh→0

6h√5

+ h2

h

= limh→0

(6√5

+ h

)=

6√5

Remark 3.6.4 It is important to use a unit vector for the direction in whichwe want to compute the derivative.

Page 3: 3.6 Directional Derivatives and the Gradient Vec- torksuweb.kennesaw.edu/~plaval//math2203/funcnD_gradient.pdf · 3.6 Directional Derivatives and the Gradient Vec-tor 3.6.1 Functions

290 CHAPTER 3. FUNCTIONS OF SEVERAL VARIABLES

It turns out that we do not have to compute a limit every time we need tocompute a directional derivative. We have the following theorem:

Theorem 3.6.5 If f is a differentiable function in x and y, then f has a di-rectional derivative in the direction of any unit vector −→u = 〈a, b〉 and

D~uf (x, y) = fx (x, y) a+ fy (x, y) b (3.13)

If −→u makes an angle θ with the positive x-axis, then we also have

D~uf (x, y) = fx (x, y) cos θ + fy (x, y) sin θ (3.14)

Proof. We begin by proving the second part.

1. Proof of equation 3.14. Since −→u is a unit vector, if it makes an angle θwith the positive x-axis, we can write −→u = 〈cos θ, sin θ〉. The result followsfrom equation 3.13.

2. Proof of equation 3.13. We prove that for an arbitrary point (x0, y0) wehave: D~uf (x0, y0) = fx (x0, y0) a+fy (x0, y0) b. Let us define the functiong by

g (h) = f (x0 + ha, y0 + hb)

Then, we see that

g′ (0) = limh→0

g (h)− g (0)

h

= limh→0

f (x0 + ha, y0 + hb)− f (x0, y0)

h= D~uf (x0, y0) (3.15)

On the other hand, we can also write g (h) = f (x, y) where x = x0 + ahand y = y0 + bh. f is a function of x and y. But since both x and yare functions of h, f is also a function of h. Using the chain rule (seeprevious section), we have

g′ (h) =df

dh

=∂f

∂x

dx

dh+∂f

∂y

dy

dh

= fx (x, y) a+ fy (x, y) b

Therefore,g′ (0) = fx (x0, y0) a+ fy (x0, y0) b (3.16)

From equations 3.15 and 3.16, we see that

D~uf (x0, y0) = fx (x0, y0) a+ fy (x0, y0) b

Since this is true for any (x0, y0), the result follows.

Page 4: 3.6 Directional Derivatives and the Gradient Vec- torksuweb.kennesaw.edu/~plaval//math2203/funcnD_gradient.pdf · 3.6 Directional Derivatives and the Gradient Vec-tor 3.6.1 Functions

3.6. DIRECTIONAL DERIVATIVES AND THE GRADIENT VECTOR 291

Example 3.6.6 Find the derivative of f (x, y) = x2 + y2 in the direction of−→u = 〈1, 2〉 at the point (1, 1, 2).

This is the example we did above, using limits. Like above, we must use theunit vector having the same direction. Such a vector is

−→u‖−→u ‖ =

1√5〈1, 2〉

Therefore, D~uf (1, 1) = fx (1, 1) 1√5

+fy (1, 1) 2√5. First, we compute the partials

of ffx (x, y) = 2x

Therefore,fx (1, 1) = 2

Similarly,fy (1, 1) = 2

Therefore,

D~uf (1, 1) =2√5

+4√5

=6√5

The Gradient Vector

The above formula, fx (x, y) a+fy (x, y) b can be written as 〈fx (x, y) , fy (x, y)〉·〈a, b〉. The vector on the left has a special name: the gradient vector.

Definition 3.6.7 If f is a function of two variables in x and y, then the gra-dient of f , denoted ∇f (read "grad f" or "del f") is defined by:

∇f (x, y) = 〈fx (x, y) , fy (x, y)〉

Example 3.6.8 Compute the gradient of f (x, y) = sinxey.

∇f (x, y) = 〈fx (x, y) , fy (x, y)〉= 〈cosxey, sinxey〉

Example 3.6.9 Compute ∇f (0, 1) for f (x, y) = x2 + y2 + 2xy.

∇f (x, y) = 〈fx (x, y) , fy (x, y)〉= 〈2x+ 2y, 2y + 2x〉

Therefore,∇f (0, 1) = 〈2, 2〉

Page 5: 3.6 Directional Derivatives and the Gradient Vec- torksuweb.kennesaw.edu/~plaval//math2203/funcnD_gradient.pdf · 3.6 Directional Derivatives and the Gradient Vec-tor 3.6.1 Functions

292 CHAPTER 3. FUNCTIONS OF SEVERAL VARIABLES

We can express the directional derivative in terms of the gradient.

Theorem 3.6.10 If f is a differentiable function in x and y, then f has adirectional derivative in the direction of any unit vector −→u = 〈a, b〉 and

D~uf (x, y) = ∇f (x, y) · −→u (3.17)

Proof. We know that

D~uf (x0, y0) = fx (x0, y0) a+ fy (x0, y0) b

= 〈fx (x, y) , fy (x, y)〉 · 〈a, b〉= ∇f (x, y) · −→u

Remark 3.6.11 From formula 3.17, we can recover the formulas for the par-tials of f with respect to x and y. For example, the partial of f with respect tox is the directional derivative of f in the direction of

−→i = 〈1, 0〉. So, we have

D~if (x, y) = 〈fx (x, y) , fy (x, y)〉 · 〈1, 0〉= fx (x, y)

So, we can use formula 3.17 to compute the derivative in any direction, includingx and y.

Remark 3.6.12 If −→u = 〈a, b〉 is not a unit vector, then

D~uf (x, y) = ∇f (x, y) ·−→u‖−→u ‖ (3.18)

3.6.2 Functions of three Variables

What we have derived above also applies to functions of three or more variables.Given a function f (x, y, z) and a unit vector −→u = 〈a, b, c〉, we have the following:

• D~uf (x, y, z) = limh→0

f(x+ah,y+bh,z+ch)−f(x,y,z)h .

• If we write−→x = (x, y, z), then we can writeD~uf (−→x ) = limh→0

f(−→x+h−→u )−f(−→x )h

and this works for functions of 2 or 3 variables.

• ∇f (x, y, z) = 〈fx, fy, fz〉.

• We can write D~uf (x, y, z) = ∇f (x, y, z) · −→u if −→u is a unit vector or

∇f (x, y, z) ·−→u‖−→u ‖ otherwise.

Page 6: 3.6 Directional Derivatives and the Gradient Vec- torksuweb.kennesaw.edu/~plaval//math2203/funcnD_gradient.pdf · 3.6 Directional Derivatives and the Gradient Vec-tor 3.6.1 Functions

3.6. DIRECTIONAL DERIVATIVES AND THE GRADIENT VECTOR 293

Example 3.6.13 Find the directional derivative of f (x, y, z) = x cos y sin z at(1, π, π4

)in the direction of −→u = 〈2,−1, 4〉.

First, we find a unit vector having the same direction. Such a vector is 1√21〈2,−1, 4〉.

Next, we compute

∇f = 〈cos y sin z,−x sin y sin z, x cos y cos z〉

So,

∇f(

1, π,π

4

)=

⟨−√

2

2, 0,−

√2

2

⟩It follows that the directional derivative we seek is:

D~uf(

1, π,π

4

)= ∇f

(1, π,

π

4

)· 1√

21〈2,−1, 4〉

=

⟨−√

2

2, 0,−

√2

2

⟩· 1√

21〈2,−1, 4〉

=−3√

2√21

≈ −0.925 82

3.6.3 Maximizing the directional derivative

As we saw above, the gradient can be used to find the directional derivative.It has many more applications. One such application is that we can use thegradient to find the direction in which a function has the largest rate of change.If you think of the graph of a function as a 2-D surface in 3-D, or a terrainon which you are walking, then the gradient can be used to find the directionin which the terrain is the steepest. Of course, depending on what you aretrying to achieve, this may be the direction you want to avoid!! This can beaccomplished as follows.

Theorem 3.6.14 Suppose that f is a differentiable function and −→u is a unitvector. The maximum value of D~uf at a given point is ‖∇f‖ and it occurs when−→u has the same direction as ∇f at the given point.Proof. We have already proven that

D~uf = ∇f · −→u= ‖∇f‖ ‖−→u ‖ cos θ

where θ is the smallest angle between −→u and ∇f . Since −→u is a unit vector , wehave

D~uf = ‖∇f‖ cos θ

So, we see that this is maximum when cos θ is maximum, that is when cos θ = 1.In this case, we have

D~uf = ‖∇f‖

Page 7: 3.6 Directional Derivatives and the Gradient Vec- torksuweb.kennesaw.edu/~plaval//math2203/funcnD_gradient.pdf · 3.6 Directional Derivatives and the Gradient Vec-tor 3.6.1 Functions

294 CHAPTER 3. FUNCTIONS OF SEVERAL VARIABLES

Since it happens when cos θ = 1, it happens when θ = 0 that is when −→u has thesame direction as ∇f .

Remark 3.6.15 Using a similar argument, we see that the minimum value ofD~uf at a given point is −‖∇f‖ and it occurs when −→u has the direction of −∇fat the given point.

Example 3.6.16 Suppose that the temperature at each point of a metal plateis given by

T (x, y) = ex cos y + ey cosx

1. In what direction does the temperature increase most rapidly at the point(0, 0)? What is the rate on increase?

2. In what direction does the temperature decrease most rapidly at the point(0, 0)?

• Solution to #1:

∇f (x, y) = 〈ex cos y − ey sinx, ey cosx− ex sin y〉

At (0, 0) the temperature increases most rapidly in the direction of

∇f (0, 0) = 〈1, 1〉

The rate of increase is

‖∇f (0, 0)‖ =√

2

• Solution to #2: At (0, 0), temperature decreases most rapidly in thedirection of

−∇f (0, 0) = 〈−1,−1〉

A picture of the gradient field around the origin in shown in figure3.19. We plotted the gradient at each point near the origin. Re-member that the gradient is a vector, it is represented as an arrow.The length of each arrow is the magnitude of the gradient and itsdirection, the direction of the gradient.

Example 3.6.17 Consider the surface z = f (x, y) = x2 − y2 which graph isgiven below. Find the direction in which the rate of increase of f is the largestat (1, 1). What is that rate of increase?

Page 8: 3.6 Directional Derivatives and the Gradient Vec- torksuweb.kennesaw.edu/~plaval//math2203/funcnD_gradient.pdf · 3.6 Directional Derivatives and the Gradient Vec-tor 3.6.1 Functions

3.6. DIRECTIONAL DERIVATIVES AND THE GRADIENT VECTOR 295

­0.5 ­0.4 ­0.3 ­0.2 ­0.1 0.1 0.2 0.3 0.4 0.5

­0.5

­0.4

­0.3

­0.2

­0.1

0.1

0.2

0.3

0.4

0.5

x

y

Figure 3.19: Gradient field for f (x, y) = ex cos y + ey cosx

­4­2

x4

2­20

00­100

y2

4

z­210­420

We know that this direction is ∇f (1, 1). Since ∇f (x, y) = 〈2x,−2y〉, it fol-lows that ∇f (1, 1) = 〈2,−2〉. At (1, 1), the rate of increase is ‖∇f (1, 1)‖ =‖〈2,−2〉‖ = 2

√2.

Page 9: 3.6 Directional Derivatives and the Gradient Vec- torksuweb.kennesaw.edu/~plaval//math2203/funcnD_gradient.pdf · 3.6 Directional Derivatives and the Gradient Vec-tor 3.6.1 Functions

296 CHAPTER 3. FUNCTIONS OF SEVERAL VARIABLES

3.6.4 The Gradient as a Normal: Tangent Planes and Nor-mal Lines to a Level Surface

The Gradient Vector and Level Curves.

Given a function of two variables z = f (x, y), its graph is a surface in R3. If kis any constant, then the graph of f (x, y) = k is a curve. It is called the levelcurves of f (x, y). Geometrically, it is the intersection of the graph of z = f (x, y)with the plane z = k.

Example 3.6.18 The graph of z = f (x, y) = x2 + y2 is a paraboloid. Theintersection of a paraboloid with a plane z = k where k > 0 is the circle centeredat the origin of radius

√k. It is easy to see . If z = k and z = x2 + y2 then

x2 + y2 = k. This is the equation of the circle centered at the origin of radius√k. Figure 3.20 shows the graph of z = f (x, y) = x2 + y2 as well as the level

curves f (x, y) = k for k = 1, k = 2, k = 3, k = 4 and k = 5. Since these levelcurves are 2-D objects which live in a plane parallel to the xy-plane, the figurealso shows their projection in the xy-plane.

The gradient of f is ∇f (x, y) = 〈fx (x, y) , fy (x, y)〉. It is a 2-D vector. Ithas the remarkable property that it is orthogonal to the level curves f (x, y) = k.This is summarized in the following proposition.

Proposition 3.6.19 Let z = f (x, y) be a function whose partial derivatives inx and y exist. Let k be any constant. Let C denote the level curves f (x, y) = k.Let P = (x0, y0) be a point on C. Then ∇f (x0, y0) is orthogonal to C at P .Proof. To show this, we show that ∇f (x0, y0) is orthogonal to the tangentvector to C at P . Let −→r (t) = 〈x (t) , y (t)〉 be the position vector of the curveC. Let t0 be the value of t such that

−→r (t0) = 〈x0, y0〉. Then,

f (x (t) , y (t)) = k

Thusdf (x, y)

dt= 0

Using the chain rule, we have

∂f

∂x

dx

dt+∂f

∂y

dy

dt= 0

that is∇f (x, y) · −→r ′ (t) = 0

In particular, at (x0, y0) we have

∇f (x0, y0) · −→r ′ (t0) = 0

Page 10: 3.6 Directional Derivatives and the Gradient Vec- torksuweb.kennesaw.edu/~plaval//math2203/funcnD_gradient.pdf · 3.6 Directional Derivatives and the Gradient Vec-tor 3.6.1 Functions

3.6. DIRECTIONAL DERIVATIVES AND THE GRADIENT VECTOR 297

Figure 3.20: Graph of z = x2 + y2 and level curves

Page 11: 3.6 Directional Derivatives and the Gradient Vec- torksuweb.kennesaw.edu/~plaval//math2203/funcnD_gradient.pdf · 3.6 Directional Derivatives and the Gradient Vec-tor 3.6.1 Functions

298 CHAPTER 3. FUNCTIONS OF SEVERAL VARIABLES

­4 ­2

y6

­4

4 x

­20

20

0 2

20

40

50

30

10

z

4

Figure 3.21: Graph of a surface, its level curves and 2 gradient vectors

Example 3.6.20 Looking back at the previous example, f (x, y) = x2 + y2 andconsidering the level curve x2 + y2 = 4. It is a circle of radius 2 centered at theorigin. Without computations, we know that a vector perpendicular to this circleat the point (2, 0), that is at the intersection of the curve and the x-axis is avector parallel to

−→i . We can verify it using our theorem. The theorem says that

such a vector would be ∇f (2, 0). ∇f (x, y) = 〈2x, 2y〉 hence ∇f (2, 0) = 〈4, 0〉 =

4−→i , so it is parallel to

−→i . Using the theorem. we also see that ∇f

(√2,√

2)

=⟨2√

2, 2√

2⟩

= 2√

2 〈1, 1〉 this means that a vector perpendicular to our curve atthe point

(√2,√

2)is parallel to 〈1, 1〉. We could have predicted that because(√

2,√

2)is the point of intersection between our curve and the line y = x. A

direction vector for this line will be perpendicular to the curve. Such a vector is〈1, 1〉.Figure 3.21 shows the surface z = x2 + y2, its level curves, and the twogradient vectors computed above, one is in red, the other one in green. One cansee the gradient vectors are indeed perpendicular to the level curves.

The Gradient Vector and Level Surfaces

There is a similar result for level surfaces. Given a function of three variablesF (x, y, z), the graph of F (x, y, z) = k is a surface. It is called the level surface ofthe function F (x, y, z). Suppose that S is a level surface of a function F (x, y, z)with equation F (x, y, z) = k where k is a constant. Let P = (x0, y0, z0) be apoint on S. We have the following proposition:

Proposition 3.6.21 ∇F (x0, y0, z0) is orthogonal to S at P .

Page 12: 3.6 Directional Derivatives and the Gradient Vec- torksuweb.kennesaw.edu/~plaval//math2203/funcnD_gradient.pdf · 3.6 Directional Derivatives and the Gradient Vec-tor 3.6.1 Functions

3.6. DIRECTIONAL DERIVATIVES AND THE GRADIENT VECTOR 299

Proof. We prove the result by proving that ∇F (x0, y0, z0) is orthogonal toany curve on S through P . Let C be any curve on S through P given by itsposition vector −→r (t) = 〈x (t) , y (t) , z (t)〉. Let t0 be the value of t such that−→r (t0) = 〈x0, y0, z0〉, the coordinates of P in other words t0 is the value of theparameter for which the curve is at P . Because C is on S, we have

F (x (t) , y (t) , z (t)) = k

Since x, y, z are differentiable of t, F is also a differentiable function of t. Usingthe chain rule, and differentiating both sides with respect to t, we have

dF

dt= 0

∂F

∂x

dx

dt+∂F

∂y

dy

dt+∂F

∂z

dz

dt= 0

Since ∇F =⟨∂F∂x ,

∂F∂y ,

∂F∂z

⟩and −→r ′ (t) =

⟨dxdt ,

dydt ,

dzdt

⟩, the above equation can

be written as∇F (x, y, z) · −→r ′ (t) = 0

In particular, at (x0, y0, z0) we have

∇F (x0, y0, z0) · −→r ′ (t0) = 0

Thus, ∇F (x0, y0, z0) is orthogonal to the tangent vector of any curve through P .Since these tangent vectors are on the tangent plane, it follows that ∇F (x0, y0, z0)is orthogonal to S at P .

Example 3.6.22 Find a vector perpendicular to the surface 4x2+2y2+z2 = 16at the point (1, 2, 2).We define F (x, y, z) = 4x2 + 2y2 + z2 and the surface can be thought of alevel surface to this function, more specifically, the level surface correspond-ing to F (x, y, z) = 16. A vector perpendicular to this surface is ∇F (1, 2, 2).∇F (x, y, z) = 〈8x, 4y, 2z〉 hence ∇F (1, 2, 2) = 〈8, 8, 4〉.

Tangent Plane to a Level Surface

The technique developed here is not to be confused with work done in previoussections. Earlier, we learned how to find the tangent plane to a surface givenby z = f (x, y) (that is given explicitly) at the point (x0, y0, z0). You will recallthat the equation of such a plane is

z − z0 = fx (x0, y0) (x− x0) + fy (x0, y0) (y − y0) (3.19)

In this subsection, we learn how to find the equation of the tangent plane toa level surface S of a function F (x, y, z) at a point P = (x0, y0, z0), that is asurface given by F (x, y, z) = k where k is a constant (a surface given implic-itly). This plane is defined by P and a vector perpendicular to S at P . The

Page 13: 3.6 Directional Derivatives and the Gradient Vec- torksuweb.kennesaw.edu/~plaval//math2203/funcnD_gradient.pdf · 3.6 Directional Derivatives and the Gradient Vec-tor 3.6.1 Functions

300 CHAPTER 3. FUNCTIONS OF SEVERAL VARIABLES

problem is how to find such a vector. In the past, when we have needed a vectorperpendicular to a plane, if we knew two vectors on the plane, we took theircross product. In this case, to find a vector perpendicular to S at P or to thetangent plane to S at P , we could apply the same idea, that is find two nonparallel vectors on the tangent plane. Their cross product would give us thevector normal we are seeking. Unfortunately, we do not have such vectors. Wedo not have three non colinear points to generate them either. However, fromthe previous subsection, we know how to find a vector perpendicular to S at P .Such a vector is ∇F (x0, y0, z0).Now that we have a point on the tangent plane: (x0, y0, z0) and a normal

vector ∇F (x0, y0, z0), it follows that the equation of the plane tangent to S atP is:

Fx (x0, y0, z0) (x− x0) + Fy (x0, y0, z0) (y − y0) + Fz (x0, y0, z0) (z − z0) = 0(3.20)

Remark 3.6.23 We can use equation 3.20 to derive equation 3.19, the equationof the tangent plane to a surface given by z = f (x, y). If we rewrite z = f (x, y)as f (x, y)− z = 0, then we can think of the graph of f (x, y) as a level surfaceof the function F (x, y, z) = 0 where F (x, y, z) = f (x, y) − z. In this case,Fx = fx, Fy = fy and Fz = −1. Thus, using equation 3.20, we see that thetangent plane is

fx (x0, y0, z0) (x− x0) + fy (x0, y0, z0) (y − y0)− (z − z0) = 0

which is the same as equation 3.19.

Example 3.6.24 Find an equation for the tangent plane to the elliptic conex2 + 4y2 = z2 at the point (3, 2, 5).We can rewrite the equation of the cone as x2 + 4y2− z2 = 0. Thus, the ellipticcone is a level surface of F (x, y, z) = x2 + 4y2 − z2, it is the level surfacecorresponding to F (x, y, z) = 0. Since Fx = 2x, Fy = 8y and Fz = −2z, fromequation 3.20, it follows that the equation of the tangent plane is

Fx (3, 2, 5) (x− 3) + Fy (3, 2, 5) (y − 2) + Fz (3, 2, 5) (z − 5) = 0

6 (x− 3) + 16 (y − 2)− 10 (z − 5) = 0

6x− 18 + 16y − 32− 10z + 50 = 0

6x+ 16y − 10z = 0

3x+ 8y − 5z = 0

We illustrate this by graphing the level surface x2 +4y2−z2 = 0, and its tangentplane at (3, 2, 5) which is: 3x+ 8y − 5z = 0. This is shown in figure 3.22.

Normal line to a Level Surface

Since ∇F (x0, y0, z0) is orthogonal to S at P , it is the direction vector of theline normal to S at P . The equation of such a line is

x− x0

Fx (x0, y0, z0)=

y − y0

Fy (x0, y0, z0)=

z − z0

Fz (x0, y0, z0)(3.21)

Page 14: 3.6 Directional Derivatives and the Gradient Vec- torksuweb.kennesaw.edu/~plaval//math2203/funcnD_gradient.pdf · 3.6 Directional Derivatives and the Gradient Vec-tor 3.6.1 Functions

3.6. DIRECTIONAL DERIVATIVES AND THE GRADIENT VECTOR 301

x0

42

­2­42

4

y­2

­4

0­40z

­2 24

Figure 3.22: Graph of x2 + 4y2− z2 = 0 and its tangent plane 3x+ 8y− 5z = 0at (3, 2, 5)

Example 3.6.25 Find the parametric equations for the normal line to the el-liptic cone x2 + 4y2 = z2 at the point (3, 2, 5).We can rewrite the equation of the cone as x2 + 4y2 − z2 = 0. Thus, the ellip-tic cone is a level surface of F (x, y, z) = x2 + 4y2 − z2, it is the level surfacecorresponding to F (x, y, z) = 0. Since Fx = 2x, Fy = 8y and Fz = −2z,from equation 3.21 and the previous exercise, it follows that the equation of thenormal line is:

x− 3

6=y − 2

16=z − 5

−10

Multiplying each side by 2 gives

x− 3

3=y − 2

8=z − 5

−5

These are symmetric equations. The parametric equations for this line are x = 3 + 3ty = 2 + 8tz = 5− 5t

Summary About the Gradient Vector

We have studied the following about the gradient vector:

Page 15: 3.6 Directional Derivatives and the Gradient Vec- torksuweb.kennesaw.edu/~plaval//math2203/funcnD_gradient.pdf · 3.6 Directional Derivatives and the Gradient Vec-tor 3.6.1 Functions

302 CHAPTER 3. FUNCTIONS OF SEVERAL VARIABLES

• ∇f = 〈fx, fy〉 for functions of two variables and ∇f = 〈fx, fy, fz〉 forfunctions of 3 variables.

• The derivative of f in the direction of the unit vector −→u is D~uf (x) =∇f (x) · −→u .

• The maximum value of D~uf (x) is ‖∇f (x)‖, it happens in the directionof ∇f (x). In other words, ∇f (x) gives the direction of fastest increasefor f .

• ∇f (x0, y0) is orthogonal to the level curves f (x, y) = k that passesthrough P = (x0, y0).

• ∇F (x0, y0, z0) is orthogonal to the tangent vector of any curve in Sthrough P where S is the level surface F (x, y, z) = k and P = (x0, y0, z0).

• ∇F (x0, y0, z0) is orthogonal to S at P .

• The equation of the tangent plane to S at P is Fx (x0, y0, z0) (x− x0) +Fy (x0, y0, z0) (y − y0) + Fz (x0, y0, z0) (z − z0) = 0.

• ∇F (x0, y0, z0) is the direction vector of the line normal to S at P .

• The equation of the normal line to S at P is x− x0

Fx (x0, y0, z0)=

y − y0

Fy (x0, y0, z0)=

z − z0

Fz (x0, y0, z0).

• If f and g are functions of 2 or 3 variables and c is a constant, it can beshown that the gradient satisfies the following properties (what do theseproperties remind you of?):

1. ∇ (f + g) = ∇f +∇g2. ∇ (f − g) = ∇f −∇g3. ∇ (cf) = c∇f4. ∇ (fg) = f∇g + g∇f

5. ∇(fg

)= g∇f−f∇g

g2

6. ∇fn = nfn−1∇f

3.6.5 Problems

Make sure you have read, studied and understood what was done above beforeattempting the problems.

1. Find the derivative of the functions below at the given point in the direc-tion of the given vector −→v .

(a) f (x, y) = x2 + y3 at (1, 2) in the direction of −→v = 〈3, 4〉.

Page 16: 3.6 Directional Derivatives and the Gradient Vec- torksuweb.kennesaw.edu/~plaval//math2203/funcnD_gradient.pdf · 3.6 Directional Derivatives and the Gradient Vec-tor 3.6.1 Functions

3.6. DIRECTIONAL DERIVATIVES AND THE GRADIENT VECTOR 303

(b) f (x, y) = sinxey at (0, 1) in the direction of −→v = 〈1, 0〉.(c) f (x, y, z) = sinx+ cos y+ ln z2 at the point

(π, π2 , 1

)in the direction

of −→v = 〈1, 1, 1〉.

2. Find the directional derivative of f (x, y) =√

5x− 4y in the direction

making an angle θ =−π6with the positive x-axis at the point (4, 1).

3. For f (x, y) = 5xy2 − 4x3y, answer the following:

(a) Find ∇f(b) Find ∇f (1, 2)

(c) Find the rate of change of f at (1, 2) in the direction of −→u = 〈5, 12〉

4. For f (x, y, z) = xe2yz, answer the following:

(a) Find ∇f(b) Find ∇f (3, 0, 2)

(c) Find the rate of change of f at (3, 0, 2) in the direction of −→u =⟨2

3,−2

3,

1

3

⟩5. Find the directional derivative of f (x, y) = 1 + 2x

√y at the point (3, 4)

in the direction of −→v = 〈4,−3〉.

6. Find the directional derivative of g (s, t) = s2et at the point (2, 0) in thedirection of −→v =

−→i +−→j .

7. Find the directional derivative of g (x, y, z) = (x+ 2y + 3z)

3

2 at the point(1, 1, 2) in the direction of −→v = 2

−→j −−→k .

8. Find the maximum rate of change of f (x, y) =y2

xat the point (2, 4) and

determine the direction in which it occurs.

9. Show that a differentiable function f decreases most rapidly at a point(x, y) or (x, y, z) in the direction opposite the gradient vector at thatpoint that is in the direction of −∇f (x, y) or −∇f (x, y, z).

10. Find all the points at which the direction of fastest change of the functionf (x, y) = x2 + y2 − 2x− 4y is

−→i +−→j .

11. Suppose that over a certain region of space the electric potential is givenby V (x, y, z) = 5x2 − 3xy + xyz.

(a) Find the rate of change of the potential at P (3, 4, 5) in the directionof −→v =

−→i +−→j −−→k .

Page 17: 3.6 Directional Derivatives and the Gradient Vec- torksuweb.kennesaw.edu/~plaval//math2203/funcnD_gradient.pdf · 3.6 Directional Derivatives and the Gradient Vec-tor 3.6.1 Functions

304 CHAPTER 3. FUNCTIONS OF SEVERAL VARIABLES

(b) In which direction does V change most rapidly at P?.

(c) What is the maximum rate of change at P?

12. Find the equation of a) the tangent plane and b) the normal line to thesurface given by x2 − 2y2 + z2 + yz = 2 at the point (2, 1,−1).

13. Find the equation of a) the tangent plane and b) the normal line to thesurface given by z + 1 = xey cos z at the point (1, 0, 0).

14. If f (x, y) = x2 + 4y2, find the gradient vector ∇f (2, 1). Use it to find thetangent line to the level curve f (x, y) = 8 at the point (2, 1). Sketch thelevel curve, the tangent line and the gradient vector.

15. Show that the equation of the tangent plane to the ellipsoidx2

a2+y2

b2+z2

c2=

1 at the point (x0, y0, z0) can be written asxx0

a2+yy0

b2+zz0

c2= 1.

16. Find the points on the hyperboloid x2 − y2 + 2z2 = 1 where the normalline is parallel to the line that joins the points (3,−1, 0) and (5, 3, 6).

3.6.6 Answers

1. Find the derivative of the functions below at the given point in the direc-tion of the given vector −→v .

(a) f (x, y) = x2 + y3 at (1, 2) in the direction of −→v = 〈3, 4〉.

D−→u f (1, 2) =54

5

(b) f (x, y) = sinxey at (0, 1) in the direction of −→v = 〈1, 0〉.

D−→v f (0, 1) = e

(c) f (x, y, z) = sinx+ cos y+ ln z2 at the point(π, π2 , 1

)in the direction

of −→v = 〈1, 1, 1〉.D−→u f

(π,π

2, 1)

= 0

2. Find the directional derivative of f (x, y) =√

5x− 4y in the direction

making an angle θ =−π6with the positive x-axis at the point (4, 1).

D−→u f (x, y) =5

16

√3 +

1

4

3. For f (x, y) = 5xy2 − 4x3y, answer the following:

(a) Find ∇f∇f =

⟨5y2 − 12x2y, 10xy − 4x3

Page 18: 3.6 Directional Derivatives and the Gradient Vec- torksuweb.kennesaw.edu/~plaval//math2203/funcnD_gradient.pdf · 3.6 Directional Derivatives and the Gradient Vec-tor 3.6.1 Functions

3.6. DIRECTIONAL DERIVATIVES AND THE GRADIENT VECTOR 305

(b) Find ∇f (1, 2)∇f (1, 2) = 〈−4, 16〉

(c) Find the rate of change of f at (1, 2) in the direction of −→u = 〈5, 12〉

D−→u f (1, 2) =172

13

4. For f (x, y, z) = xe2yz, answer the following:

(a) Find ∇f∇f = e2yz 〈1, 2xz, 2xy〉

(b) Find ∇f (3, 0, 2)∇f (3, 0, 2) = 〈1, 12, 0〉

(c) Find the rate of change of f at (3, 0, 2) in the direction of −→u =⟨2

3,−2

3,

1

3

⟩D−→u f (3, 0, 2) =

−22

3

5. Find the directional derivative of f (x, y) = 1 + 2x√y at the point (3, 4)

in the direction of −→v = 〈4,−3〉.

D−→u f (3, 4) =23

10

6. Find the directional derivative of g (s, t) = s2et at the point (2, 0) in thedirection of −→v =

−→i +−→j .

D−→u g (2, 0) = 4√

2

7. Find the directional derivative of g (x, y, z) = (x+ 2y + 3z)

3

2 at the point(1, 1, 2) in the direction of −→v = 2

−→j −−→k .

D−→u g (1, 1, 2) =9

10

√5

8. Find the maximum rate of change of f (x, y) =y2

xat the point (2, 4) and

determine the direction in which it occurs.The maximum rate of change of f (x, y) is 4

√2, it occurs in the direction

of (−4, 4).

9. Show that a differentiable function f decreases most rapidly at a point(x, y) or (x, y, z) in the direction opposite the gradient vector at thatpoint that is in the direction of −∇f (x, y) or −∇f (x, y, z).No answer to write.

Page 19: 3.6 Directional Derivatives and the Gradient Vec- torksuweb.kennesaw.edu/~plaval//math2203/funcnD_gradient.pdf · 3.6 Directional Derivatives and the Gradient Vec-tor 3.6.1 Functions

306 CHAPTER 3. FUNCTIONS OF SEVERAL VARIABLES

10. Find all the points at which the direction of fastest change of the functionf (x, y) = x2 + y2 − 2x− 4y is

−→i +−→j .

They are all the points on the line y = x+ 1.

11. Suppose that over a certain region of space the electric potential is givenby V (x, y, z) = 5x2 − 3xy + xyz.

(a) Find the rate of change of the potential at P (3, 4, 5) in the directionof −→v =

−→i +−→j −−→k .

The rate of change we seek is32

3

√3

(b) In which direction does V change most rapidly at P?V changes the most rapidly in the direction of∇V (3, 4, 5) = (38, 6, 12).

(c) What is the maximum rate of change at P?The maximum rate of change is ‖∇V (3, 4, 5)‖ = 2

√406.

12. Find the equation of a) the tangent plane and b) the normal line to thesurface given by x2 − 2y2 + z2 + yz = 2 at the point (2, 1,−1).

(a) Tangent plane:4x− 5y − z = 4

(b) Normal line:x− 2

4=

1− y5

= − (z + 1)

13. Find the equation of a) the tangent plane and b) the normal line to thesurface given by z + 1 = xey cos z at the point (1, 0, 0).

(a) Tangent plane:x+ y − z = 1

(b) Normal line:x− 1 = y = −z

14. If f (x, y) = x2 + 4y2, find the gradient vector ∇f (2, 1). Use it to find thetangent line to the level curve f (x, y) = 8 at the point (2, 1). Sketch thelevel curve, the tangent line and the gradient vector.

x+ 2y = 4

15. Show that the equation of the tangent plane to the ellipsoidx2

a2+y2

b2+z2

c2=

1 at the point (x0, y0, z0) can be written asxx0

a2+yy0

b2+zz0

c2= 1.

No answer to write.

16. Find the points on the hyperboloid x2 − y2 + 2z2 = 1 where the normalline is parallel to the line that joins the points (3,−1, 0) and (5, 3, 6).

The points are ±√

2

3

(1,−2,

3

2

).

Page 20: 3.6 Directional Derivatives and the Gradient Vec- torksuweb.kennesaw.edu/~plaval//math2203/funcnD_gradient.pdf · 3.6 Directional Derivatives and the Gradient Vec-tor 3.6.1 Functions

Bibliography

[1] Joel Hass, Maurice D. Weir, and George B. Thomas, University calculus:Early transcendentals, Pearson Addison-Wesley, 2012.

[2] James Stewart, Calculus, Cengage Learning, 2011.

[3] Michael Sullivan and Kathleen Miranda, Calculus: Early transcendentals,Macmillan Higher Education, 2014.

615