MATH2023 Multivariable Calculus Chapter 3 Partial Derivatives L2/L3 (Fall 2019)
MATH2023 Multivariable Calculus Chapter 3 Partial Derivatives L2/L3 (Fall 2019)
In the following three chapters, we continue our study on the calculus of slightly more general
functions by considering the other case when we replace the domain of a function by ℝ𝑛 . Such a
function, e.g. 𝑓: ℝ𝑛 → ℝ, is called a function of several (real) variables.
(0, 0) 0
(2, 3) 𝑓(𝑥, 𝑦) = 𝑦 2 − 2𝑥 5
൫ξ2, ξ3൯ 3 − 2ξ2
(−𝜋, 1) 1 + 2𝜋
Remark 3.2 Like before, if we are given just a formula of a function of several real variables
without specifying its domain, then we usually take the domain to be the natural domain, which is
the largest part of ℝ𝑛 on which the formula “works”, i.e. the formula actually yields a real number.
In MATH1013/1023 we learnt that closed intervals include their boundary points, while open
intervals do not. Subsets of ℝ𝑛 also have similar behaviors.
Page 1 of 36
MATH2023 Multivariable Calculus Chapter 3 Partial derivatives
L2/L3 (Fall 2019)
Example 3.5 Find the (natural) domains of each of the following functions:
(a) 𝑓(𝑥) = ξ1 − 𝑥 2
(b) 𝑔(𝑥, 𝑦) = √1 − 𝑥 2 − 𝑦 2
(c) ℎ(𝑥, 𝑦, 𝑧) = √1 − 𝑥 2 − 𝑦 2 − 𝑧 2
Solution:
(a) 𝑓(𝑥) = ξ1 − 𝑥 2 is a real number if and only if 1 − 𝑥 2 ≥ 0, i.e. −1 ≤ 𝑥 ≤ 1.
The natural domain of 𝑓 is the subset of ℝ that consists of all those real numbers 𝑥
satisfying −1 ≤ 𝑥 ≤ 1, i.e. the closed interval [−1, 1].
(b) 𝑔(𝑥, 𝑦) = √1 − 𝑥 2 − 𝑦 2 is a real number if and only if 1 − 𝑥 2 − 𝑦 2 ≥ 0, i.e. 𝑥 2 + 𝑦 2 ≤ 1.
The natural domain of 𝑔 is the subset of ℝ2 that consists of all those ordered pair of real
numbers (𝑥, 𝑦) satisfying 𝑥 2 + 𝑦 2 ≤ 1, i.e. the closed unit disk centered at the origin.
(c) ℎ(𝑥, 𝑦) = √1 − 𝑥 2 − 𝑦 2 − 𝑧 2 is a real number if and only if 1 − 𝑥 2 − 𝑦 2 − 𝑧 2 ≥ 0, i.e.
𝑥 2 + 𝑦 2 + 𝑧 2 ≤ 1.
The natural domain of ℎ is the subset of ℝ3 that consists of all those ordered triple of real
numbers (𝑥, 𝑦, 𝑧) satisfying 𝑥 2 + 𝑦 2 + 𝑧 2 ≤ 1, i.e. the closed unit ball centered at the origin.
Example 3.6 The natural domain of the function 𝑓(𝑥, 𝑦) = 𝑦/𝑥 is the subset of ℝ2 that consists
of all those points (𝑥, 𝑦) such that 𝑥 ≠ 0, i.e. the whole plane ℝ2 excluding the 𝑦-axis. The
natural domain of the function 𝑓(𝑥, 𝑦, 𝑧) = 𝑦/𝑥 is the subset of ℝ3 that consists of all those
points (𝑥, 𝑦, 𝑧) such that 𝑥 ≠ 0, i.e. the whole space ℝ3 excluding the 𝑦𝑧-plane.
Next we study two methods to visually present a function of several real variables.
Page 2 of 36
MATH2023 Multivariable Calculus Chapter 3 Partial derivatives
L2/L3 (Fall 2019)
Remark 3.8 Here are some facts about the graph of a function 𝑓 of two real variables:
(i) (“Vertical line test”) Any line in ℝ3 parallel to the 𝑧-axis must intersect the graph of 𝑓 at
one point at most.
(ii) The domain of 𝑓 consists of all those points (𝑎, 𝑏) such that the line through (𝑎, 𝑏, 0)
parallel to the 𝑧-axis intersects the graph of 𝑓 at exactly one point.
(iii) The range of 𝑓 consists of all those real numbers 𝑐 such that the plane 𝑧 = 𝑐 intersects the
graph of 𝑓 at one point at least.
2 2 2
൜𝑥 + 𝑦 = 1
𝑧=1
𝑦 𝑦
𝑥 𝑥
Solution:
The graph of 𝑓 is the surface in ℝ3 defined by the equation 𝑧 = 𝑓(𝑥, 𝑦), i.e.
𝑧 = 4 − 𝑥2 − 𝑦2.
The cross section of this graph in the 𝑥𝑧-plane is the parabola
𝑧 = 4 − 𝑥2 and 𝑦 = 0.
The cross section of this graph in the 𝑦𝑧-plane is the parabola
𝑧 = 4 − 𝑦2 and 𝑥 = 0.
For each 𝑟 ≤ 4, the cross section of this graph in the 𝑧
Page 3 of 36
MATH2023 Multivariable Calculus Chapter 3 Partial derivatives
L2/L3 (Fall 2019)
For a function of two real variables, its graph is sometimes already too difficult to sketch; and it is
often good enough to visualize such a function just using its level curves in ℝ2 , which are
cross-sectional curves of its graph in various horizontal planes. This is similar to the concepts of
“contour lines” in geography, and “isobars” or “isotherms” in meteorology.
Remark 3.12 Consider the cross-sectional curve of the graph of 𝑓 in the plane 𝑧 = 𝑘. A level
curve of 𝑓 with equation 𝑓(𝑥, 𝑦) = 𝑘 is the projection of such a cross-sectional curve onto ℝ𝟐 .
Example 3.13 Describe and sketch some level curves of the following functions:
(a) 𝑓(𝑥, 𝑦) = 𝑦 − 𝑥 (b) 𝑔(𝑥, 𝑦) = √𝑥 2 + 𝑦 2 − 1 (c) ℎ(𝑥, 𝑦) = 𝑦/𝑥
Solution:
(a) For each 𝑘 ∈ ℝ, the line 𝑦 − 𝑥 = 𝑘 is a level curve of 𝑓. Rearranging the equation we get
𝑦 = 𝑥 + 𝑘,
so the level curves of 𝑓 are all the lines in ℝ2 having slope 1.
(b) For each 𝑘 ≥ 0, the curve √𝑥 2 + 𝑦 2 − 1 = 𝑘 is a level curve of 𝑔. Rearranging this we get
𝑥 2 + 𝑦 2 = 𝑘 2 + 1,
so the level curves of 𝑔 are all the circles in ℝ2 centered at the origin, with radius at least 1.
𝑦
(c) For each 𝑘 ∈ ℝ, the line = 𝑘 is a level curve of ℎ. Rearranging the equation we get
𝑥
𝑦 = 𝑘𝑥,
so the level curves of ℎ are all the lines in ℝ2 passing through the origin (with the origin
removed), except the 𝑦-axis.
𝑦 𝑦 𝑦
𝑥 𝑥 𝑥
1
Page 4 of 36
MATH2023 Multivariable Calculus Chapter 3 Partial derivatives
L2/L3 (Fall 2019)
For a function of three real variables, its graph is impossible to sketch as it is an object in the
four-dimensional space; but we can still visualize such a function using its level surfaces in ℝ3 .
𝑓(𝑥, 𝑦, 𝑧) = √𝑥 2 + 𝑦 2 + 𝑧 2
are the surfaces in ℝ3 defined by the equation
√𝑥 2 + 𝑦 2 + 𝑧 2 = 𝑘
where 𝑘 ≥ 0. Rearranging this equation we get
𝑥2 + 𝑦2 + 𝑧2 = 𝑘2, 𝑦
In MATH1013, we intuitively defined the limit of a function of one real variable as follows.
Definition Let 𝑎 be a real number and 𝑓 be a function which is well-defined on an open interval
that contains 𝑎 , except possibly at 𝑎 . If there exists a real number 𝐿 such that 𝑓(𝑥)
Now we similarly define the limit of a function of several real variables as follows.
lim 𝑓(𝑥1 , 𝑥2 , … , 𝑥𝑛 ) = 𝐿.
(𝑥1 ,𝑥2 ,…,𝑥𝑛 )→(𝑎1 ,𝑎2 ,…,𝑎𝑛 )
If you studied MATH1023 instead of MATH1013, or if you have already taken MATH2033, then it is a
good exercise for you to try formulating Definition 3.15 using the more rigorous 𝜀-𝛿 language.
The subsequent results about limits in this section can be rigorously proved only if we use such an
𝜀-𝛿 formulation.
Page 5 of 36
MATH2023 Multivariable Calculus Chapter 3 Partial derivatives
L2/L3 (Fall 2019)
Remark 3.16 There are only two paths for a real number 𝑥 to approach a real number 𝑎, either
𝑥 → 𝑎+ (from the “right”) or 𝑥 → 𝑎− (from the “left”);
but there are infinitely many possible paths for the point (𝑥1 , 𝑥2 , … , 𝑥𝑛 ) to approach the point
(𝑎1 , 𝑎2 , … , 𝑎𝑛 ).
𝑦
𝑎 (𝑎, 𝑏)
𝑥
Note that all these are limits of functions of two real variables, 𝑓(𝑥, 𝑦) = 𝑥, 𝑔(𝑥, 𝑦) = 𝑦 and
ℎ(𝑥, 𝑦) = 𝑐, although some of the variables do not appear in each of the defining formulas.
The following are some arithmetic operations of limits, which are similar to the one-variable case.
Theorem 3.17 Let 𝑎1 , 𝑎2 , … , 𝑎𝑛 and 𝑐 be real numbers and let 𝑓 and 𝑔 be real-valued
functions of 𝑛 real variables, such that both the limits
Page 6 of 36
MATH2023 Multivariable Calculus Chapter 3 Partial derivatives
L2/L3 (Fall 2019)
The limit sign still “passes through” the composition by a continuous function of one real variable,
just like in MATH1013/1023.
lim 𝑓(𝑥1 , 𝑥2 , … , 𝑥𝑛 ) = 𝐿
(𝑥1 ,𝑥2 ,…,𝑥𝑛 )→(𝑎1 ,𝑎2 ,…,𝑎𝑛 )
In particular, we have
and so on.
Example 3.19 The following limits can be evaluated easily using Remark 3.16 and the arithmetic
operations in Theorem 3.17 and Theorem 3.18:
(a)
2 3 2
lim (𝑥 2 𝑦 3 − 4𝑦 2 ) = ( lim 𝑥) ( lim 𝑦) − 4 ( lim 𝑦)
(𝑥,𝑦)→(3,2) (𝑥,𝑦)→(3,2) (𝑥,𝑦)→(3,2) (𝑥,𝑦)→(3,2)
( lim 𝑦)
1
𝑦2 (𝑥,𝑦,𝑧)→(𝜋,0, )
𝑒 𝑒 6
lim =
(𝑥,𝑦,𝑧)→(𝜋,0, ) tan 𝑥𝑧
1
6
tan [( lim 𝑥) ( lim 𝑧)]
1 1
(𝑥,𝑦,𝑧)→(𝜋,0, ) (𝑥,𝑦,𝑧)→(𝜋,0, )
6 6
2
𝑒0
= 𝜋
tan 6
= ξ3
Page 7 of 36
MATH2023 Multivariable Calculus Chapter 3 Partial derivatives
L2/L3 (Fall 2019)
(c)
𝑥 2 + 3𝑥 − 𝑥𝑦 − 3𝑦 𝑥 2 + 3𝑥 − 𝑥𝑦 − 3𝑦 ξ𝑥 + √𝑦
lim = lim ⋅
(𝑥,𝑦)→(0,0) ξ𝑥 − √𝑦 (𝑥,𝑦)→(0,0) ξ𝑥 − √𝑦 ξ𝑥 + √𝑦
(𝑥 + 3)(𝑥 − 𝑦)
= lim ൫ξ𝑥 + √𝑦൯
(𝑥,𝑦)→(0,0) 𝑥−𝑦
= (0 + 3)൫ξ0 + ξ0൯
= 0.
[Here we may cancel the factor (𝑥 − 𝑦) from the numerator and the denominator, because
𝑥 2 +3𝑥−𝑥𝑦−3𝑦
the line 𝑦 = 𝑥 is not in the natural domain of the function 𝑓(𝑥, 𝑦) = .]
ξ𝑥−ξ𝑦
Remark 3.20 (Non-existence of a limit) If a function has different limits along two different paths
of approach to the same point, then the limit does not exist.
Example 3.21 Evaluate each of the following limits, or show that it does not exist.
𝑥 2 −𝑦 2 𝑥𝑦 𝑥𝑦 2
(a) lim (b) lim (c) lim
(𝑥,𝑦)→(0,0) 𝑥 2 +𝑦 2 (𝑥,𝑦)→(0,0) 𝑥 2 +𝑦 2 (𝑥,𝑦)→(0,0) 𝑥 2 +𝑦 4
Solution:
0
We cannot use the arithmetic operations for each of these limits as we would get in each case,
0
which is undefined. Let’s try to analyze these limits as (𝑥, 𝑦) → (0, 0) along different paths that
pass through (𝟎, 𝟎).
𝑦
(a) Along the 𝑥-axis (whose equation is 𝑦 = 0), we have
𝑥2 − 𝑦2 𝑥 2 − 02 𝑥
lim = lim 2 = lim 1 = 1.
(𝑥,𝑦)→(0,0) 𝑥 2 + 𝑦 2 𝑥→0 𝑥 + 02 𝑥→0
𝑦=0
𝑦
Along the 𝑦-axis (whose equation is 𝑥 = 0), we have
𝑥2 − 𝑦2 02 − 𝑦 2 𝑥
lim = lim 2 = lim −1 = −1.
(𝑥,𝑦)→(0,0) 𝑥 2 + 𝑦 2 𝑦→0 0 + 𝑦 2 𝑦→0
𝑥=0
We obtain two different limits of the function as (𝑥, 𝑦) → (0, 0) along two different paths,
so the limit does not exist.
Page 8 of 36
MATH2023 Multivariable Calculus Chapter 3 Partial derivatives
L2/L3 (Fall 2019)
𝑦
(b) Along the 𝑥-axis (whose equation is 𝑦 = 0), we have
𝑥𝑦 𝑥⋅0
lim = lim 2 = lim 0 = 0. 𝑥
(𝑥,𝑦)→(0,0) 𝑥 2 +𝑦 2 𝑥→0 𝑥 + 02 𝑥→0
𝑦=0 𝑦
𝑥𝑦 𝑥2 1 1
lim = lim = lim = .
(𝑥,𝑦)→(0,0) 𝑥 2 + 𝑦 2 𝑥→0 𝑥 2 + 𝑥 2 𝑥→0 2 2 𝑥
𝑦=𝑥
(c) Let’s analyze the limit as (𝑥, 𝑦) → (0, 0) along every line 𝑦 = 𝑚𝑥 through the origin:
𝑦
For each 𝑚 ∈ ℝ, along the line 𝑦 = 𝑚𝑥 we have
𝑥𝑦 2 𝑥(𝑚𝑥)2 𝑚2 𝑥 0
lim 2 4
= lim 2 4
= lim 4 2
= = 0. 𝑥
(𝑥,𝑦)→(0,0) 𝑥 + 𝑦 𝑥→0 𝑥 + (𝑚𝑥) 𝑥→0 1 + 𝑚 𝑥 1+0
𝑦=𝑚𝑥
All these limits are the same no matter what 𝑚 is, but we still cannot conclude that the limit
exists and is 0 because there are still infinitely many other paths to consider! In fact,
Along the parabola 𝑥 = 𝑦 2, we have 𝑦
2 (𝑦 2 )(𝑦 2 )
𝑥𝑦 1 1
lim = lim 2 2 = lim = .
(𝑥,𝑦)→(0,0) 𝑥 2 +𝑦 4 𝑦→0 (𝑦 ) + 𝑦 4 𝑦→0 2 2 𝑥
𝑥=𝑦 2
Remark 3.22 (Existence of a limit) When we try to show that the limit of a function exists, the
following are often useful:
Remark 3.16 and the arithmetic operations in Theorem 3.17 and Theorem 3.18
Squeeze theorem
Using polar coordinates (for functions of two real variables involving the factor 𝑥 2 + 𝑦 2 ) or
spherical coordinates (for functions of three real variables involving the factor 𝑥 2 + 𝑦 2 + 𝑧 2) also
helps to determine whether the limit of a function exists or not, because in Definition 3.15,
(𝑥, 𝑦) → (0, 0) is equivalent to 𝑟 → 0+
and
(𝑥, 𝑦, 𝑧) → (0, 0, 0) is equivalent to 𝜌 → 0+ .
Page 9 of 36
MATH2023 Multivariable Calculus Chapter 3 Partial derivatives
L2/L3 (Fall 2019)
Solution:
For every (𝑥, 𝑦) ∈ ℝ2 , we have
𝑥 4 + 𝑦 4 𝑥 4 + 2𝑥 2 𝑦 2 + 𝑦 4
0≤ 2 ≤ = 𝑥2 + 𝑦2.
𝑥 + 𝑦2 𝑥2 + 𝑦2
𝑥4 + 𝑦4
lim =0
(𝑥,𝑦)→(0,0) 𝑥 2 + 𝑦 2
by Squeeze theorem.
Alternative Solution:
We change into polar coordinates by writing 𝑥 = 𝑟 cos 𝜃 and 𝑦 = 𝑟 sin 𝜃. Then
𝑥 4 + 𝑦 4 𝑟 4 cos4 𝜃 + 𝑟 4 sin4 𝜃
= = 𝑟 2 (cos4 𝜃 + sin4 𝜃).
𝑥 2 + 𝑦 2 𝑟 2 cos2 𝜃 + 𝑟 2 sin2 𝜃
Since 0 ≤ cos4 𝜃 + sin4 𝜃 ≤ 1, we always have
When evaluating a limit using polar coordinates,
0 ≤ 𝑟 2 (cos4 𝜃 + sin4 𝜃) ≤ 𝑟 2 . we regard 𝜃 as not a constant but an arbitrary
function of 𝒓, so as to consider all possible paths
Now lim+ 0 = 0 and lim+ 𝑟 2 = 0, so but not just those along straight lines. Therefore
𝑟→0 𝑟→0
the following solution is WRONG:
𝑥4 + 𝑦4 𝑥 4 + 𝑦4
lim = lim+ 𝑟 2 (cos 4 𝜃 + sin4 𝜃) = 0 lim
(𝑥,𝑦)→(0,0) 𝑥 2 + 𝑦 2
= lim+ 𝑟 2 (cos4 𝜃 + sin4 𝜃)
(𝑥,𝑦)→(0,0) 𝑥 2 + 𝑦 2 𝑟→0 𝑟→0
×
by Squeeze theorem. = (cos4 𝜃 + sin4 𝜃) lim+ 𝑟 2
𝑟→0
= (cos4 𝜃 + sin4 𝜃) ⋅ 0 = 0
Solution:
We change into polar coordinates by writing 𝑥 = 𝑟 cos 𝜃 and 𝑦 = 𝑟 sin 𝜃. Then
sin(2𝑥 2 + 2𝑦 2 ) sin(2𝑟 2 ) sin(2𝑟 2 )
lim = lim = 2 lim = 2.
(𝑥,𝑦)→(0,0) 𝑥2 + 𝑦2 𝑟→0+ 𝑟2 𝑟→0+ 2𝑟 2
sin 𝑡
lim =1
𝑡→0 𝑡
Page 10 of 36
MATH2023 Multivariable Calculus Chapter 3 Partial derivatives
L2/L3 (Fall 2019)
Remark 3.26 According to the above definition, by saying that 𝑓 is continuous at (𝑎1 , 𝑎2 , … , 𝑎𝑛 )
we implicitly require that the following three statements all hold:
𝑓 is well-defined at (𝑎1 , 𝑎2 , … , 𝑎𝑛 ) (i.e. 𝑓(𝑎1 , 𝑎2 , … , 𝑎𝑛 ) is well-defined, or the point
(𝑎1 , 𝑎2 , … , 𝑎𝑛 ) is in the domain of 𝑓).
Example 3.27 At which points (𝑎, 𝑏) ∈ ℝ2 are the following functions continuous?
1 𝑥+𝑦 1
(a) 𝑓(𝑥, 𝑦) = sin 𝑥𝑦 (b) 𝑔(𝑥, 𝑦) = 2+cos 𝑥 (c) ℎ(𝑥, 𝑦) = 𝑥−𝑦 2
Solution:
(a) For every point (𝑎, 𝑏) ∈ ℝ2 with 𝑎 ≠ 0 and 𝑏 ≠ 0, we have
1 1
lim 𝑓(𝑥, 𝑦) = lim sin = sin = 𝑓(𝑎, 𝑏)
(𝑥,𝑦)→(𝑎,𝑏) (𝑥,𝑦)→(𝑎,𝑏) 𝑥𝑦 𝑎𝑏
so 𝑓 is continuous at (𝑎, 𝑏) . If either 𝑎 = 0 or 𝑏 = 0 , then 𝑓(𝑎, 𝑏) is undefined.
2
Therefore 𝑓 is continuous on ℝ except for those points on the 𝑥-axis or the 𝑦-axis.
(b) For every point (𝑎, 𝑏) ∈ ℝ2 , since −1 ≤ cos 𝑎 ≤ 1, we always have 2 + cos 𝑎 ≠ 0 and so
𝑥+𝑦 𝑎+𝑏
lim 𝑔(𝑥, 𝑦) = lim = = 𝑔(𝑎, 𝑏).
(𝑥,𝑦)→(𝑎,𝑏) (𝑥,𝑦)→(𝑎,𝑏) 2 + cos 𝑥 2 + cos 𝑎
Therefore 𝑔 is continuous on ℝ2 .
Page 11 of 36
MATH2023 Multivariable Calculus Chapter 3 Partial derivatives
L2/L3 (Fall 2019)
Now we have two different limits of 𝑓(𝑥, 𝑦) along different paths as (𝑥, 𝑦) → (0, 0) , so
lim 𝑓(𝑥, 𝑦) does not exist. Therefore 𝑓 is not continuous at the origin.
(𝑥,𝑦)→(0,0)
Theorem 3.17 and Theorem 3.18 help to construct many examples of continuous functions.
where 𝑔(𝑎1 , 𝑎2 , … , 𝑎𝑛 ) = 0.
The Extreme Value Theorem states that a function of one real variable which is continuous on a
closed and bounded interval [𝑎, 𝑏] must attain absolute maximum and absolute minimum. For
continuous functions of several real variables, we have the following similar result.
Theorem 3.31 (Extreme Value Theorem) Let 𝑓 be a function of 𝑛 real variables which is
continuous on a closed and bounded set 𝐷. Then there exist (𝑎1 , 𝑎2 , … , 𝑎𝑛 ), (𝑏1 , 𝑏2 , … , 𝑏𝑛 ) ∈ 𝐷
such that
𝑓(𝑎1 , 𝑎2 , … , 𝑎𝑛 ) ≤ 𝑓(𝑥1 , 𝑥2 , … , 𝑥𝑛 ) ≤ 𝑓(𝑏1 , 𝑏2 , … , 𝑏𝑛 )
for every (𝑥1 , 𝑥2 , … , 𝑥𝑛 ) ∈ 𝐷.
Page 12 of 36
MATH2023 Multivariable Calculus Chapter 3 Partial derivatives
L2/L3 (Fall 2019)
3. Partial derivatives
We next study the differential calculus of functions of several real variables. For simplicity, we just
consider functions of two real variables in the following definitions and subsequent results.
Functions of more than two variables can be treated in a similar way.
Definition 3.32 Let (𝑎, 𝑏) ∈ ℝ2 and let 𝑓 be a function of two real variables labeled as (𝑥, 𝑦).
The partial derivative of 𝒇 with respect to 𝒙 at (𝒂, 𝒃) is the derivative of the one-variable
function 𝑓(⋅, 𝑏) at 𝑎, i.e.
𝑑 𝑓(𝑎 + ℎ, 𝑏) − 𝑓(𝑎, 𝑏)
𝑓𝑥 (𝑎, 𝑏) ≔
𝑓(𝑥, 𝑏)| = lim .
𝑑𝑥 𝑥=𝑎 ℎ→0 ℎ
Replacing the point (𝑎, 𝑏) by a pair of real variables (𝑥, 𝑦), we say that the partial derivative
of 𝒇 with respect to 𝒙 is the function of two real variables 𝑓𝑥 defined by
𝑓(𝑥 + ℎ, 𝑦) − 𝑓(𝑥, 𝑦)
𝑓𝑥 (𝑥, 𝑦) ≔ lim To differentiate 𝑓 with respect
ℎ→0 ℎ to 𝑥, with all other variables
for every (𝑥, 𝑦) in the domain of 𝑓 such that this limit exists. (i.e. 𝒚) being held constant.
The partial derivative of 𝒇 with respect to 𝒚 at (𝒂, 𝒃) is the derivative of the one-variable
function 𝑓(𝑎,⋅) at 𝑏, i.e.
𝑑 𝑓(𝑎, 𝑏 + ℎ) − 𝑓(𝑎, 𝑏)
𝑓𝑦 (𝑎, 𝑏) ≔ 𝑓(𝑎, 𝑦)| = lim .
𝑑𝑦 𝑦=𝑏
ℎ→0 ℎ
Replacing the point (𝑎, 𝑏) by a pair of real variables (𝑥, 𝑦), we say that the partial derivative
of 𝒇 with respect to 𝒚 is the function of two real variables 𝑓𝑦 defined by
𝑓(𝑥, 𝑦 + ℎ) − 𝑓(𝑥, 𝑦) To differentiate 𝑓 with respect
𝑓𝑦 (𝑥, 𝑦) ≔ lim
ℎ→0 ℎ to 𝑦, with all other variables
(i.e. 𝒙) being held constant.
for every (𝑥, 𝑦) in the domain of 𝑓 such that this limit exists.
Remark 3.33 Let (𝑎, 𝑏) ∈ ℝ2 and let 𝑓 be a function of two real variables, and consider the
cross-sectional curve of the graph of 𝑓 in the plane 𝑦 = 𝑏. Geometrically, 𝑓𝑥 (𝑎, 𝑏) is the slope
of the tangent line to this curve at 𝑎. Similarly, 𝑓𝑦 (𝑎, 𝑏) is the slope of the tangent line at 𝑏 to
the cross-sectional curve of the graph of 𝑓 in the plane 𝑥 = 𝑎.
𝑥=𝑎
𝑧 𝑧
𝑦 𝑦
Slope = 𝑓𝑥 (𝑎, 𝑏) 𝑧 = 𝑓(𝑥, 𝑦) 𝑧 = 𝑓(𝑥, 𝑦)
𝑎 𝑎
𝑥 𝑥
Page 13 of 36
MATH2023 Multivariable Calculus Chapter 3 Partial derivatives
L2/L3 (Fall 2019)
(d) 𝑓𝑥 (0, 1)
0 if 𝑥 ≠ 0
because 𝑓(𝑥, 0) = ቄ is not always 0.
undefined if 𝑥 = 0
Solution:
(a) The required partial derivative is the derivative of the one-variable function 𝑓(⋅, 2) at 1, i.e.
𝑑 𝑑 2 2
𝑓𝑥 (1, 2) = 𝑓(𝑥, 2)| = | = − 2| = −2.
𝑑𝑥 𝑥=1 𝑑𝑥 𝑥 𝑥=1 𝑥 𝑥=1
(b) The required partial derivative is the derivative of the one-variable function 𝑓(−1,⋅) at −2,
i.e.
𝑑 𝑑 𝑦
𝑓𝑦 (−1, −2) = 𝑓(−1, 𝑦)| = | = −1ȁ𝑦=−2 = −1.
𝑑𝑦 𝑦=−2
𝑑𝑦 −1 𝑦=−2
(c) and (d) The domain of 𝑓 consists only of those points (𝑎, 𝑏) ∈ ℝ2 such that 𝑎 ≠ 0.
Since (0, 0) and (0, 1) are not in the domain of 𝑓, i.e. 𝑓(0, 0) and 𝑓(0, 1) are
undefined, and so both 𝑓𝑥 (0, 0) and 𝑓𝑥 (0, 1) are also undefined.
Example 3.35 We modify the function 𝑓 in the above example and let
𝑦
if 𝑥 ≠ 0
𝑓(𝑥, 𝑦) = {𝑥 .
0 if 𝑥 = 0
Compute the partial derivatives 𝑓𝑥 (0, 0) and 𝑓𝑥 (0, 1).
Solution:
This time the domain of 𝑓 is the whole ℝ2 , so (0, 0) and (0, 1) are actually in the domain of 𝑓,
and it makes sense to ask for 𝑓𝑥 (0, 0) and 𝑓𝑥 (0, 1).
0
if 𝑥 ≠ 0
In fact, 𝑓(𝑥, 0) = { 𝑥 simply means that 𝑓(𝑥, 0) = 0 for every 𝑥. Thus
0 if 𝑥 = 0
𝑑 𝑑
𝑓𝑥 (0, 0) = 𝑓(𝑥, 0)| = 0| = 0.
𝑑𝑥 𝑥=0 𝑑𝑥 𝑥=0
1
if 𝑥 ≠ 0
But the (one-variable) function 𝑓(𝑥, 1) = { 𝑥 is discontinuous at 𝑥 = 0, so
0 if 𝑥 = 0
𝑑
𝑓𝑥 (0, 1) = 𝑓(𝑥, 1)| is undefined.
𝑑𝑥 𝑥=0
Page 14 of 36
MATH2023 Multivariable Calculus Chapter 3 Partial derivatives
L2/L3 (Fall 2019)
Remark 3.36 Various other notations are often used for the partial derivatives of a function 𝑓.
When we emphasize that the partial derivatives of 𝑓 are functions, we write 𝑓𝑥 and 𝑓𝑦
𝜕𝑓 𝜕𝑓
(Leibniz’s notation), or and (Lagrange’s notation), or 𝐷𝑥 𝑓 and 𝐷𝑦 𝑓 (Euler’s notation).
𝜕𝑥 𝜕𝑦
The value of such functions evaluated at (𝑎, 𝑏) are thus written as 𝑓𝑥 (𝑎, 𝑏) and 𝑓𝑦 (𝑎, 𝑏), or
𝜕𝑓 𝜕𝑓
(𝑎, 𝑏) and (𝑎, 𝑏), or 𝐷𝑥 𝑓(𝑎, 𝑏) and 𝐷𝑦 𝑓(𝑎, 𝑏).
𝜕𝑥 𝜕𝑦
In science or engineering, we often want to name the dependent variable as 𝑧 ≔ 𝑓(𝑥, 𝑦), and
work with variables without explicitly mentioning the function 𝑓. In such case we also write
𝜕𝑧 𝜕𝑧
the partial derivatives of 𝑧 as 𝑧𝑥 and 𝑧𝑦 , or and . At the point (𝑎, 𝑏) we may write
𝜕𝑥 𝜕𝑦
𝜕𝑧 𝜕𝑧
| and | .
𝜕𝑥 𝑥=𝑎,𝑦=𝑏 𝜕𝑦 𝑥=𝑎,𝑦=𝑏
Remark 3.37 The rules of differentiation for sums, differences, scalar multiples, the product rule
and the quotient rule all hold for partial derivatives. The chain rule for partial derivatives is
slightly more complicated and will be discussed in the next section.
Partial derivatives of a function of more than two real variables are defined in a similar manner.
Instead of putting down their definition which consists of complicated notations, we illustrate this
with an example.
Solution:
𝜕𝑓
When computing , we differentiate with respect to 𝑥 and regard all the other variables 𝑦, 𝑧
𝜕𝑥
and 𝑤 as constants (i.e. we regard 𝑦, 𝑧 and 𝑤 as objects just like 3 or 𝜋). We have
𝜕𝑓 𝜕 𝜕
(𝑥, 𝑦, 𝑧, 𝑤) = 3𝑦 (𝑥 2 ) + (cos 𝑧𝑤) = 3𝑦(2𝑥) + 0 = 6𝑥𝑦.
𝜕𝑥 𝜕𝑥 𝜕𝑥
𝜕𝑓
Similarly, when computing , we differentiate with respect to 𝑤 and
𝜕𝑤
𝑑
cos 6𝑤 = −6 sin 6𝑤
regard all the other variables 𝑥, 𝑦 and 𝑧 as constants. We have 𝑑𝑤
𝜕𝑓 𝜕 𝜕
(𝑥, 𝑦, 𝑧, 𝑤) = (3𝑥 2 𝑦) + (cos 𝑧𝑤) = 0 + (−𝑧 sin 𝑧𝑤) = −𝑧 sin 𝑧𝑤.
𝜕𝑤 𝜕𝑤 𝜕𝑤
Page 15 of 36
MATH2023 Multivariable Calculus Chapter 3 Partial derivatives
L2/L3 (Fall 2019)
Example 3.39 Let 𝑧 = 𝑓(𝑥, 𝑦) be a function in two real variables such that
𝑧 2 + 𝑥𝑦 + 𝑦 2 𝑧 = 0
for every (𝑥, 𝑦). Evaluate 𝑧𝑦 .
Solution:
Taking partial derivatives on both sides with respect to 𝑦, we get
2𝑧𝑧𝑦 + 𝑥 + ൫2𝑦𝑧 + 𝑦 2 𝑧𝑦 ൯ = 0.
Therefore
𝑥 + 2𝑦𝑧
𝑧𝑦 = − .
2𝑧 + 𝑦 2
2 𝜕𝑓
Example 3.40 Let 𝑓(𝑥, 𝑦) = √𝑒 𝑥+𝑦 𝑥 𝑦 𝑦 𝑥 for every (𝑥, 𝑦). Evaluate .
𝜕𝑥
Solution:
Squaring both sides we have
2
[𝑓(𝑥, 𝑦)]2 = 𝑒 𝑥+𝑦 𝑥 𝑦 𝑦 𝑥 .
Taking partial derivatives on both sides with respect to 𝑥, we get
𝜕𝑓 2 2 2
2𝑓(𝑥, 𝑦) (𝑥, 𝑦) = ൫𝑒 𝑥+𝑦 ൯𝑥 𝑦 𝑦 𝑥 + 𝑒 𝑥+𝑦 (𝑦𝑥 𝑦−1 )𝑦 𝑥 + 𝑒 𝑥+𝑦 𝑥 𝑦 (𝑦 𝑥 ln 𝑦),
𝜕𝑥
and so
2 2 2
𝜕𝑓 ൫𝑒 𝑥+𝑦 ൯𝑥 𝑦 𝑦 𝑥 + 𝑒 𝑥+𝑦 (𝑦𝑥 𝑦−1 )𝑦 𝑥 + 𝑒 𝑥+𝑦 𝑥 𝑦 (𝑦 𝑥 ln 𝑦)
(𝑥, 𝑦) =
𝜕𝑥 2𝑓(𝑥, 𝑦)
2 2 2
൫𝑒 𝑥+𝑦 ൯𝑥 𝑦 𝑦 𝑥 + 𝑒 𝑥+𝑦 (𝑦𝑥 𝑦−1 )𝑦 𝑥 + 𝑒 𝑥+𝑦 𝑥 𝑦 (𝑦 𝑥 ln 𝑦)
= 2
2√𝑒 𝑥+𝑦 𝑥 𝑦 𝑦 𝑥
1 𝑥+𝑦 2 𝑦 𝑥 𝑦
= √𝑒 𝑥 𝑦 (1 + + ln 𝑦).
2 𝑥
We have learnt in MATH1013/1023 that if 𝑓 is a function of one real variable which has an inverse
𝑑𝑦 1
𝑓 −1 , and if we write 𝑦 = 𝑓(𝑥) and 𝑥 = 𝑓 −1 (𝑦), then = 𝑑𝑥 . For functions of several variables,
𝑑𝑥
𝑑𝑦
this result is a bit more complicated. If the variables 𝑥 and 𝑦 in a pair of functions 𝑢(𝑥, 𝑦) and
𝑣(𝑥, 𝑦) can in turn be expressed as functions 𝑥(𝑢, 𝑣) and 𝑦(𝑢, 𝑣), then in general we DO NOT
𝜕𝑢 1
have = 𝜕𝑥 .
𝜕𝑥
𝜕𝑢
Page 16 of 36
MATH2023 Multivariable Calculus Chapter 3 Partial derivatives
L2/L3 (Fall 2019)
can be expressed as functions of the two real variables 𝑢 and 𝑣 near (𝑥, 𝑦) = (0, 1). Compute
the partial derivatives 𝑥𝑢 (1, cos 1) and 𝑦𝑢 (1, cos 1) at (𝑢, 𝑣) = (1, cos 1).
Solution:
Taking partial derivatives with respect to 𝑢 on both sides of each of the equations in the given
system, we get
Here 𝑥 = 𝑥(𝑢, 𝑣) and 𝑦 = 𝑦(𝑢, 𝑣),
1 = 𝑥𝑢 + 𝑦𝑢 where 𝑢 and 𝑣 are independent
൜ . real variables.
0 = (cos 𝑥)𝑥𝑢 + (− sin 𝑦)𝑦𝑢
The values (𝑥, 𝑦) = (0, 1) corresponds to our required point (𝑢, 𝑣) = (1, cos 1), so
1 = 𝑥𝑢 (1, cos 1) + 𝑦𝑢 (1, cos 1)
൜ ,
0 = (cos 0)𝑥𝑢 (1, cos 1) + (− sin 1)𝑦𝑢 (1, cos 1)
so on solving this system of linear equations we get
sin 1 1
𝑥𝑢 (1, cos 1) = and 𝑦𝑢 (1, cos 1) = .
1 + sin 1 1 + sin 1
Definition 3.42 Let 𝑓 be a function of two real variables labeled as (𝑥, 𝑦). Then the second
partial derivatives of 𝑓 are
Remark 3.43 There are other notations for the higher partial derivatives of a function 𝑓. Since
𝜕𝑓
𝑓𝑥𝑥 is the partial derivative of 𝑓𝑥 (or ) with respect to 𝑥, we also write
𝜕𝑥
𝜕 𝜕𝑓 𝜕 2𝑓
𝑓𝑥𝑥 = ( )= 2.
𝜕𝑥 𝜕𝑥 𝜕𝑥
Similarly we write
𝜕 𝜕𝑓 𝜕 2𝑓 𝜕 𝜕𝑓 𝜕 2𝑓 𝜕 𝜕𝑓 𝜕 2𝑓
𝑓𝑥𝑦 = ( )= , 𝑓𝑦𝑥 = ( )= and 𝑓𝑦𝑦 = ( ) = 2.
𝜕𝑦 𝜕𝑥 𝜕𝑦𝜕𝑥 𝜕𝑥 𝜕𝑦 𝜕𝑥𝜕𝑦 𝜕𝑦 𝜕𝑦 𝜕𝑦
𝜕2 𝑓
Note the order of differentiation with respect to different variables. In computing 𝑓𝑥𝑦 or ,
𝜕𝑦𝜕𝑥
we first differentiate with respect to 𝑥 then differentiate with respect to 𝑦. We have similar
notations for even higher partial derivatives, for example
𝜕 4𝑓
𝑓𝑥𝑦𝑥𝑥 = .
𝜕𝑥 2 𝜕𝑦𝜕𝑥
Page 17 of 36
MATH2023 Multivariable Calculus Chapter 3 Partial derivatives
L2/L3 (Fall 2019)
Solution:
𝜕𝑓
Since (𝑥, 𝑦) = 𝑥𝑒 𝑥𝑦 , we have
𝜕𝑦
𝜕 2𝑓 𝜕 𝜕𝑓 𝜕
(𝑥, 𝑦) = ( (𝑥, 𝑦)) = (𝑥𝑒 𝑥𝑦 )
𝜕𝑥𝜕𝑦 𝜕𝑥 𝜕𝑦 𝜕𝑥
𝜕 2𝑓 𝜕 𝜕𝑓 𝜕
(𝑥, 𝑦) = ( (𝑥, 𝑦)) = (𝑦𝑒 𝑥𝑦 )
𝜕𝑦𝜕𝑥 𝜕𝑦 𝜕𝑥 𝜕𝑦
𝜕2 𝑓 𝜕2 𝑓
In Example 3.44 we notice that = 𝜕𝑦𝜕𝑥. This is not just a coincidence, but is in fact true for
𝜕𝑥𝜕𝑦
Theorem 3.45 (Mixed derivative theorem) Let 𝑓 be a function of two real variables and let
(𝑎, 𝑏) ∈ ℝ2 . If 𝑓𝑥𝑦 and 𝑓𝑦𝑥 both exist near (𝑎, 𝑏) and are both continuous at (𝑎, 𝑏), then
𝑓𝑥𝑦 (𝑎, 𝑏) = 𝑓𝑦𝑥 (𝑎, 𝑏).
Proof. We omit the proof of this theorem, which just consists of repetitive applications of the
Mean Value Theorem for one-variable functions. We leave the proof of a weaker version of this
theorem as an exercise in Problem Set 5. ∎
Remark 3.46 Let 𝑓 be a function of two real variables. Then the mixed derivative theorem
suggests that every higher partial derivative of 𝑓 must be of the form
𝜕 𝑛+𝑚 𝑓
𝜕𝑥 𝑛 𝜕𝑦 𝑚
for some non-negative integers 𝑛 and 𝑚.
Page 18 of 36
MATH2023 Multivariable Calculus Chapter 3 Partial derivatives
L2/L3 (Fall 2019)
𝑑 𝑑 𝑑 𝑑
𝑓𝑥 (0, 0) = 𝑓(𝑥, 0) = 0=0 and 𝑓𝑦 (0, 0) = 𝑓(0, 𝑦) = 0 = 0.
𝑑𝑥 𝑑𝑥 𝑑𝑦 𝑑𝑦
But on the other hand, we have already shown in Example 3.28 that 𝑓 is not continuous at (𝟎, 𝟎).
In fact, differentiablility of a function of several real variables requires much stronger conditions
than just the existence of partial derivatives. Before stating the definition, let’s recall how we
defined differentiability of a function of one real variable in MATH1013/1023.
Definition Let 𝑓 be a function of one real variable and let 𝑎 ∈ ℝ. 𝑓 is said to be differentiable
at 𝒂 if the limit
𝑓(𝑥) − 𝑓(𝑎)
𝑚 = lim
𝑥→𝑎 𝑥−𝑎
exists as a finite real number. If 𝑚 is a real number, then we symbolically write 𝑚 = 𝑓 ′ (𝑎).
Alternative Definition Let 𝑓 be a function of one real variable and let 𝑎 ∈ ℝ. 𝑓 is said to be
differentiable at 𝒂 if there exists a real number 𝑚 such that
ȁ𝑓(𝑥) − 𝑓(𝑎) − 𝑚(𝑥 − 𝑎)ȁ
lim = 0.
𝑥→𝑎 ȁ𝑥 − 𝑎ȁ
If such 𝑚 exists, then we call 𝑚 the derivative of 𝒇 at 𝒂 and symbolically write 𝑚 = 𝑓 ′ (𝑎).
Definition 3.48 Let 𝑓 be a function of two real variables and let (𝑎, 𝑏) ∈ ℝ2 . 𝑓 is said to be
differentiable at (𝒂, 𝒃) if there exist real numbers 𝑚1 and 𝑚2 such that
ȁ𝑓(𝑥, 𝑦) − 𝑓(𝑎, 𝑏) − 𝑚1 (𝑥 − 𝑎) − 𝑚2 (𝑦 − 𝑏)ȁ
lim = 0.
(𝑥,𝑦)→(𝑎,𝑏) √(𝑥 − 𝑎)2 + (𝑦 − 𝑏)2
If such numbers 𝑚1 and 𝑚2 exist, then we must have 𝑚1 = 𝑓𝑥 (𝑎, 𝑏) and 𝑚2 = 𝑓𝑦 (𝑎, 𝑏).
Think: Can you then write down the definition of a differentiable function of 𝑛 real variables?
Page 19 of 36
MATH2023 Multivariable Calculus Chapter 3 Partial derivatives
L2/L3 (Fall 2019)
Definition 3.48 is not very convenient to be applied directly, but fortunately we have the following
sufficient condition for differentiability which is often much easier to check.
Theorem 3.49 Let 𝑓 be a function of two real variables and 𝐷 be an open disk in ℝ2 . If the
partial derivatives 𝑓𝑥 and 𝑓𝑦 are continuous on 𝐷, then 𝑓 is differentiable at every point in 𝐷.
Proof of Theorem 3.49. Let (𝑎, 𝑏) ∈ 𝐷 be arbitrary. We aim to show that 𝑓 is differentiable at
(𝑎, 𝑏). Now for each point (𝑥, 𝑦) near (𝑎, 𝑏) but (𝑥, 𝑦) ≠ (𝑎, 𝑏), it follows that (𝑥, 𝑦) also
belongs to 𝐷; so applying the Mean Value Theorem to the one-variable differentiable functions
𝑓(⋅, 𝑦) and 𝑓(𝑎,⋅), there exist 𝜉 between 𝑥 and 𝑎 and 𝜂 between 𝑦 and 𝑏 such that
𝑓(𝑥, 𝑦) − 𝑓(𝑎, 𝑏) = [𝑓(𝑥, 𝑦) − 𝑓(𝑎, 𝑦)] + [𝑓(𝑎, 𝑦) − 𝑓(𝑎, 𝑏)]
= 𝑓𝑥 (𝜉, 𝑦)(𝑥 − 𝑎) + 𝑓𝑦 (𝑎, 𝜂)(𝑦 − 𝑏).
Thus we always have
|𝑓𝑥 (𝜉, 𝑦)(𝑥 − 𝑎) + 𝑓𝑦 (𝑎, 𝜂)(𝑦 − 𝑏) − 𝑓𝑥 (𝑎, 𝑏)(𝑥 − 𝑎) − 𝑓𝑦 (𝑎, 𝑏)(𝑦 − 𝑏)|
=
√(𝑥 − 𝑎)2 + (𝑦 − 𝑏)2
𝜉 is between 𝑥 and 𝑎;
ȁ𝑥 − 𝑎ȁ ȁ𝑦 − 𝑏ȁ 𝜂 is between 𝑦 and 𝑏.
≤ ȁ𝑓𝑥 (𝜉, 𝑦) − 𝑓𝑥 (𝑎, 𝑏)ȁ + |𝑓𝑦 (𝑎, 𝜂) − 𝑓𝑦 (𝑎, 𝑏)|
⏟ − 𝑎)2 + (𝑦 − 𝑏)2
√(𝑥 ⏟ − 𝑎)2 + (𝑦 − 𝑏)2
√(𝑥
≤1 ≤1
≤ ȁ𝑓𝑥 (𝜉, 𝑦) − 𝑓𝑥 (𝑎, 𝑏)ȁ + |𝑓𝑦 (𝑎, 𝜂) − 𝑓𝑦 (𝑎, 𝑏)|. 𝜉 is between 𝑥 and 𝑎;
Since 𝑓𝑥 and 𝑓𝑦 are continuous near (𝑎, 𝑏), we have 𝜂 is between 𝑦 and 𝑏.
lim ȁ𝑓𝑥 (𝜉, 𝑦) − 𝑓𝑥 (𝑎, 𝑏)ȁ = lim |𝑓𝑦 (𝑎, 𝜂) − 𝑓𝑦 (𝑎, 𝑏)| = 0.
(𝑥,𝑦)→(𝑎,𝑏) (𝑥,𝑦)→(𝑎,𝑏)
Therefore
Page 20 of 36
MATH2023 Multivariable Calculus Chapter 3 Partial derivatives
L2/L3 (Fall 2019)
Theorem 3.50 Let 𝑓 be a function of two real variables and let (𝑎, 𝑏) ∈ ℝ2 . If 𝑓 is
differentiable at (𝑎, 𝑏), then 𝑓 is continuous at (𝑎, 𝑏).
Proof. Let’s write 𝑚1 ≔ 𝑓𝑥 (𝑎, 𝑏) and 𝑚2 ≔ 𝑓𝑦 (𝑎, 𝑏). If 𝑓 is differentiable at (𝑎, 𝑏), then
ȁ𝑓(𝑥, 𝑦) − 𝑓(𝑎, 𝑏) − 𝑚1 (𝑥 − 𝑎) − 𝑚2 (𝑦 − 𝑏)ȁ
lim = 0.
(𝑥,𝑦)→(𝑎,𝑏) √(𝑥 − 𝑎)2 + (𝑦 − 𝑏)2
So
=0⋅0
= 0,
which implies that
= 𝑓(𝑎, 𝑏) + 𝑚1 ⋅ 0 + 𝑚2 ⋅ 0
= 𝑓(𝑎, 𝑏),
i.e. 𝑓 is continuous at (𝑎, 𝑏). ∎
Remark 3.51 The following chart summarizes the logical relations between continuity,
differentiability, and the existence of partial derivatives of a function of two real variables.
𝜕𝑓 𝜕𝑓
Partial derivatives and are
𝜕𝑥 𝜕𝑦
Page 21 of 36
MATH2023 Multivariable Calculus Chapter 3 Partial derivatives
L2/L3 (Fall 2019)
4. Chain rules
Theorem 3.52 (Chain rule, one variable two intermediates) Let 𝑥 and 𝑦 be functions of one
real variable and 𝑓 be a function of two real variables, such that 𝑥 , 𝑦 and 𝑓 are all
differentiable. Let 𝐹 be the function of one real variable defined by
𝐹(𝑡) ≔ 𝑓൫𝑥(𝑡), 𝑦(𝑡)൯.
Then for every 𝑡,
𝐹 ′ (𝑡) = 𝑓𝑥 ൫𝑥(𝑡), 𝑦(𝑡)൯𝑥 ′ (𝑡) + 𝑓𝑦 ൫𝑥(𝑡), 𝑦(𝑡)൯𝑦 ′ (𝑡).
If we write 𝑤 = 𝑓(𝑥, 𝑦) = 𝐹(𝑡), then in Leibniz’s notation this formula becomes
𝑑𝑤 𝜕𝑤 𝑑𝑥 𝜕𝑤 𝑑𝑦
= + .
𝑑𝑡 𝜕𝑥 𝑑𝑡 𝜕𝑦 𝑑𝑡
𝑤
Remark 3.53 To remember the above formula, we sometimes use the tree 𝜕𝑤 𝜕𝑤
𝜕𝑥 𝜕𝑦
diagram on the right which summarizes the relations of the variables 𝑤, 𝑥, 𝑦
𝑥 𝑦
𝑑𝑤
and 𝑡. To compute , we go from 𝑤 down to 𝑡 via all possible paths, 𝑑𝑥
𝑑𝑡 𝑑𝑦
𝑑𝑡 𝑑𝑡
multiply the derivatives along each path, and sum these products. Such tree 𝑡
Theorem 3.54 (Chain rule, one variable 𝒏 intermediates) Let 𝑥1 , 𝑥2 , … , 𝑥𝑛 be functions of one
real variable and 𝑓 be a function of 𝑛 real variables, such that 𝑥1 , 𝑥2 , … , 𝑥𝑛 and 𝑓 are all
differentiable. Let 𝐹 be the function of one real variable defined by
𝐹(𝑡) ≔ 𝑓൫𝑥1 (𝑡), 𝑥2 (𝑡), … , 𝑥𝑛 (𝑡)൯.
Then for every 𝑡,
𝐹 ′ (𝑡) = 𝑓𝑥1 ൫𝑥1 (𝑡), 𝑥2 (𝑡), … , 𝑥𝑛 (𝑡)൯𝑥1 ′ (𝑡) + 𝑓𝑥2 ൫𝑥1 (𝑡), 𝑥2 (𝑡), … , 𝑥𝑛 (𝑡)൯𝑥2 ′ (𝑡) + ⋯
+ 𝑓𝑥𝑛 ൫𝑥1 (𝑡), 𝑥2 (𝑡), … , 𝑥𝑛 (𝑡)൯𝑥𝑛 ′ (𝑡). 𝑤
𝜕𝑤
If we write 𝜕𝑥1
𝜕𝑤
𝜕𝑥𝑛
𝑤 = 𝑓(𝑥1 , 𝑥2 , … , 𝑥𝑛 ) = 𝐹(𝑡), 𝑥2
𝑥3 ⋯
𝑥1 𝑥𝑛
then in Leibniz’s notation this formula becomes
𝑑𝑥1 𝑑𝑥𝑛
𝑑𝑤 𝜕𝑤 𝑑𝑥1 𝜕𝑤 𝑑𝑥2 𝜕𝑤 𝑑𝑥𝑛 𝑑𝑡 𝑑𝑡
= + + ⋯+ . 𝑡
𝑑𝑡 𝜕𝑥1 𝑑𝑡 𝜕𝑥2 𝑑𝑡 𝜕𝑥𝑛 𝑑𝑡
Proof of Theorem 3.52. For each 𝑡, since 𝑓 is differentiable at the point ൫𝑥(𝑡), 𝑦(𝑡)൯, we have
Page 22 of 36
MATH2023 Multivariable Calculus Chapter 3 Partial derivatives
L2/L3 (Fall 2019)
൫𝑥(𝑡), 𝑦(𝑡)൯. Now for simplicity let’s denote 𝐴(ℎ) ≔ 𝑓൫𝑥(𝑡 + ℎ), 𝑦(𝑡 + ℎ)൯ − 𝑓൫𝑥(𝑡), 𝑦(𝑡)൯ and
𝐵(ℎ) ≔ 𝑓𝑥 ൫𝑥(𝑡), 𝑦(𝑡)൯[𝑥(𝑡 + ℎ) − 𝑥(𝑡)] + 𝑓𝑦 ൫𝑥(𝑡), 𝑦(𝑡)൯[𝑦(𝑡 + ℎ) − 𝑦(𝑡)]. Then
𝐴(ℎ) − 𝐵(ℎ)
lim =0
ℎ→0 ℎ
(why?). Therefore for each 𝑡, we have
𝐹(𝑡 + ℎ) − 𝐹(𝑡) 𝑓൫𝑥(𝑡 + ℎ), 𝑦(𝑡 + ℎ)൯ − 𝑓൫𝑥(𝑡), 𝑦(𝑡)൯
𝐹 ′ (𝑡) = lim = lim
ℎ→0 ℎ ℎ→0 ℎ
𝐴(ℎ) 𝐴(ℎ) 𝐴(ℎ) − 𝐵(ℎ) 𝐵(ℎ)
= lim = lim − lim = lim
ℎ→0 ℎ ℎ→0 ℎ ℎ→0 ℎ ℎ→0 ℎ
Example 3.55 Two people are running along two perpendicular lines intersecting at the origin 𝑂.
At a certain moment, the first runner is at a distance of 4 m away from 𝑂, and is running towards
𝑂 at a speed of 4 m/s. At the same moment, the second runner is at a distance of 3 m away
from 𝑂 and is running toward 𝑂 at a speed of 3 m/s. How fast are they approaching each
other at that moment?
Solution:
Let 𝑥(𝑡) and 𝑦(𝑡) be the distance in m of the first and second runner
away from 𝑂 at time 𝑡 respectively. Then the distance between them
𝑂
at time 𝑡 is given by
𝑟(𝑡) = √[𝑥(𝑡)]2 + [𝑦(𝑡)]2 .
So by chain rule,
𝜕𝑟 𝑑𝑥 𝜕𝑟 𝑑𝑦 𝑥(𝑡) 𝑦(𝑡)
𝑟 ′ (𝑡) = + = 𝑥 ′ (𝑡) + 𝑦 ′ (𝑡).
𝜕𝑥 𝑑𝑡 𝜕𝑦 𝑑𝑡 √[𝑥(𝑡)]2 + [𝑦(𝑡)]2 √[𝑥(𝑡)]2 + [𝑦(𝑡)]2
At that moment, say 𝑡 = 𝑡0 , we have
𝑥(𝑡0 ) = 4, 𝑥 ′ (𝑡0 ) = −4, 𝑦(𝑡0 ) = 3 and 𝑦 ′ (𝑡0 ) = −3,
and so
4 3
𝑟 ′ (𝑡0 ) = (−4) + (−3) = −5.
ξ42 + 32 ξ42 + 32
Therefore they are approaching each other at a speed of 5 m/s at that moment.
Page 23 of 36
MATH2023 Multivariable Calculus Chapter 3 Partial derivatives
L2/L3 (Fall 2019)
𝑑𝑤
Example 3.56 Let 𝑤 = 𝑥𝑦 + 𝑧, where (𝑥, 𝑦, 𝑧) = (cos 𝑡 , sin 𝑡 , 𝑡). Evaluate .
𝑑𝑡
Solution:
Applying the chain rule, we have
𝑤
𝑑𝑤 𝜕𝑤 𝑑𝑥 𝜕𝑤 𝑑𝑦 𝜕𝑤 𝑑𝑧 𝜕𝑤 𝜕𝑤
= + + 𝜕𝑥
𝑑𝑡 𝜕𝑥 𝑑𝑡 𝜕𝑦 𝑑𝑡 𝜕𝑧 𝑑𝑡 𝜕𝑤 𝜕𝑧
𝜕𝑦
𝑥 𝑦 𝑧
= (𝑦)(− sin 𝑡) + (𝑥)(cos 𝑡) + (1)(1) 𝑑𝑦
𝑑𝑥 𝑑𝑡 𝑑𝑧
= (sin 𝑡)(− sin 𝑡) + (cos 𝑡)(cos 𝑡) + (1)(1) 𝑑𝑡 𝑑𝑡
Corollary 3.57 (Implicit differentiation revisited) Let 𝑓 be a function of two real variables having
continuous partial derivatives, and let 𝑦 be a differentiable function of one real variable such that
𝑓൫𝑥, 𝑦(𝑥)൯ = 0
for every 𝑥. Then
𝑓𝑥 (𝑥, 𝑦)
𝑦 ′ (𝑥) = −
𝑓𝑦 (𝑥, 𝑦)
provided that 𝑓𝑦 (𝑥, 𝑦) ≠ 0.
Proof. Differentiating both sides of the equation 𝑓(𝑥, 𝑦) = 0 with respect to 𝑥 using chain rule,
we get
𝑓𝑥 (𝑥, 𝑦) ⋅ 1 + 𝑓𝑦 (𝑥, 𝑦)𝑦 ′ (𝑥) = 0.
𝑓 (𝑥,𝑦)
So provided that 𝑓𝑦 (𝑥, 𝑦) ≠ 0, we have 𝑦 ′ (𝑥) = − 𝑓𝑥 (𝑥,𝑦). ∎
𝑦
Example 3.58 Let 𝑦 be a function of a real variable 𝑥 such that 𝑦(1) = 1 and
𝑥 4 + 𝑥𝑦 + 𝑦 4 = 3
𝑑𝑦
for every 𝑥. Find | .
𝑑𝑥 𝑥=1
Solution:
Apart from the method we have learnt in MATH1013/1023, we can try using partial derivatives now.
Applying Corollary 3.57 to the function
𝑓(𝑥, 𝑦) ≔ 𝑥 4 + 𝑥𝑦 + 𝑦 4 − 3,
we get
𝑑𝑦 𝑓𝑥 (𝑥, 𝑦) 4𝑥 3 + 𝑦
=− =− ,
𝑑𝑥 𝑓𝑦 (𝑥, 𝑦) 𝑥 + 4𝑦 3
𝑑𝑦 4(1)3 +𝑦(1) 4(1)3 +1
so | = − 1+4[𝑦(1)]3 = − 1+4(1)3 = −1.
𝑑𝑥 𝑥=1
Page 24 of 36
MATH2023 Multivariable Calculus Chapter 3 Partial derivatives
L2/L3 (Fall 2019)
Theorem 3.59 (Chain rule, two variables two intermediates) Let 𝑢, 𝑣 and 𝑓 be differentiable
functions of two real variables. Let 𝐹 be the function of two real variables defined by
𝐹(𝑥, 𝑦) ≔ 𝑓൫𝑢(𝑥, 𝑦), 𝑣(𝑥, 𝑦)൯.
Then
𝐹𝑥 (𝑥, 𝑦) = 𝑓𝑢 ൫𝑢(𝑥, 𝑦), 𝑣(𝑥, 𝑦)൯𝑢𝑥 (𝑥, 𝑦) + 𝑓𝑣 ൫𝑢(𝑥, 𝑦), 𝑣(𝑥, 𝑦)൯𝑣𝑥 (𝑥, 𝑦)
and
𝐹𝑦 (𝑥, 𝑦) = 𝑓𝑢 ൫𝑢(𝑥, 𝑦), 𝑣(𝑥, 𝑦)൯𝑢𝑦 (𝑥, 𝑦) + 𝑓𝑣 ൫𝑢(𝑥, 𝑦), 𝑣(𝑥, 𝑦)൯𝑣𝑦 (𝑥, 𝑦).
If we write 𝑤 = 𝑓(𝑢, 𝑣) = 𝐹(𝑥, 𝑦), then in Leibniz’s notation
𝑤
these formulas become 𝜕𝑤 𝜕𝑤
𝜕𝑢 𝜕𝑣
𝜕𝑤 𝜕𝑤 𝜕𝑢 𝜕𝑤 𝜕𝑣 𝜕𝑢 𝜕𝑣
= + 𝑢 𝜕𝑦 𝜕𝑥
𝑣
𝜕𝑥 𝜕𝑢 𝜕𝑥 𝜕𝑣 𝜕𝑥 𝜕𝑢
𝜕𝑤 𝜕𝑤 𝜕𝑢 𝜕𝑤 𝜕𝑣 .
𝜕𝑣
𝜕𝑥 𝜕𝑦
= +
{ 𝜕𝑦 𝜕𝑢 𝜕𝑦 𝜕𝑣 𝜕𝑦 𝑥 𝑦
Example 3.60 Let 𝑓 be a differentiable function of two real variables and let
𝐹(𝑟, 𝜃) = 𝑓(𝑥, 𝑦)
for every (𝑟, 𝜃), where
𝑥 = 𝑟 cos 𝜃
൜ .
𝑦 = 𝑟 sin 𝜃
𝜕𝑓 𝜕𝑓 𝜕𝑓 2 𝜕𝑓 2 𝜕𝐹 𝜕𝐹
Express , and (𝜕𝑥 ) + (𝜕𝑦) in terms of and .
𝜕𝑥 𝜕𝑦 𝜕𝑟 𝜕𝜃
Solution:
Taking partial derivatives with respect to 𝑟 on both sides of the equation 𝐹(𝑟, 𝜃) = 𝑓(𝑥, 𝑦) using
the chain rule, we get
𝜕𝐹 𝜕𝑓 𝜕𝑥 𝜕𝑓 𝜕𝑦 𝜕𝑓 𝜕𝑓
= + = ( ) (cos 𝜃) + ( ) (sin 𝜃).
𝜕𝑟 𝜕𝑥 𝜕𝑟 𝜕𝑦 𝜕𝑟 𝜕𝑥 𝜕𝑦
Similarly, taking partial derivatives with respect to 𝜃 using the chain rule, we get
𝜕𝐹 𝜕𝑓 𝜕𝑥 𝜕𝑓 𝜕𝑦 𝜕𝑓 𝜕𝑓
= + = ( ) (−𝑟 sin 𝜃) + ( ) (𝑟 cos 𝜃).
𝜕𝜃 𝜕𝑥 𝜕𝜃 𝜕𝑦 𝜕𝜃 𝜕𝑥 𝜕𝑦
𝜕𝑓 𝜕𝑓
On solving and from the system of the above two linear equations, we get
𝜕𝑥 𝜕𝑦
𝜕𝑓 𝜕𝐹 sin 𝜃 𝜕𝐹 𝜕𝑓 𝜕𝐹 cos 𝜃 𝜕𝐹
= (cos 𝜃) −( ) and = (sin 𝜃) +( ) .
𝜕𝑥 𝜕𝑟 𝑟 𝜕𝜃 𝜕𝑦 𝜕𝑟 𝑟 𝜕𝜃
Therefore
𝜕𝑓 2 𝜕𝑓 2 𝜕𝐹 2 1 𝜕𝐹 2
( ) +( ) = ( ) + 2( ) .
𝜕𝑥 𝜕𝑦 𝜕𝑟 𝑟 𝜕𝜃
Page 25 of 36
MATH2023 Multivariable Calculus Chapter 3 Partial derivatives
L2/L3 (Fall 2019)
Tree diagrams are helpful in writing down any version of the chain rule.
Example 3.61 Let 𝑥 and 𝑦 be functions of two real variables labeled as (𝑠, 𝑡), and 𝑧 be a
function of the same variable 𝑡. Also let 𝑓 be a function of one real variable and 𝑔 be a
function of three real variables, and suppose that all these five functions are differentiable. Write
𝜕𝑤 𝜕𝑤 𝜕2 𝑤
down the chain rule for computing , and if
𝜕𝑠 𝜕𝑡 𝜕𝑠𝜕𝑡
(a) 𝑤 = 𝑓(𝑥)
(b) 𝑤 = 𝑔(𝑥, 𝑦, 𝑧)
Solution:
𝑤
(a) We have 𝑑𝑤
𝜕𝑤 𝑑𝑤 𝜕𝑥 𝜕𝑤 𝑑𝑤 𝜕𝑥 𝑥
𝑑𝑥
= and = . 𝜕𝑥
𝜕𝑠 𝑑𝑥 𝜕𝑠 𝜕𝑡 𝑑𝑥 𝜕𝑡 𝜕𝑠
𝜕𝑥
𝜕𝑡
Finally,
𝑠 𝑡
𝜕 2𝑤 𝜕 𝜕𝑤
= ( )
𝜕𝑠𝜕𝑡 𝜕𝑠 𝜕𝑡
𝜕 𝑑𝑤 𝜕𝑥
= ( )
𝜕𝑠 𝑑𝑥 𝜕𝑡
𝜕 𝑑𝑤 𝜕𝑥 𝑑𝑤 𝜕 2 𝑥
= [ ( )] + ( )
𝜕𝑠 𝑑𝑥 𝜕𝑡 𝑑𝑥 𝜕𝑠𝜕𝑡
𝑑 2 𝑤 𝜕𝑥 𝜕𝑥 𝑑𝑤 𝜕 2 𝑥
=( 2 ) + ( ).
𝑑𝑥 𝜕𝑠 𝜕𝑡 𝑑𝑥 𝜕𝑠𝜕𝑡
𝑤
𝜕𝑤 𝜕𝑤
(b) We have 𝜕𝑥 𝜕𝑤 𝜕𝑧
𝜕𝑤 𝜕𝑤 𝜕𝑥 𝜕𝑤 𝜕𝑦 𝜕𝑤 𝜕𝑤 𝜕𝑥 𝜕𝑤 𝜕𝑦 𝜕𝑤 𝑑𝑧 𝑥 𝑦
𝜕𝑦
𝑧
= + and = + + . 𝜕𝑦
𝜕𝑠 𝜕𝑥 𝜕𝑠 𝜕𝑦 𝜕𝑠 𝜕𝑡 𝜕𝑥 𝜕𝑡 𝜕𝑦 𝜕𝑡 𝜕𝑧 𝑑𝑡 𝜕𝑥
𝜕𝑡 𝑑𝑧
𝜕𝑠 𝜕𝑦 𝑑𝑡
𝜕𝑥
Finally, 𝑠
𝜕𝑠
𝜕𝑡 𝑡
𝜕 2𝑤 𝜕 𝜕𝑤
= ( )
𝜕𝑠𝜕𝑡 𝜕𝑠 𝜕𝑡
𝜕 𝜕𝑤 𝜕𝑥 𝜕𝑤 𝜕𝑦 𝜕𝑤 𝑑𝑧
= ( + + )
𝜕𝑠 𝜕𝑥 𝜕𝑡 𝜕𝑦 𝜕𝑡 𝜕𝑧 𝑑𝑡
𝜕 𝜕𝑤 𝜕𝑥 𝜕𝑤 𝜕 2 𝑥 𝜕 𝜕𝑤 𝜕𝑦 𝜕𝑤 𝜕 2 𝑦 𝜕 𝜕𝑤 𝑑𝑧
=[ ( )] + ( ) + [ ( )] + ( ) + [ ( )]
𝜕𝑠 𝜕𝑥 𝜕𝑡 𝜕𝑥 𝜕𝑠𝜕𝑡 𝜕𝑠 𝜕𝑦 𝜕𝑡 𝜕𝑦 𝜕𝑠𝜕𝑡 𝜕𝑠 𝜕𝑧 𝑑𝑡
𝜕 2 𝑤 𝜕𝑥 𝜕 2 𝑤 𝜕𝑦 𝜕𝑥 𝜕𝑤 𝜕 2 𝑥 𝜕 2 𝑤 𝜕𝑥 𝜕 2 𝑤 𝜕𝑦 𝜕𝑦 𝜕𝑤 𝜕 2 𝑦
=( 2 + ) + ( )+( + ) + ( )
𝜕𝑥 𝜕𝑠 𝜕𝑦𝜕𝑥 𝜕𝑠 𝜕𝑡 𝜕𝑥 𝜕𝑠𝜕𝑡 𝜕𝑥𝜕𝑦 𝜕𝑠 𝜕𝑦 2 𝜕𝑠 𝜕𝑡 𝜕𝑦 𝜕𝑠𝜕𝑡
𝜕 2 𝑤 𝜕𝑥 𝜕 2 𝑤 𝜕𝑦 𝑑𝑧
+( + ) .
𝜕𝑥𝜕𝑧 𝜕𝑠 𝜕𝑦𝜕𝑧 𝜕𝑠 𝑑𝑡
Page 26 of 36
MATH2023 Multivariable Calculus Chapter 3 Partial derivatives
L2/L3 (Fall 2019)
In this section, we again state the definitions and results for the ℝ2 case and note that they can be
easily generalized to the ℝ𝑛 case.
Definition 3.62 Let 𝐯̂ ≔ 〈𝑣1 , 𝑣2 〉 be a unit vector in ℝ2 , let (𝑎, 𝑏) ∈ ℝ2 and let 𝑓 be a function
of two real variables. The directional derivative of 𝒇 along 𝐯̂ at (𝒂, 𝒃) is the derivative of the
one-variable function 𝑓(𝑎 + 𝑡𝑣1 , 𝑏 + 𝑡𝑣2 ) at 𝑡 = 0, i.e.
𝑑 𝑓(𝑎 + 𝑣1 ℎ, 𝑏 + 𝑣2 ℎ) − 𝑓(𝑎, 𝑏)
𝐷𝐯̂ 𝑓(𝑎, 𝑏) ≔ 𝑓(𝑎 + 𝑣1 𝑡, 𝑏 + 𝑣2 𝑡)| = lim .
𝑑𝑡 𝑡=0 ℎ→0 ℎ
𝑓(〈𝑎, 𝑏〉 + 𝑡𝐯̂)
Remark 3.63 Let (𝑎, 𝑏) ∈ ℝ2 and let 𝑓 be a function of two real variables.
We have 𝐷𝐢 𝑓(𝑎, 𝑏) = 𝑓𝑥 (𝑎, 𝑏) and 𝐷𝐣 𝑓(𝑎, 𝑏) = 𝑓𝑦 (𝑎, 𝑏) . So partial derivatives are just
special cases of directional derivatives, which in general can be taken in any direction, but not
just along the directions of the 𝑥- and 𝑦-axes.
Consider the cross-sectional curve of the graph of 𝑓 in the “vertical” plane passing through
the point 𝑃൫𝑎, 𝑏, 𝑓(𝑎, 𝑏)൯ and parallel to 𝐯̂. Geometrically, 𝐷𝐯̂ 𝑓(𝑎, 𝑏) is the slope of the
tangent line to this curve at 𝑃.
Physically, 𝐷𝐯̂ 𝑓(𝑎, 𝑏) is the rate of change of 𝑓 with respect to the distance from (𝑎, 𝑏)
along a ray in the direction of 𝐯̂.
𝑧
𝑦
𝑧 = 𝑓(𝑥, 𝑦)
Slope = 𝐷𝐯̂ 𝑓(𝑎, 𝑏)
𝑏
𝑣2 (𝑥 − 𝑎) = 𝑣1 (𝑦 − 𝑏)
𝐯̂
𝑎
𝑥
Definition 3.64 Let (𝑎, 𝑏) ∈ ℝ2 and 𝑓 be a function of two real variables. The gradient vector
(or gradient) of 𝒇 at (𝒂, 𝒃) is the vector
∇𝑓(𝑎, 𝑏) ≔ 〈𝑓𝑥 (𝑎, 𝑏), 𝑓𝑦 (𝑎, 𝑏)〉.
Replacing the point (𝑎, 𝑏) by a pair of real variables (𝑥, 𝑦), we say that the gradient vector of 𝒇
is the vector-valued function of two real variables ∇𝑓 defined by
∇𝑓(𝑥, 𝑦) ≔ 〈𝑓𝑥 (𝑥, 𝑦), 𝑓𝑦 (𝑥, 𝑦)〉
for every (𝑥, 𝑦) at which the partial derivatives exist.
Page 27 of 36
MATH2023 Multivariable Calculus Chapter 3 Partial derivatives
L2/L3 (Fall 2019)
Theorem 3.65 Let 𝐯̂ be a unit vector in ℝ2 , let (𝑎, 𝑏) ∈ ℝ2 and let 𝑓 be a differentiable
function of two real variables. Then
𝐷𝐯̂ 𝑓(𝑎, 𝑏) = ∇𝑓(𝑎, 𝑏) ⋅ 𝐯̂,
i.e. 𝐷𝐯̂ 𝑓(𝑎, 𝑏) is the scalar projection of ∇𝑓(𝑎, 𝑏) onto the direction of 𝐯̂ (cf. Definition 1.34).
Proof. Let 𝐯̂ = 〈𝑣1 , 𝑣2 〉. Applying the chain rule to the definition of the directional derivative,
𝑑
𝐷𝐯̂ 𝑓(𝑎, 𝑏) = 𝑓(𝑎 + 𝑣1 𝑡, 𝑏 + 𝑣2 𝑡)|
𝑑𝑡 𝑡=0
𝜕𝑓 𝑑 𝜕𝑓 𝑑
= (𝑎 + 𝑣1 𝑡, 𝑏 + 𝑣2 𝑡)| (𝑎 + 𝑣1 𝑡)| + (𝑎 + 𝑣1 𝑡, 𝑏 + 𝑣2 𝑡)| (𝑏 + 𝑣2 𝑡)|
𝜕𝑥 𝑡=0 𝑑𝑡 𝑡=0 𝜕𝑦 𝑡=0
𝑑𝑡 𝑡=0
𝜕𝑓 𝜕𝑓
=[ (𝑎, 𝑏)] (𝑣1 ) + [ (𝑎, 𝑏)] (𝑣2 )
𝜕𝑥 𝜕𝑦
= 〈𝑓𝑥 (𝑎, 𝑏), 𝑓𝑦 (𝑎, 𝑏)〉 ⋅ 〈𝑣1 , 𝑣2 〉
= ∇𝑓(𝑎, 𝑏) ⋅ 𝐯̂.
∎
Solution:
The unit vector along the given direction is Before computing the directional derivative,
we need to find a unit vector to represent
1 3 4
𝐯̂ = (3𝐢 − 4𝐣) = 𝐢 − 𝐣. the given direction. 3𝐢 − 4𝐣 is not a unit
√32 + (−4)2 5 5 vector.
Page 28 of 36
MATH2023 Multivariable Calculus Chapter 3 Partial derivatives
L2/L3 (Fall 2019)
Example 3.67 Let (𝑎, 𝑏) be a point in ℝ2 which is not the origin, let 𝑓 be a differentiable
function of one real variable and let 𝐹 be a function of two real variables defined by
𝐹(𝑥, 𝑦) ≔ 𝑓(𝑥 2 + 𝑦 2 ).
Compute 𝐷𝐯̂ 𝐹(𝑎, 𝑏) if 𝐯̂ is the unit vector along the direction 〈−𝑏, 𝑎〉.
Solution:
We have
1 𝑏 𝑎
𝐯̂ = 〈−𝑏, 𝑎〉 = 〈− , 〉
√(−𝑏)2 + 𝑎2 ξ𝑎2 + 𝑏 2 ξ𝑎2 + 𝑏 2
and we have
∇𝐹(𝑥, 𝑦) = 〈𝐹𝑥 (𝑥, 𝑦), 𝐹𝑦 (𝑥, 𝑦)〉 = 〈2𝑥𝑓 ′ (𝑥 2 + 𝑦 2 ), 2𝑦𝑓 ′ (𝑥 2 + 𝑦 2 )〉
for every (𝑥, 𝑦). So
𝐷𝐯̂ 𝐹(𝑎, 𝑏) = ∇𝐹(𝑎, 𝑏) ⋅ 𝐯̂
𝑏 𝑎
= 〈2𝑎𝑓 ′ (𝑎2 + 𝑏 2 ), 2𝑏𝑓 ′ (𝑎2 + 𝑏 2 )〉 ⋅ 〈− , 〉
ξ𝑎2 + 𝑏 2 ξ𝑎2 + 𝑏 2
2𝑎𝑏𝑓 ′ (𝑎2 + 𝑏 2 ) 2𝑎𝑏𝑓 ′ (𝑎2 + 𝑏 2 )
=− +
ξ𝑎2 + 𝑏 2 ξ𝑎2 + 𝑏 2
= 0.
Remark 3.68 Let 𝜃 be the angle between the gradient vector ∇𝑓(𝑎, 𝑏) and the unit vector 𝐯̂.
Theorem 3.65 says that the directional derivative of 𝑓 is
𝐷𝐯̂ 𝑓(𝑎, 𝑏) = ∇𝑓(𝑎, 𝑏) ⋅ 𝐯̂ = ‖∇𝑓(𝑎, 𝑏)‖ cos 𝜃 ,
so at (𝑎, 𝑏),
𝑓 increases the most rapidly when 𝜃 = 0, i.e. when 𝐯̂ is along the direction of ∇𝑓(𝑎, 𝑏).
𝑓 decreases the most rapidly when 𝜃 = 𝜋, i.e. when 𝐯̂ is along the direction of −∇𝑓(𝑎, 𝑏).
𝜋
𝑓 has zero change when 𝜃 = 2 , i.e. along any direction 𝐯̂ orthogonal to ∇𝑓(𝑎, 𝑏).
The unit vector along ∇𝑓(𝑎, 𝑏) is often called the direction of steepest ascent of 𝑓 at (𝑎, 𝑏),
while the unit vector along −∇𝑓(𝑎, 𝑏) is called the direction of steepest descent of 𝑓 at (𝑎, 𝑏).
Page 29 of 36
MATH2023 Multivariable Calculus Chapter 3 Partial derivatives
L2/L3 (Fall 2019)
Solution:
𝜕𝑓 𝜕𝑓
The gradient of 𝑓 is ∇𝑓(𝑥, 𝑦) = 〈𝜕𝑥 (𝑥, 𝑦), 𝜕𝑦 (𝑥, 𝑦)〉 = 〈𝑥, 𝑦〉, so ∇𝑓(1, 1) = 〈1, 1〉.
𝑧
(a) 𝑓 increases the most rapidly along the direction of ∇𝑓(1, 1), i.e.
1 1 1 1 𝑧 = 𝑓(𝑥, 𝑦)
∇𝑓(1, 1) = 〈1, 1〉 = 〈 , 〉.
‖∇𝑓(1, 1)‖ ξ12 + 12 ξ2 ξ2
(b) 𝑓 decreases the most rapidly along the direction of −∇𝑓(1, 1), i.e.
1 1 1
− ∇𝑓(1, 1) = 〈− , − 〉. 𝑦
‖∇𝑓(1, 1)‖ ξ2 ξ2
(c) 𝑓 has zero change along the directions orthogonal to ∇𝑓(1, 1), i.e. 𝑥
1 1 1 1 𝑦 ∇𝑓(𝑎, 𝑏)
〈− , 〉 and 〈 , − 〉.
ξ2 ξ2 ξ2 ξ2
𝑏
Proof. Let 𝐫(𝑡) = 〈𝑥(𝑡), 𝑦(𝑡)〉 be a smooth parametrization of the level curve of 𝑓 that passes
through (𝑎, 𝑏), so that 𝐫(𝑡0 ) = 〈𝑎, 𝑏〉. Then by the definition of a level curve we have
𝑓൫𝑥(𝑡), 𝑦(𝑡)൯ = 𝑘
for every 𝑡, where 𝑘 = 𝑓(𝑎, 𝑏) is a constant. Differentiating both sides with respect to 𝑡, we get
𝑓𝑥 ൫𝑥(𝑡), 𝑦(𝑡)൯𝑥 ′ (𝑡) + 𝑓𝑦 ൫𝑥(𝑡), 𝑦(𝑡)൯𝑦 ′ (𝑡) = 0.
At 𝑡 = 𝑡0 , we have 𝑓𝑥 (𝑎, 𝑏)𝑥 ′ (𝑡0 ) + 𝑓𝑦 (𝑎, 𝑏)𝑦 ′ (𝑡0 ) = 0, i.e.
〈𝑓𝑥 (𝑎, 𝑏), 𝑓𝑦 (𝑎, 𝑏)〉 ⋅ 〈𝑥 ′ (𝑡0 ), 𝑦 ′ (𝑡0 )〉 = 0
or simply ∇𝑓(𝑎, 𝑏) ⋅ 𝐫 ′ (𝑡0 ) = 0. So ∇𝑓(𝑎, 𝑏) is orthogonal to the tangent vector 𝐫 ′ (𝑡0 ) of the
level curve of 𝑓 at (𝑎, 𝑏), i.e. it is normal to the level curve. ∎
𝑥2
Example 3.71 Find the equation of the tangent line to the ellipse + 𝑦 2 = 2 at (−2, 1).
4
Solution:
𝑥2
The ellipse is a level curve of the function 𝑓(𝑥, 𝑦) = + 𝑦 2 , whose gradient vector is
4
𝑥
∇𝑓(𝑥, 𝑦) = 〈 , 2𝑦〉.
2
At (−2, 1) we have ∇𝑓(−2, 1) = 〈−1, 2〉, so the required tangent line has equation
(−1)(𝑥 + 2) + (2)(𝑦 − 1) = 0,
i.e. 𝑥 − 2𝑦 + 4 = 0.
Page 30 of 36
MATH2023 Multivariable Calculus Chapter 3 Partial derivatives
L2/L3 (Fall 2019)
We have studied tangent lines to a curve in ℝ2 (in MATH1013/1023) and to a curve in ℝ3 (in
chapter 2). Now we study the analogous concept for a surface in ℝ3 , called tangent planes.
Example 3.73 Find the tangent plane to the sphere in ℝ3 defined by the equation
𝑥2 + 𝑦2 + 𝑧2 = 1
at the point (𝑎, 𝑏, 𝑐) lying on it.
Solution (incomplete):
Let 𝑓 be a function of two real variables whose graph passes through (𝑎, 𝑏, 𝑐) and is (part of) the
given sphere, so that we have (i) 𝑓(𝑎, 𝑏) = 𝑐 and (ii) 𝑧 = 𝑓(𝑥, 𝑦) satisfies 𝑥 2 + 𝑦 2 + 𝑧 2 = 1.
Assume that 𝑐 ≠ 0.
Taking partial derivatives on both sides with respect to 𝑥, we have
2𝑥 + 0 + 2𝑧𝑧𝑥 = 0,
𝑥 𝑎 𝑎
so 𝑧𝑥 = − 𝑧 . At (𝑎, 𝑏) we have 𝑓𝑥 (𝑎, 𝑏) = − 𝑓(𝑎,𝑏) = − 𝑐 .
the tangent line at 𝑏 to the cross-sectional curve of the graph of 𝑓 in the plane 𝑥 = 𝑎,
𝑏
which is a line with direction vector 〈0, 1, − 𝑐 〉.
Page 31 of 36
MATH2023 Multivariable Calculus Chapter 3 Partial derivatives
L2/L3 (Fall 2019)
The equation of tangent planes to a level surface of a function 𝑓 of three real variables can in fact
be easily found using the gradient vector of 𝑓.
∇𝑓(𝑎, 𝑏, 𝑐)
Proof. Let 𝐶 be any curve in the level surface of 𝑓 that passes through (𝑎, 𝑏, 𝑐). Then by a
similar argument as in the proof of Theorem 3.70, one can show that ∇𝑓(𝑎, 𝑏, 𝑐) is normal to 𝐶.
Therefore ∇𝑓(𝑎, 𝑏, 𝑐) is normal to the level surface of 𝑓 that passes through (𝑎, 𝑏, 𝑐). ∎
Solution:
The graph of 𝑓 is the surface in ℝ3 defined by the equation 𝑧 = 𝑓(𝑥, 𝑦). This surface can also
be regarded as a level surface of the function 𝐹(𝑥, 𝑦, 𝑧) ≔ 𝑓(𝑥, 𝑦) − 𝑧, whose gradient vector is
∇𝐹(𝑥, 𝑦, 𝑧) = 〈𝐹𝑥 (𝑥, 𝑦, 𝑧), 𝐹𝑦 (𝑥, 𝑦, 𝑧), 𝐹𝑧 (𝑥, 𝑦, 𝑧)〉
= 〈𝑓𝑥 (𝑥, 𝑦), 𝑓𝑦 (𝑥, 𝑦), −1〉 = 〈2𝑥, 2𝑦, −1〉.
At ൫𝑎, 𝑏, 𝑓(𝑎, 𝑏)൯ we have ∇𝐹൫𝑎, 𝑏, 𝑓(𝑎, 𝑏)൯ = 〈2𝑎, 2𝑏, −1〉, so
(a) the required tangent plane has equation
(2𝑎)(𝑥 − 𝑎) + (2𝑏)(𝑦 − 𝑏) + (−1)[𝑧 − (𝑎2 + 𝑏 2 )] = 0,
i.e. 2𝑎𝑥 + 2𝑏𝑦 − 𝑧 = 𝑎2 + 𝑏 2 , and
(b) the required normal line has parametric equations
𝑥 = 𝑎 + 2𝑎𝑡
{𝑦 = 𝑏 + 2𝑏𝑡 ,
2 2
𝑧=𝑎 +𝑏 −𝑡
where 𝑡 ∈ (−∞, +∞).
Page 32 of 36
MATH2023 Multivariable Calculus Chapter 3 Partial derivatives
L2/L3 (Fall 2019)
Solution:
[The most intuitive method is to find the parametric equations of the curve first, and then find the
tangent line to the curve as in chapter 2; but the first step is not always easy even if it’s possible.
An easier method is to note that the required tangent line is perpendicular to both normal vectors
to the two surfaces at (1, 1, 3), which can both be easily found because of Theorem 3.74]
𝑧
2 2
𝑥 +𝑦 =2
𝑥+𝑧 = 4
Now the required tangent line is perpendicular to both of these normal vectors, so it has a direction
vector
𝐢 𝐣 𝐤
𝐯 = ∇𝑓(1, 1, 3) × 𝐧 = 〈2, 2, 0〉 × 〈1, 0, 1〉 = |2 2 0| = 〈2, −2, −2〉.
1 0 1
Together with the point (1, 1, 3), the required tangent line has parametric equations given by
𝑥 = 1 + 2𝑡
{𝑦 = 1 − 2𝑡
𝑧 = 3 − 2𝑡
where 𝑡 ∈ (−∞, +∞). (Of course you may further replace 2𝑡 by just 𝑡.)
Page 33 of 36
MATH2023 Multivariable Calculus Chapter 3 Partial derivatives
L2/L3 (Fall 2019)
Now let’s consider a function 𝑓 of two real variables labeled as (𝑥, 𝑦). Recall again that the
partial derivatives of 𝑓 at (𝑎, 𝑏) are defined as the limits
𝑓(𝑎 + ℎ, 𝑏) − 𝑓(𝑎, 𝑏) 𝑓(𝑎, 𝑏 + ℎ) − 𝑓(𝑎, 𝑏)
𝑓𝑥 (𝑎, 𝑏) = lim and 𝑓𝑦 (𝑎, 𝑏) = lim .
ℎ→0 ℎ ℎ→0 ℎ
Thus in case the partial derivatives of 𝑓 both exist at (𝑎, 𝑏), we can write
𝑓(𝑎 + ℎ, 𝑏) − 𝑓(𝑎, 𝑏) 𝑓(𝑎, 𝑏 + ℎ) − 𝑓(𝑎, 𝑏)
𝑓𝑥 (𝑎, 𝑏) ≈ and 𝑓𝑦 (𝑎, 𝑏) ≈
ℎ ℎ
if ℎ is a small real number. So we have the following theorem.
Theorem 3.77 Let 𝑎 and 𝑏 be real numbers and 𝑓 be a function of two real variables whose
second partial derivatives exist at (𝑎, 𝑏). If ℎ and 𝑘 are real numbers which are close to 0, then
𝑓(𝑎 + ℎ, 𝑏 + 𝑘) ≈ 𝑓(𝑎, 𝑏) + ℎ𝑓𝑥 (𝑎, 𝑏) + 𝑘𝑓𝑦 (𝑎, 𝑏).
Definition 3.78 Let 𝑎 and 𝑏 be real numbers and 𝑓 be a function of two real variables whose
second partial derivatives exist at (𝑎, 𝑏). The linear function 𝐿: ℝ2 → ℝ defined by
𝐿(𝑥, 𝑦) = 𝑓(𝑎, 𝑏) + 𝑓𝑥 (𝑎, 𝑏)(𝑥 − 𝑎) + 𝑓𝑦 (𝑎, 𝑏)(𝑦 − 𝑏)
is called the linear approximation (or the linearization) of 𝑓 at (𝑎, 𝑏).
Compare with Definition 3.48. So a
function 𝑓 of two real variables is
Remark 3.79 The graph of 𝐿 is just the tangent plane to the differentiable at (𝒂, 𝒃) if
ȁ𝑓(𝑥, 𝑦) − 𝐿(𝑥, 𝑦)ȁ
graph of 𝑓 at the point (𝑎, 𝑏). lim
(𝑥,𝑦)→(𝑎,𝑏) √(𝑥
= 0.
− 𝑎)2 + (𝑦 − 𝑏)2
Solution:
We consider the function 𝑓(𝑥, 𝑦) = 𝑥 𝑦 , whose partial derivatives are
𝑓𝑥 (𝑥, 𝑦) = 𝑦𝑥 𝑦−1 and 𝑓𝑦 (𝑥, 𝑦) = 𝑥 𝑦 ln 𝑥 .
Thus we have
(10.003)1.99 = 𝑓(10.003, 1.99)
≈ 𝑓(10, 2) + 𝑓𝑥 (10, 2)(0.003) + 𝑓𝑦 (10, 2)(−0.01)
= 102 + 2(10)2−1 (0.003) + (102 ln 10)(−0.01)
= 100.06 − ln 10.
Page 34 of 36
MATH2023 Multivariable Calculus Chapter 3 Partial derivatives
L2/L3 (Fall 2019)
Remark 3.81 We sometimes denote a small change in 𝑥 by Δ𝑥 and a small change in 𝑦 by Δ𝑦,
and denote the corresponding change in 𝑧 = 𝑓(𝑥, 𝑦) by Δ𝑧 or Δ𝑓, so Theorem 3.77 becomes
Δ𝑓 ≈ 𝑓𝑥 (𝑎, 𝑏)Δ𝑥 + 𝑓𝑦 (𝑎, 𝑏)Δ𝑦.
𝑑𝑓 𝜕𝑓 𝑑𝑥 𝜕𝑓 𝑑𝑦
This motivates us to sloppily “cancel” 𝑑𝑡 from the chain rule = 𝜕𝑥 𝑑𝑡 + 𝜕𝑦 𝑑𝑡 and write
𝑑𝑡
𝜕𝑓 𝜕𝑓
𝑑𝑓 = 𝑑𝑥 + 𝑑𝑦,
𝜕𝑥 𝜕𝑦
where the symbols 𝑑𝑥 and 𝑑𝑦 are called differentials as in MATH1013/1023, and the symbol 𝑑𝑓
is called the total differential of 𝑓. The precise meanings of these symbols are out of the scope of
this course (and will be covered in MATH4033). In fact, the above equality becomes rigorous if we
understand the differentials by their precise definitions.
Remark 3.82 The concept of differentials is sometimes used in error analysis. If a quantity 𝑧
depends on two variables 𝑥 and 𝑦 via a relation 𝑧 = 𝑓(𝑥, 𝑦), and if error estimates Δ𝑥 and Δ𝑦
in the independent variables 𝑥 and 𝑦 (e.g. measurement error) are known, then one can estimate
the error Δ𝑧 in the dependent variable 𝑧 using
Δ𝑧 ≈ 𝑓𝑥 (𝑎, 𝑏)Δ𝑥 + 𝑓𝑦 (𝑎, 𝑏)Δ𝑦.
Example 3.83 Using a ruler calibrated with 1 mm subdivisions, a solid circular cylinder is
measured to have a diameter of 4.7 cm and a height of 6.5 cm. Assuming that the calibrations
are accurate, what is the maximum absolute error of the volume of the solid cylinder calculated
using these measurements?
Solution: Denote the diameter, the height and the volume of the cylinder by 𝑥, ℎ and 𝑉
respectively. Since the smallest subdivision of the ruler is 1 mm, the maximum absolute error of
the measurements of 𝑥 and ℎ are known to be Δ𝑥 = Δℎ = 0.5 mm = 0.05 cm. Now the
volume is computed using the formula
𝑥 2 𝜋
𝑉 = 𝜋 ( ) ℎ = 𝑥 2 ℎ.
2 4
Taking differentials on both sides, we obtain
𝜕𝑉 𝜕𝑉 𝜋 𝜋
𝑑𝑉 = 𝑑𝑥 + 𝑑ℎ = ( 𝑥ℎ) 𝑑𝑥 + ( 𝑥 2 ) 𝑑ℎ,
𝜕𝑥 𝜕ℎ 2 4
which suggests the approximation
𝜋 𝜋
Δ𝑉 ≈ ( 𝑥ℎ) Δ𝑥 + ( 𝑥 2 ) Δℎ 1st “≈”: Approximation suggested by the
2 4 differentials
≈ (𝜋/2)(4.7)(6.5)(0.05) + (𝜋/4)(4.7)2 (0.05) 2nd “≈”: 𝑥 and ℎ represents true values
while 4.7 and 6.5 are measured values
≈ 3.2669. 3rd “≈”: Approximation from rounding off
So the maximum absolute error of 𝑉 is about 3.2669 cm3 .
Page 35 of 36
MATH2023 Multivariable Calculus Chapter 3 Partial derivatives
L2/L3 (Fall 2019)
Summary of Chapter 3
The following are what you need to know in this chapter in order to get a pass (a distinction) in this
course:
Directional derivatives
Gradient vectors
Proof of Theorem 3.65: Relation between directional derivatives and gradient vectors
Tangent planes to the level surfaces of a function, tangent planes to the graph of a function
Proof of Theorem 3.70 and Theorem 3.74: Gradient vector orthogonal to level sets
Linear approximation
Differentials and error analysis
Page 36 of 36