0% found this document useful (0 votes)
11 views75 pages

3 - Partial Derivatives

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)
11 views75 pages

3 - Partial Derivatives

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
You are on page 1/ 75

CALCULUS 2

3. Partial Derivatives
(Chapter 14)

Nguyễn Anh Tú
[email protected]

Nguyễn Anh Tú [email protected] 3. Partial Derivatives Fall 2022 1 / 75


Contents

1 Functions of Two Variables

2 Limits and Continuity

3 Partial Derivatives

4 Chain Rule

5 Directional Derivatives - Gradient Vector

6 Maximum and Minimum

7 Lagrange Multipliers

Nguyễn Anh Tú [email protected] 3. Partial Derivatives Fall 2022 2 / 75


Introduction

• Many functions appearing in applications depend on more than


one parameter (variable). E.g.,
• The temperature T at a point on the surface of the earth
depends on the longitude x and latitude y of the point and the
time t. Thus, T is a function of the three variables x, y and t.
We indicate this dependence by writing T = f (x, y , t).
• The volume V of a right circular cylinder depends on its radius
r and its height h, V = πr 2 h. We say that V is a function of r
and h.
• We will study functions of several variables and extend the basic
ideas of differential calculus to such functions.

Nguyễn Anh Tú [email protected] 3. Partial Derivatives Fall 2022 3 / 75


Section 1

Functions of Two Variables

Nguyễn Anh Tú [email protected] 3. Partial Derivatives Fall 2022 4 / 75


Functions of Two Variables

• A function f of two variables is a rule that assigns to each


point (x, y ) in a set D a unique real number denoted by f (x, y ).
• The set D is the domain of f . The range of f is the set of all
values that f takes, i.e. the set {f (x, y ) | (x, y ) ∈ D}.
• If a function f is given by a formula and no domain is specified,
the domain of f is understood to be the set of all (x, y ) for
which the formula is defined.

Nguyễn Anh Tú [email protected] 3. Partial Derivatives Fall 2022 5 / 75


Examples
p
• Find the domain and range of g (x, y ) = 9 − x 2 − y 2.
Solution: The domain of g is

D = {(x, y )| 9 − x 2 − y 2 ≥ 0} = {(x, y )| x 2 + y 2 ≤ 9}

which is the disk with center (0, 0) and radius 3. The range of g
is p
{z| z = 9 − x 2 − y 2 , (x, y ) ∈ D} = [0, 3].
• Find the domain of f (x, y , z) = ln(z − y ) + xy sin z.
Solution: The expression for f (x, y , z) is defined as long as
z − y > 0, so the domain of f is

D = {(x, y , z)|z > y }


This is a half-space consisting of all points that lie above the
plane z = y .
Nguyễn Anh Tú [email protected] 3. Partial Derivatives Fall 2022 6 / 75
Graphs
If f is a function of two variables with domain D, then the graph of
f is the set
{(x, y , f (x, y )) | (x, y ) ∈ D}.

Examples: Sketch
p the graphs of f (x, y ) = 2 − x + 2y and
g (x, y ) = − 4 − x 2 − y 2 .

Nguyễn Anh Tú [email protected] 3. Partial Derivatives Fall 2022 7 / 75


Functions of Two Variables

Nguyễn Anh Tú [email protected] 3. Partial Derivatives Fall 2022 8 / 75


Level Curves

Let k belong to the range of f . The level curve of f (x, y ) at level k


is the set of points satisfying the equation f (x, y ) = k. .

Nguyễn Anh Tú [email protected] 3. Partial Derivatives Fall 2022 9 / 75


Level Curves

World mean sea-level temperatures in degrees Celsius


Nguyễn Anh Tú [email protected] 3. Partial Derivatives Fall 2022 10 / 75
Example
Sketch some level curves of the function h(x, y ) = 4x 2 + y 2 .
Solution: The level curves are
x2 y2
4x 2 + y 2 = k or + = 1, k > 0,
k/4 k
√ √
which describes a family of ellipses with semiaxes k/2 and k.

Nguyễn Anh Tú [email protected] 3. Partial Derivatives Fall 2022 11 / 75


Functions of Two Variables

Nguyễn Anh Tú [email protected] 3. Partial Derivatives Fall 2022 12 / 75


Functions of Three or More Variables

• A function of three variables f is a rule that assigns to each


ordered triple (x, y , z) in a domain D ⊂ R3 a unique real
number denoted by f (x, y , z).
• The set of points (x, y , z) in space where a function of three
independent variables has a constant value f (x, y , z) = k is
called a level surface of f .

Nguyễn Anh Tú [email protected] 3. Partial Derivatives Fall 2022 13 / 75


Example
p
• If f (x, y , z) = x 2 + y 2 + z 2 , then for k > 0, the level surface
of f is a sphere of radius kcentered at the origin.
p
• The level surface x 2 + y 2 + z 2 = 0 consists of the origin alone.

Nguyễn Anh Tú [email protected] 3. Partial Derivatives Fall 2022 14 / 75


Functions of Three or More Variables

• A function f of n variables is a rule that assigns to each point


(x1 , x2 , ..., xn ) in a domain D ⊂ Rn a unique real number
denoted by f (x1 , x2 , ..., xn ).
• For example, if a company uses n different ingredients in making
a food product, ci is the cost per unit of the ith ingredient, and
xi units of the ith ingredient are used, then the total cost of the
ingredients is a function of n the variables x1 , x2 , ..., xn :

f (x1 , x2 , ..., xn ) = c1 x1 + c2 x2 + · · · + cn xn .

Nguyễn Anh Tú [email protected] 3. Partial Derivatives Fall 2022 15 / 75


Section 2

Limits and Continuity

Nguyễn Anh Tú [email protected] 3. Partial Derivatives Fall 2022 16 / 75


Limits
• Let f be a function of two variables whose domain D includes
points arbitrarily close to (a, b). Then we say that the limit of
f (x, y ) as (x, y ) approaches (a, b) is L and we write
lim f (x, y ) = L
(x,y )→(a,b)

if for every number ϵ > 0 there ispa corresponding number δ > 0


such that if (x, y ) ∈ D and 0 < (x − a)2 + (y − b)2 < δ then
|f (x, y ) − L| < ϵ.
• Other notations for the limit are
lim f (x, y ) = L
x→a
y →b

and
f (x, y ) → L as (x, y ) → (a, b).
Nguyễn Anh Tú [email protected] 3. Partial Derivatives Fall 2022 17 / 75
Limits
• If the limit exists, then f (x, y ) must approach L no matter how
(x, y ) approaches (a, b)
• For functions of a single variable, when we let x approach a,
there are only two possible directions of approach, from the left
or from the right.
• For functions of two variables the situation is not as simple
because we can let (x, y ) approach (a, b) from an infinite
number of directions.

Nguyễn Anh Tú [email protected] 3. Partial Derivatives Fall 2022 18 / 75


Two-Path Test for Discontinuity
If f (x, y ) → L1 as (x, y ) → (a, b) along a path C1 and f (x, y ) → L2
as (x, y ) → (a, b) along a path C2 , where L1 ̸= L2 , then
lim f (x, y ) does not exist.
(x,y )→(a,b)

xy
Example: If f (x, y ) = x 2 +y 2
, does lim(x,y )→(0,0) f (x, y ) exist?
Solution: If y = 0, then f (x, 0) = 0/x 2 = 0. Therefore,

f (x, y ) → 0 as (x, y ) → (0, 0) along the x-axis.


x2
But for x ̸= 0 and y = x, f (x, x) = (1+1)x 2
= 21 . Therefore,

1
f (x, y ) → as (x, y ) → (0, 0) along y = x.
2
Thus, lim(x,y )→(0,0) f (x, y ) doesn’t exist.
Nguyễn Anh Tú [email protected] 3. Partial Derivatives Fall 2022 19 / 75
Example
xy 2
If f (x, y ) = x 2 +y 4
, does lim(x,y )→(0,0) f (x, y ) exist?
Solution: For x = 0 and y ̸= 0,
0
f (x, y ) = f (0, y ) = =0
y4

so f (x, y ) → 0 as (x, y ) → (0, 0) along the y -axis.


If we now let (x, y ) → (0, 0) along the parabola x = y 2 , we have

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

so f (x, y ) → 12 as (x, y ) → (0, 0) along x = y 2 . Thus the given limit


does not exist.

Nguyễn Anh Tú [email protected] 3. Partial Derivatives Fall 2022 20 / 75


Properties of Limits
Important properties of limit of functions of one variable carry over to
functions of two or more variables:
• The limit of a sum is the sum of the limits
• The limit of a product is the product of the limits, etc.
• The Squeeze Theorem also holds.
2
Example: Find lim(x,y )→(0,0) x 2x+yy 2 if it exists.
Solution: We have x 2 ≤ x 2 + y 2 , so x 2 /(x 2 + y 2 ) ≤ 1 and therefore,

x 2y x2
0≤ = |y | ≤ |y | → 0 as (x, y ) → (0, 0).
x2 + y2 x2 + y2
By the Squeeze Theorem,
x 2y
lim = 0.
(x,y )→(0,0) x 2 + y 2

Nguyễn Anh Tú [email protected] 3. Partial Derivatives Fall 2022 21 / 75


Continuity
• A function f of two variables is called continuous at (a, b) if

lim f (x, y ) = f (a, b).


(x,y )→(a,b)

We say f is continuous on D if f is continuous at every point


in D.
• Thus the graph of a continuous function has no hole or tear.
• Using the properties of limits, we can see that the sum,
difference, product, and quotient of continuous functions are
continuous on their domains.
• In particular, polynomials (e.g. x 2 y 3 − 3xy + y − 4) of two
variables is continuous everywhere. And a rational function
P(x,y )
Q(x,y )
, where P, are polynomials, is continuous where Q ̸= 0.

Nguyễn Anh Tú [email protected] 3. Partial Derivatives Fall 2022 22 / 75


Examples
1 Let (
xy
x 2 +y 2
if (x, y ) ̸= (0, 0)
g (x, y ) =
0 if (x, y ) = (0, 0).
xy
Then g is discontinuous at (0, 0) because lim 2 2 does
(x,y )→(0,0) x +y
not exist.
Since g is a rational function, it is continuous on its domain,
which is the set D = {(x, y )| (x, y ) ̸= (0, 0)}.
2 Let ( 2
x y
x 2 +y 2
if (x, y ) ̸= (0, 0)
h(x, y ) =
0 if (x, y ) = (0, 0).
We have seen that
x 2y
lim h(x, y ) = lim = 0.
(x,y )→(0,0) (x,y )→(0,0) x 2 + y 2

As h(0, 0) = 0, h is continuous at (0, 0), hence everywhere.


Nguyễn Anh Tú [email protected] 3. Partial Derivatives Fall 2022 23 / 75
Composition of Continuous Functions

• Composition of continuous functions are continuous.


• For example, if f (x, y ) is a continuous function of x and y , and
g (z) is a continuous function of z, then the composite
w = g (f (x, y )) is continuous.
• Thus, the following functions are continuous on their domains of
definition
xy 2
cos 2 , ln(x 2 + y 2 + 1)
x +1

Nguyễn Anh Tú [email protected] 3. Partial Derivatives Fall 2022 24 / 75


Functions of Three Variables

• Everything that we have done in this section can be extended to


functions of three or more variables. For instance, the notation

lim f (x, y , z) = L
(x,y ,z)→(a,b,c)

means that the values of f (x, y , z) approach the number L as


the point (x, y , z) approaches the point (a, b, c) along any path
in the domain of f .
• The function f is continuous at (a, b, c) if

lim f (x, y , z) = f (a, b, c).


(x,y ,z)→(a,b,c)

Nguyễn Anh Tú [email protected] 3. Partial Derivatives Fall 2022 25 / 75


Section 3

Partial Derivatives

Nguyễn Anh Tú [email protected] 3. Partial Derivatives Fall 2022 26 / 75


Partial Derivatives
• Consider a function f (x, y ) near a point (a, b). If we fix y = b
and vary x, then we obtain a function of a single variable x,
namely,
g (x) = f (x, b).
• If g ′ (a) exists, then we define the partial derivative of f with
respect to x at (a, b) by

fx (a, b) = g ′ (a).

• Thus
g (a + h) − g (a)
fx (a, b) = g ′ (a) = lim
h→0 h
and so
f (a + h, b) − f (a, b)
fx (a, b) = lim
h→0 h

Nguyễn Anh Tú [email protected] 3. Partial Derivatives Fall 2022 27 / 75


Partial Derivatives
• Similarly, the partial derivative of f with respect to y at
(a, b ), denoted by fy (a, b), is obtained by keeping x fixed,
x = a, and finding the ordinary derivative at b of the function
g (y ) = f (a, y ):
f (a, b + h) − f (a, b)
fy (a, b) = lim
h→0 h
• Partial derivatives can also be interpreted as rates of change.
fx (x, y ), represents the rate of change of f in the x direction.
Similarly, fy (x, y ), represents the rate of change of f in the y
direction.
Notations: If z = f (x, y ), we write
∂f ∂
fx (x, y ) = fx = = f (x, y )
∂x ∂x
∂f ∂
fy (x, y ) = fy = = f (x, y ).
∂y ∂y
Nguyễn Anh Tú [email protected] 3. Partial Derivatives Fall 2022 28 / 75
Example
Find the values of ∂f /∂x and ∂f /∂y at the point (4, −5) if

f (x, y ) = x 2 + 3xy + y − 1.

Solution: To find ∂f /∂x, we regard y as a constant and differentiate


with respect to x:
∂f ∂ 2
= (x + 3xy + y − 1) = 2x + 3y + 0 − 0 = 2x + 3y .
∂x ∂x
Thus, fx (4, −5) = 2(4) + 3(−5) = −7.
To find ∂f /∂y , we regard x as a constant and differentiate with
respect to y :
∂f ∂ 2
= (x + 3xy + y − 1) = 0 + 3x + 1 − 0 = 3x + 1.
∂y ∂y
Thus, fy (4, −5) = 3(4) + 1 = 13.
Nguyễn Anh Tú [email protected] 3. Partial Derivatives Fall 2022 29 / 75
Partial Derivatives

• The partial derivatives fx (a, b) and fy (a, b) can be interpreted


geometrically as the slopes of the tangent lines at
P(a, b, f (a, b)) to the traces C1 and C2 of the surface
z = f (x, y ) in the planes y = b and x = a.

Nguyễn Anh Tú [email protected] 3. Partial Derivatives Fall 2022 30 / 75


Example
If f (x, y ) = 4 − x 2 − 2y 2 , find fx (1, 1) and fy (1, 1) and interpret
these numbers as slopes.
Solution: We have fx (x, y ) = −2x and fy (x, y ) = −4y . The graph of
f is a paraboloid which intersects the vertical plane y = 1 along the
parabola z = 2 − x 2 , y = 1. The slope of the tangent line to this
parabola at the point (1, 1, 1) is fx (1, 1) = −2.
Similarly, the plane x = 1 intersects the paraboloid along the
parabola z = 3 − 2y 2 , x = 1 and the slope of the tangent line at
(1, 1, 1) is fy (1, 1) = −4.

Nguyễn Anh Tú [email protected] 3. Partial Derivatives Fall 2022 31 / 75


Partial Derivatives
• Partial derivatives can also be defined for functions of three or
more variables. For example, if f is a function of three variables
x, y , and z, then its partial derivative with respect to x is
defined as
f (x + h, y , z) − f (x, y , z)
fx (x, y , z) = lim
h→0 h
and it is found by regarding y and z as constants and
differentiating f (x, y , z) with respect to x.
• In general, if u is a function of n variables, u = f (x1 , x2 , ..., xn ),
its partial derivative with respect to the ith variable xi is
∂u f (x1 , ..., xi−1 , xi + h, xi+1 , ..., xn ) − f (x1 , ..., xi , ..., xn )
= lim
∂xi h→0 h
and we also write
∂u ∂f
= = fxi = Di f .
∂xi ∂xi
Nguyễn Anh Tú [email protected] 3. Partial Derivatives Fall 2022 32 / 75
Examples

• If resistors of R1 , R2 , and R3 ohms are connected in parallel to


make an R ohms resistor, the value of R can be found from the
equation
1 1 1 1
= + + .
R R1 R2 R3
∂R
Find the value of ∂R 2
when R1 = 30, R2 = 45, and R3 = 90
ohms.
• Find fx , fy and fz if f (x, y , z) = e x+yz ln(z + xy )

Nguyễn Anh Tú [email protected] 3. Partial Derivatives Fall 2022 33 / 75


Higher Order Partial Derivatives
• If f is a function of two variables, then its partial derivatives fx
and fy are also functions of two variables,
  so we can  consider
their partial derivatives fx x , fx y , fy x , and fy y , which are
called the second order partial derivatives of f .
• We use the following notation:
 ∂  ∂f  ∂ 2 f
fxx = fx x = = 2
∂x ∂x ∂x
 ∂  ∂f  ∂ 2f
fxy = fx y = =
∂y ∂x ∂y ∂x
 ∂ ∂f
  ∂ 2f
fyx = fy x = =
∂x ∂y ∂x∂y
• Partial derivatives of order 3 or higher can be defined similarly.
For instance,
 ∂  ∂ 2f  ∂ 3f
fyxx = fyx x = = 2
∂x ∂x∂y ∂ x∂y
Nguyễn Anh Tú [email protected] 3. Partial Derivatives Fall 2022 34 / 75
Example

Find the second partial derivatives of f (x, y ) = x cos y + ye x .


Solution:
∂f ∂ 2f
= cos y + ye x = ye x
∂x ∂x 2
∂f ∂ 2f
= −x sin y + e x = −x cos y
∂y ∂y 2
∂ 2f ∂ 2f
= − sin y + e x = − sin y + e x .
∂x∂y ∂y ∂x

Nguyễn Anh Tú [email protected] 3. Partial Derivatives Fall 2022 35 / 75


Clairaut’s Theorem
Suppose that f is defined on a disk D and the functions fxy and fyx
are both continuous on D, then

fxy (x, y ) = fyx (x, y ).

Clairaut’s Theorem also holds for higher order derivatives, e.g.

fyxx = fxyx = fxxy

if these functions are continuous.

Nguyễn Anh Tú [email protected] 3. Partial Derivatives Fall 2022 36 / 75


Tangent Plane
• Suppose f is differentiable at (x0 , y0 ). The linearization of a
function f at a point (a, b) where f is differentiable is the
function
L(x, y ) = f (a, b) + fx (a, b)(x − a) + fy (a, b)(y − b)
• The graph of L(x, y ) is the tangent plane to the surface
z = f (x, y ) at P(x0 , y0 , f (x0 , y0 )). It is the plane
z − z0 = fx (x0 , y0 )(x − x0 ) + fy (x0 , y0 )(y − y0 )

Nguyễn Anh Tú [email protected] 3. Partial Derivatives Fall 2022 37 / 75


Example
Show that f (x, y ) = xe xy is differentiable at (1, 0) and find its
linearization there. Then use it to approximate f (1.1, −0.1).
Solution: The partial derivatives are
fx (x, y ) = e xy + xye xy fy (x, y ) = x 2 e xy
fx (1, 0) = 1 fy (1, 0) = 1
Both fx and fy are continuous functions, so f is differentiable. The
linearization is
L(x, y ) = f (1, 0) + fx (1, 0)(x − 1) + fy (1, 0)(y − 0)
= 1 + 1(x − 1) + 1(y − 0) = x + y .
The corresponding linear approximation is xe xy ≈ x + y so

f (1.1, −0.1) ≈ 1.1 − 0.1 = 1.

Compare this with the actual value of f (1.1, −0.1) = 0.98542.


Nguyễn Anh Tú [email protected] 3. Partial Derivatives Fall 2022 38 / 75
Section 4

Chain Rule

Nguyễn Anh Tú [email protected] 3. Partial Derivatives Fall 2022 39 / 75


Chain Rule - I
If f (x, y ) is a differentiable function and x(t) and y (t) are
differentiable functions of t, then z(t) = f (x(t), y (t)) is a
differentiable function of t and

dz ∂f dx ∂f dy
= +
dt ∂x dt ∂y dt

Example If f (x, y ) = x 2 y + 3xy 4 , where x = sin 2t and y = cos t,


find dz/dt when t = 0.
Solution: The Chain Rule gives
dz
= (2xy + 3y 4 )2 cos 2t + (x 2 + 12xy 3 )(− sin t).
dt
When t = 0, we have x = sin 0 = 0 and y = cos 0 = 1. Therefore,
z ′ (0) = (0 + 3)2 + (0 + 0)(− sin 0) = 6.
Nguyễn Anh Tú [email protected] 3. Partial Derivatives Fall 2022 40 / 75
Chain Rule - II
Suppose that f (x, y ) is a differentiable function and x(s, t) and
y (s, t) are differentiable functions of s and t. Let
z(s, t) = f (x(s, t), y (s, t)). Then

∂z ∂f ∂x ∂f ∂y ∂z ∂f ∂x ∂f ∂y
= + = +
∂s ∂x ∂s ∂y ∂s ∂t ∂x ∂t ∂y ∂t

• Notice that the formula has one term for each of intermediate
variables x and y

Nguyễn Anh Tú [email protected] 3. Partial Derivatives Fall 2022 41 / 75


Example

Compute ∂w /∂r and ∂w /∂s if

w = x 2 + y 2, x = r − s, y = r + s.

Solution:
∂w ∂w ∂x ∂w ∂y
= + = (2x)(1) + (2y )(1)
∂r ∂x ∂r ∂y ∂r
= 2(r − s) + 2(r + s) = 4r ;
∂w ∂w ∂x ∂w ∂y
= + = (2x)(−1) + (2y )(1)
∂s ∂x ∂s ∂y ∂s
= −2(r − s) + 2(r + s) = 4s.

Nguyễn Anh Tú [email protected] 3. Partial Derivatives Fall 2022 42 / 75


Chain Rule - III
Suppose that u is a differentiable function of the n variables
x1 , x2 , ..., xn , and each xj is a differentiable function of the m variables
t1 , t2 , ..., tm . Then u is a function of t1 , t2 , ..., tm , and

∂u ∂u ∂x1 ∂u ∂x2 ∂u ∂xn


= + + ··· +
∂ti ∂x1 ∂ti ∂x2 ∂ti ∂xn ∂ti

for each i = 1, 2, ..., m.

Nguyễn Anh Tú [email protected] 3. Partial Derivatives Fall 2022 43 / 75


Example
If f and g are twice differentiable functions of one variable, show that

w = f (x − ct) + g (x + ct)

satisfies the partial differential equation

∂ 2w 2
2∂ w
= c .
∂t 2 ∂x 2
Solution: Using the Chain Rule we get
∂w ∂w
= −cf ′ (x − ct) + cg ′ (x + ct), = f ′ (x − ct) + g ′ (x + ct),
∂t ∂x
∂ 2w 2 ′ 2 ′ ∂ 2w
= c f (x − ct) + c g (x + ct), = f ′′ (x − ct) + g ′′ (x + ct).
∂t 2 ∂x 2
Thus w satisfies the given partial differential equation.
Nguyễn Anh Tú [email protected] 3. Partial Derivatives Fall 2022 44 / 75
Section 5

Directional Derivatives - Gradient Vector

Nguyễn Anh Tú [email protected] 3. Partial Derivatives Fall 2022 45 / 75


Directional Derivatives
• The directional derivative of f at (x, y ) in the direction of a
unit vector u = ⟨a, b⟩ is

f (x + ha, y + hb) − f (x, y )


Du f (x, y ) = lim
h→0 h
if this limit exists.
• In particular, D⟨1,0⟩ f = fx and D⟨0,1⟩ f = fy .

Nguyễn Anh Tú [email protected] 3. Partial Derivatives Fall 2022 46 / 75


Gradient Vector
If f is a function of two variables x and y , then the gradient vector
of f is the vector function ∇f defined by

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

Theorem
If f is a differentiable function of x and y , then f has a directional
derivative in any direction and if u = ⟨a, b⟩ then

Du f (x, y ) = ∇f (x, y )·u = fx (x, y )a + fy (x, y )b.

Example: Find the directional derivative of the function


f (x, y ) = x 2 y 3 − 4y at the point (2, −1) in the direction of the
vector v = 2i + 5j .

Nguyễn Anh Tú [email protected] 3. Partial Derivatives Fall 2022 47 / 75


Functions of Three Variables
• 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
if this limit exists.
• The gradient vector of f is

∇f (x, y , z) = ⟨fx (x, y , z), fy (x, y , z), fz (x, y , z)⟩

or,
∇f = ⟨fx , fy , fz ⟩
• We have
Du f (x, y , z) = ∇f (x, y , z)·u

Nguyễn Anh Tú [email protected] 3. Partial Derivatives Fall 2022 48 / 75


Example
Find the derivative of f (x, y , z) = x 3 − xy 2 − z at (1, 1, 0) in the
direction of a = ⟨2, −3, 6⟩.
Solution: The direction of a is
a 2 3 6
u= = i − j + k.
|a| 7 7 7
The partial derivatives of f are
fx = 3x 2 − y 2 fx (1, 1, 0) = 2
fy = −2xy fx (1, 1, 0) = −2
fz = −1 fy (1, 1, 0) = −1

Thus, ∇f (1, 1, 0) = 2i − 2j − k and so


2  3 6 4
Du f (1, 1, 0) = ∇f (1, 1, 0)·u = 2 + (−2) − + (−1) = .
7 7 7 7
Nguyễn Anh Tú [email protected] 3. Partial Derivatives Fall 2022 49 / 75
Properties of the Directional Derivative

1. Du f attains the maximum value |∇f | when u is the direction of


∇f . The function f increases most rapidly in this direction.
2. Du f attains the minimum value −|∇f | when u is the direction
of −∇f . The function f increases most rapidly in this direction.

Examples: Let f (x, y ) = xe y . At the point P(2, 0), what direction


does f have the maximum rate of change? What is this maximum
rate of change?

Nguyễn Anh Tú [email protected] 3. Partial Derivatives Fall 2022 50 / 75


Example
Suppose that the temperature at a point (x, y , z) in space is given by
T (x, y , z) = 80/(1 + x 2 + 2y 2 + 3z 2 ) where T is measured in
degrees Celsius and x, y ,z in meters. In which direction does the
temperature increase fastest at the point (1, 1, −2)? What is the
maximum rate of increase?
Solution: The gradient of T is
160
∇T = − (x i + 2y j + 3z k ).
(1 + x 2 + 2y 2 + 3z 2 )2
5
∇T (1, 1, −2) = (−i − 2j + 6k ).
8

√ in the direction of ∇T (1, 1, −2)


The temperature increases fastest
which is u = (−i − 2j + 6k )/ 41. The√maximum rate of increase is
|∇T (1, 1, −2)| = 58 | − i − 2j + 6k | = 5 841 ≈ 4◦ C/m.

Nguyễn Anh Tú [email protected] 3. Partial Derivatives Fall 2022 51 / 75


Gradient Vector and Level Curves
• At a point P(x0 , y0 ) in the domain of a differentiable function
f (x, y ), the gradient ∇f (P) is normal to the level curve through
P.
• The normal line to the level curve f (x, y ) = f (P) at the point
P is
x = x0 + Fx (P)t, y = y0 + Fy (P)t.
• The tangent line to the level curve f (x, y ) = f (P) at the point
P is
fx (P)(x − x0 ) + fy (P)(y − y0 ) = 0

Nguyễn Anh Tú [email protected] 3. Partial Derivatives Fall 2022 52 / 75


Gradient Vector and Level Surfaces
• At a point P(x0 , y0 , z0 ) in the domain of a differentiable function
f (x, y , z), the gradient ∇f (P) is normal to the level surface
through P.
• The normal line of the surface at P(x0 , y0 , z0 ) is the line
x = x0 + Fx (P)t, y = y0 + Fy (P)t, z = z0 + Fz (P)t
• The tangent plane at the point P(x0 , y0 , z0 ) on the level
surface F (x, y , z) = k is the plane
Fx (P)(x − x0 ) + Fy (P)(y − y0 ) + Fz (P)(z − z0 ) = 0

Nguyễn Anh Tú [email protected] 3. Partial Derivatives Fall 2022 53 / 75


Examples

1 Find an equation for the tangent line at a point (x0 , y0 ) of the


ellipse
x2 y2
+ =1
a2 b 2
2 Find the equations of the tangent plane and the normal line to
the ellipsoid
x2 z2
+ y2 + =3
4 9
at the point (−2, 1, −3)

Nguyễn Anh Tú [email protected] 3. Partial Derivatives Fall 2022 54 / 75


Section 6

Maximum and Minimum

Nguyễn Anh Tú [email protected] 3. Partial Derivatives Fall 2022 55 / 75


Maximum and Minimum
• If f (x, y ) ≤ f (a, b) for (x, y ) near (a, b), then f has a local
maximum at (a, b) and f (a, b) is a local maximum value of
f.
If f (x, y ) ≥ f (a, b) for (x, y ) near (a, b), then f has a local
minimum at (a, b) and f (a, b) is a local minimum value of f .
• If f (x, y ) ≤ f (a, b) for all (x, y ) in the domain of f , then f has
an absolute maximum at (a, b).
If f (x, y ) ≥ f (a, b) for all (x, y ) in the domain of f , then f has
an absolute minimum at (a, b).

Nguyễn Anh Tú [email protected] 3. Partial Derivatives Fall 2022 56 / 75


First Derivative Test
Let f be defined on a domain D. Suppose that f has a local
maximum or minimum at an interior point (a, b) of D, and that the
first-order partial derivatives of f exist. Then

∇f (a, b) = 0,

i.e.
fx (a, b) = 0 fy (a, b) = 0.
(This is an analogue of Fermat’s theorem for function of one
variable.)

Definition
An interior point (a, b) of the domain of a function f (x, y ) is called a
critical point of f if ∇f (a, b) = 0, or if one the partial derivative of
f at (a, b) does not exist.
Nguyễn Anh Tú [email protected] 3. Partial Derivatives Fall 2022 57 / 75
Example
Find the extreme values of f (x, y ) = x 2 + y 2 − 2x − 6y + 14.
Solution:
• Since fx = 2x − 2 and fy = 2y − 6, the only critical point is
(1, 3).
• Writing
f (x, y ) = (x − 1)2 + (y − 3)2 + 4,
we see that f has absolute minimum at (1, 3).
• Thus f has absolute minimum value 4 and no maximum value.

Nguyễn Anh Tú [email protected] 3. Partial Derivatives Fall 2022 58 / 75


Example
Find the extreme values of f (x, y ) = y 2 − x 2 .
Solution:
• Since fx = −2x and fy = 2y , the only critical point is (0, 0).
• We have so f (x, 0) = −x 2 < 0 if x ̸= 0 and f (0, y ) = y 2 > 0 if
y ̸= 0.
• Thus every disk with center (0, 0) contains points where f takes
positive values as well as points where f takes negative values.
• Therefore (0, 0) can’t be an extreme point of f , hence f has no
extreme value.

Nguyễn Anh Tú [email protected] 3. Partial Derivatives Fall 2022 59 / 75


Second Derivative Test
Suppose that the second partial derivatives of f are continuous near
(a, b) which is a critical point of f (i.e. fx (a, b) = 0 and fy (a, b) = 0).
Let
D = D(a, b) = fxx (a, b)fyy (a, b) − fxy2 (a, b).
(a) If D > 0 and fxx (a, b) > 0, then f (a, b) is a local minimum.
(b) If D > 0 and fxx (a, b) < 0, then f (a, b) is a local maximum.
(c) If D < 0, then (a, b) is a saddle point.

Example Find the local maximum and minimum values and saddle
points of f (x, y ) = x 4 + y 4 − 4xy + 1.
Solution: We first locate the critical points. Solving

fx = 4x 3 − 4y = 0, fy = 4y 3 − 4x = 0

gives x = 0, x = 1, x = −1. The three critical points are


(0, 0), (1, 1), and (−1, −1).
Nguyễn Anh Tú [email protected] 3. Partial Derivatives Fall 2022 60 / 75
• Next we calculate the second partial derivatives and D(x, y ):
fxx = 12x 2 , fyy = 12y 2 , fxy = −4
 2
D(x, y ) = fxx fyy − fxy = 144x 2 y 2 − 16.
• Since D(0, 0) = −16 < 0, the origin is a saddle point.
• Since D(1, 1) = 128 > 0 and fxx (1, 1) = 12 > 0, f (1, 1) = −1 is
a local min.
• Similarly, we have D(−1, −1) = 128 > 0, and
fxx (−1, −1) = 12 > 0, so f (−1, −1) = −1 is also a local
minimum.

Nguyễn Anh Tú [email protected] 3. Partial Derivatives Fall 2022 61 / 75


Absolute Maximum and Minimum

• We will look at methods to find absolute maximum and


minimum of f on a bounded, closed set.
• A bounded set in R2 is one that is contained within some disk.
• (a, b) is a boundary point of D if every disk centered at (a, b)
contains points in D and points not in D. (The point (a, b) itself
needs not belong to D.
• A closed set in R2 is one that contains all its boundary points.

Nguyễn Anh Tú [email protected] 3. Partial Derivatives Fall 2022 62 / 75


Extreme Value Theorem
If f is continuous on a closed, bounded set D in R2 , then f attains
an absolute maximum value f (x1 , y1 ) and an absolute minimum value
f (x2 , y2 ) at some points (x1 , y1 ) and (x2 , y2 ) in D.

Method to find Maximum and Minimum


To find the absolute maximum and minimum values of a continuous
function f on a closed, bounded set D:
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. The largest of the values from steps 1 and 2 is the absolute
maximum value; the smallest of these values is the absolute
minimum value.

Nguyễn Anh Tú [email protected] 3. Partial Derivatives Fall 2022 63 / 75


Example
Find the extreme values of the function f (x, y ) = x 2 − 2xy + 2y on
the rectangle D = [0, 3] × [0, 2].
Solution:
• We have fx (x, y ) = 2x − 2y and fy (x, y ) = −2x + 2. So one
critical point (1, 1).

• On L1 , f (x, 0) = x 2 . Minimum value is f (0, 0) = 0 and


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

Nguyễn Anh Tú [email protected] 3. Partial Derivatives Fall 2022 64 / 75


• On L2 , f (3, y ) = 9 − 4y . Minimum value is f (3, 2) = 1 and
maximum value is f (3, 0) = 9.
• On L3 , f (x, 2) = x 2 − 4x + 4. Minimum value is f (2, 2) = 0 and
maximum value is f (0, 2) = 4.
• On L4 , f (0, y ) = 2y . Minimum value is f (0, 0) = 0 and
maximum value is f (0, 2) = 4.
• Compare these values with f (1, 1) = 1, we conclude that the
absolute maximum value of f on D is f (3, 0) = 9 and the
absolute minimum value is f (0, 0) = f (2, 2) = 0.

Nguyễn Anh Tú [email protected] 3. Partial Derivatives Fall 2022 65 / 75


Example

Find the extreme values of the function f (x, y ) = x 2 ye −(x+y ) on the


triangular region T given by x ≥ 0, y ≥ 0, and x + y ≤ 4.
Solution: First, we look for critical points

0 = fx (x, y ) = xy (2 − x)e −(x+y ) ⇐⇒ x = 0, y = 0, or x = 2,


0 = fy (x, y ) = x 2 (1 − y )e −(x+y ) ⇐⇒ x = 0, or y = 1.

Only (2, 1) is an interior point of T , so the critical point (2, 1). We


have f (2, 1) = 4/e 3 ≈ 0.199. The boundary of T consists of three
straight line segments. On two of these, the coordinate axes, f is
identically zero. The third segment is given by y = 4 − x, 0 ≤ x ≤ 4,
so the values of f on this segment can be expressed as a function of
x alone:

Nguyễn Anh Tú [email protected] 3. Partial Derivatives Fall 2022 66 / 75


Maximum and Minimum

g (x) = f (x, 4 − x) = x 2 (4 − x)e −4 , 0 ≤ x ≤ 4.


Note that g (0) = g (4) = 0 and g (x) > 0 if 0 < x < 4.
g ′ (x) = (8x − 3x 2 )e −4 , so g has only one critical point x = 8/3. We
have
8  8 4  256
g =f , = e −4 ≈ 0.174 < 0.199 = f (2, 1).
3 3 3 27
Thus the maximum value of f over the region T is 4/e 3 and that it
occurs at the interior critical point (2, 1). The minimum value of f is
zero and occurs at all points of two perpendicular boundary segments.

Nguyễn Anh Tú [email protected] 3. Partial Derivatives Fall 2022 67 / 75


Section 7

Lagrange Multipliers

Nguyễn Anh Tú [email protected] 3. Partial Derivatives Fall 2022 68 / 75


Lagrange Multipliers for Functions of Two Variables
• In this section we present Lagrange’s method for maximizing or
minimizing a general function f (x, y ) subject to a constraint of
the form g (x, y ) = k.
• To maximize f (x, y ) subject to g (x, y ) = k is to find the largest
value of c such that the level curve f (x, y ) = c intersects
g (x, y ) = k.

• This happens when these curves just touch each other.


Nguyễn Anh Tú [email protected] 3. Partial Derivatives Fall 2022 69 / 75
Lagrange Multipliers for Functions of Two Variables
• The normal lines at the point (x0 , y0 ) where they touch are
identical.
• So the gradient vectors are parallel, that is,
∇f (x0 , y0 ) = λ∇g (x0 , y0 ) for some scalar λ.
Method of Lagrange Multipliers
To find the extreme values of f (x, y ) subject to the constraint
g (x, y ) = k,
1 Find values of x, y , and λ such that

∇f (x, y ) = λ∇g (x, y ) and g (x, y ) = k.

(This amounts to solving three equations in three unknowns


fx (x, y ) = λgx (x, y ), fy (x, y ) = λgy (x, y ) and g (x, y ) = k.)
2 Evaluate f at the points found in previous step to find maximum
and minimum.
Nguyễn Anh Tú [email protected] 3. Partial Derivatives Fall 2022 70 / 75
Example
Find the extreme values of f (x, y ) = x 2 + 2y 2 on the disk
x 2 + y 2 ≤ 1.
Solution:
• Since fx = 2x and fy = 4y , the only critical point is (0, 0).
• Next we apply the method of Lagrange multipliers to find the
extreme values of f on the circle x 2 + y 2 = 1.
• We solve the system
fx = λgx , fy = λgy , g (x, y ) = 1
or
2x = 2λx (1)
4y = 2λy (2)
x + y2 = 1
2
(3)
• The solutions are (0, 1), (0, −1), (1, 0) and (−1, 0).
Nguyễn Anh Tú [email protected] 3. Partial Derivatives Fall 2022 71 / 75
• Evaluating f at these points:
f (0, 1) = 2, f (0, −1) = 2, f (1, 0) = 1, f (−1, 0) = 1.
• Therefore the maximum value of f on the circle is f (0, ±1) = 2
and the minimum value is f (±1, 0) = 1.
• Comparing with f (0, 0) = 0, we find that the maximum value of
f on the disk x 2 + y 2 ≤ 1 is f (0, ±1) = 2 and the minimum
value is f (0, 0) = 0.

Nguyễn Anh Tú [email protected] 3. Partial Derivatives Fall 2022 72 / 75


Lagrange Multipliers for Functions of Three Variables

• The method applies to function of three variables as well. The


system to solve is

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

or equivalently,

fx (x, y , z) = λgx (x, y , z), fy (x, y , z) = λgy (x, y , z),


fz (x, y , z) = λgz (x, y , z) and g (x, y , z) = k.

• The number λ is called a Lagrange multiplier.

Nguyễn Anh Tú [email protected] 3. Partial Derivatives Fall 2022 73 / 75


Example
A rectangular box without a lid is to be made from 12 m2 of
cardboard. Find the maximum volume of such a box.
Solution: Let x, y , and z be the length, width, and height,
respectively, of the box in meters. Then we wish to maximize

V = xyz

subject to the constraint

g (x, y , z) = 2xz + 2yz + xy = 12.

We solve the equations

∇Vx = λ∇gx , ∇Vy = λ∇gy , ∇Vz = λ∇gz , g (x, y , z) = 12

Nguyễn Anh Tú [email protected] 3. Partial Derivatives Fall 2022 74 / 75


which are

yz = λ(2z + y ) (5)
xz = λ(2z + x) (6)
xy = λ(2x + 2y ) (7)
2xz + 2yz + xy = 12 (8)

Solving this system of equations yields x = 2, y = 2, and z = 1.

Nguyễn Anh Tú [email protected] 3. Partial Derivatives Fall 2022 75 / 75

You might also like