You are on page 1of 11

MATH 38

UNIT 2. DIRECTIONAL DERIVATIVES AND GRADIENTS


Objectives: Upon the completion of the course, the student must be able to
1. find directional derivatives (if they exist);
2. find equations of tangent plane and normal line to a surface;
3. find extreme values of functions (constrained or unconstrained case); and
Review: Vectors, Equations of Lines and Planes in Space
Outline:

Definitions
Tangent Planes and Normals to Surfaces
Extrema of Functions of Two Variables
Lagrange Multipliers

Reference: 12.6 to 12.9, TC7


Review Notes
Consider a vector A

x ,y

Magnitude:

(in position representation).


A

x2 y 2

Direction Angle, A (in standard position):


Unit Vector in the direction of

A:

tan A

UA

x
A

y
x
y
A

U A cos A i sin A j
where i

1 ,0

and

0 ,1

f
fx a,.b : slope of the line tangent to the curve of intersection of the surface z f x,y
x
and the plane y b at P a,b, f a,b .
f
fy a,.b : slope of the line tangent to the curve of intersection of the surface z f x,y
y

and the plane

x a at P a,b, f a,b

2.1 Directional Derivatives and Gradients


Directional derivatives are used to determine rate of change towards a certain direction. In our case,
vectors will be used to represent directions.
Definition (of directional derivative).
Let f be a function of two variables x and y . If u is a unit vector cos i sin j ,
then the directional derivative of f in the direction of u , denoted by Du f is given by
f x hcos ,y h sin f x,y
if this limit exists.
h
h0

Du f x,y lim

Remark: Du f xo ,yo is the rate of change of f at the point xo ,yo in the direction of

u.

MATH 38

Example.
Consider the function defined by f x,y 2 x2 y2 .
Determine Du f if U is the unit vector in the direction of

a.
b.
3

Theorem. If f is a differentiable function of x and y , and u cosi sin j , then


Du f x,y fx x,y cos fy x,y sin .

Exercise.
Consider the function defined by f x,y 3 x2 4y2 .
Determine Du f if U is the unit vector in the direction of
a.

3
4

b.

Definition (of gradient).


Let f be a function of two variables x and y such that fx and fy exist. The gradient
of f denoted by f (read as "del f ") is defined by
f x,y fx x,y i fy x,y j .
Example.
Consider the function defined by f x,y 2 x2 y2 .
Determine f x,y .
Remarks:
1.

Du f x,y U f x,y

2.

f xo ,yo is perpendicular to the level curve of

3.

f xo ,yo is the direction of the steepest ascent.

(DO NOT forget that U is a unit vector.)


f through

xo ,yo .

Example.
Consider the function defined by f x,y x2 y2 .
Determine D u f 4 ,3 where U is the unit vector in the direction
12 , 5

MATH 38

Exercises.
Determine the directional derivative of f at point

1.

f x,y x2 y , P 1 ,2

2.


f x,y ex siny , P 0 , 4

1.

f x,y x2 3 xy 2y2 , P 1 ,2

P in the direction of

A 3 ,4

1,

2 , 1

_______________
2. Sketch the level curve of f x,y

y
x2

that goes through the point

P 1 ,2 . Show that the vector f 1 ,2 (drawn with initial


point at 1 ,2 , NOT in its position representation) is perpendicular
to the level curve.

(For functions of three variables.)


Definition.
Let f be a function of two variables x , y and z . If u is a unit vector
cos i cos j cos k , then the directional derivative of f in the direction of
denoted by Du f is given by

u,

f x hcos ,y hcos ,z hcos f x,y,z


if this limit
h
h0

Du f x,y,z lim
exists.

Theorem. If f is a differentiable function of


then

x, y

and

z , and

u cos i cos j cos k ,

Du f x,y,z fx x,y,z cos fy x,y cos fz x,y,z cos .

Definition.
Let

be a function of two variables

x, y

and

such that fx ,

fy and fz exist. The gradient of f denoted by f is defined by


f x,y,z fx x,y i fy x,y j fz x,y k .

Example.
Consider the function defined by f x,y,z cosxy sinyz .
Determine D u f 2 ,0 3
1 ,2 , 2 .

where U is the unit vector in the direction

MATH 38

Exercises.
Determine the directional derivative of f at point

3.

f x,y ,z x3 y y2 z2 , P 2 ,1 ,3

4.

f x,y ,z ln x2 y2 z2 , P 1 ,3 ,2

P in the direction of
A

1 ,2 ,2

1 ,1 ,1

Theorem (on maximum and minimum rate of change).


Let f be a function of two variables

f xo ,yo 0 .

and y that is differentiable at xo ,yo , where

1. The maximum value of Du f xo ,yo is f xo,yo . This value is attained in the direction of
f xo,yo .

opposite the direction of f xo ,yo .

2. The minimum value of Du f xo ,yo is f xo ,yo . This value is attained in the

Examples.
0. Determine the maximum and minimum values of D U f for
f x,y ex Arctany at P 0 ,1 .
1. The density of a rectangular plate at a point in the xy plane is given
by x,y

1
x2 y2 3

. Determine the magnitude and the unit

vector in the direction of the greatest rate of change of at


.

3 ,2

Exercise.
The temperature

T (in degrees) at a point x,y,z on a three-

dimensional space is given by T x,y,z 3 x2 2 xy. Determine the


following:
1.

rate of change of

T at 3 ,2 ,2 in the direction of the vector

2i 3 j 6k

2.

the magnitude and the unit vector on the direction of the direction of
the greatest rate of change of T at 3 ,2 ,2

MATH 38

2.2 Tangent Planes and Normal to Surfaces


Recall:
For the equation of a plane:
Let P0 x0 ,y0 ,z0
plane.

be a point on a plane and N a ,b ,c

is a vector normal to the

If P x,y ,z is another point on the plane, then P0 P is perpendicular to

N.

Hence, P0 P N 0 .

This gives the standard equation of the plane: a x x0 b y y0 c z z0 0


For the equation of a line:
Let P0 x0 ,y0 ,z0

be a point on a line that is parallel to the vector M a ,b , c .

If P x,y ,z is another point on the line, then P0 P t M .

This gives the parametric equation of the line: x x0 at; y y0 bt; z z0 ct.
Alternatively, if a,b and

are all non-zero,

y y0
x x0
z z0

then
is the symmetric equation of the line.
a
b
c
_______________________
Definition (of a normal vector)
A vector orthogonal to a tangent vector of every curve C through a point P0 on a surface

S is called as a normal vector to S at P0 .


Theorem.
If a surface S is given by the equation F x,y ,z 0 and
Fx , Fy and Fz are not all zero at P0 on S, then

F is differentiable and
F P0 is a normal vector to S

at P0 .
Remark:

The tangent plane to S at P0 is a plane containing the point P0 having F P0


vector.
Hence, the equation of tangent plane is given by

as a normal

Fx x0 ,y0 ,z0 x x0 Fy x0 ,y0 ,z0 y y0 Fz x0 ,y0 ,z0 z z0 0 .

MATH 38

The vector equation is given by

F P0 x x0 i y y0 j z z0 k 0 .

Examples. Determine the equation of the tangent plane to the given


surface at the indicated point.
1.

x2 y2 3z 2

2.

y ex cosz

at the point

at the point

2 ,4 ,6

1 ,e,0

Remark:
The normal line to S at P0 is a line through the point P0 in the direction of the normal vector

F P0 . Hence, the parametric equation of the line is given by


x x0 t Fx x0 , y0 , z0 ;

y y0 t Fy x0 , y0 , z0 ;

z z0 t Fz x0 , y0 , z0 .

Also, if Fx , Fy and Fz are all non-zero, the symmetric equation of the line is given by

y y0
x x0
z z0

Fx x0 ,y0 ,z0
Fy x0 ,y0 ,z0
Fz x0 ,y0 ,z0
Example.
Determine a parametric and symmetric equation of the normal line to the
surface given by x2 y2 z2 2z 0 at the point 1 ,0 1 .
Exercises.
1. Determine the equation of the tangent plane to the surface
z 2e3 y cos2 x

at the point

,0 ,1

2. Find a point on the surface z 2 x2 3y2 where the tangent plane


is parallel to the plane 8 x 3 y z 0 .
3. Show that the equation of the tangent plane to the ellipsoid
x2
a2

y2
b2

x0 x
a2

z2
c2

1 at

x0 ,y0 ,z0

can be written in the form

y y z z
0 0
1
b2
c2

4. Give a parametric and a symmetric equation of the normal line to the


surface x2 y2 z2 16 at the point 2 ,3 , 3

5. Show that any normal line to a point


x2 y2 z2 a2

x0 ,y0 ,z0

on the sphere

passes through the center of the sphere.

MATH 38

Remark:
All tangent lines to a surface at a point P0 lie on the tangent plane to the surface at P0 .
Solving for the tangent line to a curve of intersection
Let P0 be a point on the curve of intersection, C , of surfaces F x,y ,z 0 and
G x,y,z 0 .

The tangent line to C at P0 lies in each tangent plane to the surfaces.

N1 F P0 and N 2 G P0 are both orthogonal to the unit vector to C .

If N1 is NOT parallel to N 2 , then N1 N 2 is the direction of the tangent line to the


curve of intersection, C .
Example.
Determine the equation of the tangent line to the curve of intersection of
the surfaces defined by x2 y2 z 8 and x y2 z2 2 at the
point 2 ,2 ,0 .

Definition (of tangency at a point)


If two surfaces have a common tangent plane, the two surfaces are said to be tangent at that
point.
Remark: If F x,y ,z 0 and G x,y,z 0 are tangent at a point P0 ,

then F P0

k G P0 , for some constant k .

Example.
Show that the surfaces defined by x2
x2 y2 z2 6z 7 0

are tangent at the point

For tangent line to a curve on a plane (optional)


Theorem.

z2 4 y 0

and
0 ,1 ,2

MATH 38

If C is a curve in R 2 given by F x,y 0 such that F is differentiable and Fx , Fy


are not both zero at P0 on C , then F P0 is a normal vector to C at P0 .
Remark:

In R2 , the equation of the tangent line to the curve F x,y 0 at P0 x0 ,y0 is given by

Fx x0 ,y0 x x0 Fy x0 ,y0 y y0 0 .

Exercises.
1. Determine the equation of the tangent line to the curve of intersection
of the surfaces defined by y ex sinz 2 and
z y2 ln x 1 3 at the point 0 ,2 ,0 .
2. Show that the surfaces defined by 4 x2 y2 9z2
xyz 36 are tangent at the point 3 ,6 ,2 .

108

and

3. Determine the equation of the tangent line to the curve


2 x3 2y3 9 xy 0 at the point 1 ,2 .

__________________
2.3 Extrema of Functions of More Than One Variable
Definition (of relative extrema)
Let f be a function of two variables

f x,y

f has a relative minimum value at

a ,b such that f a,b

and y .

a ,b if there exists an open ball


for all x, y B .

a ,b if there exists an open ball B


f x,y for all x, y B .

f has a relative maximum value at

a ,b such that f a,b

B containing
containing

Remarks:
1. A point

a ,b is a critical point of f if

a.) fx a,b 0 and fy a,b 0 ; or


b.) fx a,b or fy a,b

2. If a critical point has no relative extrema, then it is a saddle point.


Theorem (Second-Derivative Test)

MATH 38

Let f be a function of two variables


on some open disk
fy a,b 0 .

ii.

and y such that fx , fy , fxx, fyy , fxy are continuous

B containing a ,b . Suppose further that fx a,b 0 and

Let D a,b fxx a,b fyy a,b


i.

fxy a,b 2

If D a,b 0 and fxx a,b 0 (or fyy a,b 0 ), f has a relative minimum value at
a ,b .
If D a,b 0 and fxx a,b 0 (or fyy a,b 0 ), f has a relative maximum value at

a,b .

iii. If D a,b 0 , f has a saddle point at

a ,b , f a,b .

iv. No conclusion regarding relative extrema can be made if D a,b 0 .


Example.
Determine the relative extremum values and the point/s where they occur
of the function defined by f x,y x3 y2 6 x2 y 1 . Also,
determine the saddle points, if there are any.

Exercises. Determine the relative extremum values and the point/s


where they occur of the given functions. Also, determine the saddle
points, if there are any.
x2
3y3 9 y2 3 xy 9y 9 x
2

1.

f x,y

2.

f x,y x3 y3 3 y2 3 x 9y 2

_________________
3. Determine the minimum distance between the origin and the surface
z2 x2 y 4 .
Hint: Express the distance of a point on the given surface as a function
of x and y , only. Also, the point where the minimum distance
occurs coincides with the point where the square of the minimum
distance occurs.

Definitions.
A region R is bounded if it is a subregion of a closed disk. The boundary of a region R is
the set of all points P such that B P ;r contains points of R and points not in R , for
any r . A closed region contains its boundary.
Theorem (Extreme-Value Theorem)

MATH 38

10

Let R be a closed region in the xy plane and let f be continuous on


an absolute maximum-value and an absolute minimum value on R .

R . Then,

f has

Solving for absolute extrema:


Consider a function f that is continuous on a closed and bounded region R . An absolute
extremum of f occurs at a relative extremum of f or at a point on the boundary of R .
1.
2.
3.
4.

Solve for the critical points of f .


Determine function values at critical points of f interior to R .
Determine extreme values on f on the boundary of R .
The largest (smallest) function value from (2) and (3) is the absolute maximum (minimum)
value of f on R .

Example.
Determine the absolute maximum and absolute minimum values of the
function defined by f x,y y3 x2 3y over the region bounded by
x2 y 1 2 1 .

Exercise.
Determine the absolute maximum and absolute minimum values of
f x,y 3 x2 xy on the region bounded by the parabola y x2
and the line y 4 .
There are two distinct boundaries to be considered for this item.

2.4 Lagrange Method (for Constrained-Optimization)


Optimization problems can be distinguished into two: the constrained case and the
unconstrained (or free extremum) case. Many real world problems (mostly economics in nature) are
examples of the constrained case such as maximizing a manufacturer's profit but is constrained by
factors such as the amount raw materials available. In this scenario, the profit is our objective and the
amount of raw material is the constraint. The unconstrained case was already considered in the
previous section when the relative extrema of a given function are determined.
Theorem.
Consider functions f and g with continuous first partial-derivatives. If f has a relative
extremum value at x0 ,y0 , subject to the constraint g x ,y 0 and

g x0 ,y0

0 , then there exists a constant (read as "lambda", called as the

Lagrange multiplier) such that

f x0 ,y0

g x0 ,y0

MATH 38

11

g x0 ,y0
and g at x0 ,y0 .

Remark: f x0 ,y0
defined by f

indicates the parallelism of the normal lines to surfaces

Lagrange method for constrained-optimization:


(Two variables, one constraint)
Problem: Maximize or minimize z f x,y subject to the constraint g x ,y 0 .
1. Form the auxiliary function F x ,y ,
2. Set the first-partial derivatives of

Fx x ,y ,

f x,y g x,y .

F to zero.

Fy x ,y ,

3. Determine the critical points of


4. Among the critical points of

F x ,y ,

F by solving the system in (2).

F is/are the ordered pairs that give the desired extrema.

Example.
1. Determine the absolute extrema of the function
f x, y x2 4xy y2 subject to the constraint that x y 6 .
2. Use the Lagrange Method to determine the point on the plane
3 x 2y z 5 that is closest to the point 1 ,2 ,3 , and find
the minimum distance.

Exercises.
1. Determine the relative extrema of f x,y xy subject to the
2
y2
constraint x
1.

2. Determine the minimum distance of the surface


the origin.

z2 x2 y 4

from

3. Determine the dimensions of a right circular cylinder that will give the
maximum volume if required surface area is 24 .
The surface area of a right circular cylinder is given by 2r 2 2rh.