Sunteți pe pagina 1din 21

Directional Derivatives and the Gradient Vector

Math 55 - Elementary Analysis III


Institute of Mathematics
University of the Philippines
Diliman

Math 55

Directional Derivatives & Gradient

1/ 21

Recall: Partial Derivatives


Let z = f (x, y).
z
x
z
y

f (x + h, y) f (x, y)
h0
h
f (x, y + h) f (x, y)
= fy (x, y) = lim
h0
h
= fx (x, y) = lim

R
R

fx represents the rate of change


of f with respect to x when y is
fixed
fy represents the rate of change
of f with respect to y when x is
fixed

Math 55

Directional Derivatives & Gradient

2/ 21

Recall: Partial Derivatives


z
.
x
z = xy 2 sin3 (3x).

Find
1
2

z = xy + y x + log5 (4x2 y).


r
y
1
2
.
z = tan (3x y ) +
x
z
= y 2 3 sin2 (3x) cos(3x)3
x
z
1
= yxy1 + y x ln y +
8x
2
x
(4x y) ln 5
1
1  y 1/2 y
z
=

3
+
.
1 + (3x y 2 )2
2 x
x2
x
Math 55

Directional Derivatives & Gradient

3/ 21

Directional Derivative
Suppose we want to find the rate of change of f at (x0 , y0 ) in
the direction of a unit vector u = ha, bi. That is, the slope of
the tangent line to C at P .

If Q(x, y, z) is another
point on C and P 0 , Q0
are the projections of P
and Q on the xy-plane,
resp., then the vector
P ~0 Q0 is parallel to u so
for some scalar h,
P ~0 Q0 = hu = hha, hbi .

Math 55

Directional Derivatives & Gradient

4/ 21

Directional Derivative
Therefore,
x x0 = ha x = x0 + ha
y y0 = hb y = y0 + hb

The rate of change of f (with respect to distance) in the


direction of u is
f
h0 h
lim

f (x, y) f (x0 , y0 )
h0
h
f (x0 + ha, y0 + hb) f (x0 , y0 )
= lim
h0
h
=

lim

Math 55

Directional Derivatives & Gradient

5/ 21

Directional Derivative
Definition
The directional derivative of f (x, y) at (x0 , y0 ) in the
direction of a unit vector u = ha, bi is
Du f (x0 , y0 ) = lim

h0

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


h

provided this limit exists.


Remarks:
1

If u = = h1, 0i, then


f (x0 + a, y0 ) f (x0 , y0 )
= fx (x0 , y0 ).
D f = lim
h0
h
If u = = h0, 1i, then
f (x0 , y0 + b) f (x0 , y0 )
Df = lim
= fy (x0 , y0 ).
h0
h
Math 55

Directional Derivatives & Gradient

6/ 21

Directional Derivative
Theorem
If f is a differentiable function of x and y, then f has a
directional derivative at any point (x0 , y0 ) in the domain of f ,
in the direction of any unit vector u = ha, bi and
Du f (x0 , y0 ) = fx (x0 , y0 )a + fy (x0 , y0 )b.
Proof. Define g(h) = f (x0 + ha, y0 + hb). Then
g 0 (0)

=
=

g(h) g(0)
f (x0 + ha, y0 + hb) f (x0 , y0 )
= lim
h0
h
h
Du f (x0 , y0 ).
lim

h0

Let g(h) = f (x, y) where x = x0 + ha, y = y0 + hb. By Chain Rule,


g 0 (h) =

f dy
f dx
= fx (x, y)a + fy (x, y)b
+
x dh
y dh

Note that h = 0 x = x0 , y = y0 so g 0 (0) = fx (x0 , y0 )a + fy (x0 , y0 )b.


Hence,
Du f (x0 , y0 ) = fx (x0 , y0 )a + fy (x0 , y0 )b.

Math 55

Directional Derivatives & Gradient

7/ 21

Example
Example
Evaluate Du f (1, 2) if f (x, y) = x2 2xy y 2 if u =

E
2
2
,

2
2 .

Solution. First, we compute the partial derivatives


fx (x, y) = 2x 2y fx (1, 2) = 2
fy (x, y) = 2x 2y fy (1, 2) = 6
Hence,
!
!
2
2
+ fy (1, 2)
Du f (1, 2) = fx (1, 2)
2
2
!
!
2
2
= 2
6
2
2

= 2 2
Math 55

Directional Derivatives & Gradient

8/ 21

Example
Example
Determine the directional derivative of f (x, y) = xy 2 cos(xy)
at any point, in the direction of the vector 3 4
.
Solution. The unit vector in the same direction as the given
vector is


h3, 4i
h3, 4i
3 4
p
u=
,
=
=
k h3, 4i k
5 5
32 + (4)2
Hence,
 
 
3
4
Du f (x, y) = fx (x, y)
+ fy (x, y)
5
5
 
 

3
4
2
= y + y sin(xy)
+ (2xy + x sin(xy))
5
5
Math 55

Directional Derivatives & Gradient

9/ 21

Directional Derivative

u
(x0 , y0 )

If the unit vector u = ha, bi, makes an angle with the x-axis,
then
a = kuk cos = cos
b = kuk sin = sin
and the formula in the previous theorem becomes
Du f (x, y) = fx (x, y) cos + fy (x, y) sin .
Math 55

Directional Derivatives & Gradient

10/ 21

Example
Example
2

Find the directional derivative of f (x, y) = ex y 2x + y at the


point (1, 0) in the direction of the unit vector given by = 3 .
Solution: From the previous formula,
Du f (x, y) = fx (x, y) cos + fy (x, y) sin





2
2
=
2xyex y 2 cos + x2 ex y + 1 sin
3
3
Hence,
 
1
Du f (1, 0) = 2
+2
2

= 1 + 3

Math 55

!
3
2

Directional Derivatives & Gradient

11/ 21

The Gradient Vector

From the previous theorem,


Du f (x, y) = fx (x, y)a + fy (x, y)b
= hfx (x, y), fy (x, y)i ha, bi
= hfx (x, y), fy (x, y)i u
The vector hfx (x, y), fy (x, y)i appears not only in the formula
for directional derivative but in many applications as well.
This vector is called the gradient of f , denoted grad f or f .

Math 55

Directional Derivatives & Gradient

12/ 21

The Gradient Vector

Definition
If f is a function of x and y, then the gradient of f is the vector
function f defined as
f (x, y) = hfx (x, y), fy (x, y)i
Thus, the directional derivetive of f in the direction of a unit
vector u = ha, bi can be written as
Du f (x, y) = f (x, y) u

Math 55

Directional Derivatives & Gradient

13/ 21

Example
Example
Find the directional derivative of f (x, y) = x2 ln y at the point
(2, 1) in the direction of 2 + .
Solution: We normalize the given vector
u=

h2, 1i
=
22 + 1 2

1
2
,
5
5

Next, compute the gradient



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

hfx (x, y), fy (x, y)i =

x2
2x ln y,
y

h0, 4i

Hence,

Du f (1, 2) = f (1, 2) u = h0, 4i
Math 55

2
1
,
5
5

4
=
5

Directional Derivatives & Gradient

14/ 21

Functions of Three Variables


Definition
The directional derivative of f (x, y, z) at (x0 , y0 , z0 ) in the
direction of the unit vector u = ha, b, ci is
f (x0 + ha, y0 + hb, z0 + hc) f (x0 , y0 , z0 )
h0
h
lim

provided this limit exists.


Definition
The gradient vector of f (x, y, z) is
f (x, y, z) = hfx (x, y, z), fy (x, y, z), fz (x, y, z)i

Du f (x, y, z) = fx (x, y, z)a + fy (x, y, z)b + fz (x, y, z)c


= f (x, y, z) u
Math 55

Directional Derivatives & Gradient

15/ 21

The Gradient Vector

Theorem
Suppose f is a differentiable function of x and y. The
maximum value of Du f is kf k and it occurs when u is in the
same direction as f .
Proof. Let be the angle between f and u.
Du f (x, y) = f u
= kf kkuk cos
= kf k cos
which is maximum when cos is 1 and is attained when = 0,
i.e., f and u are in the same direction.


Math 55

Directional Derivatives & Gradient

16/ 21

Example
Example
Suppose that the height of a hill above sea level is modelled by
h(t) = 1000 0.02x2 0.01y 2 . Standing at the point (50, 80), in
which direction is the elevation changing fastest? What is the
maximum rate of change of the elevation?
Solution: The maximum rate of change occurs in the
direction of f (50, 80).
h(x, y) = h0.04x, 0.02yi
h(50, 80) = h0.04(50), 0.02(80)i = h2, 1.6i
and the maximum rate of change of h (Du f ) is
p
kf (1, 2)k = (2)2 + (1.6)2 = 2.5612.
Math 55

Directional Derivatives & Gradient

17/ 21

The Gradient Vector

Math 55

Directional Derivatives & Gradient

18/ 21

The Gradient Vector


Theorem
If f and g are differentiable 
functions
of x and y, show that

f
gf f g
(f g) = f g + gf and
=
.
g
g2
Example
Find F (x, y) if F (x, y) = x2 sin(3xy).
Solution: Let f (x, y) = x2 and g(x, y) = sin(3xy), thus
F (x, y) = f (x, y)g(x, y). Hence,
F (x, y) = x2 h3y cos(3xy), 3x cos(3xy)i + sin(3xy) h2x, 0i


= 3x2 y cos(3xy), 3x3 cos(3xy) + h2x sin(3xy), 0i


= 3x2 y cos(3xy) + 2x sin(3xy), 3x3 cos(3xy)

Math 55

Directional Derivatives & Gradient

19/ 21

Exercises
1

Find the directional derivative of the given function at the given


point in the direction of the vector v.


a. f (r, ) = er sin , 0, 3 , v = 3 2
x
b. g(x, y, z) = y+z
, (4, 1, 1), v = h1, 2, 3i

Find the directional derivative of f (x, y) = log7 (x2 y) + xy in the

direction given by = , at the point (1, 2).


6
y
If f (x, y) = xe , find the rate
 of change of f at P (2, 0) in the
direction from P to Q 12 , 2 . In what direction is f changing
fastest? What is the maximum rate of change of f ?

Find all points for which the direction of fastest change of


f (x, y) = x2 + y 2 2x 4y is + .

Let f be a function of x and y and consider the points A(1, 3),


B(3, 3), C(1, 7) and D(6, 15). Given that DAB
~ f (1, 3) = 3 and
DAC
~ f (1, 3) = 6, find the directional derivative of f at A in the
~
direction of the vector AD.
Math 55

Directional Derivatives & Gradient

20/ 21

References

Stewart, J., Calculus, Early Transcendentals, 6 ed., Thomson


Brooks/Cole, 2008

Dawkins, P., Calculus 3, online notes available at


http://tutorial.math.lamar.edu/

Math 55

Directional Derivatives & Gradient

21/ 21

S-ar putea să vă placă și