Chapter 11.
Partial Differentiation
Le Cong Nhan
Faculty of Applied Sciences
HCMC University of Technology and Education
November 21, 2020
Le Cong Nhan (Faculty of Applied SciencesChapter
HCMC University of Technology
11. Partial and Education)
Differentiation November 21, 2020 1 / 94
Content
1 Functions of Several Variables
2 Limits and Continuity
3 Partial Derivatives
4 Tangent planes, Approximations, and Differentiability
5 Chain Rules
6 Directional Derivatives and the Gradient
7 Extrema of Functions of Two Variables
8 Lagrange Multipliers
Le Cong Nhan (Faculty of Applied SciencesChapter
HCMC University of Technology
11. Partial and Education)
Differentiation November 21, 2020 2 / 94
11.1. Functions of Several Variables
Definition 1 (Function of two variables)
A function f of two variables is a rule that assigns to each ordered pair of
real numbers (x, y ) in a set D a unique real number f (x, y ). The set D is
called the domain of f and its range is the set of values that takes on, i.e.,
R = {f (x, y )|(x, y ) ∈ D} .
Notation. Function f of two variables
z = f (x, y )
The variables x and y are independent vari-
ables and z is the dependent variable.
Le Cong Nhan (Faculty of Applied SciencesChapter
HCMC University of Technology
11. Partial and Education)
Differentiation November 21, 2020 3 / 94
If a function f (x, y ) is given by a formula and no domain is specified, then
the domain of f
D = (x, y ) ∈ R2 : f (x, y ) is well-defined .
Example 2
For each of the following functions, evaluate f (3, 2) and find the domain
√
x +y +1
(b) f (x, y ) = x ln y 2 − x
(a) f (x, y ) =
x −1
Le Cong Nhan (Faculty of Applied SciencesChapter
HCMC University of Technology
11. Partial and Education)
Differentiation November 21, 2020 4 / 94
Graphs
Definition 3 (Graph of Functions of Two Variables)
If f is a function of two variables with domain D, then the graph of f
Gf = (x, y , z) ∈ R3 : z = f (x, y ) and (x, y ) ∈ D .
The graph of a function f of two variables is
a surface S with equation z = f (x, y ).
Le Cong Nhan (Faculty of Applied SciencesChapter
HCMC University of Technology
11. Partial and Education)
Differentiation November 21, 2020 5 / 94
Definition 4 (Level Curves)
The set of points (x, y ) in the xy -plane that satisfy f (x, y ) = k is called
the level curve of f at k, where k is a constant (in the range of f ).
Figure: Level curves Figure: Topographic map of
mountainous regions
Le Cong Nhan (Faculty of Applied SciencesChapter
HCMC University of Technology
11. Partial and Education)
Differentiation November 21, 2020 6 / 94
Figure: Global mean sea-level temperatures in January in degrees Celsius
Le Cong Nhan (Faculty of Applied SciencesChapter
HCMC University of Technology
11. Partial and Education)
Differentiation November 21, 2020 7 / 94
Example 5
A contour map for a function f is shown in figure below. Use it to
estimate the values of f (1, 3) and f (4, 5).
Le Cong Nhan (Faculty of Applied SciencesChapter
HCMC University of Technology
11. Partial and Education)
Differentiation November 21, 2020 8 / 94
Functions of Three or More Variables
Definition 6
A function of three variables f is a rule that
(x, y , z) ∈ D ⊂ R3 7→ f (x, y , z) ∈ R.
The temperature T at a point on the surface of the earth given by
T = f (x, y , t) ,
where x is the longitude, y is the lattitude and t is the time.
Le Cong Nhan (Faculty of Applied SciencesChapter
HCMC University of Technology
11. Partial and Education)
Differentiation November 21, 2020 9 / 94
Definition 7 (Level Surfaces)
If f is a function of three variables x, y and z, then he set of equation
f (x, y , z) = k is called the level surface of f at k, where k is a constant (in
the range of f ).
Figure: Level surfaces of function f (x, y , z) = x 2 + y 2 + z 2
Le Cong Nhan (Faculty of Applied SciencesChapter
HCMC University of Technology
11. Partial and Education)
Differentiation November 21, 2020 10 / 94
11.2 Limits and Continuity
Let us consider the behavior of the functions
sin(x 2 + y 2 )
f (x, y ) = as (x, y ) → (0, 0).
x2 + y2
Le Cong Nhan (Faculty of Applied SciencesChapter
HCMC University of Technology
11. Partial and Education)
Differentiation November 21, 2020 11 / 94
Let us consider the behavior of the functions
x2 − y2
g (x, y ) = as (x, y ) → (0, 0).
x2 + y2
Le Cong Nhan (Faculty of Applied SciencesChapter
HCMC University of Technology
11. Partial and Education)
Differentiation November 21, 2020 12 / 94
Limit of a function of two variables
Definition 8 (Limit of a function of two variables)
We write
lim f (x, y ) = L (1)
(x,y )→(x0 ,y0 )
to indicate that the value of f (x, y ) approaches the number L as the point
(x, y ) approaches the point (x0 , y0 ) along any path that stays within the
domain of f .
Other Notations:
lim f (x, y ) = L
x→x0
and f (x, y ) → L as (x, y ) → (x0 , y0 ).
y →y0
Le Cong Nhan (Faculty of Applied SciencesChapter
HCMC University of Technology
11. Partial and Education)
Differentiation November 21, 2020 13 / 94
Method to prove the limits of function does not exist
If f (x, y ) → L1 as (x, y ) → (x0 , y0 ) along a path C1 and f (x, y ) → L2 as
(x, y ) → (x0 , y0 ) along a path C2 , where L1 6= L2 , then
lim f (x, y ) does not exist.
(x,y )→(x0 ,y0 )
Limit Laws
The limit of a sum is the sum of the limits and it is similar with difference,
product and quotient.
Le Cong Nhan (Faculty of Applied SciencesChapter
HCMC University of Technology
11. Partial and Education)
Differentiation November 21, 2020 14 / 94
Example 9
Evaluate
x 2 + x − xy − y
x 2 + xy + y 2
a. lim b. lim
(x,y )→(0,0) (x,y )→(0,0) x −y
Le Cong Nhan (Faculty of Applied SciencesChapter
HCMC University of Technology
11. Partial and Education)
Differentiation November 21, 2020 15 / 94
Example 10
Show that the following limits do not exist
x2 − y2 xy
a. lim b. lim
(x,y )→(0,0) x 2 + y 2 (x,y )→(0,0) x 2 + y2
Le Cong Nhan (Faculty of Applied SciencesChapter
HCMC University of Technology
11. Partial and Education)
Differentiation November 21, 2020 16 / 94
Example 11
Find lim f (x, y ) if it exists, where
(x,y )→(0,0)
xy 2 3x 2 y
a. lim b. lim
(x,y )→(0,0) x 2 + y 4 (x,y )→(0,0) x 2 + y 2
Le Cong Nhan (Faculty of Applied SciencesChapter
HCMC University of Technology
11. Partial and Education)
Differentiation November 21, 2020 17 / 94
Continuity
Definition 12
A function f of two variables is called continuous at (x0 , y0 ) if
lim f (x, y ) = f (x0 , y0 ). (2)
(x,y )→(x0 ,y0 )
The function f is continuous on D if f is continuous at each point in D.
Example 13
Test the continuity of the functions
x −y 1
a. f (x, y ) = b. f (x, y ) =
x2 + y2 y − x2
Le Cong Nhan (Faculty of Applied SciencesChapter
HCMC University of Technology
11. Partial and Education)
Differentiation November 21, 2020 18 / 94
Example 14
Show that f is continuous at (0, 0) where
1
y sin
6 0
if x =
f (x, y ) = x
0 if x = 0
Le Cong Nhan (Faculty of Applied SciencesChapter
HCMC University of Technology
11. Partial and Education)
Differentiation November 21, 2020 19 / 94
Example 15
Show that f is continuous at (0, 0) where
3x 2 y
if (x, y ) 6= (0, 0)
2 2
f (x, y ) = x + y
0 if (x, y ) = (0, 0)
Le Cong Nhan (Faculty of Applied SciencesChapter
HCMC University of Technology
11. Partial and Education)
Differentiation November 21, 2020 20 / 94
Example 16
Test the continuity of g at (0, 0)
2
x − y2
if (x, y ) 6= (0, 0)
2 2
g (x, y ) = x + y
0 if (x, y ) = (0, 0)
Functions of Three or More Variables
Every that we have done with functions of two variables can be extended
to functions of three or more variables. For instance, a function f (x, y , z)
is said to be continuous at (x0 , y0 , z0 ) if
lim f (x, y , z) = f (x0 , y0 , z0 ). (3)
(x,y ,z)→(x0 ,y0 ,z0 )
Le Cong Nhan (Faculty of Applied SciencesChapter
HCMC University of Technology
11. Partial and Education)
Differentiation November 21, 2020 21 / 94
11.3 Partial Derivatives
Definition 17 (Partial derivatives)
If z = f (x, y ) be a function of two variables, its partial derivatives are the
functions fx and fy defined by
f (x + h, y ) − f (x, y )
fx (x, y ) = lim , (4)
h→0 h
f (x, y + h) − f (x, y )
fy (x, y ) = lim . (5)
h→0 h
Notation for Partial derivatives
∂f ∂f
zx = fx (x, y ) = (x, y ) = Dx f , zy = fy (x, y ) = (x, y ) = Dy f .
∂x ∂y
and
∂f ∂f
(x0 , y0 ) = fx (x0 , y0 ) and (x0 , y0 ) = fy (x0 , y0 ) .
∂x ∂y
Le Cong Nhan (Faculty of Applied SciencesChapter
HCMC University of Technology
11. Partial and Education)
Differentiation November 21, 2020 22 / 94
Rule for finding partial derivatives of z = f (x, y )
I To find fx , regard y as a constant and differentiate f (x, y ) with
respect to x.
I To find fy , regard x as a constant and differentiate f (x, y ) with
respect to y .
Example 18
If f (x, y ) = x 3 + x 2 y 2 − 2y 2 , find fx and fy .
Le Cong Nhan (Faculty of Applied SciencesChapter
HCMC University of Technology
11. Partial and Education)
Differentiation November 21, 2020 23 / 94
Example 19
∂z
Let z = x 2 sin 3x + y 3 . Evaluate
and zy at (1, 1).
∂x ( π ,0)
3
Le Cong Nhan (Faculty of Applied SciencesChapter
HCMC University of Technology
11. Partial and Education)
Differentiation November 21, 2020 24 / 94
Example 20
Find the first partial derivatives of the function
p x
a. f (x, y ) = ln x + x 2 + y 2 b. f (x, y ) = y 2 sin
y
Le Cong Nhan (Faculty of Applied SciencesChapter
HCMC University of Technology
11. Partial and Education)
Differentiation November 21, 2020 25 / 94
Example 21
Let f (x, y , z) = x 2 + 2xy 2 + yz 3 . Determine fx , fy and fz .
Le Cong Nhan (Faculty of Applied SciencesChapter
HCMC University of Technology
11. Partial and Education)
Differentiation November 21, 2020 26 / 94
Example 22
Show that the function z = ln x 2 + xy + y 2 satisfies the equation
xzx + yzy = 2.
Le Cong Nhan (Faculty of Applied SciencesChapter
HCMC University of Technology
11. Partial and Education)
Differentiation November 21, 2020 27 / 94
Example 23
Let z be defined implicitly as a function of x and y by the equation
x 2 z + yz 3 = x.
Determine ∂z/∂x and ∂z/∂y .
Le Cong Nhan (Faculty of Applied SciencesChapter
HCMC University of Technology
11. Partial and Education)
Differentiation November 21, 2020 28 / 94
Partial Derivative as a slope
Figure: Slope interpretation of partial derivative
Le Cong Nhan (Faculty of Applied SciencesChapter
HCMC University of Technology
11. Partial and Education)
Differentiation November 21, 2020 29 / 94
Example 24
Find the slope of the line that is parallel to the xz-plane and tangent to
√
the surface z = x x + y at the point P(1, 3, 2)
Le Cong Nhan (Faculty of Applied SciencesChapter
HCMC University of Technology
11. Partial and Education)
Differentiation November 21, 2020 30 / 94
Partial Derivative as a Rate
As the point (x, y ) moves from the fixed point P0 (x0 , y0 ), the function
f (x, y ) changes at a rate given by:
fx (x0 , y0 ) in the direction of the positive x-axis
fy (x0 , y0 ) in the direction of the positive y -axis.
Example 25
In an electric circuit with electromotive force (EMF) of E volts and resistance
R ohms, the current is I = E /R amperes. Find the partial derivatives ∂I /∂E
and ∂I /∂R at the instant when E = 120 and R = 15 and interpret these
derivatives as rates.
Le Cong Nhan (Faculty of Applied SciencesChapter
HCMC University of Technology
11. Partial and Education)
Differentiation November 21, 2020 31 / 94
High Derivatives
Given a function of two variables z = f (x, y )
Second order partial derivatives
∂2f
∂ ∂f
= = (fx )x = fxx
∂x 2 ∂x ∂x
∂2f
∂ ∂f
= = (fy )y = fyy
∂y 2 ∂y ∂y
Mixed second order partial derivatives
∂2f
∂ ∂f
= = (fx )y = fxy
∂y ∂x ∂y ∂x
∂2f
∂ ∂f
= = (fy )x = fyx
∂x∂y ∂x ∂y
Le Cong Nhan (Faculty of Applied SciencesChapter
HCMC University of Technology
11. Partial and Education)
Differentiation November 21, 2020 32 / 94
Example 26
Find the second partial derivatives of f (x, y ) = x 3 + x 2 y 2 − 2y 2 .
Le Cong Nhan (Faculty of Applied SciencesChapter
HCMC University of Technology
11. Partial and Education)
Differentiation November 21, 2020 33 / 94
Theorem 27 (Clairaut’s Theorem)
Suppose f is defined on an open disk D that contains the point (x0 , y0 ). If
the functions fxy and fyx are both continuous on D, then
fxy (x0 , y0 ) = fyx (x0 , y0 )
Example 28
By direct calculation, show that fxyz = fyzx = fzyx for the function
f (x, y , z) = xyz + x 2 y 3 z 4 .
Le Cong Nhan (Faculty of Applied SciencesChapter
HCMC University of Technology
11. Partial and Education)
Differentiation November 21, 2020 34 / 94
11.4 Tangent planes, Approximations, and Differentiability
Equation of the tangent plane
Suppose S is a surface with the equation z = f (x, y ) and let P0 (x0 , y0 , z0 )
be a point on S at which a tangent plane exists. Then an equation for the
tangent plane to S at P0 is
z − z0 = fx (x0 , y0 )(x − x0 ) + fy (x0 , y0 )(y − y0 ).
Figure: The tangent plane contains the tangent lines T1 and T2
Le Cong Nhan (Faculty of Applied SciencesChapter
HCMC University of Technology
11. Partial and Education)
Differentiation November 21, 2020 35 / 94
Example 29
Find the tangent plane to the elliptic paraboloid z = 2x 2 + y 2 at the point
(1, 1, 3).
Le Cong Nhan (Faculty of Applied SciencesChapter
HCMC University of Technology
11. Partial and Education)
Differentiation November 21, 2020 36 / 94
Approximation, Differential
For a differentiable function of one variable
y = f (x), then
I The increment of y at a
∆y = f (a + ∆x) − f (a) ≈ f 0 (a)∆x
Increment approximation of f at a is
defined by
f (a + ∆x) ≈ f (a) + f 0 (a)∆x Figure: The relationship between
the increment ∆y and the differ-
I The differential of y at a ential dy
dy = f 0 (a)dx
Le Cong Nhan (Faculty of Applied SciencesChapter
HCMC University of Technology
11. Partial and Education)
Differentiation November 21, 2020 37 / 94
Approximation, Differential of z = f (x, y )
I The increment of f at (a, b)
∆f =f (a + ∆x, b + ∆y ) − f (a, b) ≈ fx (a, b)∆x + fy (a, b)∆y
Increment approximation of f at (a, b)
f (a + ∆x, b + ∆y ) ≈ f (a, b) + fx (a, b) ∆x + fy (a, b) ∆y (6)
I The differential of f , also called total differential, is defined by
df = fx dx + fy dy (7)
Le Cong Nhan (Faculty of Applied SciencesChapter
HCMC University of Technology
11. Partial and Education)
Differentiation November 21, 2020 38 / 94
Figure: ∆z ≈ dz for ∆x, ∆y small
Le Cong Nhan (Faculty of Applied SciencesChapter
HCMC University of Technology
11. Partial and Education)
Differentiation November 21, 2020 39 / 94
Example 30
Find the total differential of the given functions
a. z = e x (cos y + x sin y ) b. f (x, y , z) = 2x 3 + 5y 4 − 6z
Le Cong Nhan (Faculty of Applied SciencesChapter
HCMC University of Technology
11. Partial and Education)
Differentiation November 21, 2020 40 / 94
Example 31
An open box has length 3 ft, width 1 ft, and height 2 ft, and is constructed
from material that costs $2/ft2 for sides and $3/ft2 for the bottom. Com-
pute the cost of constructing the box, then use increments to estimate the
change in cost if the length and width are each increased by 3 in. and the
height is decreased by 4 in.
Le Cong Nhan (Faculty of Applied SciencesChapter
HCMC University of Technology
11. Partial and Education)
Differentiation November 21, 2020 41 / 94
Example 32
The radius and height of a right circular cone are measured with errors of at
most 3% and 2% respectively. Use incremental approximations to estimate
the maximum percentage error in computing the volume of the cone using
these measurements and the formula V = 13 πR 2 H.
Le Cong Nhan (Faculty of Applied SciencesChapter
HCMC University of Technology
11. Partial and Education)
Differentiation November 21, 2020 42 / 94
Example 33
The base radius and height of a right circular cone are measured as 10 cm
and 25 cm, respectively, with a possible error in measurement of as much
as 0.1 cm in each. Use differentials to estimate the maximum error in the
calculated volume of the cone.
Le Cong Nhan (Faculty of Applied SciencesChapter
HCMC University of Technology
11. Partial and Education)
Differentiation November 21, 2020 43 / 94
Example 34
At a certain factory, the daily output is Q = 60K 1/2 L1/3 units, where K
denotes the capital investment (in units of $1,000) and L the size of the
labor force (in worker-hours). The current capital investment is $900,000
and 1,000 worker-hours of labor are used each day. Estimate the change in
output that will result if capital investment is increased by $1,000 and
labor is decreased by 2 worker-hours.
Le Cong Nhan (Faculty of Applied SciencesChapter
HCMC University of Technology
11. Partial and Education)
Differentiation November 21, 2020 44 / 94
Example 35
When two resistances R1 and R2 are connected in parallel, the total
resistance R satisfies
1 1 1
= +
R R1 R2
If R1 is measured as 300 ohms with a maximum error of 2% and R2 is
measured as 500 ohms with a maximum error of 3%, use incremental
approximations to estimate the maximum percentage error in R.
Le Cong Nhan (Faculty of Applied SciencesChapter
HCMC University of Technology
11. Partial and Education)
Differentiation November 21, 2020 45 / 94
Differentiability
Definition 36
If z = f (x, y ), then f is differentiable at (x0 , y0 ) if ∆f can be expressed
in the form
∆f = fx (x0 , y0 )∆x + fy (x0 , y0 )∆y + ε1 ∆x + ε2 ∆y (8)
where ε1 and ε2 → 0 as (∆x, ∆y ) → (0, 0).
Theorem 37
If f (x, y ) is differentiable at (x0 , y0 ), it is also continuous there.
Le Cong Nhan (Faculty of Applied SciencesChapter
HCMC University of Technology
11. Partial and Education)
Differentiation November 21, 2020 46 / 94
Example 38
Let f be the function given by
xy
x2 + y2 if (x, y ) 6= (0, 0)
f (x, y ) =
0 if (x, y ) = (0, 0)
Show that f has partial derivatives fx and fy at (0, 0) but it is not
continuous there.
Theorem 39 (Sufficient condition for differentiability)
If f is a function of x and y , and f , fx , and fy are continuous in a disk D
centered at (x0 , y0 ), then f is differentiable at (x0 , y0 ).
Le Cong Nhan (Faculty of Applied SciencesChapter
HCMC University of Technology
11. Partial and Education)
Differentiation November 21, 2020 47 / 94
Example 40
Show that f (x, y ) = x 2 y + xy 3 is differentiable for all (x, y ).
Le Cong Nhan (Faculty of Applied SciencesChapter
HCMC University of Technology
11. Partial and Education)
Differentiation November 21, 2020 48 / 94
11.5 Chain Rules
Rule for differentiating a composite function:
If y = f (x) and x = g (t), where f and g are differentiable functions, then
dy dy dx
= (9)
dt dx dt
Theorem 41 (The Chain Rule for One Parameter)
Suppose that z = f (x, y ) is a differentiable function of x and y , where
x = x(t) and y = y (t) are both differentiable functions of t. Then z is a
differentiable function of t and
dz ∂z dx ∂z dy
= + (10)
dt ∂x dt ∂y dt
Le Cong Nhan (Faculty of Applied SciencesChapter
HCMC University of Technology
11. Partial and Education)
Differentiation November 21, 2020 49 / 94
Example 42
Find the derivative of the following composite functions
(a) z = x 2 y + 3xy 4 , where x = cos t, y = sin 2t,
p
(b) z = x 1 + y 2 , where x = te 2t , y = e −t .
Le Cong Nhan (Faculty of Applied SciencesChapter
HCMC University of Technology
11. Partial and Education)
Differentiation November 21, 2020 50 / 94
Example 43
A right circular cylinder is changing in such a way that its radius r is
increasing at the rate of 3 in./min and its height h is decreasing at the
rate of 5 in./min. At what rate is the volume of the cylinder changing
when the radius is 10 in. and the height is 8 in.?
Le Cong Nhan (Faculty of Applied SciencesChapter
HCMC University of Technology
11. Partial and Education)
Differentiation November 21, 2020 51 / 94
The Implicit Function Theorem
Find dy /dx if y = y (x) is an implicit function defined by an equation of
the form
F (x, y ) = 0. (11)
1 Implicit Differentiation: Section 3.6
2 Applying the Chain rule:
If F is differentiable, we can apply the case 1 of the Chain rule to obtain
∂F dx ∂F dy
+ = 0.
∂x dx ∂y dx
Since dx/dx = 1, so if ∂F /∂y 6= 0, then one has
dy ∂F ∂F Fx
=− : =− . (12)
dx ∂x ∂y Fy
Le Cong Nhan (Faculty of Applied SciencesChapter
HCMC University of Technology
11. Partial and Education)
Differentiation November 21, 2020 52 / 94
Example 44
dy
Find if y is a differentiable function of x such that
dx
sin (x + y ) + cos (x − y ) = y
Le Cong Nhan (Faculty of Applied SciencesChapter
HCMC University of Technology
11. Partial and Education)
Differentiation November 21, 2020 53 / 94
Example 45
Find y 0 if y is implicitly given by the equation
x +y y
a. x 3 y − xy 3 = a2 b. arctan =
a a
where a is a constant.
Le Cong Nhan (Faculty of Applied SciencesChapter
HCMC University of Technology
11. Partial and Education)
Differentiation November 21, 2020 54 / 94
Theorem 46 (The Chain Rule for Two Parameters)
Suppose that z = f (x, y ) is a differentiable function of x and y , where
x = x(u, v ) and y = y (u, v ) are both differentiable functions of u and v .
Then z is a differentiable function of u and v , and
∂z ∂z ∂x ∂z ∂y ∂z ∂z ∂x ∂z ∂y
= + and = + (13)
∂u ∂x ∂u ∂y ∂u ∂v ∂x ∂v ∂y ∂v
Example 47
Find the partial derivatives of the following composite function
u
z = ln x 2 + y 2 ,
where x = uv , y = .
v
Le Cong Nhan (Faculty of Applied SciencesChapter
HCMC University of Technology
11. Partial and Education)
Differentiation November 21, 2020 55 / 94
Example 48
∂w 2 r +s
Find if w = 4x + y 2 + z 3 , where x = e rs , y = ln and z = rst 2 .
∂s t
Le Cong Nhan (Faculty of Applied SciencesChapter
HCMC University of Technology
11. Partial and Education)
Differentiation November 21, 2020 56 / 94
Example 49
If f is differentiable and z = u + f u 2 v 2 , show that
∂z ∂z
u −v = u.
∂u ∂v
Le Cong Nhan (Faculty of Applied SciencesChapter
HCMC University of Technology
11. Partial and Education)
Differentiation November 21, 2020 57 / 94
11.6 Directional Derivatives and the Gradient
Definition 50 (Directional derivative)
Let f be a function of two variables, and let u = u1 i + u2 j be a unit vector.
The directional derivative of f at P0 (x0 , y0 ) in the direction of u is
f (x0 + hu1 , y0 + hu2 ) − f (x0 , y0 )
Du f (x0 , y0 ) = lim (14)
h→0 h
Interpretation of Directional
derivative:
1 Directional derivative as a slope
2 Directional derivative as a rate
Figure: Directional derivative
Le Cong Nhan (Faculty of Applied SciencesChapter
HCMC University of Technology
11. Partial and Education)
Differentiation November 21, 2020 58 / 94
Theorem 51 (Directional derivatives using partial derivatives)
Let f (x, y ) be a function that is differentiable at P0 (x0 , y0 ). Then f has a
directional derivative in the direction of the unit vector u = u1 i + u2 j given
by
Du f (x0 , y0 ) = fx (x0 , y0 ) u1 + fy (x0 , y0 ) u2 (15)
Example 52
Find the directional derivative of f (x, y ) = 3 − 2x 2 + y 3 at the point
P(1, 2) in the direction of the unit vector
√
1 3
u= i− j.
2 2
Le Cong Nhan (Faculty of Applied SciencesChapter
HCMC University of Technology
11. Partial and Education)
Differentiation November 21, 2020 59 / 94
The Gradient
Let f (x, y ) be a differentiable function at (x, y ). Then the gradient of f ,
denoted by ∇f (pronounced ”del f”) or grad f (x, y ) (gradient of f ), is a
vector given by
∇f (x, y ) = fx (x, y ) i + fy (x, y )j = hfx (x, y ), fy (x, y )i (16)
The value of the gradient at the point P0 (x0 , y0 )
∇f (x0 , y0 ) = fx (x0 , y0 ) i + fy (x0 , y0 )j (17)
Properties of Gradient:
1 Maximal property;
2 Normal property.
Le Cong Nhan (Faculty of Applied SciencesChapter
HCMC University of Technology
11. Partial and Education)
Differentiation November 21, 2020 60 / 94
Example 53
Find ∇f (x, y ) for f (x, y ) = x 2 y + y 3 .
Le Cong Nhan (Faculty of Applied SciencesChapter
HCMC University of Technology
11. Partial and Education)
Differentiation November 21, 2020 61 / 94
Theorem 54 (The gradient formula for the directional derivative)
If f is a differentiable function of x and y , then the directional derivative
of f at the point P0 (x0 , y0 ) in the direction of the unit vector u is
Du f (x0 , y0 ) = ∇f (x0 , y0 ) · u (18)
Example 55
Find the directional derivative of f (x, y ) = ln x 2 + y 3 at P0 (1, −3) in
the direction of v = 2i − 3j.
Le Cong Nhan (Faculty of Applied SciencesChapter
HCMC University of Technology
11. Partial and Education)
Differentiation November 21, 2020 62 / 94
Theorem 56 (Basic properties of the gradient)
Let f and g be differentiable functions. Then
Constant rule ∇c = 0 for any constant c
Linearity rule ∇ (af + bg ) = a∇f + b∇g for constants a and b
Product rule ∇ (fg ) = f ∇g + g ∇f
f g ∇f − f ∇g
Quotient rule ∇ = g 6= 0
g g2
Power rule ∇ (f n ) = nf n−1 ∇f
Le Cong Nhan (Faculty of Applied SciencesChapter
HCMC University of Technology
11. Partial and Education)
Differentiation November 21, 2020 63 / 94
Maximal Property of the Gradient
Suppose f is differentiable at the point P0 (x0 , y0 ) and ∇f (x0 , y0 ) 6= 0.
Du f (x0 , y0 ) = ∇f (x0 , y0 ) · u
the largest value of the directional
derivative Du f at P0 is
k∇f (x0 , y0 )k
and occurs when the unit vector u points
in the direction of ∇f (x0 , y0 ) =: ∇f0 .
the smallest value of the directional
derivative Du f at P0 is
− k∇f (x0 , y0 )k
and occurs when the unit vector u points
in the direction of −∇f (x0 , y0 ).
Le Cong Nhan (Faculty of Applied SciencesChapter
HCMC University of Technology
11. Partial and Education)
Differentiation November 21, 2020 64 / 94
Example 57
In what direction is the function defined by f (x, y ) = xe y increasing most
rapidly at the point P0 (2, 0), and what is the maximum rate of increase?
In what direction is f decreasing most rapidly?
Le Cong Nhan (Faculty of Applied SciencesChapter
HCMC University of Technology
11. Partial and Education)
Differentiation November 21, 2020 65 / 94
Function of Three Variables
For a function of three variables f (x, y , z), the gradient of f is defined by
∇f = fx i + fy j + fz k = hfx , fy , fz i (19)
and the directional derivative of f at P0 (x0 , y0 , z0 ) in the direction of the
unit vector u given by
Du f = ∇f (x0 , y0 , z0 ) · u (20)
Example 58
Let f (x, y , z) = x sin yz. Find find the gradient of f and the directional
derivative of f at (1, 3, 0) in the direction of
v = i − 2j + k.
Le Cong Nhan (Faculty of Applied SciencesChapter
HCMC University of Technology
11. Partial and Education)
Differentiation November 21, 2020 66 / 94
Normal Property of the Gradient
Suppose S is a surface with equation F (x, y , z) = k, that is, it is a level
surface of a function F of three variables, and let P(x0 , y0 , z0 ) be a point
on S. Let C be any curve that lies on the surface and passes through the
point P described by
R(t) = hx(t), y (t), z(t)i
The gradient vector at P,
∇F (x0 , y0 , z0 ), is perpendicular to
the tangent plane surface at P.
Figure: The normal property of the
gradient
Le Cong Nhan (Faculty of Applied SciencesChapter
HCMC University of Technology
11. Partial and Education)
Differentiation November 21, 2020 67 / 94
Example 59
Find a vector that is normal to the level surface x 2 + 2xy − yz + 3z 2 = 7
at the point P (1, 1, −1).
Le Cong Nhan (Faculty of Applied SciencesChapter
HCMC University of Technology
11. Partial and Education)
Differentiation November 21, 2020 68 / 94
Example 60
Sketch the level curve corresponding to k = 1 for the function√
f (x, y ) = x 2 − y 2 and find a normal vector at the point P 2, 3 .
Figure: The level curve x 2 − y 2 = 1
Le Cong Nhan (Faculty of Applied SciencesChapter
HCMC University of Technology
11. Partial and Education)
Differentiation November 21, 2020 69 / 94
Example 61
The set of points (x, y ) with 0 ≤ x ≤ 5 and 0 ≤ y ≤ 5 is a square of first
quadrant of the xy -plane. Suppose this square is heated in such a way
that T (x, y ) = x 2 + y 2 is the temperature at the point P(x, y ). In what
direction will heat flow from the point P (3, 4)?
Let H(x, y ) be the heat flow at each point (x, y ) in the region. From
physics it is known that H(x, y ) will be perpendicular to the isothermal
curves T (x, y ) = k for k constant.
Therefore we can express the heat
flow as
H = −k∇T (21)
where k is a positive constant (called
the thermal conductivity).
Figure: Isotherms
Le Cong Nhan (Faculty of Applied SciencesChapter
HCMC University of Technology
11. Partial and Education)
Differentiation November 21, 2020 70 / 94
Tangent Planes and Normal Lines
If ∇F (x0 , y0 , z0 ) 6= 0, then
the tangent plane to the level surface F (x, y , z) = k at P(x0 , y0 , z0 ) as
the plane that passes through P and has normal vector ∇F (x0 , y0 , z0 )
Fx (x0 , y0 , z0 ) (x − x0 ) + Fy (x0 , y0 , z0 ) (y − y0 )
+ Fz (x0 , y0 , z0 ) (z − z0 ) = 0 (22)
The normal line to S at P is the line passing through P and
perpendicular to the tangent plane:
x − x0 y − y0 z − z0
= = (23)
Fx (x0 , y0 , z0 ) Fy (x0 , y0 , z0 ) Fz (x0 , y0 , z0 )
Le Cong Nhan (Faculty of Applied SciencesChapter
HCMC University of Technology
11. Partial and Education)
Differentiation November 21, 2020 71 / 94
Example 62
Find the equations of the tangent plane and normal line at the point
P (−2, 1, −3) to the ellipsoid
x2 z2
+ y2 + =3
4 9
Le Cong Nhan (Faculty of Applied SciencesChapter
HCMC University of Technology
11. Partial and Education)
Differentiation November 21, 2020 72 / 94
Example 63
Find the equations for the tangent plane and the normal line to the cone
z2 = x2 + y2
at the point where x = 3, y = 4, and z > 0.
Le Cong Nhan (Faculty of Applied SciencesChapter
HCMC University of Technology
11. Partial and Education)
Differentiation November 21, 2020 73 / 94
Example 64
Find the equations for the tangent plane and the normal line at the point
P(1, −1, 2) on the surface S given by x 2 y + y 2 z + z 2 x = 5.
Le Cong Nhan (Faculty of Applied SciencesChapter
HCMC University of Technology
11. Partial and Education)
Differentiation November 21, 2020 74 / 94
11.7 Extrema of Functions of Two Variables
Terminology
Absolute extrema
Relative extrema (Local extrema)
Figure: Absolute extrema and Relative extrema
Le Cong Nhan (Faculty of Applied SciencesChapter
HCMC University of Technology
11. Partial and Education)
Differentiation November 21, 2020 75 / 94
Theorem 65 (Partial derivative criteria for relative extrema)
If f has a relative maximum or minimum at (x0 , y0 ) and the first-order partial
derivatives of f exist there, then
fx (x0 , y0 ) = 0 and fy (x0 , y0 ) = 0.
Definition 66 (Critical points)
A point (x0 , y0 ) is called a critical point or stationary point of f if either
fx (x0 , y0 ) = fy (x0 , y0 ) = 0 or one of these partial derivatives does not exist.
Notice:
I If f has a relative maximum or minium at (x0 , y0 ), then (x0 , y0 ) is a
critical point.
I At the critical point, a function could have a relative maximum or
relative minimum or neither.
Le Cong Nhan (Faculty of Applied SciencesChapter
HCMC University of Technology
11. Partial and Education)
Differentiation November 21, 2020 76 / 94
Example 67
Discuss the nature of the critical point (0, 0) for quadratic surfaces
a. z = x 2 + y 2 b. z = 1 − x 2 − y 2 c. z = y 2 − x 2
Le Cong Nhan (Faculty of Applied SciencesChapter
HCMC University of Technology
11. Partial and Education)
Differentiation November 21, 2020 77 / 94
Theorem 68 (Second Derivatives Test)
Suppose that (x0 , y0 ) is a critical point of f (x, y ) and f has continuous
second-order partial derivatives in a disk with center (x0 , y0 ). The discrimi-
nant of f is the expression
D = fxx fyy − fxy2
(a) A relative minimum occurs at (x0 , y0 ) if
D(x0 , y0 ) > 0 and fxx (x0 , y0 ) > 0.
(b) A relative maximum occurs at (x0 , y0 ) if
D(x0 , y0 ) > 0 and fxx (x0 , y0 ) < 0.
(c) A saddle point occurs at (x0 , y0 ) if D(x0 , y0 ) < 0.
Notice: If D(x0 , y0 ) = 0, then the test is inclusive.
Le Cong Nhan (Faculty of Applied SciencesChapter
HCMC University of Technology
11. Partial and Education)
Differentiation November 21, 2020 78 / 94
Example 69
Find all relative extrema and saddle points of the function
f (x, y ) = 2x 2 + 2xy + y 2 − 2x − 2y + 5.
Le Cong Nhan (Faculty of Applied SciencesChapter
HCMC University of Technology
11. Partial and Education)
Differentiation November 21, 2020 79 / 94
Example 70
Find all relative extrema and saddle points of the function
f (x, y ) = x 4 + y 4 − 4xy + 1.
Le Cong Nhan (Faculty of Applied SciencesChapter
HCMC University of Technology
11. Partial and Education)
Differentiation November 21, 2020 80 / 94
Example 71
Find all relative extrema and saddle points of the function
f (x, y ) = x 2 y 4 .
Le Cong Nhan (Faculty of Applied SciencesChapter
HCMC University of Technology
11. Partial and Education)
Differentiation November 21, 2020 81 / 94
Absolute Extrema of Continuous Functions
Theorem 72 (Extreme Value Theorem for Functions of Two Variables)
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.
I A closed set in R2 is one that contains all its boundary points. For
example, the disk
D = (x, y ) : x 2 + y 2 ≤ 1
is a closed set.
I A bounded set in R2 is one that contains within some disk.
Le Cong Nhan (Faculty of Applied SciencesChapter
HCMC University of Technology
11. Partial and Education)
Differentiation November 21, 2020 82 / 94
Absolute extrema
To find the absolute maximum and minimum values of a continuous
function f on a closed, bounded set D:
(1) Find all critical points of f in D.
(2) Find all points on the boundary of D where absolute extrema can occur
(boundary points, critical points, endpoints, etc.).
(3) Compute the value of f (x0 , y0 ) for each of the points (x0 , y0 ) found in
steps 1 and 2.
(4) The largest of the values from step 3 is the absolute maximum value;
the smallest of these values is the absolute minimum value.
Le Cong Nhan (Faculty of Applied SciencesChapter
HCMC University of Technology
11. Partial and Education)
Differentiation November 21, 2020 83 / 94
Example 73
Find the absolute maximum and minimum values of the function
2 2
f (x, y ) = e x −y over the disk
x 2 + y 2 ≤ 1.
Le Cong Nhan (Faculty of Applied SciencesChapter
HCMC University of Technology
11. Partial and Education)
Differentiation November 21, 2020 84 / 94
Example 74
Find the absolute maximum and minimum values of the function
f (x, y ) = x 2 − 2xy + 2y on the rectangle
D = {(x, y ) : 0 ≤ x ≤ 3, 0 ≤ y ≤ 2} .
Le Cong Nhan (Faculty of Applied SciencesChapter
HCMC University of Technology
11. Partial and Education)
Differentiation November 21, 2020 85 / 94
Least Squares Approximation of Data
Linear regression:
y = mx + b (24)
At the point Pk (xk , yk ), the error caused by
using point on regression line can be
measured by the difference
yk − (mxk + b) (25)
We wish to minimize the function F
n
X
Figure: Linear regression F (m, b) = [yk − (mxk + b)]2 . (26)
k=1
Le Cong Nhan (Faculty of Applied SciencesChapter
HCMC University of Technology
11. Partial and Education)
Differentiation November 21, 2020 86 / 94
11.8 Lagrange Multipliers
Method of Lagrange Multipliers
To find the maximum and minimum values of the function
z = f (x, y )
subjected to the constrain g (x, y ) = k.
(1) Find x, y and λ such that
∇f = λ∇g and g (x, y ) = k.
(2) Evaluate f (x, y ) at all the points that result from step (1) and all
points on the boundary of the constraint.
(3) (Interpretation) The largest of these values is the maximum value of
f ; the smallest is the minimum value of f .
Le Cong Nhan (Faculty of Applied SciencesChapter
HCMC University of Technology
11. Partial and Education)
Differentiation November 21, 2020 87 / 94
Example 75
(1) Find the maximum and minimum values of the function z = xy with
constraint x + y = 1.
(2) Find the maximum and minimum values of the function z = x + y with
constraint x 2 + y 2 = 1.
Le Cong Nhan (Faculty of Applied SciencesChapter
HCMC University of Technology
11. Partial and Education)
Differentiation November 21, 2020 88 / 94
Example 76
Given that the largest and smallest values of f (x, y ) = 1 − x 2 − y 2 subject
to the constraint x + y = 1 with x ≥ 0, y ≥ 0 exist, use the method of
Lagrange multipliers to find these extrema.
Le Cong Nhan (Faculty of Applied SciencesChapter
HCMC University of Technology
11. Partial and Education)
Differentiation November 21, 2020 89 / 94
Example 77
A container in R3 has a shape of the cube given by 0 ≤ x ≤ 1, 0 ≤ y ≤ 1,
0 ≤ z ≤ 1. A plate is placed in the container in such a way that it
occupies that portion of the plane x + y + z = 1 that lies in a cubical
container. If the container is heated so that the temperature at each point
(x, y , z) is given by
T (x, y , z) = 4 − 2x 2 − y 2 − z 2
in hundreds of degrees Celsius, what are the hottest and coldest points on
the plate? You may assume these extreme temperature exist.
Le Cong Nhan (Faculty of Applied SciencesChapter
HCMC University of Technology
11. Partial and Education)
Differentiation November 21, 2020 90 / 94
Theorem 78 (Rate of change of extreme value)
Suppose E is an extreme value (maximum or minimum) of f subject to
the constraint g (x, y ) = c. Then the Lagrange multiplier λ is the rate of
change of E with respect to c, that is
dE
λ= .
dλ
Le Cong Nhan (Faculty of Applied SciencesChapter
HCMC University of Technology
11. Partial and Education)
Differentiation November 21, 2020 91 / 94
Example 79
If x thousand dollars is spent on labor, and y thousand dollars is spent on
equipment, it is estimated that the output of a certain factory will be
Q(x, y ) = 50x 2/5 y 3/5
units. If $150,000 is available, how should this capital be allocated between
labor and equipment to generate the largest possible output? How does the
maximum output change if the money available for labor and equipment is
increased by $1,000? In economics, an output function of the general form
Q(x, y ) = cx α y 1−α is known as a Cobb-Douglas production function.
Le Cong Nhan (Faculty of Applied SciencesChapter
HCMC University of Technology
11. Partial and Education)
Differentiation November 21, 2020 92 / 94
Lagrange Multiplier with Two Constraints
Suppose now that we want to find the maximum and minimum values of a
function f (x, y , z) subject to two constraints (side conditions) of the form
g (x, y , z) = k and h(x, y , z) = c.
Suppose f has such an extreme value at a point P(x0 , y0 , z0 ), then there
are numbers λ and µ such that:
g (x0 , y0 , z0 ) = k and h(x0 , y0 , z0 ) = c and
∇f (x0 , y0 , z0 ) = λ∇g (x0 , y0 , z0 )
+ µ∇h(x0 , y0 , z0 ). (27)
Le Cong Nhan (Faculty of Applied SciencesChapter
HCMC University of Technology
11. Partial and Education)
Differentiation November 21, 2020 93 / 94
Example 80
Find the maximum value of the function f (x, y , z) = x + 2y + 3z on the
curve of intersection of the plane x − y + z = 1 and the cylinder
x 2 + y 2 = 1.
Le Cong Nhan (Faculty of Applied SciencesChapter
HCMC University of Technology
11. Partial and Education)
Differentiation November 21, 2020 94 / 94