14.6 Directional Derivatives and the Gradient

Instructor: Longfei Li
Math 243 Lecture Notes
14.6 Directional Derivatives and the Gradient
We knew about the partial derivatives fx and fy from previous lectures:
fx represents the rate of change of z in the positive x− direction (i)
fy represents the rate of change of z in the positive y− direction (j)
What is the rate of change of z in any direction?
Definition: Directional derivatives of f at (x0 , y0 ) in the direction of unit vector u =< a, b > is defined
by
f (x0 + ah, y0 + bh) − f (x0 , y0 )
Du f (x0 , y0 ) = lim
h→0
h
Remark: The direction vector has to be a unit vector. The definition is consistent with fx and fy .
Theorem: If f is a differentiable function of x and y, then f has a directional derivative in the direction
of any unit vector u =< a, b > and
Du f (x, y) = fx (x, y)a + fy (x, y)b
=< fx , fy > · < a, b >
Remark: The gradient of f is defined as ∇f (x, y) =< fx (x, y), fy (x, y) >. So the directional derivatives can be written as Du f (x, y) = ∇f (x, y) · u
Example: Find the directional derivative of f (x, y) = xy − x3 at (1, 2) in direction u =< 2, 3 >
Solution: u =< 2, 3 > is not a unit vector, so we need to find the unit vector v in the same direction
as u:
u
2
3
v=
=< √ , √ >
|u|
13 13
The gradient of f is found
∇f (x, y) =< y − 3x2 , x >
1
So at (1, 2), we have
∇f (1, 2) =< −1, 1 >
So the directional derivative is
√
2
3
1
13
Du f = ∇f (1, 2) · v = − √ + √ = √ =
13
13
13
13
Example: Find the directional derivatives of f (x, y) = x2 + x + (y − 1)3 pointing NE at (0, 0).
Solution:
√ √
The north east direction is u =< cos π4 , sin π4 >=< 22 , 22 >. It’s a unit vector. So according to the
formula, we have
√ √
√
2 2
Du f (0, 0) = ∇f (0, 0) · u =< 1, 3 > · <
,
>= 2 2
2 2
Similarly, we can extend the theorem to functions of 3 variables:
Du = ∇f · u
here ∇f =< fx , fy , fz > and u =< a, b, c > is a unit vector.
We have defined the derivatives of a function in any direction. So we want to ask which direction gives
the largest derivative.
Du f = ∇f · u = |∇f ||u| cos θ = |∇f | cos θ
here |u| = 1 and θ is the angle between ∇f and u. So when θ = 0, Du f is maximized and Du f = |∇f |.
θ = 0 means the direction u is the same as ∇f . Therefore, we can conclude the following theorem.
Theorem: For a differentiable function f , the max value of the directional derivative Du f is |∇f | and
it’s obtained when u is in the same direction as the gradient.
Remark: Steepest slope occurs in the direction of gradient.
Example: For f (x, y) = x2 + x + (y − 1)3 , find the direction in which f has the largest rate of change?
What is the largest derivative?
Solution: We know from the above theorem that the largest derivative is obtained in the direction of
the gradient. So first, we need to evaluate the gradient:
∇f (x, y) =< fx , fy >=< 2x + 1, 3(y − 1)2 >
At (0, 0),
∇f (0, 0) =< 1, 3 >
So the largest derivative is obtained in the direction u =< 1, 3 >, and Du f (0, 0) = |∇f (0, 0)| =
2
√
10
Application of Gradient Vector
Tangent Plane:
Let S be a surface of the function F (x, y, z) = k. (Recall: This is a level surface of F ). P (x0 , y0 , z0 ) is
a point on S. Any curve C on S passes through P can be parametrized as r(t) =< x(t), y(t), z(t) >
and for some t0 , r(t0 ) =< x0 , y0 , z0 >. Since C is on S, we must have
F (x(t), y(t), z(t)) = k ⇒
At P0 (x0 , y0 , z0 ), we then have
∂F dx ∂F dy ∂F dz
+
+
= 0 ⇒ ∇F · r0 (t) = 0
∂t dt
∂t dt
∂t dt
∇F (x0 , y0 , z0 ) · r0 (t0 ) = 0
Which means, ∇F (x0 , y0 , z0 ) is orthogonal to the tangent vector of C at P (x0 , y0 , z0 ). Since C is any
vector on S through P , ∇F (x0 , y0 , z0 ) is orthogonal to all the tangent vectors at P , and thus to the
tangent plane of S at P . So we can write an equation of tangent plane:
∂F
∂F
∂F
(x0 , y0 , z0 )(x − x0 ) +
(x0 , y0 , z0 )(y − y0 ) +
(x0 , y0 , z0 )(z − z0 ) = 0
∂x
∂y
∂z
Noting that in Section 14.4, we found the tangent plane of the surface z = f (x, y) is
z − z0 = fx (x0 , y0 )(x − x0 ) + fy (x0 , y0 )(y − y0 )
These two equations are consistent, since we can write F (x, y, z) = z − f (x, y) = 0. So
∇F (x0 , y0 ) =< −fx (x0 , y0 ), −fy (x0 , y0 ), 1 >⇒ −fx (x0 , y0 )(x − x0 ) − fy (x0 , y0 )(y − yz ) + z − z0 = 0
Thus, we derived the equation introduced in Section 14.4.
Normal Line:
∇F (x0 , y0 , z0 ) can be regarded as the direction of the normal line, therefore we have the normal line
equation given as
x − x0
y − y0
z − z0
= ∂F
= ∂F
∂F
∂x (x0 , y0 , z0 )
∂y (x0 , y0 , z0 )
∂z (x0 , y0 , z0 )
Remark: ∇F is orthogonal to the tangent plane as shown in the picture above.
3