Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

MATH1.3 CALCULUS II - AY2020/21: Chapter 1: Functions of Several Variables

Download as pdf or txt
Download as pdf or txt
You are on page 1of 123

MATH1.

3 CALCULUS II - AY2020/21
Chapter 1: Functions of Several Variables

MATH1.3 CALCULUS II - AY2020/21 1 / 123


Outline

1 Introduction to xy -plane & xyz-space

2 Limits

3 Continuity

4 Partial derivatives

5 The Chain Rules

6 Approximations

MATH1.3 CALCULUS II - AY2020/21 2 / 123


Outline

1 Introduction to xy -plane & xyz-space

2 Limits

3 Continuity

4 Partial derivatives

5 The Chain Rules

6 Approximations

MATH1.3 CALCULUS II - AY2020/21 3 / 123


1. Introduction to xy -plane & xyz-space

We extend the basic ideas of single-variable calculus to functions


of several variables.

We discuss limit at a point and continuity.

As there are more than one variables, the derivatives involved are
more interesting. Applications of derivatives are also discussed.

Similarly, we also discuss integrals involving several variables.

MATH1.3 CALCULUS II - AY2020/21 4 / 123


• The set Rn

Definition (1.)
The set Rn consists of all n-tuples (x1 , x2 , . . . , xn ) with real entries.

The addition and scalar multiplication operations are coordinate-wise,


i.e.
1 (x1 , x2 , . . . , xn ) + (y1 , y2 , . . . , yn ) = (x1 + y1 , x2 + y2 , . . . , xn + yn )
2 c(x1 , x2 , . . . , xn ) = (cx1 , cx2 , . . . , cxn ), c ∈ R.

When n = 1, we have R1 = R, the usual real line.


When n = 2, R2 is the 2-dimensional plane (we usually write (x, y )
instead of (x1 , x2 ) for points in R2 ).
When n = 3, R3 is the 3-dimensional space we live in (we usually
write (x, y , z) instead of (x1 , x2 , x3 ) for points in R3 ).
MATH1.3 CALCULUS II - AY2020/21 5 / 123
• The xy -plane R2

The xy -plane is the plane with two perpendicular axes, the x-axis
and y -axis, such that each of them represents a real line and they
intersect at the zero.

This intersection point, denoted by 0, is called the origin.

Every point on the xy -plane is represented by a pair of real


numbers (a, b) such that a is the real number on the x-axis
projected vertically and b is the real number on the y -axis
projected horizontally.

We always name the xy -plane as R2 .

MATH1.3 CALCULUS II - AY2020/21 6 / 123


MATH1.3 CALCULUS II - AY2020/21 7 / 123
Lines, circles & ellipses in R2
Equation of a line:

ax + by = c, (a2 + b2 6= 0).

Equation of a circle:

(x − a)2 + (y − b)2 = r 2 , r > 0.

Equation of an ellipse:

α(x − a)2 + β(y − b)2 = r 2 , α > 0, β > 0, r > 0.

MATH1.3 CALCULUS II - AY2020/21 8 / 123


• The xyz-space R3

The xyz-space is the space consisting of three mutually


perpendicular axes, the x-axis, y -axis, and z-axis.

The intersection of these three axes is called the origin, denoted


by 0.

Every point on the space is represented by (a, b, c), where a, b, c


are the real numbers projected to the x-axis, y -axis, and z-axis,
respectively.

We always name the xyz-space as R3 .

MATH1.3 CALCULUS II - AY2020/21 9 / 123


Note. Use the right-hand rule to determine the positive z-axis.

MATH1.3 CALCULUS II - AY2020/21 10 / 123


Planes in R3
Equation of a plane in R3 :

ax + by + cz = d, (a2 + b2 + c 2 6= 0).

(Coefficients give a normal vector n = (a, b, c) to the plane.)

Vector form:
(r − r0 ) · n = 0.

MATH1.3 CALCULUS II - AY2020/21 11 / 123


Spheres in R3
Equation of a sphere: center (a, b, c), radius r

(x − a)2 + (y − b)2 + (z − c)2 = r 2 , r > 0.

MATH1.3 CALCULUS II - AY2020/21 12 / 123


Ellipsoids in R3
Equation of an ellipsoid:

α(x − a)2 + β(y − b)2 + γ(z − c)2 = r 2 , α > 0, β > 0, γ > 0, r > 0.

MATH1.3 CALCULUS II - AY2020/21 13 / 123


• Function of 2 variables

Definition (2.)
A function f of two variables, with a domain D ⊂ R2 , is a rule that
assigns to each point (x, y ) ∈ D a unique real number which is
denoted by f (x, y ).

We often write z = f (x, y ) to make explicit the value taken on by f


at the point (x, y ).

The variables x and y are independent, and z is dependent.

Note. When the domain of f is not specified, we take the largest subset
of R2 on which f (x, y ) is a real number, to be the domain of f .

MATH1.3 CALCULUS II - AY2020/21 14 / 123


Many functions depend on more than one independent variables.

Example (3.)
1 The power P (watts) of an electric circuit is related to the circuit’s
resistance R (ohms) and current I (amperes) by the equation

P = RI 2 .

This means that P is a function of two variables R and I; we may


express this function as P(R, I) = RI 2 .

2 The distance of a point P(x, y ) from a point Q(a, b) is given by


q
d(x, y ) = (x − a)2 + (y − b)2 .

The domain of d(x, y ) is R2 since d(x, y ) is defined for every point


in R2 .
MATH1.3 CALCULUS II - AY2020/21 15 / 123
Example (4.)
p
y − x2
Find and sketch the domain of f (x, y ) = and evaluate f (1, 2).
x −2

Solution. Note that f (x, y ) is defined whenever y − x 2 ≥ 0 and


x − 2 6= 0. Then the domain of f is
n o
D = (x, y ) : y ≥ x 2 & x 6= 2

and √
2−1
f (1, 2) = = −1.
1−2

• Sketch the domain D of f (!)

MATH1.3 CALCULUS II - AY2020/21 16 / 123


• Graph of f (x, y )
Definition (5.)
The graph of a function z = f (x, y ) is a 3-dimensional set
n o
(x, y , z) ∈ R3 : z = f (x, y ), (x, y ) ∈ D .

It is a challenge to sketch it on paper.

MATH1.3 CALCULUS II - AY2020/21 17 / 123


• Level curves of f (x, y )
Definition (6.)
The set of points (x, y ) ∈ R2 where f (x, y ) has the same (constant)
value f (x, y ) = k is called a level curve of f .

MATH1.3 CALCULUS II - AY2020/21 18 / 123


• Level curves and Contour map

If f (x, y ) is the altitude function of a region in R2 , then the level curves


give rise to the contour map.

MATH1.3 CALCULUS II - AY2020/21 19 / 123


Example (7.)
Find the level curve of f (x, y ) = 100 − x 2 − y 2 , which
1 corresponds to f (x, y ) = 75.
2 passes through (10, 0).

Note. Our aim is to determine all points (x, y ) lying on each of the
above level curves (by describing (x, y ) via equations and sketching
them, if possible.)

MATH1.3 CALCULUS II - AY2020/21 20 / 123


Solution.
1 To find the level curve corresponds to f (x, y ) = 75, we find (x, y )
satisfying

100 − x 2 − y 2 = 75 ⇐⇒ x 2 + y 2 = 25.

This is a circle centered at (0, 0) of a radius 5.

2 The level curve which passes through (10, 0) is the level curve
containing all points (x, y ) corresponds to same value of f
evaluated at (0, 0), i.e., f (10, 0).

Since f (10, 0) = 0, the required level curve is described by

f (x, y ) = 0 ⇐⇒ x 2 + y 2 = 102 .

This is a circle centered at (0, 0) of a radius 10.

MATH1.3 CALCULUS II - AY2020/21 21 / 123


The graph & level curves of f (x, y ) = 100 − x 2 − y 2 :

MATH1.3 CALCULUS II - AY2020/21 22 / 123


• Function of 3 variables

Definition (8.)
A function f of three variables, with a domain D ⊂ R3 , is a rule that
assigns to each point (x, y , z) ∈ D a unique real number which is
denoted by f (x, y , z).

We often write w = f (x, y , z) to make explicit the value taken on


by f at the point (x, y , z).

The variables x, y , and z are independent, and w is dependent.

MATH1.3 CALCULUS II - AY2020/21 23 / 123


• Level surfaces of f (x, y , z)
Definition (9.)
For a function f of three variables, the set of points (x, y , z) ∈ R3
where f (x, y , z) has a constant value f (x, y , z) = k is called a level
surface of f .

MATH1.3 CALCULUS II - AY2020/21 24 / 123


Example (10.)
Consider the function f (x, y , z) = (x − 1)2 + y 2 + z 2 .
1 Find the level surface which corresponds to f (x, y , z) = 9.
2 Find the level surface which passes through the point (1, −2, 3).

Solution.
1 The level surface of f which corresponds to f (x, y , z) = 9, is

(x − 1)2 + y 2 + z 2 = 9.

This is the sphere centered at (1, 0, 0) of radius 3.


2 Since f (1, −2, 3) = 02 + (−2)2 + 32 = 13, the level surface of f
that passes through (1, −2, 3) is the set

{(x, y , z) ∈ R3 : (x − 1)2 + y 2 + z 2 = 13}.



This is the sphere centered at (1, 0, 0) of radius 13.
MATH1.3 CALCULUS II - AY2020/21 25 / 123
• Functions of several variables

We can define functions of several variables and their level sets.


Definition (11.)
A function f of n variables with a domain D ⊂ Rn , is a rule that
assigns to each point (x1 , x2 , . . . , xn ) ∈ D a unique real number
denoted by f (x1 , x2 , . . . , xn ).
For a function f of n variables, the set of points
(x1 , x2 , . . . , xn ) ∈ Rn where f (x1 , x2 , . . . , xn ) has a constant value
f (x1 , x2 , . . . , xn ) = k is called a level set of f .

The real number w = f (x1 , x2 , . . . , xn ) is called the evaluation of f at


the point (x1 , x2 , . . . , xn ). The variables x1 , x2 , . . . , xn are independent
variables, and the variable w is a dependent variable.

MATH1.3 CALCULUS II - AY2020/21 26 / 123


Outline

1 Introduction to xy -plane & xyz-space

2 Limits

3 Continuity

4 Partial derivatives

5 The Chain Rules

6 Approximations

MATH1.3 CALCULUS II - AY2020/21 27 / 123


2. Limits

Recall: Intuitive concept.

For a function f (x) of one variable x, intuitively, we say the limit of a


function f when x tends to a point a is L, if f (x) gets very near to L
when x gets very near to a.
Here,
x gets very near to a means that the distance |x − a| becomes
very small.
f (x) gets very near to L means that the distance |f (x) − L|
becomes very small.

MATH1.3 CALCULUS II - AY2020/21 28 / 123


Recall: Formal definition.

Let f be a function of one variable defined on a domain D ⊂ R, a ∈ R (a


not necessary in D). We say that the limit of f (x) as x tends to a is L if

for any ε > 0 there exists a corresponding δ > 0 such that

|f (x) − L| < ε whenever 0 < |x − a| < δ, x ∈ D,

and we write
lim f (x) = L.
x→a

MATH1.3 CALCULUS II - AY2020/21 29 / 123


• Limits in several variables: Intuitive concept

Now for function f (x, y ) of two variables x and y , intuitively, we say the
limit of a function f when (x, y ) tends to a point (a, b) is L, if f (x, y )
gets very near to L when (x, y ) gets very near to (a, b) (in any possible
way).

Remark.
(x, y ) gets very near to (a, b) means that the distance between points
(x, y ) and (a, b) gets very small. This distance above is defined by
q
k(x, y ) − (a, b)k := (x − a)2 + (y − b)2 .

MATH1.3 CALCULUS II - AY2020/21 30 / 123


• Limits

Definition (1.)
Let f be a function of two variables defined on a domain D ⊂ R2 and
(a, b) ∈ R2 ((a, b) is not necessary in D).

We say that the limit of f (x, y ) as (x, y ) tends to (a, b) exists, if there is
a number L such that
for any ε > 0 there exists a corresponding δ > 0 such that

|f (x, y ) − L| < ε whenever 0 < k(x, y ) − (a, b)k < δ, (x, y ) ∈ D,

and we write
lim f (x, y ) = L.
(x,y )→(a,b)

MATH1.3 CALCULUS II - AY2020/21 31 / 123


From the formal definition of limits, we can get several consequences.

(Uniqueness:) If lim f (x, y ) exists, then it is unique.


(x,y )→(a,b)

(Algebra of limits:) Limit laws or properties are established by


using the formal definition.

Proposition (2.)
For every integer n ≥ 0, we have

lim x n = an , lim y n = bn .
(x,y )→(a,b) (x,y )→(a,b)

For example,

(a) lim x 7 = (−1)7 = −1, (b) lim y 3 = 23 = 8.


(x,y )→(−1,3) (x,y )→(−1,2)

MATH1.3 CALCULUS II - AY2020/21 32 / 123


Theorem (3. Algebra of limits)
If lim f (x, y ) and lim g(x, y ) exist, then
(x,y )→(a,b) (x,y )→(a,b)
1 lim (αf (x, y ) + βg(x, y ))
(x,y )→(a,b)

=α lim f (x, y ) + β lim g(x, y ),


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

where α and β are constants.



2 lim (f (x, y ) · g(x, y )
(x,y )→(a,b)

= lim f (x, y ) · lim g(x, y )


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

lim f (x, y )
f (x, y ) (x,y )→(a,b)
3 lim = (if lim g(x, y ) 6= 0).
(x,y )→(a,b) g(x, y ) lim g(x, y ) (x,y )→(a,b)
(x,y )→(a,b)

MATH1.3 CALCULUS II - AY2020/21 33 / 123


For example,
1

     
lim x2 + y3 = lim x2 + lim y 3 = a2 + b 3 .
(x,y )→(a,b) (x,y )→(a,b) (x,y )→(a,b)

     
lim x2 · y3 = lim x2 · lim y 3 = a2 b 3 .
(x,y )→(a,b) (x,y )→(a,b) (x,y )→(a,b)

MATH1.3 CALCULUS II - AY2020/21 34 / 123


• Limit along a path

Suppose C is a path passing through (a, b).

Considering values f (x, y ) as (x, y ) → (a, b) along the path C, we


express by
lim f (x, y )
(x,y )→(a,b)
C

the limit of f (x, y ) along the path C as (x, y ) tends to (a, b).

Example (4.)
x2 − y2 x2
lim = lim = 1.
(x,y )→(0,0) x 2 + y 2 x→0 x 2
y =0

MATH1.3 CALCULUS II - AY2020/21 35 / 123


From the uniqueness of limit, it follows that if f (x, y ) has different limits
as (x, y ) tends to (a, b) along different paths, then the lim f (x, y )
(x,y )→(a,b)
does not exist.

This is recorded in the following result.

Corollary (5. Limit does not exist)


Suppose C1 and C2 are two paths passing through (a, b). If

lim f (x, y ) 6= lim f (x, y ),


(x,y )→(a,b) (x,y )→(a,b)
C1 C2

then lim f (x, y ) does not exist.


(x,y )→(a,b)

MATH1.3 CALCULUS II - AY2020/21 36 / 123


Example (6.)
2x 2 − y 2
Does the limit lim exit?
(x,y )→(0,0) x 2 + y 2

Solution. Consider two different paths: y = 0 and x = y .


Along y = 0: For any (x, y ) 6= (0, 0) along this path, we have

2x 2 − y 2 2x 2 − 02 2x 2 2x 2 − y 2
= = = 2 =⇒ lim = 2.
x 2 + y 2 |{z} x 2 + 02 x2 (x,y )→(0,0) x2 + y2
put y =0 y =0

Along x = y : For any (x, y ) 6= (0, 0) along this path, we have

2x 2 − y 2 2x 2 − x 2 x2 1 2x 2 − y 2 1
2 2
= 2 2
= 2
= =⇒ lim 2 2
= .
x +y |{z} x +x 2x 2 (x,y )→(0,0) x +y 2
put y=x x=y

2x 2 − y 2
So the limit lim does not exist.
(x,y )→(0,0) x 2 + y 2
MATH1.3 CALCULUS II - AY2020/21 37 / 123
Question. What happen if

lim f (x, y ) = lim f (x, y ),


(x,y )→(a,b) (x,y )→(a,b)
C1 C2

can we conclude that lim f (x, y ) exist?


(x,y )→(a,b)

The answer is NO, of course. Please provide a “counterexample” (!).

MATH1.3 CALCULUS II - AY2020/21 38 / 123


Outline

1 Introduction to xy -plane & xyz-space

2 Limits

3 Continuity

4 Partial derivatives

5 The Chain Rules

6 Approximations

MATH1.3 CALCULUS II - AY2020/21 39 / 123


3. Continuity

Definition (1.)
Let f (x, y ) be a function defined in a domain D ⊂ R2 and (a, b) ∈ D.
The function f is said to be continuous at (a, b) if

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


(x,y )→(a,b)

Remark. For a continuity of f (x, y ) at (a, b), 3 conditions must hold:


1 f is defined at (a, b), i.e. (a, b) ∈ D,
2 there exists a limit lim f (x, y ) = L,
(x,y )→(a,b)
3 L = f (a, b).

We say that f is continuous on D if it is continuous at each (a, b) ∈ D.

MATH1.3 CALCULUS II - AY2020/21 40 / 123


• Polynomials & Rational Functions.

Definition (2.)
A polynomial of two variables is a function of the form

p(x, y ) = c0 + c1 x + c2 y + c3 xy + c4 x 2 + c5 y 2 + · · · + ck x n y m .

For example, p(x, y ) = π − 179x 2 + y 3 − 2018xy 9 .

A rational function of two variables is a ratio of two polynomials


p(x, y )
, with q(x, y ) 6= 0.
q(x, y )
x 2 + xy + y 2
For example, f (x, y ) = , where y − x 2 6= 0.
x2 − y

MATH1.3 CALCULUS II - AY2020/21 41 / 123


From the properties of limits, it follows that for non-negative integers m
and n, we have
lim x m y n = am b n .
(x,y )→(a,b)

Thus f (x, y ) = x m y n is continuous at every point (a, b) ∈ R2 .

This gives the following important facts:


Polynomials are continuous on R2 .
Rational functions are continuous on their domains of definition.

For example, p(x, y ) = π − 179x 2 + y 3 − 2018xy 9 is continuous


x 2 + xy + y 2
everywhere on R2 , while f (x, y ) = is continuous at any
x2 − y
point (x, y ) ∈ R2 satisfying y 6= x 2 .

MATH1.3 CALCULUS II - AY2020/21 42 / 123


Example (3.)
Is the function
 2 2
 2x − y

if (x, y ) 6= (0, 0),
g(x, y ) = x2 + y2

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

continuous at (0, 0)?

Solution. Note that g(x, y ) is defined at (0, 0) and g(0, 0) = 0, and


hence we have to check whether lim g(x, y ) = 0.
(x,y )→(0,0)
2x 2 − y 2
But we already proved that lim g(x, y ) = lim
(x,y )→(0,0) (x,y )→(0,0) x 2 + y 2
does not exist, and so g is not continuous at (0, 0).

MATH1.3 CALCULUS II - AY2020/21 43 / 123


Outline

1 Introduction to xy -plane & xyz-space

2 Limits

3 Continuity

4 Partial derivatives

5 The Chain Rules

6 Approximations

MATH1.3 CALCULUS II - AY2020/21 44 / 123


4. Partial derivatives

Definition (1. Partial derivative of f (x, y ) w.r.t. x)


For a function of two variables f (x, y ), partial derivative of f w.r.t. x is
the function fx defined as follows:
f (t, y ) − f (x, y )
fx (x, y ) = lim ,
t→x t −x
(keeping y as a constant).

Note that the subscript x indicates that the values of t tends to x.


∂f
Another notation: .
∂x

MATH1.3 CALCULUS II - AY2020/21 45 / 123


The symbol fx (a, b) is the partial derivative fx (x, y ) at a point (a, b)
(i.e., x = a, keeping y = b unchanged):

f (t, b) − f (a, b)
fx (a, b) = lim .
t→a t −a

MATH1.3 CALCULUS II - AY2020/21 46 / 123


This is the gradient of the curve z = f (x, b) at x = a.

MATH1.3 CALCULUS II - AY2020/21 47 / 123


Therefore, we have
The partial derivative fx (a, b) is the slope of the tangent to the
curve z = f (x, b) at x = a.

It gives the rate of change of f (x, b) at (a, b) along the positive


x-direction.

Other notations:

∂f
fx (a, b) = fx (x, y ) = .
x=a,y =b ∂x x=a,y =b

MATH1.3 CALCULUS II - AY2020/21 48 / 123


Example (2.)
Let f (x, y ) = x 2 y 3 . Use the definition of partial derivative to compute
fx (x, y ).

Solution. We have
f (t, y ) − f (x, y ) t 2y 3 − x 2y 3
fx (x, y ) = lim = lim
t→x t −x t→x t −x
t 2 − x2
= y 3 lim = y 3 lim (t + x) = 2xy 3 .
t→x t − x t→x

∂f
We also write: = 2xy 3 .
∂x

MATH1.3 CALCULUS II - AY2020/21 49 / 123


Example (3.)
Consider 
 x sin(x + y )

if x + y 6= 0,
f (x, y ) = x +y
0

if x + y = 0.

Determine whether fx (0, 0) exists. If it does, what is its value?

Solution. We use the definition,


f (t, 0) − f (0, 0)
fx (0, 0) = lim .
t→0 t −0
Since f (0, 0) = 0 and
t sin(t + 0) t sin(t)
f (t, 0) = = = sin t (as t 6= 0), we have
t +0 t
f (t, 0) − f (0, 0) sin t
fx (0, 0) = lim = lim = 1.
t→0 t −0 t→0 t

MATH1.3 CALCULUS II - AY2020/21 50 / 123


• Partial derivative of f (x, y ) w.r.t. y

Similarly, we have partial derivative fy .

Definition (4.)
For a function of two variables f (x, y ), partial derivative of f w.r.t. y is
the function fy defined as follows:

f (x, t) − f (x, y )
fy (x, y ) = lim ,
t→y t −y

(keeping x as a constant).

The subscript y indicates that the values of t tends to y .


∂f
Another notation: .
∂y

MATH1.3 CALCULUS II - AY2020/21 51 / 123


The symbol fy (a, b) is the partial derivative fy (x, y ) at a point (a, b)
(i.e., y = b, keeping x = a unchanged):

f (a, t) − f (a, b)
fy (a, b) = lim .
t→b t −b

We also have
The partial derivative fy (a, b) is the slope of the tangent to the
curve z = f (a, y ) at y = b.

It gives the rate of change of f (a, y ) at (a, b) along the positive


y -direction.

Other notations:

∂f
fy (a, b) = fy (x, y ) = .
x=a,y =b ∂y x=a,y =b

MATH1.3 CALCULUS II - AY2020/21 52 / 123


This is the gradient of the curve z = f (a, y ) at y = b.

MATH1.3 CALCULUS II - AY2020/21 53 / 123


• Partial derivatives: in terms of h → 0

We can also define the partial derivatives as follows:


1 Letting t = x + h and noticing that t → x is equivalent to h → 0,
we have
f (x + h, y ) − f (x, y )
fx (x, y ) = lim .
h→0 h

2 Similarly, with t = y + h, we have

f (x, y + h) − f (x, y )
fy (x, y ) = lim .
h→0 h

MATH1.3 CALCULUS II - AY2020/21 54 / 123


• Partial derivatives for 3-variable functions

Definition (5.)
For a function f (x, y , z) of three variables, its partial derivative w.r.t. x
is defined as
f (x + h, y , z) − f (x, y , z)
fx (x, y , z) = lim
h→0 h
and it is obtained by regarding y and z as constants and differentiating
f with respect to x.

Other partial derivatives: fy and fz .

MATH1.3 CALCULUS II - AY2020/21 55 / 123


• Partial derivatives of functions of n variables

More generally, we have the following definition.

Definition (6.)
For a function f (x1 , x2 , . . . , xn ) of n variables, the partial derivative w.r.t.
to the variable xi is defined by

fxi (x1 , x2 , . . . , xn )
f (x1 , . . . , xi + h, . . . , xn ) − f (x1 , . . . , xi , . . . , xn )
= lim .
h→0 h

∂f
Other notations: , or simply, fi (x1 , x2 , . . . , xn ).
∂xi

MATH1.3 CALCULUS II - AY2020/21 56 / 123


• Evaluating partial derivatives

• For a fixed value of y , the definition

f (t, y ) − f (x, y )
fx (x, y ) = lim
t→x t −x
tells us that it is the usual derivative of the function f (x, y ) w.r.t. x.

Therefore, to evaluate fx , we regard y as a constant and differentiate


the function f (x, y ) with respect to x.

Hence, we may apply rules of single-variable differentiation whenever


they are applicable.

• Similarly, to evaluate fy , we regard x as a constant and differentiate


f (x, y ) with respect to y .

MATH1.3 CALCULUS II - AY2020/21 57 / 123


Example (7.)
Find fx (2, 1) and fy (2, 1), if f (x, y ) = x 3 + x 2 y 3 − 2y 2 .

Solution. We have
∂  3 
fx (x, y ) = x + x 2 y 3 − 2y 2 = 3x 2 + 2xy 3 ,
∂x
∂  3 
fy (x, y ) = x + x 2 y 3 − 2y 2 = 3x 2 y 2 − 4y .
∂y
Then

fx (2, 1) = 12 + 4 = 16 and fy (2, 1) = 12 − 4 = 8.

MATH1.3 CALCULUS II - AY2020/21 58 / 123


Example (8.)
x ∂f ∂f
If f (x, y ) = sin , calculate and .
1+y ∂x ∂y

Solution. Using the Chain Rule for functions of one variable, we have
(keep y as a constant)
 
∂f x ∂ x 1 x
= cos = cos ,
∂x 1 + y ∂x 1 + y y +1 y +1

and (keep x as a constant)


 
∂f x ∂ x −x x
= cos = 2
cos .
∂y 1 + y ∂y 1+y (y + 1) y + 1

MATH1.3 CALCULUS II - AY2020/21 59 / 123


• Similarly, we have partial derivatives for 3-variable functions.

Example (9.)
p
For f (x, y , z) = x sin y + e3x y 2 + 9z, compute fx , fy , and fz .

Solution. We have
p
fx (x, y , z) = sin y + 3e3x y 2 + 9z,

e3x y
fy (x, y , z) = x cos y + p ,
y 2 + 9z

9e3x
fz (x, y , z) = p .
2 y 2 + 9z

MATH1.3 CALCULUS II - AY2020/21 60 / 123


Example (10.)
Find fx , fy , and fz , if f (x, y , z) = exy ln z.

Solution. We have
∂ xy
fx (x, y , z) = (e ln z) = yexy ln z,
∂x
∂ xy
fy (x, y , z) = (e ln z) = xexy ln z,
∂y
∂ xy exy
fz (x, y , z) = (e ln z) = .
∂z z

MATH1.3 CALCULUS II - AY2020/21 61 / 123


• Second partial derivatives

• If f is a function of two variables, then its partial derivatives fx and fy


are also functions of two variables.

Then we can consider their partial derivatives: (fx )x , (fx )y , (fy )x , and
(fy )y , which are called second partial derivatives of f .

∂2f
We use the notation fxy , or to indicate that we first differentiate f
∂y ∂x
with respect to x followed by differentiating with respect to y :

∂2f
 
∂ ∂f
fxy = (fx )y and = .
∂y ∂x ∂y ∂x

MATH1.3 CALCULUS II - AY2020/21 62 / 123


• For a 2-variable function f (x, y ) there are FOUR second-order partial
derivatives:

∂2f
 
∂ ∂f
(fx )x = fxx = , =
∂x ∂x∂x 2
∂2f
 
∂ ∂f
(fx )y = fxy = = ,
∂y ∂x ∂y ∂x
∂2f
 
∂ ∂f
(fy )x = fyx = = ,
∂x ∂y ∂x∂y
∂2f
 
∂ ∂f
(fy )y = fyy = = .
∂y ∂y ∂y 2

• Similarly, for a 3-variable function, there are NINE second-order


partial derivatives.

MATH1.3 CALCULUS II - AY2020/21 63 / 123


Example (11. Back to Example 7)
Find all second-order derivatives of

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

Solution. We fist find the first-order derivatives

fx = 3x 2 + 2xy 3 , fy = 3x 2 y 2 − 4y .

Now we have

fxx = (fx )x = 6x + 2y 3 , fxy = (fx )y = 6xy 2 ,


fyx = (fy )x = 6xy 2 , fyy = (fy )y = 6x 2 y − 4.

Note that fxy (a, b) = fyx (a, b).

MATH1.3 CALCULUS II - AY2020/21 64 / 123


• Is it true that fxy = fyx ?

In general, fxy 6= fyx .

However, under some conditions, these partial derivatives are equal.

Theorem (12. Equality of mixed derivatives)


If f (x, y ) and its partial derivatives fx , fy , fxy , and fyx are defined
throughout an open region containing a point (a, b) and all are
continuous at (a, b), then

fxy (a, b) = fyx (a, b).

The above theorem is also known as Clairaut’s Theorem, named after


the French mathematician Alexis Clairaut who proved it in 1740.

MATH1.3 CALCULUS II - AY2020/21 65 / 123


Example (13. Back to Example 10)
∂2f
For f (x, y , z) = exy ln z, find and fzxy .
∂z∂y

Solution. First, we have

∂2f xexy
 
∂ ∂f ∂
= = (xexy ln z) = .
∂z∂y ∂z ∂y ∂z z

Next, to compute fzxy = (fz )x y
, we evaluate

exy yexy
fz = =⇒ (fz )x = .
z z

Hence,
 exy + y (xexy ) exy (1 + xy )
fzxy = (fz )x y
= = .
z z
MATH1.3 CALCULUS II - AY2020/21 66 / 123
• Gradient Vector

We introduce a useful term, known as the gradient vector, denoted by


∇f . It is a vector formed by partial derivatives of f .

Definition (14.)
1 For a function f of two variables x and y , the gradient of f is the
vector ∇f defined by
 ∂f ∂f
∇f (x, y ) = fx , fy = i+ j.
∂x ∂y
2 For a function f of three variables x, y , and z, the gradient of f is
the vector ∇f defined by
 ∂f ∂f ∂f
∇f (x, y , z) = fx , fy , fz = i+ j+ k.
∂x ∂y ∂z

MATH1.3 CALCULUS II - AY2020/21 67 / 123


Example (15.)
For f (x, y ) = x(x − 3) − y , find
∇f (x, y )
∇f (P0 ), where P0 = (1, −1).

Solution. Since f (x, y ) = x(x − 3) − y = x 2 − 3x − y , we have

fx (x, y ) = 2x − 3, fy (x, y ) = −1.

Hence,

∇f (x, y ) = fx (x, y ), fy (x, y ) = (2x − 3, −1),
 
∇f (P0 ) = (2x − 3) , −1 = (2 · 1, −1) =

x=1,y =−1 x=1,y =−1
(−1, −1).

MATH1.3 CALCULUS II - AY2020/21 68 / 123


Example (16.)
x2 z2
For F (x, y , z) = + y 2 + , find the gradient vector ∇F (x, y , z).
4 9

Solution. We have
x 2z
Fx (x, y , z) = , Fy (x, y , z) = 2y , and Fz (x, y , z) = .
2 9

Hence,  
x 2z
∇F (x, y , z) = , 2y , .
2 9

MATH1.3 CALCULUS II - AY2020/21 69 / 123


More generally, for a function of n variables, we have the following
definition.

Definition (17.)
If f is a function of n variables x1 , x2 , . . . , xn , then the gradient vector (or
simply, gradient) of f is the vector ∇f defined by
 
∂f ∂f ∂f
∇f (x1 , x2 , . . . , xn ) = , ,..., .
∂x1 ∂x2 ∂xn

MATH1.3 CALCULUS II - AY2020/21 70 / 123


Outline

1 Introduction to xy -plane & xyz-space

2 Limits

3 Continuity

4 Partial derivatives

5 The Chain Rules

6 Approximations

MATH1.3 CALCULUS II - AY2020/21 71 / 123


5. The Chain Rules

Recall for functions of one variable.

The Chain Rule for functions of one variable gives the way for
differentiating a composite function: if y = f (x) and x = g(t) are two
differentiable functions, then
dy dy dx
= .
dt dx dt

For functions of two or more variables, the Chain Rule has several
versions, which depend on the number of variables of the given
functions.

MATH1.3 CALCULUS II - AY2020/21 72 / 123


• The Chain Rule - Case 1

For a function f (x, y ), when both x and y are functions of ONE


variable.

Theorem (1. Chain Rule for f (x, y ): Case 1)


If w = f (x, y ) is differentiable and x = x(t), y = y (t) are differentiable

functions of t, then the composite function w = f x(t), y (t) is also
differentiable w.r.t. t and
dw ∂w dx ∂w dy
= + ,
dt ∂x dt ∂y dt

that is
dw
= fx x(t), y (t) x 0 (t) + fy x(t), y (t) y 0 (t).
 
dt

MATH1.3 CALCULUS II - AY2020/21 73 / 123


Example (2.)
Suppose w = x 2 y + 3xy 4 , where x = et and y = sin t.
dw
(a) Find .
dt
(b) What is the rate of change in w at t = 0?

Solution.
(a) We have

dw ∂w dx ∂w dy
= +
dt ∂x dt ∂y dt
= (2xy + 3y 4 )et + (x 2 + 12xy 3 ) cos t (∗)
t
(substitute x = e , y = sin t)
= (2et sin t + 3 sin4 t)et + (e2t + 12et sin3 t) cos t. (∗∗)

MATH1.3 CALCULUS II - AY2020/21 74 / 123


dw
(b) Since the rate of change in w at t = 0 is , we use (∗∗)
dt t=0
dw
= (2et sin t + 3 sin4 t)et + (e2t + 12et sin3 t) cos t
dt
to get

dw
= (2e0 sin 0 + 3 sin4 0)e0 + (e2·0 + 12e0 sin3 0) cos 0
dt t=0
(substitute e0 = 1, sin 0 = 0, cos 0 = 1) = 1.

• Remark. We can also use (∗)

dw
= (2xy + 3y 4 )et + (x 2 + 12xy 3 ) cos t
dt

dw
to evaluate values of x and y at t = 0, and then .
dt t=0

MATH1.3 CALCULUS II - AY2020/21 75 / 123


Example (3.)
The radius of a right circular cone is increasing at a rate of 1.8cm/s,
while its height is decreasing at a rate of 2.5cm/s. At what rate is the
volume of the cone changing when the radius is 24cm and the height
is 14cm?

Solution. Volume V cm3 of a right circular cone with radius r cm and


height hcm is
1
V = πr 2 h
3
(as a function of r and h).

Also by the assumptions, we have

dr dh
= 1.8, and = −2.5
dt dt

MATH1.3 CALCULUS II - AY2020/21 76 / 123


Example 3 (cont.)

1 2
From V = πr h, applying the Change Rule, we have
3
dV ∂V dr ∂V dh
= · + ·
dt ∂r dt ∂h dt
π dr dh 
= 2rh · +r 2 · .
3 dt
|{z} dt
|{z}
1.8 −2.5

Hence, with r = 24 and h = 14, we obtain


dV π 
= 2 · 24 · 14 · (1.8) + (24)2 · (−2.5) = 76.8π (cm3 /s).
dt 3

MATH1.3 CALCULUS II - AY2020/21 77 / 123


For a function f (x, y , z), when x, y , and z are functions of ONE
variable.

Theorem (4. Chain Rule for f (x, y , z): Case 1)


If w = f (x, y , z) is differentiable and x = x(t), y = y (t), and z = z(t)
are differentiable functions of t, then the composite function

w = f x(t), y (t), z(t) is also differentiable w.r.t t and

dw ∂w dx ∂w dy ∂w dz
= + + ,
dt ∂x dt ∂y dt ∂z dt

that is
dw
= fx x(t), y (t), z(t) x 0 (t) + fy x(t), y (t), z(t) y 0 (t)
 
dt
+ fz x(t), y (t), z(t) z 0 (t).


MATH1.3 CALCULUS II - AY2020/21 78 / 123


Example (5.)
2 √
For w = ex y + y 2 z + 4, where x = t 3 , y = cos t, and z = ln(t 2 + 1),
dw
find the value of at t = 0.
dt

Solution. By the Chain Rule, we have

dw ∂w dx ∂w dy ∂w dz
= · + · + ·
dt ∂x dt ∂y dt ∂z dt
2 2 √ y2 2t
= 2xex y · (3t 2 ) + (ex + 2y z + 4) · (− sin t) + √ · 2 .
2 z +4 t +1

When t = 0, we have x = 0, y = 1, and z = 0. Then,

dw √ 1 0
= 0 + (1 + 2 4)(− sin 0) + √ · = 0.
dt 2 4 0 + 1

MATH1.3 CALCULUS II - AY2020/21 79 / 123


• The Chain Rule - Case 2

For a function f (x, y ), when both x and y are functions of TWO


variables.

Suppose x = g(s, t) and y = h(s, t). Then w = f (x, y ) is a function of


∂w ∂w
two variables s and t and we may find partial derivatives and .
∂s ∂t

Theorem (6. Chain Rule for f (x, y ): Case 2)


If w = f (x, y ), where x = g(s, t) and y = h(s, t) are differentiable, then
w has partial derivatives w.r.t. s and t, and

∂w ∂w ∂x ∂w ∂y
= + ,
∂s ∂x ∂s ∂y ∂s

∂w ∂w ∂x ∂w ∂y
= + .
∂t ∂x ∂t ∂y ∂t
MATH1.3 CALCULUS II - AY2020/21 80 / 123
Example (7.)
∂w ∂w
For w = ex sin y , where x = st 2 and y = s2 t, find and .
∂s ∂t

Solution. We have
∂w ∂w ∂x ∂w ∂y
= · + ·
∂s ∂x ∂s ∂y ∂s
= (ex sin y ) · (t 2 ) + (ex cos y ) · (2st)
2 2
= t 2 est sin(s2 t) + 2stest cos(s2 t),

and
∂w ∂w ∂x ∂w ∂y
= · + ·
∂t ∂x ∂t ∂y ∂t
= (ex sin y ) · (2st) + (ex cos y ) · (s2 )
2 2
= 2stest sin(s2 t) + s2 est cos(s2 t).

MATH1.3 CALCULUS II - AY2020/21 81 / 123


Example (8.)
Write down the Chain Rule for the case where w = f (x, y ) and
x = x(s, t, u), y = y (s, t, u).

Solution. Note that w is a function of s, t, and u.

We have
∂w ∂w ∂x ∂w ∂y
= + ,
∂s ∂x ∂s ∂y ∂s
∂w ∂w ∂x ∂w ∂y
= + ,
∂t ∂x ∂t ∂y ∂t
∂w ∂w ∂x ∂w ∂y
= + .
∂u ∂x ∂u ∂y ∂u

MATH1.3 CALCULUS II - AY2020/21 82 / 123


Example (9.)
Write down the Chain Rule for the case where w = f (x, y , z) and
x = x(s, t), y = y (s, t), z = z(s, t).

Solution. Note that w is a function of s and t.

We have
∂w ∂w ∂x ∂w ∂y ∂w ∂z
= + + ,
∂s ∂x ∂s ∂y ∂s ∂z ∂s
∂w ∂w ∂x ∂w ∂y ∂w ∂z
= + + .
∂t ∂x ∂t ∂y ∂t ∂z ∂t

MATH1.3 CALCULUS II - AY2020/21 83 / 123


Example (10.)
For u = x 4 y + y 2 z 3 , where x = rset , y = rs2 e−t , and z = r 2 s sin t, find
∂u
the value of when r = 2, s = 1, t = 0.
∂s

Solution. Note that u is a function of x, y , and z.

Since
∂u ∂u ∂x ∂u ∂y ∂u ∂z
= + + ,
∂s ∂x ∂s ∂y ∂s ∂z ∂s

we compute

∂u ∂u ∂u
= 4x 3 y , = x 4 + 2yz 3 , = 3y 2 z 2 ,
∂x ∂y ∂z

∂x ∂y ∂z
= ret , = 2rse−t , = r 2 sin t.
∂s ∂s ∂s

MATH1.3 CALCULUS II - AY2020/21 84 / 123


Example 10 (cont.)

When r = 2, s = 1, t = 0, we have x = 2, y = 2, and z = 0. Therefore,

∂u ∂u ∂u
= 64, = 16, = 0,
∂x ∂y ∂z

∂x ∂y ∂z
= 2, = 4, = 0,
∂s ∂s ∂s
which give
∂u
= 64 · 2 + 64 · 4 + 0 · 0 = 192.
∂s

MATH1.3 CALCULUS II - AY2020/21 85 / 123


• The General Chain Rule

Theorem (11. The Chain Rule: General Case)


Let u be a function n variables x1 , x2 , . . . , xn , each of which is a
∂xi
function of m variables t1 , t2 , . . . , tm such that all partial derivatives
∂tj
exist (i = 1, 2, ..., n; j = 1, 2, ..., m).

Then u is a function of t1 , t2 , . . . , tm and


∂u ∂u ∂x1 ∂u ∂x2 ∂u ∂xn
= + + ··· +
∂tj ∂x1 ∂tj ∂x2 ∂tj ∂xn ∂tj

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

MATH1.3 CALCULUS II - AY2020/21 86 / 123


Example (12.)
Write down the Chain Rule for the case where w = f (x, y , z, t) and
x = x(u, v ), y = y (u, v ), z = z(u, v ), and t = t(u, v ).

Solution. We apply the theorem above with n = 4 and m = 2.

∂w ∂w ∂x ∂w ∂y ∂w ∂z ∂w ∂t
= + + + ,
∂u ∂x ∂u ∂y ∂u ∂z ∂u ∂t ∂u
∂w ∂w ∂x ∂w ∂y ∂w ∂z ∂w ∂t
= + + + .
∂v ∂x ∂v ∂y ∂v ∂z ∂v ∂t ∂v

MATH1.3 CALCULUS II - AY2020/21 87 / 123


• Implicit Differentiation

Now suppose that z is defined implicitly as a function of x and y by


an equation of the form

F (x, y , z) = C, where C is a constant.

∂z ∂z
Our aim is to find and .
∂x ∂y
Apply the Chain Rule to differentiate the above equation w.r.t. x

∂F ∂x ∂F ∂y ∂F ∂z
+ + =0
∂x |{z}
∂x ∂y |{z}
∂x ∂z ∂x
1 0
(∂x/∂x = 1 and ∂y /∂x = 0, because y is independent to x).

The preceding equation becomes:


MATH1.3 CALCULUS II - AY2020/21 88 / 123
∂F ∂F ∂z
+ = 0.
∂x ∂z ∂x
Similarly,

∂F ∂F ∂z
+ = 0.
∂y ∂z ∂y

∂F
Suppose that 6= 0. In this case, we obtain
∂z

∂F ∂F
∂z −Fx ∂z ∂y −Fy
= − ∂x = and =− = .
∂x ∂F Fz ∂y ∂F Fz
∂z ∂z

MATH1.3 CALCULUS II - AY2020/21 89 / 123


Example (13.)
∂z ∂z
Find and , if x 3 + y 3 + z 3 + 6xyz = 1.
∂x ∂y

Solution. Let F (x, y , z) = x 3 + y 3 + z 3 + 6xyz. Then F (x, y , z) = 1,


and by the above formula, we have

∂z −Fx 3x 2 + 6yz x 2 + 2yz


= =− 2 =− 2
∂x Fz 3z + 6xy z + 2xy
and
∂z −Fy 3y 2 + 6xz y 2 + 2xz
= =− 2 =− 2 .
∂y Fz 3z + 6xy z + 2xy

MATH1.3 CALCULUS II - AY2020/21 90 / 123


Outline

1 Introduction to xy -plane & xyz-space

2 Limits

3 Continuity

4 Partial derivatives

5 The Chain Rules

6 Approximations

MATH1.3 CALCULUS II - AY2020/21 91 / 123


6. Approximations

Recall: Gradient vector.


Recall that for a function f (x, y ) of two variables x and y , the gradient
of f is
∂f ∂f
∇f (x, y ) = (fx , fy ) = i+ j,
∂x ∂y
whereas for a function F (x, y , z) of three variables x, y , and z, the
gradient of F is
∂F ∂F ∂F
∇F (x, y , z) = (Fx , Fy , Fz ) = i+ j+ k.
∂x ∂y ∂z

In this section, we discuss the orthogonal property of the gradient


vector to its level curve or level surface.
It is used in describing equation of tangent planes. Then it is applied to
estimating errors and linear approximations.
MATH1.3 CALCULUS II - AY2020/21 92 / 123
• Gradient vector perpendicular to level curve

Proposition (1.)
Consider the 2-variable function f (x, y ) and the level curve defined by
f (x, y ) = k . Suppose P0 (x0 , y0 ) is a point on this level curve, i.e.,
f (x0 , y0 ) = k.

Then the gradient vector ∇f (P0 ) is orthogonal (perpendicular) to the


tangent of the level curve f (x, y ) = k at P0 .

MATH1.3 CALCULUS II - AY2020/21 93 / 123


• Diagram: Orthogonality

MATH1.3 CALCULUS II - AY2020/21 94 / 123


Example (2.)
Let f (x, y ) = x(x − 3) − y . Sketch the level curve of f which passes
through P0 (1, −1) and indicate the gradient vector ∇f (P0 ) on the
sketch.

Solution. Note that f (P0 ) = f (1, −1) = −1.

The level curve passing through P is the curve

f (x, y ) = −1 ⇐⇒ x(x − 3) − y = −1 ⇐⇒ y = x 2 − 3x + 1,

which is the parabola.

The gradient vector is ∇f (x, y ) = (2x − 3, −1), and so

∇f (P0 ) = (−1, −1).

MATH1.3 CALCULUS II - AY2020/21 95 / 123


At P0 (1, −1), the gradient ∇f (P0 ) = (−1, −1) is perpendicular to the
tangent of the parabola y = x(x − 3) + 1.
Sketch of the level curve and the gradient vector ∇f (P0 ):

MATH1.3 CALCULUS II - AY2020/21 96 / 123


• Gradient vector perpendicular to level surface

Proposition (3.)
Consider a 3-variable function F (x, y , z) and the level surface S is
defined by F (x, y , z) = k . Suppose P(x0 , y0 , z0 ) is a point on S.

Then the gradient vector ∇F (P0 ) is orthogonal (perpendicular) to the


tangent of the level surface at P0 .

MATH1.3 CALCULUS II - AY2020/21 97 / 123


• Tangent planes to level surfaces

Here with ∇F (x0 , y0 , z0 ) 6= 0 (i.e. is not the zero vector), we mean the
tangent plane to the level surface F (x, y , z) = k at P(x0 , y0 , z0 ) is the
plane passes through P and has normal vector ∇F (x0 , y0 , z0 ).

Therefore, the equation of this tangent plane is

∇F (x0 , y0 , z0 ) · (x − x0 , y − y0 , z − z0 ) = 0.

We can write the equation of this tangent plane as

Fx (x0 , y0 , z0 )(x − x0 ) + Fy (x0 , y0 , z0 )(y − y0 ) + Fz (x0 , y0 , z0 )(z − z0 ) = 0.

MATH1.3 CALCULUS II - AY2020/21 98 / 123


• Diagram: Orthogonality

MATH1.3 CALCULUS II - AY2020/21 99 / 123


• Normal lines to level surfaces

The normal line to the surface F (x, y , z) = k at P(x0 , y0 , z0 ) can be


represented by the vector equation

r = (x0 , y0 , z0 ) + t∇F (x0 , y0 , z0 )

or

x = x0 + t Fx (x0 , y0 , z0 ),
y = y0 + t Fy (x0 , y0 , z0 ),
z = z0 + t Fz (x0 , y0 , z0 ).

MATH1.3 CALCULUS II - AY2020/21 100 / 123


Example (4.)
Find the equation of the tangent plane and normal at the point
(−2, 1, −3) to the ellipsoid

x2 z2
+ y2 + = 3.
4 9

Solution.
• Tangent plane.
x2 z2
Let F (x, y , z) = + y 2 + . The equation of the tangent plane at
4 9
(x0 , y0 , z0 ) is

∇F (x0 , y0 , z0 ) · (x − x0 , y − y0 , z − z0 ) = 0.

MATH1.3 CALCULUS II - AY2020/21 101 / 123


Example 4 (cont.)

From  
x 2z
∇F = (Fx , Fy , Fz ) = , 2y , ,
2 9
 
−2
it follows that ∇F (−2, 1, −3) = −1, 2, .
3
Hence, the required equation is

−2  
− 1, 2, · x − (−2), y − 1, z − (−3) = 0
3
2
⇐⇒ −(x + 2) + 2(y − 1) − (z + 3) = 6
3
2
⇐⇒ x − 2y + z = −6.
3

MATH1.3 CALCULUS II - AY2020/21 102 / 123


• Normal line.
x2 z2
The equation of the normal line to the ellipsoid + y2 + = 3 at the
4 9
point (x0 , y0 , z0 ) is

r = (x0 , y0 , z0 ) + t∇F (x0 , y0 , z0 ),

and hence, the desired equation is

−2
(x, y , z) = (−2, 1, −3) + t(−1, 2, ).
3
This is in a parametric form, that is



 x = −2 − t

y = 1 + 2t t ∈ R.
z = −3 − 2 t



3

MATH1.3 CALCULUS II - AY2020/21 103 / 123


• Tangent plane to z = f (x, y )
We can obtain an equation of the tangent plane of the graph
z = f (x, y ), because the latter is viewed as the level surface
F (x, y , z) = 0, where F (x, y , z) = f (x, y ) − z.

So we have the following result.

Proposition (5. Tangent plane to z = f (x, y ))


Let f (x, y ) be a function of two variables. The equation of the tangent
plane to the graph z = f (x, y ) at (x0 , y0 , f (x0 , y0 )) is given by

z = f (x0 , y0 ) + ∇f (x0 , y0 ) · (x − x0 , y − y0 ),

that is

z = f (x0 , y0 ) + fx (x0 , y0 )(x − x0 ) + fy (x0 , y0 )(y − y0 ).

MATH1.3 CALCULUS II - AY2020/21 104 / 123


• Diagram: Tangent plane

z = f (x0 , y0 ) + ∇f (x0 , y0 ) · (x − x0 , y − y0 ),

MATH1.3 CALCULUS II - AY2020/21 105 / 123


• Summary: Equation of Tangent Plane to z = f (x, y )

We have
z = f (x0 , y0 ) + ∇f (x0 , y0 ) · (x − x0 , y − y0 ), or equivalently
z = f (x0 , y0 ) + fx (x0 , y0 )(x − x0 ) + fy (x0 , y0 )(y − y0 ).
Rearranging the above gives

fx (x0 , y0 ) x + fy (x0 , y0 ) y − z
| {z } | {z }
a b

= fx (x0 , y0 )x0 + fy (x0 , y0 )y0 − f (x0 , y0 ),


| {z }
d

which is in the form ax + by + cz = d, where c = −1.

MATH1.3 CALCULUS II - AY2020/21 106 / 123


• Remark: Tangent plane to z = f (x, y ).

For a function f (x) of one variable, the equation of the tangent line
at x = x0 is given by

y = f (x0 ) + f 0 (x0 )(x − x0 ).

We obtained above a similar equation describing the tangent


plane to the surface z = f (x, y ) at (x0 , y0 , f (x0 , y0 )) given by

z = f (x0 , y0 ) + ∇f (x0 , y0 ) · (x − x0 , y − y0 ),

that is,

z = f (x0 , y0 ) + fx (x0 , y0 )(x − x0 ) + fy (x0 , y0 )(y − y0 ).

MATH1.3 CALCULUS II - AY2020/21 107 / 123


Example (6.)
Find the equation of the tangent plane to the surface z = 2x 2 + y 2 at
the point (1, 1, 3).

Solution. Let f (x, y ) = 2x 2 + y 2 . The required equation is

z = f (1, 1) + fx (1, 1)(x − 1) + fy (1, 1)(y − 1).

Note that fx (x, y ) = 4x and fy (x, y ) = 2y . So we obtain f (1, 1) = 3,


fx (1, 1) = 4, and fy (1, 1) = 2.

Therefore, the equation of the tangent plane at (1, 1, 3) is

z = 3 + 4(x − 1) + 2(y − 1), i.e. z = 4x + 2y − 3.

MATH1.3 CALCULUS II - AY2020/21 108 / 123


• Recall: Linear Approximation of f (x)

Recall that a linear approximation of a single variable function f (x) for


values of x near a is an approximation of f (x) using the tangent
function.
(Note that y = f (a) + f 0 (a)(x − a) is the equation of tangent line to
y = f (x) at x = a.)

The value f (x) is approximated by the function L(x) which defines the
tangent line:
f (x) ≈ L(x) = f (a) + f 0 (a)(x − a).

MATH1.3 CALCULUS II - AY2020/21 109 / 123


• Linear approximation of f (x, y )

For a 2-variable function f (x, y ), we have a similar linear approximation


for (x, y ) close to (a, b).

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

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


| {z }
L(x,y )

Let
L(x, y ) = f (a, b) + fx (a, b) · (x − a) + fy (a, b) · (y − b)

be the function which describes the above tangent plane.

MATH1.3 CALCULUS II - AY2020/21 110 / 123


Proposition (7. Linear approximation of f (x, y ))
For (x, y ) close to (a, b), we use L(x, y ) to approximate f (x, y ) as
follows:
f (x, y ) ≈ L(x, y ),

that is

f (x, y ) ≈ f (a, b) + fx (a, b) · (x − a) + fy (a, b) · (y − b)

= f (a, b) + ∇f (a, b) · (x − a, y − b).

MATH1.3 CALCULUS II - AY2020/21 111 / 123


• Diagram: Linearization

f (x, y ) ≈ L(x, y ) = f (a, b) + fx (a, b) · (x − a) + fy (a, b) · (y − b)

MATH1.3 CALCULUS II - AY2020/21 112 / 123


Example (8.)
Use linear approximation to approximate the value
q
9(1.95)2 + (8.1)2 .

p
Solution. Let f (x, y ) = 9x 2 + y 2 .

Note that 1.95 is close to 2 and 8.1 is close to 8.

Then we choose a = 2 and b = 8 to approximate f (1.95, 8.1):

f (x, y ) ≈ L(x, y ) = f (a, b) + fx (a, b) · (x − a) + fy (a, b) · (y − b)

which gives

f (1.95, 8.1) ≈ f (2, 8) + fx (2, 8) · (1.95 − 2) + fy (2, 8) · (8.1 − 8).

MATH1.3 CALCULUS II - AY2020/21 113 / 123


Example 8 (cont.)

We have
∂ 9x
q
fx (x, y ) = 9x 2 + y 2 = p ,
∂x 9x 2 + y 2
∂ y
q
fy (x, y ) = 9x 2 + y 2 = p .
∂y 9x 2 + y 2

Then we have

f (1.95, 8.1) ≈ f (2, 8) + fx (2, 8) · (−0.05) + fy (2, 8) · (0.1)


9·2 8
= 10 + √ (−0.05) + √ (0.1)
9·2 +82 2 9 · 22 + 82
= 10 + (−0.01) = 9.99.

MATH1.3 CALCULUS II - AY2020/21 114 / 123


• Estimate of change in f : Differentials
Let f (x, y ) be a function of two variables. We study how to estimate the
change in f from a point (a, b) to (a + ∆x, b + ∆y ), i.e.

∆f = f (a + ∆x, b + ∆y ) − f (a, b).

Here, ∆x and ∆y are respectively small changes in variables x and y .

Recall: for a function f (x) of one variable, to estimate the change


∆f = f (a + ∆x) − f (a), we use L(a + ∆x) for f (a + ∆x), where
L(x) = f (a) + f 0 (a)(x − a) is the linear approximation of f about a.

Thus we have

∆f ≈ df = L(a + ∆x) − f (a) = f 0 (a)∆x,

where df = f 0 (a)∆x is known as the differential of f .


MATH1.3 CALCULUS II - AY2020/21 115 / 123
• Change & Total Differential

Similarly, when ∆x and ∆y are small, to estimate ∆f , we use


L(a + ∆x, b + ∆y ) for f (a + ∆x, b + ∆y ).

Recall: L(x, y ) = f (a, b) + ∇f (a, b) · (x − a, y − b).

Thus we have

∆f = f (a + ∆x, b + ∆y ) − f (a, b)
≈ L(a + ∆x, b + ∆y ) − f (a, b)
= ∇f (a, b) · (∆x, ∆y )
= fx (a, b)∆x + fy (a, b)∆y ,

MATH1.3 CALCULUS II - AY2020/21 116 / 123


• Increment & Total Differential

Definition (9.)
We define the total differential of f (or simply, the differential of f ),
denoted by df , as

df = ∇f (a, b) · (∆x, ∆y ) = fx (a, b)∆x + fy (a, b)∆y .

Thus we have ∆f ≈ df .

Remark. For independent variables x and y , the following notation is


often used: dx = ∆x and dy = ∆y , so that

df = ∇f (a, b) · (dx, dy ) = fx (a, b)dx + fy (a, b)dy .

MATH1.3 CALCULUS II - AY2020/21 117 / 123


• Diagram: Differential z = f (x, y )

We have ∆z ≈ dz = fx (a, b)dx + fy (a, b)dy .

MATH1.3 CALCULUS II - AY2020/21 118 / 123


Example (10.)
Let f (x, y ) = x 2 + 3xy − y 2 . If x changes from 2 to 2.05 and y changes
from 3 to 2.96, compute df and compare it with ∆f .

Solution. • Since x changes from 2 to 2.05 and y changes from 3 to


2.96, we have

a = 2 =⇒ ∆x = 2.05 − 2 = 0.05
b = 3 =⇒ ∆y = 2.96 − 3 = −0.04.

Also
fx (x, y ) = 2x + 3y and fy (x, y ) = 3x − 2y .
Then we have

df = (2a + 3b)∆x + (3a − 2b)∆y


= (2 · 2 + 3 · 3) · (0.05) + (3 · 2 − 2 · 3) · (−0.04) = 0.65.
MATH1.3 CALCULUS II - AY2020/21 119 / 123
• On the other hand, the change in f is

∆f = f (a + ∆x, b + ∆y ) − f (a, b)
= f (2.05, 2.96) − f (2, 3)
h i h i
= (2.05)2 + 3(2.05) · (2.96) − (2.96)2 − (2)2 + 3(2) · (3) − (3)2
= 0.6449.

Note that ∆f is approximately equal to df , but df is much easier to


calculate.

MATH1.3 CALCULUS II - AY2020/21 120 / 123


• Functions of n ≥ 3 variables

Definition (11.)
For a function F (x, y , z) of three variables, we have the following linear
approximation and total differential at (a, b, c) as follows.

Linear approximation:

F (x, y , z) ≈ L(x, y , z)
= F (a, b, c) + ∇F (a, b, c) · (x − a, y − b, z − c),

Total differential:

∆F ≈ df = ∇F (x, y , z) · (x − a, y − b, z − c)

= Fx (a, b, c) · (x − a) + Fy (a, b, c) · (y − b) + Fz (a, b, c) · (z − c).

MATH1.3 CALCULUS II - AY2020/21 121 / 123


More generally, for a function f (x1 , x2 , . . . , xn ) of n variables, we have
the following linear approximation and total differential at
(a1 , a2 , . . . , an ).

Definition (12.)
Linear approximation:

f (x1 , x2 , . . . , xn ) ≈ L(x1 , x2 , . . . , xn )
= f (a1 , a2 , . . . , an )
+∇f (a1 , a2 , . . . , an ) · (x1 − a1 , x2 − a2 , . . . , xn − an ),

Total differential:

df = ∇f (a1 , a2 , . . . , an ) · (x1 − a1 , x2 − a2 , . . . , xn − an ).

MATH1.3 CALCULUS II - AY2020/21 122 / 123


END OF CHAPTER 1

MATH1.3 CALCULUS II - AY2020/21 123 / 123

You might also like