MATH1.3 CALCULUS II - AY2020/21: Chapter 1: Functions of Several Variables
MATH1.3 CALCULUS II - AY2020/21: Chapter 1: Functions of Several Variables
MATH1.3 CALCULUS II - AY2020/21: Chapter 1: Functions of Several Variables
3 CALCULUS II - AY2020/21
Chapter 1: Functions of Several Variables
2 Limits
3 Continuity
4 Partial derivatives
6 Approximations
2 Limits
3 Continuity
4 Partial derivatives
6 Approximations
As there are more than one variables, the derivatives involved are
more interesting. Applications of derivatives are also discussed.
Definition (1.)
The set Rn consists of all n-tuples (x1 , x2 , . . . , xn ) with real entries.
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.
ax + by = c, (a2 + b2 6= 0).
Equation of a circle:
Equation of an ellipse:
ax + by + cz = d, (a2 + b2 + c 2 6= 0).
Vector form:
(r − r0 ) · n = 0.
α(x − a)2 + β(y − b)2 + γ(z − c)2 = r 2 , α > 0, β > 0, γ > 0, r > 0.
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 ).
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 .
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 .
and √
2−1
f (1, 2) = = −1.
1−2
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.)
100 − x 2 − y 2 = 75 ⇐⇒ x 2 + y 2 = 25.
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).
f (x, y ) = 0 ⇐⇒ x 2 + y 2 = 102 .
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).
Solution.
1 The level surface of f which corresponds to f (x, y , z) = 9, is
(x − 1)2 + y 2 + z 2 = 9.
2 Limits
3 Continuity
4 Partial derivatives
6 Approximations
and we write
lim f (x) = L.
x→a
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 .
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
and we write
lim f (x, y ) = L.
(x,y )→(a,b)
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,
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)
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)
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
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
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
2 Limits
3 Continuity
4 Partial derivatives
6 Approximations
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
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 .
2 Limits
3 Continuity
4 Partial derivatives
6 Approximations
f (t, b) − f (a, b)
fx (a, b) = lim .
t→a t −a
Other notations:
∂f
fx (a, b) = fx (x, y ) = .
x=a,y =b ∂x x=a,y =b
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
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).
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.
Other notations:
∂f
fy (a, b) = fy (x, y ) = .
x=a,y =b ∂y x=a,y =b
f (x, y + h) − f (x, y )
fy (x, y ) = lim .
h→0 h
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.
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
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.
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
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
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
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
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
∂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
f (x, y ) = x 3 + x 2 y 3 − 2y 2 .
fx = 3x 2 + 2xy 3 , fy = 3x 2 y 2 − 4y .
Now 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
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
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).
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
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
2 Limits
3 Continuity
4 Partial derivatives
6 Approximations
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.
that is
dw
= fx x(t), y (t) x 0 (t) + fy x(t), y (t) y 0 (t).
dt
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. (∗∗)
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
dr dh
= 1.8, and = −2.5
dt dt
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
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).
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
dw √ 1 0
= 0 + (1 + 2 4)(− sin 0) + √ · = 0.
dt 2 4 0 + 1
∂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).
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
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
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
∂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
∂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
∂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).
∂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
2 Limits
3 Continuity
4 Partial derivatives
6 Approximations
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.
f (x, y ) = −1 ⇐⇒ x(x − 3) − y = −1 ⇐⇒ y = x 2 − 3x + 1,
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.
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 ).
∇F (x0 , y0 , z0 ) · (x − x0 , y − y0 , z − z0 ) = 0.
or
x = x0 + t Fx (x0 , y0 , z0 ),
y = y0 + t Fy (x0 , y0 , z0 ),
z = z0 + t Fz (x0 , y0 , z0 ).
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.
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
−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
z = f (x0 , y0 ) + ∇f (x0 , y0 ) · (x − x0 , y − y0 ),
that is
z = f (x0 , y0 ) + ∇f (x0 , y0 ) · (x − x0 , y − y0 ),
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
For a function f (x) of one variable, the equation of the tangent line
at x = x0 is given by
z = f (x0 , y0 ) + ∇f (x0 , y0 ) · (x − x0 , y − y0 ),
that is,
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).
Let
L(x, y ) = f (a, b) + fx (a, b) · (x − a) + fy (a, b) · (y − b)
that is
p
Solution. Let f (x, y ) = 9x 2 + y 2 .
which gives
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
Thus we have
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 ,
Definition (9.)
We define the total differential of f (or simply, the differential of f ),
denoted by df , as
Thus we have ∆f ≈ df .
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
∆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.
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)
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 ).