Ch12 06 - GRADIENT AND DIRECTIONAL DERIVATIVES PDF

Title Ch12 06 - GRADIENT AND DIRECTIONAL DERIVATIVES
Author Litan Kumar Saha
Course Engineering Mathematics
Institution North South University
Pages 13
File Size 531.8 KB
File Type PDF
Total Downloads 14
Total Views 176

Summary

GRADIENT AND DIRECTIONAL DERIVATIVES...


Description

12-65

SECTION 12.6

Early in a season, a typical batter might have 50 hits in 200 at bats. Show that getting a hit will increase batting average by about 4 points. Find the approximate increase in batting average later in the season for a player with 100 hits in 400 at bats. In general, if b and h are both doubled, how does a ′ change? 44. For the baseball players of exercise 43, approximate the number of points that the batting average will decrease by making an out. 45. Find the general form for the derivative of g(t) = u (t)v(t ) for differentiable functions u and v. (Hint: Start with f (u, v) = u v .) Apply the result to find the derivative of 2 (2t + 1)3t .

EXPLORAT ORY EXERCISES 1. We have previously done calculations of the amount of work done by some force. Recall that if a scalar force F (x) is applied

..

The Gradient and Directional Derivatives

983

as x increases from x = a to x = b, then the work done equals b W = a F (x) d x . If the position x is a differentiable funcT tion of time, then we can write W = 0 F (x(t))x ′ (t) dt , where x (0) = a and x (T ) = b. Power is defined as the time derivative of work. Work is sometimes measured in foot-pounds, so power could be measured in foot-pounds per second (ft-lb/s). One horsepower is equal to 550 ft-lb/s. Show that if force and velocity are constant, then power is the product of force and velocity, Determine how many pounds of force are required to maintain 400 hp at 80 mph. For a variable force and velocity, use the chain rule to compute power. 2. Engineers and physicists (and therefore mathematicians) spend countless hours studying the properties of forced oscillators. Two physical situations that are well modeled by the same mathematical equations are a spring oscillating due to some force and a simple electrical circuit with a voltage source. A general solution of a forced √oscillator can have the form √ t u(t ) = g(t ) − 0 g(u)e−(t − u )/2 [cos 23 (t−u) + 32 sin 2 3 (t − u)]du. If g(0) = 1 and g ′ (0) = 2, compute u(0) and u ′ (0).

12.6 THE GRADIENT AND DIRECTIONAL DERIVATIVES Suppose that you are hiking in rugged terrain. You can think of your altitude at the point given by longitude x and latitude y as defining a function f (x, y). Although you are unlikely to have a handy formula for this function, you can learn more about this function than you might expect. If you face due east (in the direction of the positive x -axis), the slope of the ∂f terrain is given by the partial derivative (x, y). Similarly, facing due north, the slope of ∂x ∂f the terrain is given by (x, y). However, in terms of f (x, y ), how would you compute ∂y the slope in some other direction, say north-by-northwest? In this section, we develop the notion of directional derivative, which will answer this question. Suppose that we want to find the instantaneous rate of change of f (x, y) at the point P(a, b) and in the direction given by the unit vector u = u 1 , u 2 . Let Q(x, y) be any point −→ on the line through P(a, b) in the direction of u. Notice that the vectorPQ is then parallel to u. Since two vectors are parallel if and only if one is a scalar multiple of the other, we −→ have that PQ = hu, for some scalar h, so that −→ PQ = x − a, y − b = h u = h u 1 , u 2  = hu 1 , hu 2 . It then follows that x − a = hu 1 and y − b = hu 2 , so that x = a + hu 1

and

y = b + hu 2 .

The point Q is then described by (a + hu 1 , b + hu 2 ), as indicated in Figure 12.33 (on the following page). Notice that the average rate of change of z = f (x, y) along the line from P to Q is then f (a + hu 1 , b + hu 2 ) − f (a , b) . h

984

CHAPTER 12

..

Functions of Several Variables and Partial Differentiation

12-66

y

Q(a ⫹ hu1, b ⫹ hu2)



PQ h

u ⫽ 具u1, u2典

P(a, b)

x

FIGURE 12.33 − → The vector PQ

The instantaneous rate of change of f (x, y) at the point P(a, b) and in the direction of the unit vector u is then found by taking the limit as h → 0. We give this limit a special name in Definition 6.1.

DEFINIT ION 6.1 The directional derivative of f (x, y) at the point (a, b) and in the direction of the unit vector u = u 1 , u 2  is given by Du f (a, b) = lim

h→0

f (a + hu 1 , b + hu 2 ) − f (a, b) , h

provided the limit exists.

Notice that this limit resembles the definition of partial derivative, except that in this case, both variables may change. Further, you should observe that the directional derivative in the direction of the positive x-axis (i.e., in the direction of the unit vector u = 1, 0) is Du f (a, b) = lim

h→0

f (a + h, b) − f (a, b) h

,

∂f which you should recognize as the partial derivative . Likewise, the directional derivative ∂x in the direction of the positive y-axis (i.e., in the direction of the unit vector u = 0, 1) is ∂f . It turns out that any directional derivative can be calculated simply, in terms of the first ∂y partial derivatives, as we see in Theorm 6.1.

T HEOREM 6.1 Suppose that f is differentiable at (a, b) and u = u 1 , u 2  is any unit vector. Then, we can write Du f (a , b) = f x (a , b)u 1 + f y (a , b) u 2 .

12-67

SECTION 12.6

..

The Gradient and Directional Derivatives

985

PROOF Let g(h) = f (a + hu 1 , b + hu 2 ). Then, g(0) = f (a, b) and so, from Definition 6.1, we have Du f (a, b) = lim

h→0

g (h) − g (0) f (a + hu 1 , b + hu 2 ) − f (a, b) = g ′ (0). = lim h→0 h h

If we define x = a + hu 1 and y = b + hu 2 , we have g(h) = f (x, y). From the chain rule (Theorem 5.1), we have g ′ (h) =

∂ f dx ∂f ∂f ∂ f dy = u1 + + u 2. ∂y dh ∂ x dh ∂x ∂y

Finally, taking h = 0 gives us Du f (a, b) = g ′ (0) =

∂f ∂f (a, b)u 1 + (a, b)u 2 , ∂x ∂y

as desired.

EXAMPLE 6.1

Computing Directional Derivatives

For f (x, y) = x 2 y − 4y 3 , compute Du f (2, 1) for the directions (a) u = (b) u in the direction from (2, 1) to (4, 0).

 √3 1  , 2 and 2

Solution Regardless of the direction, we first need to compute the first partial ∂f ∂f derivatives = 2x y and = x 2 − 12 y 2 . Then, f x (2, 1) = 4 and f y (2, 1) = −8. ∂x ∂y √  For (a), the unit vector is given as u = 2 3, 21 and so, from Theorem 6.1 we have √   √ 1 3 = 2 3 − 4 ≈ −0.5. −8 Du f (2, 1) = f x (2, 1)u 1 + f y (2, 1)u 2 = 4 2 2 Notice that this says that the function is decreasing in this direction. For (b), we must first find the unit vector u in the indicated direction. Observe that the vector from (2, 1) to (4, 0) corresponds  to the position vector 2, −1 and so, the unit vector in that direction is u = √25 , − √15 . We then have from Theorem 6.1 that   2 1 16 Du f (2, 1) = f x (2, 1)u 1 + f y (2, 1)u 2 = 4√ − 8 − √ =√ . 5 5 5  So, the function is increasing rapidly in this direction. For convenience, we define the gradient of a function to be the vector-valued function whose components are the first-order partial derivatives of f , as specified in Definition 6.2. We denote the gradient of a function f by grad f or ∇ f (read “del f ”).

DEFINIT ION 6.2 The gradient of f (x, y) is the vector-valued function   ∂f ∂f ∂f ∂f = j, ∇ f (x, y) = i+ , ∂y ∂x ∂ x ∂y provided both partial derivatives exist.

986

CHAPTER 12

..

Functions of Several Variables and Partial Differentiation

12-68

Using the gradient, we can write a directional derivative as the dot product of the gradient and the unit vector in the direction of interest, as follows. For any unit vector u = u 1 , u 2 , Du f (x, y ) = f x (x, y )u 1 + f y (x, y )u 2

=  f x (x, y ), f y (x, y ) · u 1 , u 2 

= ∇ f (x, y) · u. We state this result in Theorem 6.2.

T HEOREM 6.2 If f is a differentiable function of x and y and u is any unit vector, then Du f (x, y ) = ∇ f (x, y ) · u. Writing directional derivatives as a dot product has many important consequences, one of which we see in example 6.2.

EXAMPLE 6.2 2

Finding Directional Derivatives 2

For f (x, y) = x + y , find Du f (1, −1) for (a) u in the direction of v = −3, 4 and (b) u in the direction of v = 3, −4. Solution First, note that ∇f =



 ∂f ∂f = 2x, 2y. , ∂ x ∂y

At the point (1, −1), we have  ∇ f (1, −1) = 2, −2. For (a), a unit vector in the same direction as v is u = −53, 45 . The directional derivative of f in this direction at the point (1, −1) is then   14 −6 − 8 3 4 =− . = Du f (1, −1) = 2, −2 · − , 5 5 5 5 3 4  For (b), the unit vector is u = 5 , − 5 and so, the directional derivative of f in this direction at (1, −1) is   6+8 3 4 14 Du f (1, −1) = 2, −2 · , − = . = 5 5  5 5 A graphical interpretation of the directional derivatives in example 6.2 is given in Figure 12.34a. Suppose we intersect the surface z = f (x, y) with a plane passing through the point (1, −1, 2), which is perpendicular to the xy-plane and parallel to the vector u (see Figure 12.34a). Notice that the intersection is a curve in two dimensions. Sketch this curve on a new set of coordinate axes, chosen so that the new origin corresponds to the point (1, −1, 2), the new vertical axis is in the z-direction and the new positive horizontal   axis points in the direction of the vector u. In Figure 12.34b, we show the case for u = −5 3, 45 and   in Figure 12.34c, we show the case for u = 53, − 45 . In each case, the directional derivative gives the slope of the curve at the origin (in the new coordinate system). Notice that the direction vectors in example 6.2 parts (a) and (b) differ only by sign and the resulting curves in Figures 12.34b and 12.34c are exact mirror images of each other.

12-69

SECTION 12.6

z

..

The Gradient and Directional Derivatives

v

(1, ⫺1, 2)

v

6

6

4

4

2

2

y 2

⫺2 u

987

4

u ⫺4

2

⫺2

⫺2

u

⫺2

x

FIGURE  12.34b 

FIGURE 12.34a

u = − 53 ,

Intersection of surface with plane

4 5

FIGURE  12.34c  u=

3 , − 45 5

We can use a contour plot to estimate the value of a directional derivative, as we illustrate in example 6.3.

EXAMPLE 6.3

  Use a contour plot of z = x 2 + y 2 to estimate Du f (1, −1) for u = −53, 45 .

y 3 z⫽1 z⫽2 z⫽3

2 1 ⫺3 ⫺2 ⫺1 ⫺1

Directional Derivatives and Level Curves

u

1

2

3

⫺2 ⫺3

FIGURE 12.35 Contour plot of z = x 2 + y 2

x

2 2 Solution A  plot of z = x + y is shown in Figure 12.35 with the direction  contour vector u = −53, 45 sketched in with its initial point located at the point (1, −1). The level curves shown correspond to z = 0.2, 0.5, 1, 2 and 3. From the graph, you can z , where u is the distance approximate the directional derivative by estimating u traveled along the unit vector u. For the unit vector shown, u = 1. Further, the vector appears to extend from the z = 2 level curve to the z = 0.2 level curve. In this case, z z = 0.2 − 2 = −1.8 and our estimate of the directional derivative is = −1.8. u 14 Compared to the actual directional derivative of −5 = −2.8 (found in example 6.2), this is not very accurate. A better estimate could be obtained with a smaller u. For example, to get from the z = 2 level curve to the z = 1 level curve, it appears that we z 1 − 2 ≈ = −2.5. You could travel along about 40% of the unit vector. Then u 0.4 continue this process by drawing more level curves, corresponding to values of z closer to z = 2. 

Keep in mind that a directional derivative gives the rate of change of a function in a given direction. So, it’s reasonable to ask in what direction a given function has its maximum or minimum rate of increase. First, recall from Theorem 3.2 in Chapter 10 that for any two vectors a and b, we have a · b = ab cos θ , where θ is the angle between the vectors a and b. Applying this to the form of the directional derivative given in Theorem 6.2, we have Du f (a, b) = ∇ f (a, b) · u = ∇ f (a, b)u cos θ = ∇ f (a, b) cos θ, where θ is the angle between the gradient vector at (a, b) and the direction vector u. Notice now that ∇ f (a, b) cos θ has its maximum value when θ = 0, so that cos θ = 1. The directional derivative is then ∇ f (a, b). Further, observe that the angle ∇ f (a, b) θ = 0 when ∇ f (a, b) and u are in the same direction, so that u = . Similarly, ∇ f (a, b)

988

CHAPTER 12

..

Functions of Several Variables and Partial Differentiation

12-70

the minimum value of the directional derivative occurs when θ = π , so that cos θ = −1. ∇ f (a, b) . Finally, In this case, ∇ f (a, b) and u have opposite directions, so that u = − ∇ f (a, b) π observe that when θ = 2 , u is perpendicular to ∇ f (a, b) and the directional derivative in this direction is zero. Since the level curves are curves in the xy-plane on which f is constant, notice that a zero directional derivative at a point indicates that u is tangent to a level curve. We summarize these observations in Theorem 6.3.

T HEOREM 6.3 Suppose that f is a differentiable function of x and y at the point (a, b). Then (i) the maximum rate of change of f at (a, b) is ∇ f (a, b), occuring in the direction of the gradient; (ii) the minimum rate of change of f at (a, b) is −∇ f (a, b), occuring in the direction opposite the gradient; (iii) the rate of change of f at (a, b) is 0 in the directions orthogonal to ∇ f (a, b) and (iv) the gradient ∇ f (a, b) is orthogonal to the level curve f (x, y) = c at the point (a, b), where c = f (a, b). In using Theorem 6.3, remember that the directional derivative corresponds to the rate of change of the function f (x, y) in the given direction. y

EXAMPLE 6.4

u

4

Find the maximum and minimum rates of change of the function f (x, y) = x 2 + y 2 at the point (1, 3).

z = 16 2 z = 10 ⫺4

x 2

⫺2

4

⫺2

Solution We first compute the gradient ∇ f = 2x, 2y and evaluate it at the point (1, 3): ∇ f (1, 3) = 2, 6. From √ Theorem 6.3, the maximum rate of change of f at (1, 3) is ∇ f (1, 3) = 2, 6 = 40 and occurs in the direction of u=

⫺4

u=−

y z = 1.4 1 z = 1.97 1

2

A(0.6, ⫺0.7)

∇ f (1, 3) 2, 6 = √ . ∇ f (1, 3) 40

Similarly, the minimum rate of change of f at (1, 3) is √ −∇ f (1, 3) = −2, 6 = − 40, which occurs in the direction of

FIGURE 12.36 Contour plot of z = x 2 + y 2

z = 0.5

Finding Maximum and Minimum Rates of Change

x

∇ f (1, 3) −2, 6 . = √ ∇ f (1, 3) 40 

Notice that the direction of maximum increase in example 6.4 points away√from the origin, since the displacement vector from (0, 0) to (1, 3) is parallel to u = 2, 6/ 40. This should make sense given the familiar shape of the paraboloid. The contour plot of f (x, y ) shown in Figure 12.36 indicates that the gradient is perpendicular to the level curves. We expand on this idea in example 6.5.

⫺1

EXAMPLE 6.5 FIGURE 12.37 Contour plot of z = 3x − x 3 − 3x y 2

Finding the Direction of Steepest Ascent

The contour plot of f (x, y) = 3x − x 3 − 3x y 2 shown in Figure 12.37 indicates several level curves near a relative maximum at (1, 0). Find the direction of maximum increase from the point A(0.6, −0.7) and sketch in the path of steepest ascent.

12-71

SECTION 12.6

y

x

The Gradient and Directional Derivatives

989

Solution From Theorem 6.3, the direction of maximum increase at (0.6, −0.7) is given by the gradient ∇ f (0.6, −0.7). We have ∇ f = 3 − 3x 2 − 3y 2 , −6x y and so, ∇ f (0.6, −0.7) = 0.45, 2.52. The unit vector in this direction is then u = 0.176, 0.984. A vector in this direction (not drawn to scale) at the point (0.6, −0.7) is shown in Figure 12.38a. Notice that this vector does not point toward the maximum at (1, 0). (By analogy, on a mountain, the steepest path from a given point will not always point toward the actual peak.) The path of steepest ascent is a curve that remains perpendicular to each level curve through which it passes. Notice that at the tip of the vector drawn in Figure 12.38a, the vector is no longer perpendicular to the level curve. Finding an equation for the path of steepest ascent is challenging. In Figure 12.38b, we sketch in a plausible path of steepest ascent.  Most of the results of this section extend easily to functions of any number of variables.

z = f(0.6, ⫺0.7)

FIGURE 12.38a

DEFINIT ION 6.3

Direction of steepest ascent at (0.6, −0.7)

The directional derivative of f (x, y, z) at the point (a, b, c) and in the direction of the unit vector u = u 1 , u 2 , u 3  is given by

y

Du f (a, b, c) = lim h→0

(1, 0)

..

x

f (a + hu 1 , b + hu 2 , c + hu 3 ) − f (a, b, c) , h

provided the limit exists. The gradient of f (x, y, z) is the vector-valued function   ∂f ∂f ∂f ∂f ∂f ∂f = ∇ f (x, y, z) = i+ , j+ , k, ∂x ∂ x ∂y ∂z ∂y ∂z provided all the partial derivatives are defined.

z = f(0.6, ⫺0.7)

As was the case for functions of two variables, the gradient gives us a simple representation of directional derivatives in three dimensions.

FIGURE 12.38b Path of steepest ascent

T HEOREM 6.4 If f is a differentiable function of x, y and z and u is any unit vector, then Du f (x, y, z) = ∇ f (x, y, z) · u.

(6.1)

As in two dimensions, we have that Du f (x, y, z) = ∇ f (x, y, z) · u = ∇ f (x, y, z)u cos θ = ∇ f (x, y, z) cos θ, where θ is the angle between the vectors ∇ f (x, y, z) and u. For precisely the same reasons as in two dimensions, it follows that the direction of maximum increase at any given point is given by the gradient at that point.

EXAMPLE 6.6

Finding the Direction of Maximum Increase 2

2

If the temperature at point (x, y, z) is given by T (x, y, z) = 85 + (1 − z/100)e−(x +y ) , find the direction from the point (2, 0, 99) in which the temperature increases most rapidly.

990

CHAPTER 12

..

Functions of Several Variables and Partial Differentiation

12-72

Solution We first compute the gradient   ∂f ∂f ∂f ∇f = , , ∂ x ∂y ∂z       z  −(x 2 +y 2 ) 1 2 2 z  −(x 2 +y 2 ) e−(x +y ) = −2x 1 − e ,− e , −2y 1 − 100 100 100  1 −4  1 −4 and ∇ f (2, 0, 99) = − 25 e , 0, −100 e . To find a unit vector in this direction, you can simplify the algebra by canceling the common factor of e−4 (think about why this makes sense) and multiplying by 100. A unit vector in the direction of −4, 0, −1 and −4, 0, −1 √ . also in the direction of ∇ f (2, 0, 99), is then  17 Recall that for any constant k, the equation f (x, y, z) = k defines a level surface of the function f (x, y, z). Now, suppose that u is any unit vector lying in the tangent plane to the level surface f (x, y, z) = k at a point (a, b, c) on the level surface. Then, it ...


Similar Free PDFs