0% found this document useful (0 votes)
492 views8 pages

1 Directional Derivatives and The Gradient Vector

This document discusses directional derivatives and the gradient vector. It begins by defining directional derivatives as the rate of change of a function z with respect to distance in a given direction. It then introduces the gradient vector, which is defined as the vector of partial derivatives of the function. The key points are: - The directional derivative of a function f at a point (x0, y0) in the direction of a unit vector u is equal to the dot product of the gradient vector and u. - For functions of two variables, the gradient vector is the vector of partial derivatives. - For functions of three variables, the gradient vector contains the partial derivatives with respect to each variable.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
492 views8 pages

1 Directional Derivatives and The Gradient Vector

This document discusses directional derivatives and the gradient vector. It begins by defining directional derivatives as the rate of change of a function z with respect to distance in a given direction. It then introduces the gradient vector, which is defined as the vector of partial derivatives of the function. The key points are: - The directional derivative of a function f at a point (x0, y0) in the direction of a unit vector u is equal to the dot product of the gradient vector and u. - For functions of two variables, the gradient vector is the vector of partial derivatives. - For functions of three variables, the gradient vector contains the partial derivatives with respect to each variable.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

1 Directional Derivatives and the Gradient Vector

Directional Derivatives
We want the rate of change of z at (x0 , y0 ) in the
direction of an unit vector u = ⟨a, b⟩.
 Consider the surface S of z = f (x, y), the verti-
cal plane that passes through P (x0 , y0 , z0 ) in the
direction of u intersects S a curve C.
 The slope of tangent line T to C at P is what we
need.

If Q(x, y, z) is another point on C and P ′ , Q′ are the projections of P, Q onto the xy-plane, then the vector
# ′ »′
P Q is parallel to u,
# »
P ′ Q′ = hu = ⟨ha, hb⟩

Therefore x − x0 = ha, y − y0 = hb.

∆z z − z0 f (x0 + ha, y0 + hb) − f (x0 , y0 )


= =
h h h
If we take limit as h → 0, we obtain the rate of change of z (with respect to distance) in the direction of
u.

Definition : Directional Derivatives

The directional derivative of f at (x0 , y0 ) in the direction of a unit vector u = ⟨a, b⟩ is

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


Du f (x0 , y0 ) = lim
h→0 h
= fx (x, y)a + fy (x, y)b
= fx (x, y) cos θ + fy (x, y) sin θ (u makes an angle θ with the x+ -axis)

+ EXAMPLE. Find the directional derivative Du f (x, y) if

f (x, y) = x3 − 3xy + 4y 2

and u is given by θ = π/6. What is Du f (1, 2)?


SOLUTION. fx (x, y) = 3x2 − 3y fy (x, y) = 8y − 3
Therefore,

3 2 1
Du f (x, y) = (3x − 3y) + (8y − 3)
2 2
√ √
3 3 2 4−3 3 3
= x + y−
2 2 2

13 − 3 3
Hence Du f (1, 2) =
2

1
The Gradient Vector

Notice that Du = ⟨fx (x, y), fy (x, y)⟩ · u.

Definition : Gradient

The gradient of f (x, y) is the vector function ∇f defined by

∂f ∂f
∇f (x, y) = ⟨fx (x, y), fy (x, y)⟩ = i+ j
∂x ∂y

The directional derivative of f (x, y) is Du f (x, y) = ∇f (x, y) · u

+ EXAMPLE. If f (x, y) = sin x + exy , then

∇f (x, y) = ⟨fx , fy ⟩ = ⟨cos x + yexy , xexy ⟩


∇f (0, 1) = ⟨2, 0⟩

+ EXAMPLE. Find the directional derivative of f (x, y) = x2 y 3 − 4y at


(2, −1) in the direction of v = 2i + 5j.
SOLUTION. We first compute the gradient vector at (2, −1):

∇f (x, y) = 2xy 3 i + (3x2 y 2 − 4)i


∇f (2, −1) = −4i + 8j

v 2 5
The unit vector in the direction of v is u = = √ i+ √ j
|v| 29 29
Therefore we have
!
2 5
Du f (2, −1) = ∇f (2, −1) · u = (−4i + 8j) · √ i+ √ j
29 29
−4·2+8·5 32
= √ =√
29 29

Functions of Three Variables

Definition : Directional Derivatives

The directional derivative of f at (x0 , y0 , z0 ) in the direction of a unit vector u = ⟨a, b, c⟩ is

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


Du f (x0 , y0 , z0 ) = lim
h→0 h
The gradient vector is
∂f ∂f ∂f
∇f = ⟨fx , fy , fz ⟩ = i+ j+ k
∂x ∂y ∂z
And the directional derivative is Du f (x, y, z) = ∇f (x, y, z) · u

+ EXAMPLE. If f (x, y, z) = x sin yz, (a) find ∇f and (b) find Du f (1, 3, 0) in the direction of v = i + 2j − k.

SOLUTION.
∇f = sin yz · i + xz cos yz · j + xy cos xz · k
The unit vector in the direction of v is
1 2 1
u= √ i+ √ j− √ k
6 6 6
Therefore

Du = ∇f (1, 3, 0) · u
1 2 1
= 3k · √ i + √ j − √ k
6 6 6
s
3
=−
2

2
1.1 Maximizing the Directional Derivative

Definition : Maximum Value of the Directional Derivative

The maximum value of Du f (x) is |∇f (x)|, when u has the same direction as the gradient vector ∇f (x).

+ EXAMPLE.
(a) If f (x, y) = xey , find the rate of change of f at P (2, 0) in the direction
from P to Q( 21 , 2).
(b) In what direction, f has max Du f and what’s it?
SOLUTION.
(a)

∇f (x, y) = ⟨fx , fy ⟩ = ⟨ey , xey ⟩


∇f (2, 0) = ⟨1, 2⟩
−−→
The unit vector in the direction P Q is u = − 53 , 45 , so we have

 
3 4
Du f (2, 0) = ∇f (2, 0) · u = ⟨1, 2⟩ · − ,
5 5
   
3 4
=1 − +2 =1
5 5

(b) f increases fastest in the direction of ∇f (2, 0) = ⟨1, 2⟩.



|∇f (2, 0)| = |⟨1, 2⟩| = 5

Tangent Planes to Level Surfaces

Suppose S of F (x, y, z) = k, and P (x0 , y0 , z0 ) ∈ S. We can write ∇F · r′ (t) = 0

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

We see that the gradient vector ∇F (x0 , y0 , z0 ) is perpendicular to the tangent vector to any curve C on
S that pass through P .

Definition : Tangent plane

If ∇F (x0 , y0 , z0 ) ̸= 0, there is a tangent plane to the level surface F (x, y, z) = k at P (x0 , y0 , z0 )

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

The normal line to S at P is the line passing through P and perpendicular to the tangent plane. The
direction of it is given by ∇F (x0 , y0 , z0 ) and its symmetric equation*s are

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

³ Special case. When z = f (x, y), then F (x, y, z) = f (x, y) − z = 0, we have

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

+ EXAMPLE. Find the tangent plane and normal line at (−2, 1, −3) to the ellipsoid

x2 z2
+ y2 + =3
4 9
SOLUTION. The ellipsoid is the level surface (k = 3) of the function

x2 z2
F (x, y, z) = + y2 +
4 9
Therefore we have
x 2z
Fx (x, y, z) = Fy (x, y, z) = 2y Fz (x, y, z) =
2 9
2
Fx (−2, 1, −3) = −1 Fy (−2, 1, −3) = 2 Fz (−2, 1, −3) = −
3

3
The equation of the tangent plane at (-2, 1, -3) is

2
−1(x + 2) + 2(y − 1) − (z + 3) = 0
3
The symmetric equations of the normal line are

x+2 y−1 z+3


= =
−1 2 − 23

Maximum and Minimum Values

Definition : Local extrema

Local maximum f (a, b) if f (x, y) ≤ f (a, b) when (x, y) is near


(a, b).And the first-order partial derivatives of f exists there, then
fx (a, b) = 0 and fy (a, b) = 0.

If we put fx (a, b) = 0 and fy (a, b) = 0 in the equation of a tangent plane, we get z = z0 . So the tangent
plane at a local extrema must be horizontal. A point (a, b) is a critical point (or stationary point) of f if
fx (a, b) = fy (a, b) = 0, or if one of these does not exist.

+ EXAMPLE. Let f (x, y) = x2 + y 2 − 2x − 6y + 14. Then

fx (x, y) = 2x − 2 fy (x, y) = 2y − 6

These derivatives are equal to 0 when x = 1, y = 3. So the only critical


point is (1, 3).
f (x, y) = 4 + (x − 1)2 + (y − 3)2

We have f (x, y) ≥ 4. Therefore f (1, 3) = 4 is a local minimum, and in


fact it is the absolute minimum of f .

+ EXAMPLE. Find the extreme values of f (x, y) = x2 + y 2 .


f (x, y) is either maxima or minima depends on directions. So (0, 0) is a
saddle point of f . Then how to determine?

Definition : Second Derivatives Test

Suppose fx (a, b) = fy (a, b) = 0. Let

D = D(a, b) = fxx (a, b)fyy (a, b) − [fxy (a, b)]2



f
xx fxy

= = fxx fyy − (fxy )2
fyx fyy

(a) Local minimum: D > 0, fxx (a, b) > 0.


(b) Local maximum: D > 0, fxx (a, b) < 0.
(c) Neither: D < 0.

ˆ Note. If D = 0, we have no idea.

4
+ EXAMPLE. Find the local maximum and minimum ad saddle points of
f (x, y) = x4 + y 4 − 4xy + 1.
First we have

fx = 4x3 − 4y fy = 4y 3 − 4x
x3 − y = 0 y3 − x = 0

which implies 0 = x9 − x = x(x2 − 1)(x2 + 1)(x4 + 1), so there’re 3 roots:


0, 1, -1. The 3 critical points are (0, 0), (1, 1), (−1, −1).
Next we calculate the second partial derivatives and D(x, y)

fxx = 12x2 fxy = −4 fy y = 12y 2

D(x, y) = fxx fyy − (fxy )2 = 144x2 y 2 − 16

Since D(0, 0) = −16 < 0, it follows that (0,0) is a saddle point. And
D(1, 1) = 128 > 0, fxx (1, 1) = 12 > 0, so it’s a local minimum. Similarly,
(−1, −1) is a local minimum.
+ EXAMPLE. Find the shortest distance from (1, 0, −2) to the plane x + 2y + z = 4.

The distance from (x, y, z) to (1, 0, −2) is

d2 = f (x, y) = (x − 1)2 + y 2 + (6 − x − 2y)2

By solving the equation

fx = 4x + 4y − 14 = 0
fy = 4x + 10y − 24 = 0
11 5

we find that the only critical point is 6 , 3 . Since fxx = 4, fxy = 4, fyy = 10, D(x, y) = fxx fyy − (fxy )2 =
11 5
24 > 0, so f has a local minimum at 6 , 3 . There must be a point on the given plane that is closest to

(1,0,-2). We also find that d = 56 6.

Absolute Maximum and Minimum Values

Definition : Extreme Value Theorem

If f is continuous on a closed, bounded set D ∈ R2 then f attains an absolute maximum value f (x1 , y1 )
and an absolute minimum value f (x2 , y2 ). To find it,
1. Find the values of f at the critical points of f in D.
2. Find the extreme values of f on the boundary of D.
3. Determine the largest and smallest ones.

+ EXAMPLE. Find the absolute maximum and minimum of f (x, y) = x2 − 2xy + 2y on the rectangle
D = {(x, y)| 0 ≤ x ≤ 3, 0 ≤ y ≤ 2}.
Since f is a polynominal, it’s continuous on D. First find the critical points

fx = 2x − 2y = 0 fy = −2x + 2 = 0

So the only critical point is (1,1), and f (1, 1) = 1.

Now we look at the values of f on the boundary of D, which consists of the four line segments L1 , L2 , L3 , L4 .

5
■ On L1 , we have y = 0 and

f (x, 0) = x2 0≤x≤3

Its minimum value is f (0, 0) = 0 and maximum value is f (3, 0) = 9.


■ On L2 , we have x = 3 and

f (3, y) = 9 − 4y 0≤y≤2

The maximum value is f (3, 0) = 9 and the minimum value is f (3, 2) = 1.


■ On L3 we have y = 2 and

f (x, 2) = x2 − 4x + 4 = (x − 2)2 0≤x≤3

The minimum value is f (2, 2) = 0 and the maximum value is f (0, 2) = 4.


■ On L4 we have x = 0 and

f (0, y) = 2y 0≤y≤2

with maximum value f (0, 2) = 4 and minimum valye f (0, 0) = 0.


Thus, on the boundary, the minimum value is 0 and the maximum is 9.

Lagrange Multipliers
We will discover Lagrange’s methods for maximizing or minimizing a
general function f (x, y, z) to a constraint (or side contidition) of the
form g(x, y, z) = k.

Definition : Method of Lagrange Multipliers

To find the maximum and minimum values of f (x, y, z) to the constraint g(x, y, z) = k (assume they
exist and ∇g ̸= 0 on the surface g(x, y, z) = k):
(a) Find all x, y, z and λ (Lagrange multiplier) such that

∇f (x, y, z) = λ∇g(x, y, z)
g(x, y, z) = k

(b) Evaluate f at all these points and find the largest and smallest ones.

Write (a) in terms of components

fx = λgx fy = λgy fz = λgz g(x, y, z) = k

It’s not necessary to find explicit values for λ.


+ EXAMPLE. A rectangular box without a lid is to be made from 12 m2 of cardboard. Find the maximum
volume.

SOLUTION. We wish to maximize V = xyz, where x, y, z are the length, width and height of the box,
subject to the constraint
g(x, y, z) = 2xz + 2yz + xy = 12

We look for x, y, z, λ that ∇V = λ∇g and g(x, y, z) = 12.

Vx = λgx
Vy = λgy
Vz = λgz
2xz + 2yz + xy = 12

6
which become

yz = λ(2z + y)
xz = λ(2z + x)
xy = λ(2x + 2y)
2xz + 2yz + xy = 12

Observe that λ ̸= 0, and we have 2xz + xy = 2yz + xy which gives xz = yz. But z ̸= 0, or V = 0. So x = y.
We also have x = y = 2z.
4z 2 + 4z 2 + 4z 2 = 12

Therefore we have x = y = 2, and z = 1.

+ EXAMPLE. Find the extreme values of f (x, y) = x2 + 2y 2 on the circle


x2 + y 2 = 1.
Solve the equation

fx = λgx , fy = λgy , g(x, y) = 1


2x = 2xλ
4y = 2yλ
x2 + y 2 = 1

■ x = 0, then y = ±1.
■ λ = 1, then y = 0, and x = ±1.
Evaluating f at these 4 points, we find that fmax = f (0, ±1) = 2 and
fmin = f (±1, 0) = 1.

+ EXAMPLE. Find the points on the sphere x2 + y 2 + z 2 = 4 that are closest and farthest from (3, 1, −1).

SOLUTION. We want to minimize and maximize

d2 = (x − 3)2 + (y − 1)2 + (z + 1)2

The constraint is that the point (x, y, z) lies on the sphere, that is

g(x, y, z) = x2 + y 2 + z 2 = 4

According to the method of Lagrange multipliers, we solve ∇f =


λ∇g, g = 4, which gives

2(x − 3) = 2xλ
2(y − 1) = 2yλ
2(z + 1) = 2zλ
x + y2 + z2 = 4
2

3 1 1
Hence, we got x = ,y = ,z = − . Then we have
1−λ 1−λ 1−λ

32 12 (−1)2
+ + =4
(1 − λ)2 (1 − λ)2 (1 − λ)2

7

11
which gives λ = 1 ± , which give the corresponding (x, y, z)
2
! !
6 2 2 6 2 2
√ , √ , −√ and −√ , −√ , √
11 11 11 11 11 11

which is the closest and farthest point, respectively.

Two Constraints

We want to find the maximum and minimum values of f (x, y, z) subject to 2 constraints of the form
g(x, y, z) = k and g(x, y, z) = c. Geometrically, we are looking for the extreme values of f when (x, y, z) lies
on the curve of intersection C of g and h.

∇f (x0 , y0 , z0 ) = λ∇g(x0 , y0 , z0 ) + µ∇h(x0 , y0 , z0 )

Solving 5 equations

fx = λgx + µhx
fy = λgy + µhy
fz = λgz + µhz
g(x, y, z) = k
h(x, y, z) = c

+ EXAMPLE. Find the maximum value of f (x, y, z) = x + 2y + 3z on the curve of intersection of the plane
x − y + z = 1 and the cylinder x2 + y 2 = 1.

SOLUTION. We maximize f (x, y, z) = x + 2y + 3z. We solve the equations

1 = λ + 2xµ
2 = −λ + 2yµ
3=λ
x−y+z =1
x2 + y 2 = 1

We get x = −1/µ, y = 5/(2µ).

1 25
+ =1
µ2 4µ2
√ √ √ √
and so µ = ± 229 . Then x = ∓2/ 29, y = ±5/ 29, z = 1 ± 7/ 29.

The corresponding values of f are 3 ± 29. The maximum value of f on

the given curve is 3 + 29.

You might also like