Calculus II - Chapter 1
Function of several variables
By Minh Nguyen from USTH Learning Support
April 2024
Contents
1 The set Rn 3
1.1 Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.2 Some equation in R2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.3 Some equation in R3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2 Function of several variables 3
2.1 Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2.2 Level curve for function of 2 variables . . . . . . . . . . . . . . . . . . . . . . . 4
2.3 Level surface for function of 3 variables . . . . . . . . . . . . . . . . . . . . . 5
2.4 Exercise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
3 Limit 6
3.1 Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
3.2 Limit along a path . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
4 Continuity 8
5 Partial Derivative 8
5.1 Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
5.1.1 Partial Derivative of Function of 2 variables . . . . . . . . . . . . . . . 8
5.1.2 Partial Derivative of Function of n variables . . . . . . . . . . . . . . . 9
5.2 Second Partial Derivative . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
5.2.1 Gradient vector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
6 The chain rule 11
6.1 The chain rule - Case 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
6.2 The chain rule - Case 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
6.3 Implicit Differentiation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
1
7 Approximations 14
7.1 Gradient vector perpendicular to level curve . . . . . . . . . . . . . . . . . . . 14
7.2 Gradient vector perpendicular to level surface . . . . . . . . . . . . . . . . . . 15
7.3 Tangent plane to z =f (x, y) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
7.4 Linear Approximation of f (x, y) . . . . . . . . . . . . . . . . . . . . . . . . . 17
7.5 Estimate change in f : Differential . . . . . . . . . . . . . . . . . . . . . . . . 18
2
1 The set Rn
1.1 Definition
The set of Rn consists of all n-tuples (x1 , x2 , ..xn ) with real entries .
Two operations:
- Addiction
- Scalar multiplication
1.2 Some equation in R2
• Equation of a line:
ax + by = c, (a2 + b2 ̸= 0)
• Equation of a circle:
(x − a)2 + (y − b)2 = r2 , (r > 0)
• Equation of an ellipse:
α(x − a)2 + β(y − b)2 = r2 , α > 0, β > 0, r > 0
1.3 Some equation in R3
• Equation of a plane
ax + by + cz = d, a2 + b2 + c2 ̸= 0
vector n = (a,b,c) perpendicular with plane.
• Equation of a sphere: center (a, b, c), radius r
(x − a)2 + (y − b)2 + (z − c)2 = r2 , r > 0
• Equation of an ellipsoid:
α(x − a)2 + β(y − b)2 + γ(z − c)2 = r2 , α, β, γ, r > 0
2 Function of several variables
2.1 Definition
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 number denoted by f (x1 , x2 , ..xn ).
∗ Note:
- In this course, we often consider function of 2 or 3 variables.
- w = f (x1 , .., xn ) called dependent variable and x1 , x2 , .. called independent variables.
√
x+y+1
Example: Find domain of f (x, y) = x−1
and evaluate f (3, 5)
Sol:
D = {(x, y)|x + y + 1 ≥ 0 and x ̸= 1}
3
3
f (3, 5) = 2
2.2 Level curve for function of 2 variables
- The level curves of a function f of two variables are curve with equation f (x, y) = k, where
k is a constant (in range of f ).
Example: Graph f (x, y) = 100−x2 −y 2 and plot the level curve f (x, y) = 0, f (x, y) = 100.
Sol:
Domain : D = {(x, y) ∈ R2 }
Range: R = {z ∈ R|z ≤ 100}
With f (x, y) = 100 − x2 − y 2 = 0, then x2 + y 2 = 100 → the level curve in this case is a circle
with center at (0,0) and radius = 10.
With f (x, y) = 100, then level curve in this case is origin.
- If f (x, y) is the altitude function of a region in R2 , then the level curves give rise to the
contour map.
4
2.3 Level surface for function of 3 variables
- 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.
Example: Consider function f (x, y, z) = (x − 1)2 + (y − 2)2 + (z − 3)2 . Find the level surface
which pass through point (4,5,6)
Sol: f (4, 5, 6) = 27, so level surface which passes through point (4,5,6) is (x − 1)2 + (y − 2)2 +
(z − 3)2 = 27 √
This is a sphere centered at (1,2,3) with radius is 27
2.4 Exercise
1. Match function with its graph.
- z = sin(xy)
- z = sin(x − y)
- z = (1 − x2 )(1 − y 2 )
-z = sin x − sin y
5
- Hint: Based on the specific values such as x=0,y=0,.. and properties of the function.
- Answer:
B: (1 − x2 )(1 − y 2 )
C: sin(xy)
F: sin(x − y)
E: sin x − sin y
3 Limit
3.1 Definition
Let f be a function of two variables defined on a domain D ⊂ R2 and (a, b) ⊂ R2 ( (a,b) do
not necessary tin 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 exist a corresponding δ > 0 such that
|f (x, y) − L| < ε whenever 0 < ||(x, y) − (a, b)|| < δ, (x, y) ∈ D
And we write: lim(x,y)→ (a,b) f (x, y) = L
- If limit of a function at one point (x,y) exists, then it is unique.
- Can’t apply L’Hospital rule to find limit in function of several variables.
- The Squeeze Theorem is also true for function of several variables.
•Example : Given function f (x, y) = √ xy 2 2
, find lim(x,y)→ (0,0) ?
x +y
Sol:
6
D = R2 \ (0, 0)
This is indeterminate form 00 .
Consider | √ xy
2 2
|
√ x +y p
We have x2 ≤ x2 + y 2 , so | √ xy | ≤ | √xyx2 | = |y|
2 x +y 2
→ −|y| ≤ √ xy ≤ |y|
2 x +y 2
Using Squeeze Theorem:
lim(x,y)→ (0,0) −|y| ≤ lim(x,y)→ (0,0) f (x, y) ≤ lim(x,y)→ (0,0) |y|
→ lim(x,y)→ (0,0) f (x, y) = 0
3.2 Limit along a path
•N ote :
- To prove the limit does not exist, you need to find two paths passing through (a,b) that
make two different limit.
- Only use limit along a path to prove the limit does not exist.
xy 2
Example: Find limit: lim(x,y)→ (0,0) x2 +y 4
7
Sol:
Choose first path: y = x, substitute y = x, we have:
xy 2 x3
lim = lim =0
(x,y)→ (0,0) x2 + y 4 (x,y)→ (0,0) x2 + x4
Choose second path: x = y 2 , substitute x = y 2 , we have:
xy 2 y4 1
lim 2 4
= lim 4 4
=
(x,y)→ (0,0) x + y (x,y)→ (0,0) y + y 2
→ limit does not exist
4 Continuity
f (x, y) is continuous at point (a,b), if satisfy 3 conditions:
- (a,b) ∈ domain of f
- lim(x,y)→ (a,b) f exists
- lim(x,y)→ (a,b) f = f (a, b)
• Note: Polynomial and rational function are always continuous on their domain.
5 Partial Derivative
5.1 Definition
5.1.1 Partial Derivative of Function of 2 variables
For a function of two variables f (x, y), partial derivative of f with respect to x is a function
fx defined as follow:
f (t, y) − f (x, y)
fx (x, y) = lim
t→ x t−x
(keeping y as a constant)
∂f df
Another notation: ∂x
(write dx
when calculate partial derivative = 0 point.)
8
( This image illustrates partial derivative w.r.t x and we consider derivative on red line.)
Partial Derivative of f w.r.t y defined by formula:
f (x, t) − f (x, y)
fy (x, y) = lim
t→ y t−y
(keep x as a constant)
Example: Use the definition to calculate fx (x, y), fy (x, y). With f (x, y) = 4x2 y 4
Sol:
4t2 y 4 − 4x2 y 4 4y 4 (t2 − x2 ) 4y 4 (t − x)(t + x)
fx (x, y) = lim = lim = lim = lim 4y 4 (t + x)
t→ x t−x t→ x t−x t→ x t−x t→ x
= 4y 4 2x = 8xy 4
4x2 t4 − 4x2 y 4 4x2 (t4 − y 4 ) 4x2 (t2 − y 2 )(t2 + y 2 )
fy (x, y) = lim = lim = lim
t→ y t−y t→ y t−y t→ y t−y
= lim 4x2 (t2 + y 2 )(t + y) = 4x2 2y 2 2y = 16x2 y 3
t→ y
• You can define partial derivative in term of h → 0
1. Let t = x + h, when t → x, then h → 0.
f (x + h, y) − f (x, y)
fx (x, y) = lim
h→ 0 h
2. Let t = y+h, when t → y, then h → 0.
f (x, y + h) − f (x, y)
fy (x, y) = lim
h→ 0 h
5.1.2 Partial Derivative of Function of n variables
For a function of several variables f (x1 , x2 , .., xi ..., xn ), partial derivative of f with respect to
xi is a function fxi defined as follow:
f (x1 , x2 , .., xi + h, ..xn ) − f (x1 , x2 , .., xi , ..xn )
fxi (x1 , x2 , .., xn ) = lim
h→ 0 h
∂f
Another notation ∂x i
• To evaluate fx , we regard y as a constant and differentiate the function f (x, y) with respect
to x.
• To evaluate fy , we regard x as a constant and differentiate the function f (x, y) with respect
to y.
Example: fx (x, y) and fy (x, y), if f (x, y) = cos(3x2 + y)y 5
Sol:
9
fx (x, y) = −sin(3x2 + y)6xy 5
fy (x, y) = −sin(3x2 + y)y 5 + cos(3x2 + y)5y 4
Example: fx (x, y, z),fz (x, y, z) and fy (x, y, z), if f (x, y, z) = 3x2 y 5 ln(z)
fx (x, y, z) = 6xy 5 ln(z)
fz (x, y, z) = 3x2 y 5 z1
fy (x, y, z) = 3x2 5y 4 ln(z)
5.2 Second Partial Derivative
• If is a function of two variables, then its partial derivatives and are also functions of two
variables, so we can consider their partial derivatives fxx ,fxy ,fyx ,and fyy , which are called
the second partial derivatives of f . If z =f (x, y) , we use the following notation:
∂ ∂f ∂ 2f
fxx = (fx )x = =
∂x ∂x ∂x2
∂ ∂f ∂ 2f
fxy = (fx )y = =
∂y ∂x ∂y∂x
∂ ∂f ∂ 2f
fyy = (fy )y = =
∂y ∂y ∂y 2
∂ ∂f ∂ 2f
fyx = (fy )x = =
∂x ∂y ∂x∂y
Note: Notice the order of ∂x, ∂y
It is similar with function of 3 variables.
Example: Find all second-order derivatives of f (x, y) = 3x2 + 4xy 3 + y 5
Sol:
fx (x, y) = 6x + 4y 3
fy (x, y) = 12xy 2 + 5y 4
(fx )x = 6
(fx )y = 12y 2
(fy )x = 12y 2
(fy )y = 24xy + 20y 3
Clairaut’s Theorem: If f (x, y) and its partial derivative fx , fy , fxy , fyx are defined throughout
an open region containing a point (a, b) and all are continuous at (a, b), then:
fxy = fyx
5.2.1 Gradient vector
Gradient vector is formed by partial derivative of f.
10
1. For a function of two variables f (x, y), gradient vector of f is a vector ∇f defined by:
∂f ∂f
∇f = (fx , fy ) = ( i, j)
∂x ∂y
2. For a function of three variables f (x, y, z), gradient vector of f is a vector ∇f defined by:
∂f ∂f ∂f
∇f = (fx , fy , fz ) = ( i, j, k)
∂x ∂y ∂z
3. For a function of n variables f (x1 , x2 , ..xn ), gradient vector of is a vector ∇f defined by:
∇f = (fx1 , fx2 , .., fxn )
Example: For function f (x, y, z) = 3x2 + y 3 + z 4 + 4xyz
a. Find gradient vector of f
b. Find gradient vector of f at point Po (1,2,3)
Sol:
a.
fx = 6x + 4yz
fy = 3y 2 + 4xz
fz = 4z 3 + 4xy
∇f = (fx , fy , fz ) = (6x + 4yz, 3y 2 + 4xz, 4z 3 + 4xy)
b.
∇Po = (30, 24, 116)
6 The chain rule
6.1 The chain rule - Case 1
For a function f (x, y), when both x and y are functions of ONE variable.
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
dw
Example: Suppose w = 6x2 + 3y 4 , where x = 5t+1, y = t2 .Find dt
Sol:
∂w
∂x
= 12x
11
dx
dt
=5
∂w
∂y
= 12y 3
dy
dt
= 2t
dw ∂w dx ∂w dy
= + = 12x5 + 12y 3 2t = 60(5t + 1) + 12(t2 )3 × 2t = 300t + 24t7 + 60
dt ∂x dt ∂y dt
Example: The voltage V in a circuit that satisfies the law V=IR is slowly dropping as the
battery wears out. At the same time, the resistance R is increasing as the resistor heats up.
Find how the current is changing at the instant when R = 600 ohms, I=0.04 amp, dR dt
=0.5
ohm/sec, and dV
dt
= -0.01 volt/sec.
Sol:
Using the chain rule, we have:
dV ∂V dI ∂V dR
= +
dt ∂I dt ∂R dt
dV dI dR
=R +I
dt dt dt
dI
−0.01 = 600 + 0.04 × 0.5
dt
dI
→ = −5 × 10−5 amp/sec
dt
It is similar for function of n variables. If w = f (x1 , x2 , .., xn ) is differentiable and x1 =
x1 (t), x2 = x2 (t), .., xn = xn (t) are differentiable, then w is also differentiable w.r.t t:
dw ∂w dx1 ∂w dx2 ∂w dxn
= + + ... +
dt ∂x1 dt ∂x2 dt ∂xn dt
6.2 The chain rule - Case 2
For a function f(x, y), when both x and y are functions of TWO variables.
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
∂w ∂w
Example: For w = 2x2 + 3xy 2 , where x = 3t + 4z, y = 3t3 + z 2 . Find ,
∂t ∂z
when t = z = 1
Sol:
12
∂w
∂x
= 4x + 3y 2 = 76
∂w
∂y
= 6xy = 168
∂x
∂t
=3
∂x
∂z
=4
∂y
∂t
= 9t2 = 9
∂y
∂z
= 2z = 2
∂w ∂w ∂x ∂w ∂y
= + = 640
∂z ∂x ∂z ∂y ∂z
∂w ∂w ∂x ∂w ∂y
= + = 1740
∂t ∂x ∂t ∂y ∂t
In general case: Let u be a function of n variables x1 , x2 , .., xn . Each of which is function of
m variables t1 , t2 , ..tm . Then partial derivative of u w.r.t tj :
∂u ∂u ∂x1 ∂u ∂x2 ∂u ∂xn
= + + ... +
∂tj ∂x1 ∂tj ∂x2 ∂tj ∂xn ∂tj
6.3 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(1)
where C is a constant
∂z ∂z
Our aim is to find ,
∂x ∂y
( because z consists of two components x and y)
Thus, we use the chain rule and differentiate (1) w.r.t x:
∂F ∂x ∂F ∂y ∂F ∂z
+ + =0
∂x ∂x ∂y ∂x ∂z ∂x
∂x ∂y
∂x
= 1, ∂x = 0 ( because y is not dependent on x)
Then equation become :
∂F ∂F ∂z
+ =0
∂x ∂z ∂x
∂F
Suppose that ∂x
̸= 0
∂F
∂z ∂x Fx
→ = − ∂F =−
∂x ∂z
Fz
∂z
It is similar with ∂y
:
∂z Fy
=−
∂y Fz
13
∂z ∂z
Example: Find , ,
∂x ∂y
if 6x2 + xy 3 + z 4 + 5xyz = 8
Sol:
3 +5yz
∂z
∂x
= − FFxz = − 12x+y
4z 3 +5xy
∂z
∂y
= − FFyz = − 3xy2+5xz
4z 3 +5xy
7 Approximations
7.1 Gradient vector perpendicular to level curve
- Gradient vector of function of two variables ∇f = (fx , fy )
Consider function of two variables f (x, y) and its level curve f (x, y) = k. Suppose Po (xo , yo )
is a point on level curve, f (xo , yo ) = k
Then the gradient vector ∇(Po ) is orthogonal( perpendicular) to the tangent of the level
curve f (x, y) = k at Po
Tangent line to a level curve:
fx (xo , yo )(x − xo ) + fy (xo , yo )(y − yo ) = 0
Example: Given function f (x, y) = 3x2 +4xy 2 , find equation of tangent line at point Po (−1, 1)
Sol:
fx = 6x + 4y 2
fy = 8xy
The gradient vector is:
∇ = (6x + 4y 2 , 8xy)
14
∇Po = (−2, −8)
Equation of tangent line at Po on the level curve:
−2(x − xo ) + −8(y − yo ) = 0
⇔ −2(x + 1) − 8(y − 1) = 0
⇔ −2x − 2 − 8y + 8 = 0
−1 3
⇔y= x+
4 4
7.2 Gradient vector perpendicular to level surface
Consider a 3 variables function F (x, y, z) and the level surface S is defined by F (x, y, z) = k.
Suppose Po (xo , yo , zo ) is a point on S.
Then the gradient vector ∇F (Po ) is orthogonal ( perpendicular) to the tangent of the level
surface at Po
Equation of tangent plane to the level surface at point Po (xo , yo , zo ) and normal vector
∇F (xo , yo , zo ):
∇F (xo , yo , zo )(x − xo , y − yo , z − zo ) = 0
or:
Fx (xo , yo , zo )(x − xo ) + Fy (xo , yo , zo )(y − yo ) + Fz (xo , yo , zo )(z − zo ) = 0
• Normal line to the surface F (x, y, z) = k at point Po (xo , yo , zo ) can be represented by vector
equation:
r = (xo , yo , zo ) + t∇F (xo , yo , zo )
or:
x = xo + tFx (xo , yo , zo )
y = yo + tFy (xo , yo , zo )
z = zo + tFz (xo , yo , zo )
15
Example: Find the tangent plane and normal line of the level surface
f (x, y, z) = x2 + y 2 + z − 9 = 0
at point P(1,2,4)
Sol:
∇f (P ) = (fx , fy , fz ) = (2, 4, 1)
The equation of tangent plane:
2(x − 1) + 4(y − 2) + 1(z − 4) = 0
or
2x + 4y + z = 14.
Normal line: x = 1 +2t , y = 2 + 4t , z =4 + t
7.3 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 point (xo , yo , f (xo , yo )) given by:
z = f (xo , yo ) + ∇f (xo , yo )(x − xo , y − yo )
or
z = f (xo , yo ) + fx (xo , yo )(x − xo ) + fy (xo , yo )(y − yo )
16
Example: Find the plane tangent to the surface z = f (x, y) = xcosy − yex at point (0,0)
Sol:
fx = cosy − yex
fy = −xsiny − ex
Equation of tangent surface is:
f (0, 0) + fx (0, 0)(x − 0) + fy (0, 0)(y − 0) = z
⇔x−y−z =0
7.4 Linear Approximation of f (x, y)
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)
Let : L(x, y) = f (a, b) + fx (a, b)(x − a) + fy (a, b)(y − b)
For (x,y) close to (a,b), we use L(x,y) to approximate f(x,y) as follow:
f (x, y) ≈ L(x, y)
that is :
f (x, y) ≈ f (a, b) + ∇f (a, b)(x − a, y − b)
or:
f (x, y) ≈ f (a, b) + fx (a, b)(x − a) + fy (a, b)(y − b)
17
Example: Use linear approximation to approximate the value
10 × 9.92 + 8 × 6.12
Sol:
Choose f (x, y) = 10x2 + 8y 2 and (a,b) = (10,6)
fx (x, y) = 20x
fy (x, y) = 16y
Using linear approximation, we have:
f (9.9, 6.1) = f (10, 6) + fx (10, 6)(9.9 − 10) + fy (10, 6)(6.1 − 6) = 1277.6
7.5 Estimate change in f : Differential
The change in f from a point (a, b) to ( a+∆x,b +∆y):
∆f = f (a + ∆x, b + ∆y) − f (a, b)
→ ∆f ≈ L(a + ∆x, b + ∆y) − f (a, b)
→ ∆f ≈ fx (a, b)(∆x) + fy (a, b)(∆y)
∆x, ∆y are small changes in x and y.
• Total Differential
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)
18
Thus, we have : df ≈ ∆f
Notation is often used: dx = ∆x and dy = ∆y, so that:
df = fx (a, b)(dx) + fy (a, b)(dy)
Example: Let f (x, y) = 6x5 + 2y 3 . If x change from 3 to 3.05, y change from 5 to 4.5.
Compute df
Sol:
Since x change from 3 to 3.5, y change from 5 to 4.95, we have:
a = 3 → ∆x = 0.05
b = 5 → ∆y = −0.05
And:
fx = 30x4
fy = 6y 2
df = fx (3, 5)∆x + fy (3, 5)∆y = 114
• General Case:
For a function f (x1 , x2 , x3 , .., xn ) of three variables, we have the following linear approxima-
tion and total differential at (a1 , a2 , .., an ) as follows.
• Linear approximation:
f (x1 , x2 , x3 , .., xn ) ≈ L(x1 , x2 , x3 , .., 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 )
19
FEEDBACK FOR THIS DOCUMENT
Please scan this QR code...
Or click this link: https://forms.gle/qmMhmKmVWHVKNAaG6
to give us feedback on this document!!!
Please spend a little time to send your feedback. Although it is just a simple work, it has
great significance to us. Your feedback can help us improve our future documents and it
let us know whether you understand what we have written in this document. Thank you so
much for using our documents!
Good luck with your exam!
20