0% found this document useful (0 votes)
3 views78 pages

Chapter 3

The document is a lecture outline for MATH2205: Multivariate Calculus, focusing on partial differentiation. It covers key concepts such as functions of several variables, limits, continuity, partial derivatives, and their geometric interpretations. The document also includes definitions, examples, and properties related to these topics.

Uploaded by

yiumartin91
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)
3 views78 pages

Chapter 3

The document is a lecture outline for MATH2205: Multivariate Calculus, focusing on partial differentiation. It covers key concepts such as functions of several variables, limits, continuity, partial derivatives, and their geometric interpretations. The document also includes definitions, examples, and properties related to these topics.

Uploaded by

yiumartin91
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

MATH2205: Multivariate Calculus

Ch.3 Partial Differentiation

Dr. Ching Jou Liao

Department of Mathematics
Hong Kong Baptist University

MATH2205 Ch.3 Partial Differentiation 1 / 78


Table of Contents

1 Functions of Several Variables

2 Limits and Continuity

3 Partial Derivatives

4 Tangent Planes

5 Linear Approximations and Differentiability

6 The Chain Rule

7 Gradients and Directional Derivatives

8 Taylor Series and Approximations

9 Implicit Functions

MATH2205 Ch.3 Partial Differentiation 2 / 78


Definition
A function f of n real variables is a rule that assigns a unique real number
f (x1 , x2 , · · · , xn ) to each point (x1 , x2 , · · · , xn ) in a subset D of Rn . The set D is called
the domain of f and the set of function values

{f (x1 , x2 , · · · , xn ) : (x1 , x2 , · · · , xn ) ∈ D}

is called the range of f .

Unless specified, the domain refers to the largest set of points (x1 , x2 , · · · , xn ) for
which f (x1 , x2 , · · · , xn ) makes sense as a real number.

E.g., the volume of a circular cylinder of radius r and height h is V(r, h) = πr 2 h. We


see V is a function of two variables r, h. The natural domain of the function is
r ≥ 0, h ≥ 0, or D = [0, ∞) × [0, ∞).

MATH2205 Ch.3 Partial Differentiation 3 / 78


Graphs I
Let f : R → R whose domain is D1 ⊆ R. The graph C1 of a one-variable function
y = f (x), x ∈ D1 is the set of points in the xy-space having coordinates
(x, f (x)), x ∈ D1 . i.e., n o
C1 = (x, f (x)) : x ∈ D1 .

Typically this is a plane curve in R2 .

Similarly, let f : R2 → R whose domain is D2 ⊆ R2 . The graph C2 of a two-variable


function z = f (x, y), (x, y) ∈ D2 is the set of points in the xyz-space having
coordinates (x, y, f (x, y)), (x, y) ∈ D2 . i.e.,
n o
C2 = (x, y, f (x, y)) : (x, y) ∈ D2 .

Typically this is a surface in R3 .

MATH2205 Ch.3 Partial Differentiation 4 / 78


Graphs II

MATH2205 Ch.3 Partial Differentiation 5 / 78


Graphs III
E.g. The graph of the function
q
z= 9 − x2 − y 2 , x2 + y 2 ≤ 9

is the upper hemisphere of radius 3 centered at the origin.

In general, the graph of an n-variable function is an n-dim hypersurface in Rn+1 .

MATH2205 Ch.3 Partial Differentiation 6 / 78


Level sets I
Another way to represent the function f (x, y) graphically is to produce a
topographic map of the surface z = f (x, y), which consists level curves (contour
lines, isolines) defined by
f (x, y) = C
for different constant values C. For example, the level curves of the paraboloid
z = x2 + y2 are concentric circles x2 + y2 = C.

MATH2205 Ch.3 Partial Differentiation 7 / 78


Level sets II
The level curves are the horizontal traces, i.e., curves made by the intersection of
the surface z = f (x, y) with planes f (x, y) = C parallel to xy−plane.

If the level curves are drawn for equally spaced values of C, then we can tell the
steepness of the surface from the denseness of the curves.

MATH2205 Ch.3 Partial Differentiation 8 / 78


Level sets III
For the three-variable function w = f (x, y, z), we can consider the level surfaces
(isosurfaces) defined by
f (x, y, z) = C.
This is a good way to visualize three-variable functions since it’s difficult to draw a
hypersurface in R4 directly.

The above are the level surfaces of the function w = f (x, y, z) = x2 + y2 + z2 .

MATH2205 Ch.3 Partial Differentiation 9 / 78


Level sets IV
In general, an n-variable function f (x1 , x2 , · · · , xn ) has the level sets defined by

f (x1 , x2 , · · · , xn ) = C

for constants C.

MATH2205 Ch.3 Partial Differentiation 10 / 78


Table of Contents

1 Functions of Several Variables

2 Limits and Continuity

3 Partial Derivatives

4 Tangent Planes

5 Linear Approximations and Differentiability

6 The Chain Rule

7 Gradients and Directional Derivatives

8 Taylor Series and Approximations

9 Implicit Functions

MATH2205 Ch.3 Partial Differentiation 11 / 78


Limits I
Recall that for f : R → R,
lim f (x) = L
x→a
means “f (x) is very close to L whenever x is near a."

Mathematically, for any ϵ > 0, there exists δ > 0 such that

|f (x) − L| < ϵ whenever |x − a| < δ.

MATH2205 Ch.3 Partial Differentiation 12 / 78


Limits II
Consider f : R2 → R, how can we generalize the definition to

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

for any ϵ > 0, there exists δ > 0 such that

|f (x) − L| < ϵ whenever |x − a| < δ.


Æ
Here |x − a| = (x − a)2 + (y − b)2 denote the distance between x = (x, y) and
a= (a, b).

MATH2205 Ch.3 Partial Differentiation 13 / 78


Limits III
Thus, we can generalize the definition of the distance between any two points x, a
in Rn to be q
|x − a| = (x1 − a1 )2 + (x2 − a2 )2 + · · · + (xn − an )2
for x = (x1 , x2 , · · · , xn ) and a = (a1 , a2 , · · · , an ).

Now we are ready to define the limit for f : Rn → R.

We say the limit of f (x) is L ∈ R as x approaches a, i.e.

lim f (x) = L,
x→a

if the following is satisfied.

For any ϵ > 0, there exists δ > 0 such that

|f (x) − L| < ϵ whenever |x − a| < δ.

Note:
▶ It is not necessary that a lies in the domain of f .

▶ The limit lim f (x) is unique if it exists.


x→a

MATH2205 Ch.3 Partial Differentiation 14 / 78


Limits IV
If
▶ f (x, y) → L1 as (x, y) → (a, b) along a path C1

▶ f (x, y) → L2 as (x, y) → (a, b) along a path C2 (̸= C1 )

and L1 ̸= L2 , then
lim f (x, y)
(x,y)→(a,b)

does NOT exist.

MATH2205 Ch.3 Partial Differentiation 15 / 78


Limits V
E.g. Evaluate the indicated limit or explain why it does not exist.


2xy
lim
(x,y)→(0,0) x2 + y 2


2x2 y
lim
(x,y)→(0,0) x4 + y 2


x2 y
lim
(x,y)→(0,0) x2 + y2

MATH2205 Ch.3 Partial Differentiation 16 / 78


Limits VI
The usual algebraic rules of limits can be extended to multivariate functions. For
example, if limx→x0 f (x) = L, limx→x0 g(x) = M, and every neighborhood of x0
contains points in both the domain of f and g other than x0 , then

lim f (x) + g(x) = L + M,


x→x0

lim f (x)g(x) = LM,


x→x0

f (x) L
lim = , provided M ̸= 0.
x→x0 g(x) M
lim F(f (x)) = F(L), provided F(t) is continuous at L.
x→x0

MATH2205 Ch.3 Partial Differentiation 17 / 78


Continuity
Let f be an n-variable function, and x0 ∈ Rn be a fixed point in the domain of f . We
say the function f is continuous at x0 if

lim f (x) = f (x0 ).


x→x0

The functions in Example 1 and 2 above are continuous wherever they are defined,
that is, at all points except (0, 0). Furthermore, there is no way to define f (0, 0) so
that those functions become continuous at (0, 0).

The function in Example 3 is not defined at (0, 0), but it has a continuous extension
to that point since the limit lim(x,y)→(0,0) f (x, y) exists. That is, f becomes continuous
if we define f (0, 0) = lim(x,y)→(0,0) f (x, y) = 0. In other words, the function

2
 x y ,

(x, y) ̸= (0, 0)
f (x, y) = x + y2
2

 0, (x, y) = (0, 0).

is continuous at (0, 0) (also continuous at all other points).

MATH2205 Ch.3 Partial Differentiation 18 / 78


Table of Contents

1 Functions of Several Variables

2 Limits and Continuity

3 Partial Derivatives

4 Tangent Planes

5 Linear Approximations and Differentiability

6 The Chain Rule

7 Gradients and Directional Derivatives

8 Taylor Series and Approximations

9 Implicit Functions

MATH2205 Ch.3 Partial Differentiation 19 / 78


Definition I
Recall the first-order derivative of a single-variable function y = f (x) is defined as
below:
f (x + h) − f (x)
f ′ (x) = lim ,
h→0 h
i.e., the rate of change of y with respect to x, and is equal to the slope of the
tangent line to the graph of f at (x, y).

MATH2205 Ch.3 Partial Differentiation 20 / 78


Definition II
Definition: For a two-variable function z = f (x, y), the first-order partial
derivatives (first partial derivatives) are
∂f f (x + h, y) − f (x, y)
(x, y) = lim ,
∂x h→0 h
∂f f (x, y + k) − f (x, y)
(x, y) = lim ,
∂y k→0 k
provided the limits exist.

The partial derivatives of f represent the rate of change of the function value with
∂f
respect to one variable. For example, (x, y) is the ordinary derivative of f (x, y)
∂x
considered as a function of x, with y held fixed.

The above definition can be generalized to any dimensions in an obvious way.

All the standard differentiation rules for sums, products, reciprocals and quotients
continue to apply to partial derivatives.

MATH2205 Ch.3 Partial Differentiation 21 / 78


Notations I

The symbol is called an evaluation symbol, i.e., the expression is evaluated


(a,b)
at (x, y) = (a, b). For instance,

∂z ∂z
fx (a, b) = fy (a, b) = .
∂x (a,b) ∂y (a,b)

MATH2205 Ch.3 Partial Differentiation 22 / 78


Notations II
E.g.

MATH2205 Ch.3 Partial Differentiation 23 / 78


Geometric Interpretation of Partial Derivatives

z = f (x, y) represents a surface S, i.e., the graph of f

Let P = (a, b, f (a, b)) lie on S

Fix y = b, C1 is the curve that the plane y = b intersects S

Fix x = a, C2 is the curve that the plane x = a intersects S


∂z ∂z
The partial derivatives of f at (a, b), , and are the slopes of the
∂x (a,b) ∂y (a,b)
tangents to C1 and C2 respectively Interactive applet

MATH2205 Ch.3 Partial Differentiation 24 / 78


Partial derivatives and continuity
If a single-variable function f (x) has a derivative f ′ (a), then it is necessarily
continuous at x = a.

This property does NOT extend to partial derivatives. A multivariate function whose
partial derivatives exist at a point is NOT necessarily continuous at that point.

That’s to say, even when


∂z ∂z
= fx (a, b) and = fy (a, b)
∂x (a,b) ∂y (a,b)

exist, f may NOT be continuous at (a, b).

E.g. The function 


 2xy
 , (x, y) ̸= (0, 0),
f (x, y) = x2 + y 2

 0, (x, y) = (0, 0)
is not continuous at (0, 0), but all first partial derivatives exist at (0, 0).

MATH2205 Ch.3 Partial Differentiation 25 / 78


Table of Contents

1 Functions of Several Variables

2 Limits and Continuity

3 Partial Derivatives

4 Tangent Planes

5 Linear Approximations and Differentiability

6 The Chain Rule

7 Gradients and Directional Derivatives

8 Taylor Series and Approximations

9 Implicit Functions

MATH2205 Ch.3 Partial Differentiation 26 / 78


Equation of Tangent Plane I

As shown above, if f is “smooth" near P, the tangent plane to the surface S at P is


defined to be the plane that contains both tangent lines T1 and T2 .

⃗ is called the normal vector to S at P with


n

⃗ = T⃗1 × T⃗2 .
n

MATH2205 Ch.3 Partial Differentiation 27 / 78


Equation of Tangent Plane II
Recall (Ch.1.2) the point-normal equation of a plane is

A(x − x0 ) + B(y − y0 ) + C(z − z0 ) = 0

⃗ = 〈A, B, C〉 is the normal vector of the plane through (x0 , y0 , z0 ).


where n

Since T1 and T2 have slopes fx (a, b) and fy (a, b) respectively, we have

T⃗1 = i + fx (a, b)k = 〈1, 0, fx (a, b)〉 T⃗2 = j + fy (a, b)k = 〈0, 1, fx (a, b)〉.

The above gives


⃗ = T⃗1 × T⃗2 = fx (a, b)i + fy (a, b)j − k.
n

An equation of the tangent plane to z = f (x, y) at P = (a, b, f (a, b)) is

fx (a, b)(x − a) + fy (a, b)(y − b) − (z − f (a, b)) = 0.

MATH2205 Ch.3 Partial Differentiation 28 / 78


Equation of Tangent Plane III
E.g. Find a normal vector and an equation of the tangent plane and normal line to
the graph z = sin(xy) at the point where x = π/ 3 and y = −1.

p
▶ The corresponding point P = (π/ 3, −1, − 3/ 2)

∂z 1 ∂z π
=− and =
∂x P 2 ∂y P 6
▶ The normal vector
π 1
⃗=−
i+ j− k
n
2 6
▶ The standard form of the normal line is
p
π 3
x− 3
y+1 z+ 2
1
= π =
− 2 6
−1
▶ The point-normal equation of the tangent plane is
p
1 π π 3
− (x − ) + (y + 1) − (z + )=0
2 3 6 2

MATH2205 Ch.3 Partial Differentiation 29 / 78


Existence of Tangent Plane
Even fx (a, b) and fy (a, b) exist, the tangent plane at (a, b, f (a, b)) may NOT exist. Try
the counterexample below.
x2 y


 , (x, y) ̸= (0, 0)
f (x, y) = x + y2
2

0, (x, y) = (0, 0)

The graph of f has no tangent plane at (0, 0) (also no normal). The graph of f is not
locally flat at (0, 0) (will not appear flat no matter how much we zoom in).

For some z = f (x, y), there exists vertical tangent lines and tangent planes.

The surface z = f (x, y) has a nonvertical tangent plane at P = (a, b, f (a, b)) if and
only if f (x, y) is differentiable at P.

MATH2205 Ch.3 Partial Differentiation 30 / 78


Table of Contents

1 Functions of Several Variables

2 Limits and Continuity

3 Partial Derivatives

4 Tangent Planes

5 Linear Approximations and Differentiability

6 The Chain Rule

7 Gradients and Directional Derivatives

8 Taylor Series and Approximations

9 Implicit Functions

MATH2205 Ch.3 Partial Differentiation 31 / 78


Linearization for f : R → R
Recall that if f : R → R,
f (x) ≈ L(x) = f (a) + f ′ (a)(x − a)
is the linearization of f at a provided f ′ (a) exists.

The graph of L is the tangent line to the graph of f at x = a.

That’s to say, the (nonvertical) tangent line at a is a good linear approximation to f


around a.

MATH2205 Ch.3 Partial Differentiation 32 / 78


Linearization for f : R2 → R
Let f : R2 → R. Similarly, the (nonvertical) tangent plane L(x, y) at (a, b) is a good
linear approximation to f (x, y) around (a, b).

i.e.
f (x, y) ≈ L(x, y) = f (a, b) + fx (a, b)(x − a) + fy (a, b)(y − b).
p
E.g. Let f (x, y) = 2x2 + e2y , find the linear approximation at (2, 0).
The above formula gives
4 1
L(x, y) = 3 + (x − 2) + y.
3 3

MATH2205 Ch.3 Partial Differentiation 33 / 78


Differentiability I
Recall that if f : R → R is differentiable at a, we use L(x) = f (a) + f ′ (a)(x − a) to
approximate f around a, i.e.,when x = a + h (h is small), we have

f (a + h) − L(a + h) f (a + h) − (f (a) + f ′ (a)h)


lim = 0 = lim .
h→0 h h→0 h

Similarly, if f : R2 → R is differentiable at (a, b), we use


L(x, y) = f (a, b) + fx (a, b)(x − a) + fy (a, b)(y − b) to approximate f around a. i.e.,
when x = a + h and y = b + k (h, k are small), we have

f (a + h, b + k) − L(a + h, b + k)
lim p =0
(h,k)→(0,0) h2 + k 2
f (a + h, b + k) − (f (a, b) + hfx (a, b) + kfy (a, b))
= lim p = 0.
(h,k)→(0,0) h2 + k 2

Definition: The function f (x, y) is differentiable at (a, b) if


f (a + h, b + k) − f (a, b) − hfx (a, b) − kfy (a, b)
lim p = 0.
(h,k)→(0,0) h2 + k 2

MATH2205 Ch.3 Partial Differentiation 34 / 78


Differentiability II
Recall that even fx and fy exist, f may NOT be continuous, not to mention
differentiability.

Theorem
If fx , fy both exist and are continuous in a neighborhood of (a, b), then f is differentiable
at (a, b).

Note that f : R2 → R is differentiable at (a, b) means


f (a + h, b + k) − f (a, b) − hfx (a, b) − kfy (a, b)
lim p = 0.
(h,k)→(0,0) h2 + k 2
Thus, the main idea of the proof is to write f (a + h, b + k) − f (a, b) in terms of fx and
fy using a multivariate mean value theorem.

We will skip the multivariate mean value theorem and the proof of the above
theorem.

MATH2205 Ch.3 Partial Differentiation 35 / 78


Differentiability III
In the following, we shall generalize the differentiability to f : Rn → Rm , i.e.,

f(x) = (f1 (x)), f2 (x)), · · · , fm (x)),

where x = (x1 , x2 , · · · , xn ).

To see the definition of differentiability of f at x, let’s relook at the definition for


f : R2 → R :
f (a + h, b + k) − f (a, b) − hfx (a, b) − kfy (a, b)
lim p = 0,
(h,k)→(0,0) h2 + k 2
which is equivalent to
– ™
h
f (a + h, b + k) − f (a, b) − [fx (a, b), fy (a, b)] ·
k
lim p = 0.
(h,k)→(0,0) h2 + k 2

We restate that if f : R2 → R1 is differentiable at a = (a, b) if and only if there exists


a 1 × 2 matrix A such that
|f(a + h) − f(a) − Ah|
lim = 0, where h = (h, k).
h→0 |h|
In particular,
A = [fx (a, b), fy (a, b)].

MATH2205 Ch.3 Partial Differentiation 36 / 78


Differentiability IV
Definition: A function f : Rn → Rm is differentiable at a point a ∈ Rn if and only if
there exists an m × n matrix A such that
|f(a + h) − f(a) − Ah|
lim = 0.
h→0 |h|
In particular,
∂f1 ∂f1
 
 ∂x ···
 1 a ∂xn a


 . .. . 
A= . . . .

 . . 

 ∂fm ∂fm 
···
∂x1 a ∂xn a

We use the notation • ∂f ˜


i
Df(a) =
∂xj a

and call this matrix the derivative of f at a.

MATH2205 Ch.3 Partial Differentiation 37 / 78


Differentiability V
The matrix
∂f1 ∂f1
 
 ∂x ···
 1 ∂xn 

 . .. . 
Df(x) =  . . . .

 . . 

 ∂fm ∂fm 
···
∂x1 ∂xn
is called Jacobian matrix of the transformation f.

Let § ª
L(Rn , Rm ) = F : Rn → Rm : F is a inear tranformation ,

then • ∂f ˜
i
Df(x) = : Rn → L(Rn , Rm ),
∂xj
while • ∂f ˜
i
Df(a) = ∈ L(Rn , Rm ),
∂xj a

i.e.,

the output of Df(x) is a m × n matrix;


the output of Df(a) is a vector ∈ Rm .

MATH2205 Ch.3 Partial Differentiation 38 / 78


Differentiability VI
E.g. Let f(x, y) = (xey + cos(πy), x2 , x − ey ), find the Jacobian matrix of f and the
related linear transformation at a = (1, 0).

▶ Note that f : R2 → R3 , the size of Jacobian Matrix is 3 × 2


 ∂f ∂f1   
1
∂x ∂y ey xey − π sin(πy)
 ∂f2 ∂f2
Df(x) =  = 2x 0
  
 ∂x ∂y 
∂f3 ∂f3
1 −ey
∂x ∂y


 ∂f ∂f1   
1
∂x ∂y 1 1
 ∂f ∂f2
Df(a) =  ∂x2 = 2 0 
  
∂y 
∂f3 ∂f3
1 −1
∂x ∂y a

MATH2205 Ch.3 Partial Differentiation 39 / 78


Differentiability VII
Remark:

If we want to say f is differentiable at the pont a, we need to verify


|f(a + h) − f(a) − Ah|
lim = 0.
h→0 |h|
However, the following theorem guarantees the differentiability.

Theorem
If the partial derivatives in the Jacobian matrix are continuous, the f is differentiable at
x.

So f is differentiable everywhere in the example on P.39.

MATH2205 Ch.3 Partial Differentiation 40 / 78


Differentiability VIII
Recall that the surface z = f (x, y) has a nonvertical tangent plane at (a, b) if and
only if f (x, y) is differentiable at (a, b), i.e.,
f (a + h, b + k) − (f (a, b) + hfx (a, b) + kfy (a, b))
lim p = 0.
(h,k)→(0,0) h2 + k 2
Thus, the nonvertical tangent plane L(x, y) = f (a, b) + fx (a, b)(x − a) + fy (a, b)(y − b)
at (a, b) is a good linear approximation to f (x, y) around (a, b).

Similarly, we define f : Rn → Rm is differentiable at a point a ∈ Rn if and only if there


exists an m × n matrix A such that
|f(a + h) − (f(a) + Ah)|
lim = 0.
h→0 |h|

Thus,
L(x) = f(a) + A(x − a)
is the linearization of f around a. (Note A = Df(a))

E.g. (Same on page 39) The approximate value for f(1.02, 0.01) is
       
2 1 1 – ™ 2 0.03
0.02
f(a) + Df(a) · (x − a) = 1 + 2 0 · = 1 + 0.04 .
       
0.01
0 1 −1 0 0.01

Therefore, f(1.02, 0.01) ≈ (2.03, 1.04, 0.01).

MATH2205 Ch.3 Partial Differentiation 41 / 78


Table of Contents

1 Functions of Several Variables

2 Limits and Continuity

3 Partial Derivatives

4 Tangent Planes

5 Linear Approximations and Differentiability

6 The Chain Rule

7 Gradients and Directional Derivatives

8 Taylor Series and Approximations

9 Implicit Functions

MATH2205 Ch.3 Partial Differentiation 42 / 78


The chain rule I
Let f , g : R → R. The Chain Rule is a formula that gives the derivative of a

composite function y = f g(x) of f and g, i.e.,
d
f g(x) = f ′ g(x) g′ (x),
 
dx
or
dy dy du
= ,
dx du dx
where u = g(x).

In the following, we shall see the version of Chain Rule for f : Rn → Rm .

MATH2205 Ch.3 Partial Differentiation 43 / 78


The chain rule II
Let z = f (x, y) = f (u(t), v(t)) be with continuous first partial derivatives, and if
x = u(t) and y = v(t) are differentiable functions of t, then the corresponding Chain
Rule in terms of the Leibniz notation is

dz ∂z dx ∂z dy
= + .
dt ∂x dt ∂y dt

MATH2205 Ch.3 Partial Differentiation 44 / 78


The chain rule III
E.g. Let z = sin(x2 y) with x = t 2 and y = 1/ t, then
dz ∂z dx ∂z dy 1
= + = 2xy cos(x2 y)(2t) + x2 cos(x2 y) −
dt ∂x dt ∂y dt t2
4yt 3 − x 4t 2 − t 2
= x cos(x2 y) = t 2 cos(t 3 ) = 3t 2 cos(t 3 ).
t2 t2

MATH2205 Ch.3 Partial Differentiation 45 / 78


The chain rule IV
Now let z = f (x, y) = f (u(s, t), v(s, t)) be with continuous first partial derivatives, and
if x = u(s, t) and y = v(s, t) have first partial derivatives, then the corresponding
Chain Rule in terms of the Leibniz notation is

∂z ∂z ∂x ∂z ∂y ∂z ∂z ∂x ∂z ∂y
= + and = + .
∂s ∂x ∂s ∂y ∂s ∂t ∂x ∂t ∂y ∂t

MATH2205 Ch.3 Partial Differentiation 46 / 78


The chain rule V
E.g. Let z = sin(x2 y) with x = st 2 and y = s2 + 1t , then
∂z ∂z ∂x ∂z ∂y
= + = 2xy cos(x2 y)(t 2 ) + x2 cos(x2 y)(2s)
∂s ∂x ∂s ∂y ∂s
  1 2 
= 2st 2 s2 + t + 2s3 t 4 cos(s4 t 4 + s2 t 3 )
t
= (4s3 t 4 + 2st 3 ) cos(s4 t 4 + s2 t 3 ),
∂z ∂z ∂x ∂z ∂y  −1 
= + = 2xy cos(x2 y)(2st) + x2 cos(x2 y)
∂t ∂x ∂t ∂y ∂t t2
  1   −1 
= 2st 2 s2 + (2st) + s2 t 4 2 cos(s4 t 4 + s2 t 3 )
t t
= (4s4 t 3 + 3s2 t 2 ) cos(s4 t 4 + s2 t 3 ).

MATH2205 Ch.3 Partial Differentiation 47 / 78


The chain rule VI
Writing t = (s, t) and (x, y) = g(t), we can rewrite the Chain Rule for

z = f (x, y) = f (g(t)) = (f ◦ g)(t)

Originally,
∂z ∂z ∂x ∂z ∂y ∂z ∂z ∂x ∂z ∂y
= + , = +
∂s ∂x ∂s ∂y ∂s ∂t ∂x ∂t ∂y ∂t

Equivalently,
 ∂(f ◦ g)(s, t) ∂(f ◦ g)(s, t) 
D(f ◦ g)(t) =
∂s ∂t
∂x ∂x
‚ Œ
 ∂f (x, y) ∂f (x, y) 
= ∂s ∂t
∂y ∂y
∂x ∂y ∂s ∂t
= Df (g(t)) · Dg(t)

The expression above for Jacobian of a composite function

D(f ◦ g)(t) = Df (g(t))Dg(t) (3.3.1)

holds in general.

MATH2205 Ch.3 Partial Differentiation 48 / 78


The chain rule VII
R2 → R3 be a
E.g. Let g : function
 such that g(1, 2) = (1, 2, 1) and
1/ 2 1/ 2
Dg(1, 2) =  4 1 .
 

1 0
Let f : R3 → R2 be given by f (x, y, z) = (x2 ey , y2 z). Find D(f ◦ g)(1, 2).


‚ Œ
2xey x 2 ey 0
Df (x, y, z) =
0 2yz y2

D(f ◦ g)(1, 2) = Df (g(1, 2))Dg(1, 2) = Df (1, 2, 1)Dg(1, 2)


 
‚ Œ 1/ 2 1/ 2
2e2 e2 0
=  4 1 
 
0 4 4
1 0
‚ Œ
5e2 2e2
=
20 4

MATH2205 Ch.3 Partial Differentiation 49 / 78


Table of Contents

1 Functions of Several Variables

2 Limits and Continuity

3 Partial Derivatives

4 Tangent Planes

5 Linear Approximations and Differentiability

6 The Chain Rule

7 Gradients and Directional Derivatives

8 Taylor Series and Approximations

9 Implicit Functions

MATH2205 Ch.3 Partial Differentiation 50 / 78


Gradients I

Recall that if f : R2 → R, the partial derivatives at (a, b), i.e., fx (a, b) and fy (a, b), are
defined to be the slopes in the x- and y-directions. That’s the rates of change along
the directions of unit vectors i and j respectively.

MATH2205 Ch.3 Partial Differentiation 51 / 78


Gradients II
Here we will see that these partial derivatives can be used to find the slope in any
direction.

To begin, it is useful to combine the first partial derivatives of a function into


something called a gradient, and we focus on single-valued function f : Rn → R in
this section.

MATH2205 Ch.3 Partial Differentiation 52 / 78


Gradients III
Definition: Let f : Rn → R. Suppose all the first partial derivatives of f exist, then
the gradient vector of f is
∂f ∂f ∂f
∇f = grad f = ( , ,··· , ).
∂x1 ∂x2 ∂xn

▶ ∇f is the 1 × n Jacobian matrix of f

▶ ∇f : Rn → L(Rn , R), i.e.,


 ∂f ∂f ∂f ‹
∇f (a) = , ,··· , for a ∈ Rn .
∂x1 a ∂x2 a ∂xn a

▶ Since we can also regard L(Rn , R) as an n-vector space, you may say
∇f : Rn → Rn .

E.g. If f (x, y) = x2 − y2 , then ∇f = (2x, −2y).

MATH2205 Ch.3 Partial Differentiation 53 / 78


Gradients IV
Theorem
Suppose f (x, y) is differentiable at (a, b) and ∇f (a, b) ̸= 0, then ∇f (a, b) is a normal
vector to the level curve of f passing through (a, b).

E.g. If f (x, y) = x2 + y2 , then ∇f (1, 2) = 2i + 4j which is perpendicular to the tangent


line x + 2y = 5 at (1, 2).

MATH2205 Ch.3 Partial Differentiation 54 / 78


Directional Derivatives I
Before we generalize to f : Rn → R, let’s see the case of f : R2 → R.

Definition: Let u = ui + vj be a unit vector. The directional derivative of f (x, y)


at (a, b) in the direction of u is
f (a + hu, b + hv) − f (a, b)
Du f (a, b) = lim .
h→0 h

▶ Since we are interested in the direction of change of the input, and not the
length of the change vector, we use a unit vector.

E.g. Find the directional derivative of

f (x, y) = x2 sin 2y

at (1, π/ 2) in the direction of u= 3i − 4j using the above definition.

MATH2205 Ch.3 Partial Differentiation 55 / 78


Directional Derivatives II
Theorem
If f (x, y) is differentiable at (a, b) and u is a unit vector, then the directional derivative at
(a, b) in the direction of u is
Du f (a, b) = u · ∇f (a, b).

E.g. Recalculate the e.g. on the above page using this formula.
u 3 4
▶ Normalize u: = i− j
|u| 5 5
▶ ∇f (a, b) = ∇f (1, π/ 2) = (2 sin π, 2 cos π)
3 4 8
▶ Du f (1, π/ 2) = (2 sin π, 2 cos π) · ( , − ) =
5 5 5

MATH2205 Ch.3 Partial Differentiation 56 / 78


Directional Derivatives III
To see why this formula holds, let’s define a new function of a single variable

g(h) = f (a + hu, b + hv).

Note that this really is a function of a single variable, h.

By the definition of derivative for single-variable function g,


dg g(h) − g(0) f (a + hu, b + hv) − f (a, b)
g′ (0) = = lim = lim = Du f (a, b).
dh h=0 h→0 h−0 h→0 h

By multivariate chain rule, the left hand side of the above is


dg d  ∂f dx ∂f dy 
= f (x, y) = +
dh h=0 dh h=0 ∂x dh ∂y dh h=0

∂f ∂f
= u+ v
∂x (a,b) ∂y (a,b)

= ∇f (a, b) · u,

where x(h) = a + hu and y(h) = b + hv.

MATH2205 Ch.3 Partial Differentiation 57 / 78


Directional Derivatives IV
Theorem
If f : Rn → R is differentiable at a = (a1 , a2 , · · · , an ) and u ∈ Rn is a unit vector, then the
directional derivative of f at a in the direction of u is

Du f (a) = u · ∇f (a).

MATH2205 Ch.3 Partial Differentiation 58 / 78


Table of Contents

1 Functions of Several Variables

2 Limits and Continuity

3 Partial Derivatives

4 Tangent Planes

5 Linear Approximations and Differentiability

6 The Chain Rule

7 Gradients and Directional Derivatives

8 Taylor Series and Approximations

9 Implicit Functions

MATH2205 Ch.3 Partial Differentiation 59 / 78


Taylor Polynomials I
Recall that if f : R → R is differentiable.

▶ Its linearization at a is a linear function that approximates f near a:

f (a + h) ≈ L(a + h) = f (a) + f ′ (a)h .


▶ To obtain a better approximation, we can use the nth order Taylor polynomial
(if exists) of f about a: (Note P1 = L.)
f (2) (a) f (n) (a)
f (a + h) ≈ Pn (a + h) = f (a) + f (1) (a)h + h2 + · · · + hn ,
2! n!
where f (j) denotes the jth order derivative of f , j = 1, . . . , n.
dj
E.g. Take a = 0. Since e0 = 1, and ex = 1, j = 1, . . . , n,
dxj x=0

x2 xn
ex ≈ 1 + 1 × x + 1 × +···+ .
2! n!

Similarly, if f : R2 → R, we can obtain a better approximation than the linearization


by using a degree n polynomial.

MATH2205 Ch.3 Partial Differentiation 60 / 78


Taylor Polynomials II
Note that the 1st order (linearization) approximation of f (x, y) at (a, b) is

L(a + h, b + k) = f (a, b) + fx (a, b)h + fy (a, b)k.

The 2nd order approximation of f (x, y) at (a, b) is

1 
P2 (a + h, b + k) = L(a + h, b + k) + fxx (a, b)h2 + 2fxy (a, b)hk + fyy (a, b)k 2 .
2!

Why? (This is for interested only and can be omitted)


Let F(t) = f (x(t), y(t)) = f (a + th, b + tk),


nd
then the 2 order Taylor polynomial of F(t) about t = 0 is

F(2) (0)
P2 (t) = F(0) + F(1) (0)t + t2 ,
2!
where

MATH2205 Ch.3 Partial Differentiation 61 / 78


Taylor Polynomials III

▶ Note that if fxy and fyx are both continuous, then fxy = fyx .

The 2nd order partial derivatives of f (x, y) are

MATH2205 Ch.3 Partial Differentiation 62 / 78


Taylor Polynomials IV
E.g. Find the 2nd order partial derivatives of
xy
f (x, y) = .
x+1

MATH2205 Ch.3 Partial Differentiation 63 / 78


Taylor Polynomials V
E.g. Find the 2nd order Taylor polynomial of
sin x
f (x, y) =
y
about (a, b) = (0, 1).

MATH2205 Ch.3 Partial Differentiation 64 / 78


Table of Contents

1 Functions of Several Variables

2 Limits and Continuity

3 Partial Derivatives

4 Tangent Planes

5 Linear Approximations and Differentiability

6 The Chain Rule

7 Gradients and Directional Derivatives

8 Taylor Series and Approximations

9 Implicit Functions

MATH2205 Ch.3 Partial Differentiation 65 / 78


Implicit Function

Definition
An equation of the form
F(x, y) = c

implicitly defines y as a function of x on a set I if there is a function y = y(x)


on I such that F(x, y(x)) = c for c ∈ R.

E.g. Let F(x, y) = x2 + y2 . Then F(x, y) = 1 ⇔ x2 + y2 = 1 is the equation of


unit circle.

Around (−1, 0) and (1, 0), y is NOT a function of x.

Around other points, e.g.,


p
▶ given (0, 1), y is a function of x near (0, 1), i.e., y = 1 − x2 .
p
▶ given (0, −1), y is a function of x near (0, −1), i.e., y = − 1 − x2 .

MATH2205 Ch.3 Partial Differentiation 66 / 78


It would be nice if choosing a value for x in the equation F(x, y) = c would
immediately determine the value of y, i.e., write y in terms of x to express y
as a function of x.

Thus the Implicit Function Theorem (IFT) tells us

when we can write y = y(x) near a point, or

when there other solutions nearby if a solution to a system of equations is known.

What’s the condition to guarantee the above?

E.g. (Cont’d)

Given (0, 1), it satisfies F(x, y) = 1. We differentiate F(x, y) = 1 implicitly w.r.t x:


dy dy Fx
Fx (x, y) + Fy (x, y) =0 ⇒ =− when Fy ̸= 0.
dx dx Fy
dy dy x
i.e., 2x + 2y =0 ⇒ =− when y ̸= 0.
dx dx y
Calculation for finding
dy Fx
=−
dx Fy
will itself guarantee the existence of y = y(x).

MATH2205 Ch.3 Partial Differentiation 67 / 78


Implicit Function Theorem

Implicit function theorem (simple version)


Let F : R2 → R and assume F(x, y) has continuous partial derivatives with

F(x0 , y0 ) = c and Fy (x0 , y0 ) ̸= 0.

Then around (x0 , y0 ), there is a unique function y = y(x) satisfying


F(x, y(x)) = c with
Fx
y′ (x) = − .
Fy

The analytic version of IFT: Suppose we want to solve F(x, y) = 0 for y as a function
of x, i.e., y = y(x). If we have F(x0 , y0 ) = 0, then IFT says it is possible to solve for x
near a if Fy (x0 , y0 ) ̸= 0 holds.

The geometric version of IFT: Since Fy (x0 , y0 ) ̸= 0, near (x0 , y0 ), the curve
F(x, y) = 0 has nonvertical tangent lines near (x0 , y0 ). Thus, some part of the curve
near (x0 , y0 ) must be the graph of a function of x.

MATH2205 Ch.3 Partial Differentiation 68 / 78


The IFT is great, but it still has some limitations. These include

▶ In order to get information about F(x, y) = 0, we have to start by knowing one


solution (a, b).

▶ It only gives local information near (a, b). Even worse, it does not tell us how
close we need to be for the conclusions of the theorem to hold.

▶ It does not give a formula for y = y(x).

However, it tells us how to compute y′ (a) and this allows us to approximate by


linearization, i.e., L(a + h) = y(a) + y′ (a)h.

MATH2205 Ch.3 Partial Differentiation 69 / 78


Similarly, consider the equation F(x, y, z) = 0. In order to find solution(s), we can
ask whether F(x, y, z) = 0 defines z as a function of x and y, i.e., F(x, y, z(x, y)) = 0
near P0 = (a, b, c) with F(a, b, c) = 0.

If yes, and F is differentiable near P0 , then the partial derivatives of z at P0 can be


found by implicit differentiation of F(x, y, z) w.r.t x and y:
∂z
Fx (x, y, z) + Fz (z, y, z) = 0
∂x
∂z
Fy (x, y, z) + Fz (z, y, z) = 0,
∂y

so that
∂z Fx (a, b, c)
= −
∂x P0 Fz (a, b, c)
∂z Fy (a, b, c)
= − ,
∂y P0 Fz (a, b, c)

provided that Fz (a, b, c) ̸= 0.

MATH2205 Ch.3 Partial Differentiation 70 / 78


E.g. Near which points on x2 + y2 + z2 = 1 can the equation be solved for z as a
function of x and y?

▶ Let F(x, y, z) = x2 + y2 + z2 − 1.

▶ If yes, we calculate the partial derivatives of z = z(x, y):

∂z ∂z x
2x + 2z = 0, so =−
∂x ∂x z
∂z ∂z y
2y + 2z = 0, so =− .
∂y ∂y z

▶ Thus, z = z(x, y) near (a, b, c) provided that c ̸= 0, i.e., Fz (a, b, c) ̸= 0.

▶ Note that the geometric version of this is that for points with c = 0 are on the
equator and the tangent planes are vertical.

MATH2205 Ch.3 Partial Differentiation 71 / 78


Let’s consider a system of nonlinear equations:

F(x, y, z, w) = xyez + sin(w − z) = 0


G(x, y, z, w) = (x + 1)(y + 2)(z + 3)(w + 4) − 24 = 0

In general, if you are given a system of k “nonlinear" equations in k unknowns, it is


not just impossible to solve; it is (in practice) impossible to determine whether it
has any solutions.

Let’s see how the IFT works on it.

The above can be written as the following system with 2 equations having 4
variables:

F(x, y, z, w) = 0
G(x, y, z, w) = 0.

Next we need to choose dependent and independent variables.

MATH2205 Ch.3 Partial Differentiation 72 / 78


Note that the number of equations is the number to be considered as functions of
the remaining variables.

If we can write z(x, y) and w(x, y), and F, G are differentiable, then the partial
derivatives of z and w can be found by implicit differentiation of F, G w.r.t x and y.

Differentiating F(x, y, z, w) = 0 w.r.t x:


∂F ∂F  ∂z  ∂F  ∂w 
+ + = 0.
∂x ∂z ∂x ∂w ∂x
Differentiating G(x, y, z, w) = 0 w.r.t x:
∂G ∂G  ∂z  ∂G  ∂w 
+ + = 0.
∂x ∂z ∂x ∂w ∂x

(Similar to differentiate F, G w.r.t y)

MATH2205 Ch.3 Partial Differentiation 73 / 78


∂z ∂w
Thus, to find , at a point P, we need to solve the following linear system:
∂x ∂x
∂z
‚ Œ‚ Œ ‚ Œ
Fz (P) Fw (P) ∂x P
Fx (P)
∂w =− .
Gz (P) Gw (P) ∂x P
Gx (P)

∂z ∂w
Note that calculation for finding , at P will itself guarantee z(x, y) and w(x, y)
∂x ∂x
exist.

From linear algebra, if the determinant of the matrix on the left hand side is
∂z ∂w
nonzero, we can solve , by multiplying the inverse on both sides.
∂x P ∂x P

i.e.,

If Ax = b,
then A−1 Ax = A−1 b,

where ‚ Œ
Fz (P) Fw (P)
A= with det(A) ̸= 0.
Gz (P) Gw (P)

MATH2205 Ch.3 Partial Differentiation 74 / 78


Relook the example on p.72:

F(x, y, z, w) = xyez + sin(w − z) = 0


G(x, y, z, w) = (x + 1)(y + 2)(z + 3)(w + 4) − 24 = 0.


‚ Œ ‚ Œ
Fz Fw xyez − cos(w − z) cos(w − z)
= .
Gz Gw (x + 1)(y + 2)(w + 4) (x + 1)(y + 2)(z + 3)

▶ Since P = (0, 0, 0, 0) is a solution, thus


‚ Œ ‚ Œ
Fz (P) Fw (P) −1 1
= .
Gz (P) Gw (P) 8 6

▶ Since ‚ Œ
−1 1
det = −14 ̸= 0,
8 6
it has a unique inverse matrix, i.e.,
‚ Œ
−1 6 −1
.
14 −8 −1

MATH2205 Ch.3 Partial Differentiation 75 / 78


▶ So
∂z
‚ Œ‚ Œ ‚ Œ
Fz (P) Fw (P) ∂x P
Fx (P)
∂w =−
Gz (P) Gw (P) ∂x P
Gx (P)
is
∂z
‚ Œ‚ Œ ‚ Œ
−1 1 ∂x P
0
∂w = . (3.4.1)
8 6 ∂x P
−24
▶ Therefore,
∂z
‚ Œ ‚ Œ‚ Œ ‚ Œ
−1 6 −1 0 12/ 7
∂x P = =− .
∂w
∂x P 14 −8 −1 −24 12/ 7

▶ Therefore, the system of equations implicitly determine z, w as a functions of


x, y near P, i.e., z(x, y) and w(x, y) exist near P.

Recall Cramer’s rule: Let A be a nonsingular n × n matrix. Then the solution x of


the system Ax = b is given by
det(Aj )
xj = , j = 1, 2, · · · , n,
det(A)
where Aj is the matrix A with its j-th column replaced by the vector b.

MATH2205 Ch.3 Partial Differentiation 76 / 78


Let’s demonstrate how Cramer’s rule helps solve the equation (3.4.1)

∂z
‚ Œ‚ Œ ‚ Œ
−1 1 ∂x P
0
∂w =
8 6 ∂x P
−24

det(A) = −14

‚ Œ
0 1
∂z −24 6 12
P
= x1 = =−
∂x −14 7

‚ Œ
−1 0
∂w 8 −24 12
P
= x2 = =−
∂x −14 7
▶ Thus,
∂z
‚ Œ ‚ Œ
∂x P
12/ 7
∂w =−
∂x P
12/ 7

MATH2205 Ch.3 Partial Differentiation 77 / 78


The Implicit Function Theorem: Consider a system of n equations in n + m
variables, 

 F1 (x1 , · · · , xm ; y1 , · · · , yn ) = 0
.

.
 .

Fn (x1 , · · · , xm ; y1 , · · · , yn ) = 0

Note that the number of equations is the number to be considered as functions of


the remaining variables, i.e.,

yi = yi (x1 , x2 , · · · , xm ) for i = 1, 2, · · · , n.

Suppose P0 = (a1 , · · · , am ; b1 , · · · , bn ) is a point that satisfies the system of


equations and each of the functions Fi has continuous partial derivatives in each
variables near P0 with
∂(F1 , · · · , Fn )
̸= 0.
∂(y1 , · · · , yn ) P0
Then the system of equations can be solved for y1 , · · · , yn in terms of x1 , · · · , xm
near P0 , and
∂(F1 , · · · , Fn )
∂yi ∂(y1 , · · · yi−1 , xj , yi+1 , · · · , yn )
=− .
∂xj ∂(F1 , · · · , Fn )
∂(y1 , · · · , yn )
at P0 .

Note: The last formula is a consequence of the Cramer’s rule.

MATH2205 Ch.3 Partial Differentiation 78 / 78

You might also like