Directional Derivatives
Directional Derivatives
Let z = f (x, y ) be the surface shown and assume the hiker is at the point
The hiker would like to travel on the surface in the direction of unit vector
u = u1 i + u2 j.
df h ∂f ∂f ih i
= i+ j . u1 i + u2 j
ds u,(a,b) ∂x (a,b) ∂y (a,b)
gives the rate of change of elevation as the hiker travels in the direction of
u at the moment the hiker is at location (a, b, f (a, b)).
Recall that if z = f (x, y ), then the partial derivatives fx and fy are defined
as
f (x0 + h, y0 ) − f (x0 , y0 )
fx (x0 , y0 ) = lim
h→0 h
f (x0 , y0 + h) − f (x0 , y0 )
fy (x0 , y0 ) = lim
h→0 h
and represent the rates of change of z in the x- and y -directions, that is,
in the directions of the unit vectors i and j.
Suppose that we now wish to find the rate of change of z at (x0 , y0 ) in the
direction of an arbitrary unit vector u = u1 i + u2 j. To do this we consider
the surface S with equation z = f (x, y ) (the graph of f ) and we let
z0 = f (x0 , y0 ).
Then the point P(x0 , y0 , z0 ) lies on S. The vertical plane that passes
through P in the direction of u intersects S in a curve C .
The slope of the tangent line T to C at the point P is the rate of change
of z in the direction of u.
df ∂f dx ∂f dy
= + .
dt ∂x dt ∂y dt
At any point
P0 (x0 , y0 ) = P0 (g (t0 ), h(t0 )),
this equation gives the rate of change of f with respect to increasing t and
therefore depends, among other things, on the direction of motion along
the curve.
If the curve is a straight line and t is the arc length parameter along the
line measured from P0 in the direction of a given unit vector u, then
df /dt
u = u1 i + u2 j
is a unit vector.
x = x0 + su1 , y = y0 + su2
Definition 1.
The derivative of f at P0 (x0 , y0 ) in the direction of the unit vector
u = u1 i + u2 j is the number
df f (x0 + su1 , y0 + su2 ) − f (x0 , y0 )
= lim (1)
ds u,P0 s→0 s
provided the limit exists.
Example 2.
Using the definition, find the derivative of
f (x, y ) = x 2 + xy
√ √
at P0 (1, 2) in the direction of the unit vector u = (1/ 2)i + (1/ 2)j.
T = f (x, y )
x = x0 + su1 , y = y0 + su2
Definition 3.
The gradient vector (gradient) of f (x, y ) at a point P0 (x0 , y0 ) is the vector
∂f ∂f
∇f = i+ j
∂x ∂y
obtained by evaluating the partial derivatives of f at P0 .
Theorem 4.
If f (x, y ) is differentiable in an open region containing P0 (x0 , y0 ), then the
derivative of f in the direction of u at P0 is the dot product of u with the
gradient of f at P0 :
df
= (∇f )P0 .u.
ds u,P0
Example 5.
Find the derivative of f (x, y ) = xe y + cos(xy ) at the point (2, 0) in the
direction of v = 3i − 4j.
where θ is the angle between the vectors u and ∇f , reveals the following
properties.
Example 6.
x2 y2
Find the directions in which f (x, y ) = + .
2 2
(a) increases most rapidly at the point (1, 1).
(b) decreases most rapidly at (1, 1).
(c) What are the directions of zero change in f at (1, 1)?
Example 7.
The directional derivative of
x2 + y2
f (x, y ) =
4
at (3, 2) in the direction of
1 1
u= √ i+ √ j
2 2
is about 2.47 (Verify !)
Example 8.
The directional derivative of
x2 + y2
f (x, y ) =
4
at (3, 2) in the direction of
√
1 3
u= i− j
2 2
is about −0.98 (Verify !)
√
3
Moving in the direction of u = 12 i − 2 j the rate of change is about 1 unit
DOWN for every unit along u.
Example 9.
The directional derivative of f (x, y ) = x 3 − 3xy + 4y 2 in the direction of
the unit vector u given by angle θ = π/6 is
√
13 − 3 3
.
2
Since the downflowing stream will reach its destination in the fastest way,
it must flow in the direction of the negative gradient vectors from Property
2 for the directional derivative. Equation (2) tells us these directions are
perpendicular to the level curves.
The observation also enables us to find equations for tangent lines to level
curves. Tangent lines to level curves are the lines normal to the gradients.
The line through a point P0 (x0 , y0 ) normal to a vector
N = Ai + Bj
Example 10.
x2
Find an equation for the tangent to the ellipse 4 + y 2 = 2 at the point
(−2, 1).
x2
f (x, y ) = + y 2.
4
The gradient of f at (-2,1) is
x
∇f |(−2,1) = i + 2y j = −i + 2j.
2 (−2,1)
(−1)(x + 2) + (2)(y − 1) = 0
x − 2y = −4.
Example 11.
We illustrate two of the rules with
f (x, y ) = x − y g (x, y ) = 3y
∇f = i − j ∇g = 3j.
We have
Du f = ∇f .u = |∇f | cos θ,
Example 12.
(a) Find the derivative of f (x, y , z) = x 3 − xy 2 − z at P0 (1, 1, 0) in the
direction of v = 2i − 3j + 6k.
(b) In what directions does f change most rapidly at P0 , and what are
the rates of change in these directions?
(b) The function increases most rapidly in the direction of ∇f = 2i − 2j − k and decreases
most rapidly in the direction of −∇f . The rates of change in the directions are,
respectively,
q √
|∇f | = (2)2 + (−2)2 + (−1)2 = 9=3 and − |∇f | = −3.
Exercise 13.
Find the gradient of the function at the given point. Then sketch the
gradient together with the level curve that passes through the point.
1. g (x, y ) = xy 2 , (2, −1)
√
2. f (x, y ) = 2x + 3y , (−1, 2)
√
x
3. f (x, y ) = tan−1 y , (4, −2)
Exercise 14.
Find ∇f at the given point.
1. f (x, y , z) = 2z 3 − 3(x 2 + y 2 )z + tan−1 xz, (1, 1, 1)
2. f (x, y , z) = (x 2 + y2 + z 2 )−1/2 + ln(xyz), (−1, 2, −2)
3. f (x, y , z) = e x+y cos z + (y + 1) sin−1 x, (0, 0, π/6)
(c) u = A
|A|
= √ 3i+6j−2k = 37 i + 67 j − 72 k; fx (x, y , z) = y + z ⇒ fx (1, −1, 2) =
32 +62 +(−2)2
1; fy (x, y , z) = x + z ⇒ fy (1, −1, 2) = 3; fz (x, y , z) = y + x ⇒ fz (1, −1, 2) = 0 ⇒ Of =
i + 3j ⇒ (Du f )P0 = Of .u = 37 + 18 7
=3
A 2i+j−2k
(d) u = |A|
= √ = 23 i + 13 j − 32 k; gx (x, y , z) = 3e x cos yz ⇒ gx (0, 0, 0) =
22 +12 +(−2)2
3; gy (x, y , z) = −3ze x sinyz ⇒
gy (0, 0, 0) = 0; gz (x, y , z) = −3ye x sin yz ⇒ gz (0, 0, 0) =
0 ⇒ Og = 3i ⇒ (Du g )P0 = Og .u = 2
Exercise 17.
Sketch the curve f (x, y ) = c together with ∇f and the tangent line at the
given point. Then write an equation for the tangent line.
1. xy = −4, (2, −2)
2. x2 − xy + y2 = 7, (−1, 2)
Exercise 18.
1. Let f (x, y ) = x 2 − xy + y 2 − y . Find the directions u and the values
of Du f (1, −1) for which
(a) Du f (1, −1) is largest
(b) Du f (1, −1) is smallest
(c) Du f (1, −1) = 0
(d) Du f (1, −1) = 4
(e) Du f (1, −1) = −3.
(x−y )
2. Let f (x, y ) = (x+y ) . Find the directions u and the values of
Du f (− 12 , 23 ) for which
(a) Du f (− 12 , 3
2) is largest
(b) Du f (− 12 , 3
2) is smallest
(c) Du f (− 12 , 3
2) =0
(d) Du f (− 21 , 3
2) = −2
(e) Du f (− 12 , 3
2) = 1.
(a) Of (1, −1) = 3i − 4j ⇒ |Of (1, −1)| = 5 ⇒ Du f (1, −1) = 5in the direction of u = 35 i − 45 j
(b) −Of (1, −1) = −3i + 4j ⇒ |Of (1, −1)| = 5 ⇒ Du f (1, −1) = −5 in the direction of u =
− 53 i + 45 j
(c) Du f (1, −1) = 0 in the direction of u = 45 i + 53 j or u = − 45 i − 35 j
q
(d) Let u = u1 i + u2 j ⇒ |u| = u12 + u22 = 1 ⇒ u12 + u22 = 1; Du f (1, −1) = Of (1, −1) · u =
(3i − 4j) · (u1 i + u2 j) = 3u1 − 4u2 = 4 ⇒ u2 = 34 u1 − 1 ⇒ u12 + ( 34 u1 − 1)2 = 1 ⇒
25 2
u − 23 u1 = 0 ⇒ u1 = 0 or u1 = 24
16 1 25
; u1 = 0 ⇒ u2 = −1 ⇒ u = −j, or u1 = 25 24
⇒ u2 =
7 24 7
− 25 ⇒ u = 25 i − 25 j
q
(e) Let u = u1 i + u2 j ⇒ |u| = u12 + u22 = 1 ⇒ u12 + u22 = 1; Du f (1, −1) = Of (1, −1) · u =
(3i − 4j) · (u1 i + u2 j) = 3u1 − 4u2 = −3 ⇒ u1 = 43 u2 − 1 ⇒ ( 34 u2 − 1)2 + u22 = 1 ⇒
25 2
u − 83 u2 = 0 ⇒ u2 = 0 or u2 = 24
9 2 25
; u2 = 0 ⇒ u1 = −1 ⇒ u = −i, or u2 = 25 24
⇒ u2 =
7 7 24
25
⇒ u = 25
i + 25
j
Exercise 19.
1. Zero directional derivative : In what direction is the derivative of
f (x, y ) = xy + y 2 at P(3, 2) equal to zero?
2. Zero directional derivative : Is there a direction u in which the rate
of change of f (x, y ) = x 2 − 3xy + 4y 2 at P(1, 2) equals 14? Give
reasons for your answer.
Exercise 20.
1. Changing temperature along a circle : Is there a direction u in which
the rate of change of the temperature function T (x, y , z) = 2xy − yz
(temperature in degrees Celsius, distance in feet) at P(1, −1, 1) is −3
deg.Cel/ft ? Give reasons for your answer.
2. The derivative of f (x, y , z) at a point P is greatest in the direction
√ of
v = i + j − k. In this direction, the value of the derivative is 2 3.
(a) What is 5f at P ? Give reasons for your answer.
(b) What is the derivative of f at P in the direction of i + j ?
Exercise 21.
1. Directional derivatives and scalar components : How is the derivative
of a differentiable function f (x, y , z) at a point P0 in the direction of
a unit vector u related to the scalar component of (∇f )P0 in the
direction of u? Give reasons for your answer.
2. Directional derivatives and partial derivatives : Assuming that the
necessary derivatives of f (x, y , z) are defined, how are Di f , Dj f , and
Dk f related to fx , fy , and fz ? Give reasons for your answer.
Exercise 22.
1. Lines in the xy -plane : Show that A(x − x0 ) + B(y − y0 ) = 0 is an
equation for the line in the xy -plane through the point (x0 , y0 ) normal
to the vector N = Ai + Bj.
2. The algebra rules for gradients : Given a constant k and the
gradients
∂f ∂f ∂f ∂g ∂g ∂g
∇f = i+ j+ k, ∇g = i+ j+ k,
∂x ∂y ∂z ∂x ∂y ∂z
establish the algebra rules for gradients.
Exercise 23.
1. Find the directions in which the functions increase and decrease most
rapidly at P0 . Then find the derivatives of the functions in these
directions. Also find the dertivative of f at P0 in the direction of the
vector v.
(a) f (x, y ) = x 2 e −2y , P0 (1, 0), v = i + j
(b) f (x, y , z) = ln(2x + 3y + 6z), P0 (−1, −1, 1), v = 2i + 3j + 6k
2. What is the largest value that the directional derivative of
f (x, y , z) = xyz can have at the point (1, 1, 1)?
Exercise 24.
1. The temperature of a point in space is given by
T (x, y , z) = x 2 + y 2 − z. A mosquito located at (1, 1, 2) desires to
fly in such a direction that it will get warm as soon as possible. In
what direction should it move?
2. Prove the following :
(a) 5r n = nr n−2 r
(b) 5 1r = −r
r3
(c) 5ln |r| = rr2 where r = xi + y j + zk, |r| = r and n is an integer.
3. Find the directional derivative of f (x, y , z) = x 2 − y 2 + 2z 2 at the
point P(1, 2, 3) in the direction of the line PQ where Q is the point
(5, 0, 4). Also, calculate the magnitude of the maximum directional
derivative.
Exercise 25.
Use the weather map in the above figure to estimate the value of the
directional derivative of the temperature function at Reno in the
southeasterly direction.
Solution :
The unit vector directed √toward the
southeast is u = (i − j)/ 2, but we
won’t need to use this expression.
Exercise 26.
The directional derivative of the function f (x, y , z) = 3xy + z 2 at the
point P0 (1, −2, 2) in the direction from the point P0 towards the origin is
4
(a)
3
3
(b)
4
3
(c) −
4
4
(d) −
3
4
Correct Answer :
3