CHAPTER 2 MULTIVARIABLE AND VECTOR DIFFERENTIAL CALCULUS 1. Revision on Partial Differentiation • Definition: For a function f (x 1 ,x 2 ,...,x n ) of the n variables x 1 ,x 2 ,...,x n , the partial derivative of f with respect to x i is defined as f x i (x 1 ,...,x n ) = lim h→0 f (x 1 ,...,x i-1 ,x i + h, x i+1 ,...,x n ) - f (x 1 ,...,x i ,...,x n ) h . • Notation: If z = f (x 1 ,...,x n ) f x i (x 1 ,...,x n )= f x i = ∂f ∂x i = ∂ ∂x i f (x 1 ,...,x n )= ∂z ∂x i = f i = D i f = D x i f. • Rule: To find f x i , regard all x j with j 6= i as constants and differentiate with respect to x i . • Example: Find the partial derivatives of f (x, y) = sin(x 2 +2y). Solution: f x (x, y) =2x cos(x 2 +2y), f y (x, y) = 2 cos(x 2 +2y). -2 -1 0 1 2 -2 -1 0 1 2 -1 -0.5 0 0.5 1 x y z Figure 1. z = sin(x 2 +2y). • Example: Find the partial derivatives of f (x, y)= p x 2 +3xy 2 . 1
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
CHAPTER 2 MULTIVARIABLE AND VECTOR DIFFERENTIAL CALCULUS
1. Revision on Partial Differentiation
• Definition: For a function f(x1, x2, . . . , xn) of the n variables x1, x2, . . . , xn, the partial derivative off with respect to xi is defined as
• Example: Find the partial derivatives of f(x, y) =√
x2 + 3xy2.1
2 CHAPTER 2 MULTIVARIABLE AND VECTOR DIFFERENTIAL CALCULUS
Solution:
fx(x, y) =2x + 3y2
2√
x2 + 3xy2, fy(x, y) =
3xy√x2 + 3xy2
.
• Note:
• z = f(x, y) defines a surface in three-space.• f(x, y) = constant defines a (family) of contour(s) in two-space.• f(x, y, z) = constant defines a (family) of surface(s) in three-space.
−0.9
−0.9 −0.9
−0.9
−0.9
−0.9
−0.9
−0.9
−0.9
−0.9
−0.9−0.9
0
0
0
00
0
00
0
0
0
0
0
0
0.9
0.9
0.9
0.9
0.9
0.9
0.9
0.9
−2 −1.5 −1 −0.5 0 0.5 1 1.5 2−2
−1.5
−1
−0.5
0
0.5
1
1.5
2−0.9
−0.9
−0.9
−0.9
−0.9
−0.9 −0.9
−0.9−0.9
−0.9 −0.9
−0.9
−0.9
−0.9 −0.9
−0.9
−0.9
−0.9 −0.9
−0.9
0
0
0
0
0
0 0
0
0
0 0
0
0
0
0
0
00
0
0.9
0.9
0.9
0.9
0.9
0.9 0.9
0.9
0.9
0.9 0.9
0.9
0.9
0.9
0.9
0.90.9
0.9
0.9
0.9
0.9
0.9
−2 −1.5 −1 −0.5 0 0.5 1 1.5 2−2
−1.5
−1
−0.5
0
0.5
1
1.5
2
Figure 2. Contours of z = sin(x2 + 2y) and z = sin(x2 + 2y2).
• Geometric interpretation: fxi(c1, . . . , cn) is the slope of the curve
y = f(c1, . . . , ci−1, x, ci+1, . . . , cn)
at the point x = ci, y = f(c1, . . . , ci, . . . , cn).
• Physical interpretation: fximeasures how fast the function change in the direction of xi.
• Definition: [Second partial derivatives]
(fxi)xj
= fxixj= fij =
∂
∂xj
(∂f
∂xi
)=
∂2f
∂xj∂xi
.
• Example: Find the second partial derivatives of f(x, y) = 2x2y4
Solution:
fx(x, y) =4xy4, fy(x, y) = 8x2y3
fxx(x, y) =4y4, fxy(x, y) = 16xy3
fyx(x, y) =16xy3, fyy(x, y) = 24x2y2
CHAPTER 2 MULTIVARIABLE AND VECTOR DIFFERENTIAL CALCULUS 3
• Clairaut’s Theorem: If f is defined on an open set that contains the point (c1, . . . , cn) and fxixj
and fxjxiare both continuous on the open set, then
fxixj(c1, . . . , cn) = fxjxi
(c1, . . . , cn).
2. Linear Approximation and Taylor’s Theorem
• We want to approximate a function f(x1, . . . , xn) by a linear function a1x1+. . .+anxn in a neighbourhoodof a point (c1, . . . , cn) so that they agree at the point (c1, . . . , cn).
• Linearization: The linearization of the function f(x1, . . . , xn) at the point (c1, . . . , cn) is
• Linear Approximation: The linear approximation of the function f(x1, . . . , xn) at the point (c1, . . . , cn)is the approximation of f by its linearization at (c1, . . . , cn), i.e.,
f(x1, . . . , xn) ≈ f(c1, . . . , cn) +n∑
i=1
fxi(c1, . . . , cn)(xi − ci).
• Example: Find the linearization of the function f(x, y, z) = x2 + sin(yz) at the point (1, 1, 0).
Solution:
fx(x, y, z) =2x, fy(x, y, z) = z cos(yz), fz(x, y, z) = y cos(yz)
Therefore the quadratic approximation at the point (0, 0, 0) is
u(x, y, z) ≈ 1 + x + 2y + 3z +1
2
(x2 + 4y2 + 9z2 + 4xy + 6xz + 12yz
)
• mth-order Approximation: The mth-order approximation of a function f(x1, . . . , xn) at the point(c1, . . . , cn) is
f(x1, . . . , xn) ≈ f(c1, . . . , cn)+n∑
i=1
fxi(c1, . . . , cn)(xi−ci)+. . .+
1
m!
n∑i1=1
. . .
n∑im=1
fxi1...xim
(c1, . . . , cn)m∏
j=1
(xij−cij).
• Taylor Series Expansion: The Taylor series expansion of a function f(x1, . . . , xn) at the point(c1, . . . , cn) is
∞∑m=0
1
m!
n∑i1=1
. . .
n∑im=1
fxi1...xim
(c1, . . . , cn)m∏
j=1
(xij − cij).
3. Chain Rule
• Chain Rule (first version): If u = f(x1, . . . , xn) is a differentiable function of (x1, . . . , xn), andxi = gi(t), 1 ≤ i ≤ n are differentiable functions of t, then
du
dt=
∂u
∂x1
dx1
dt+ . . . +
∂u
∂xn
dxn
dt
• Example: If z = x2y + 4xy3, where x = cos 2t and y = sin t. Finddz
dtwhen t = 0.
Solution:dz
dt=
∂z
∂x
dx
dt+
∂z
∂y
dy
dt
=− 2(2xy + 4y3) sin 2t + (x2 + 12xy2) cos t
When t = 0, x = 1 and y = 0, thereforedz
dt
∣∣∣∣t=0
= 1.
CHAPTER 2 MULTIVARIABLE AND VECTOR DIFFERENTIAL CALCULUS 5
• Chain Rule (general version): If u = f(x1, . . . , xn) is a differentiable function of (x1, . . . , xn), andxi = gi(t1, . . . , tm), 1 ≤ i ≤ n are differentiable functions of t1, . . . , tm, then
∂u
∂tj=
∂u
∂x1
∂x1
∂tj+ . . . +
∂u
∂xn
∂xn
∂tj, 1 ≤ j ≤ m
i.e.,∂
∂tj=
∂x1
∂tj
∂
∂x1
+ . . . +∂xn
∂tj
∂
∂xn
• Example: If z =√
4x2 + 9y2, where x = r cos θ and y = r sin θ, find∂z
∂rand
∂z
∂θ.
Solution:
∂z
∂x=
4x√4x2 + 9y2
,∂z
∂y=
9y√4x2 + 9y2
∂x
∂r= cos θ,
∂y
∂r= sin θ,
∂x
∂θ= −r sin θ,
∂y
∂θ= r cos θ
Therefore,
∂z
∂r=
∂z
∂x
∂x
∂r+
∂z
∂y
∂y
∂r=
4 cos2 θ√4 cos2 θ + 9 sin2 θ
+9 sin2 θ√
4 cos2 θ + 9 sin2 θ=
√4 cos2 θ + 9 sin2 θ
∂z
∂θ=
∂z
∂x
∂x
∂θ+
∂z
∂y
∂y
∂θ= − 4r cos θ sin θ√
4 cos2 θ + 9 sin2 θ+
9r sin θ cos θ√4 cos2 θ + 9 sin2 θ
=5r cos θ sin θ√
4 cos2 θ + 9 sin2 θ
• Example: If z = f(x, y) has continuous second order partial derivatives and x = r2 + s2 and y = 2rs,
find (a)∂z
∂rand (b)
∂2z
∂r2. (Study this example carefully! )
Solution:
∂z
∂r=
∂z
∂x
∂x
∂r+
∂z
∂y
∂y
∂r= 2r
∂z
∂x+ 2s
∂z
∂y
∂2z
∂r2=2
(∂z
∂x+ r
∂
∂r
(∂z
∂x
))+ 2s
∂
∂r
(∂z
∂y
),
∂
∂r
(∂z
∂x
)=
∂x
∂r
∂
∂x
∂z
∂x+
∂y
∂r
∂
∂y
∂z
∂x= 2r
∂2z
∂x2+ 2s
∂2z
∂x∂y
∂
∂r
(∂z
∂y
)=
∂x
∂r
∂
∂x
∂z
∂y+
∂y
∂r
∂
∂y
∂z
∂y= 2r
∂2z
∂y∂x+ 2s
∂2z
∂y2
=⇒ ∂2z
∂r2=2
∂z
∂x+ 4r2 ∂2z
∂x2+ 8rs
∂2z
∂x∂y+ 4s2 ∂2z
∂y2
• Implicit Differentiation: If F (x1, . . . , xn−1, z) = 0 defines z implicitly as a function of x1, . . . , xn−1,
then∂z
∂xi
= −∂F∂xi
∂F∂z
, 1 ≤ i ≤ n− 1.
6 CHAPTER 2 MULTIVARIABLE AND VECTOR DIFFERENTIAL CALCULUS
• Proof: Differentiate F (x1, . . . , xn−1, z(x1, . . . , xn−1)) = 0 with respect to xi,
∂F
∂xi
+∂z
∂xi
∂F
∂z= 0 =⇒ ∂z
∂xi
= −∂F∂xi
∂F∂z
• Example: Find∂z
∂xand
∂z
∂yif x3 + y3 + z3 − 8xyz = 20.
Solution:
F (x, y, z) =x3 + y3 + z3 − 8xyz − 20 = 0
Fx(x, y, z) =3x2 − 8yz, Fy(x, y, z) = 3y2 − 8xz, Fz(x, y, z) = 3z2 − 8xy
=⇒ ∂z
∂x=− 3x2 − 8yz
3z2 − 8xy,
∂z
∂y= −3y2 − 8xz
3z2 − 8xy
4. Special coordinate systems
• Polar coordinates in two dimensions:
{x = r cos θ
y = r sin θr ≥ 0, 0 ≤ θ ≤ 2π.
• Example: In polar coordinates, the equation of a circle with radius a and centered at the origin isr = a.
• Example:
(a) The polar coordinates of the point (1,√
3) is(2,
π
3
).
(b) The polar coordinates of the point (−1,√
3) is
(2,
2π
3
).
(c) The polar coordinates of the point (−1,−√3) is
(2,
4π
3
).
(d) The polar coordinates of the point (1,−√3) is
(2,
5π
3
).
• Example: In polar coordinates, the function f(x, y) = x2 + 6xy + 4y2 is f(r, θ) = r2(cos2 θ +6 cos θ sin θ + 4 sin2 θ).
• Partial derivative in two-dimensional polar coordinates: If u = f(x, y), where x = r cos θ andy = r sin θ, then
∂f
∂r=
∂x
∂r
∂f
∂x+
∂y
∂r
∂f
∂y= cos θ
∂f
∂x+ sin θ
∂f
∂y
∂f
∂θ=
∂x
∂θ
∂f
∂x+
∂y
∂θ
∂f
∂y= −r sin θ
∂f
∂x+ r cos θ
∂f
∂y
CHAPTER 2 MULTIVARIABLE AND VECTOR DIFFERENTIAL CALCULUS 7
−3 −2 −1 0 1 2 3−3
−2
−1
0
1
2
3
(2,π/3)(2,2π/3)
(2,4π/3) (2,5π/3)
θr
π/3
Figure 3. Polar coordinates.
=⇒
∂f
∂r∂f
∂θ
=
(cos θ sin θ
−r sin θ r cos θ
)
∂f
∂x∂f
∂y
=⇒
∂f
∂x∂f
∂y
=
cos θ − sin θ
r
sin θcos θ
r
∂f
∂r∂f
∂θ
∂f
∂x= cos θ
∂f
∂r− sin θ
r
∂f
∂θ∂f
∂y= sin θ
∂f
∂r+
cos θ
r
∂f
∂θ
• Example: If u = f(x, y), where x = r cos θ and y = r sin θ, show that
(∂f
∂x
)2
+
(∂f
∂y
)2
=
(∂f
∂r
)2
+1
r2
(∂f
∂θ
)2
Solution:
∂f
∂r=
∂x
∂r
∂f
∂x+
∂y
∂r
∂f
∂y= cos θ
∂f
∂x+ sin θ
∂f
∂y
∂f
∂θ=
∂x
∂θ
∂f
∂x+
∂y
∂θ
∂f
∂y= −r sin θ
∂f
∂x+ r cos θ
∂f
∂y
=⇒(
∂f
∂r
)2
+1
r2
(∂f
∂θ
)2
=
(cos θ
∂f
∂x+ sin θ
∂f
∂y
)2
+1
r2
(−r sin θ
∂f
∂x+ r cos θ
∂f
∂y
)2
8 CHAPTER 2 MULTIVARIABLE AND VECTOR DIFFERENTIAL CALCULUS
=(cos2 θ + sin2 θ
) (∂f
∂x
)2
+ (2 cos θ sin θ − 2 sin θ cos θ)
(∂f
∂x
)(∂f
∂y
)+
(sin2 θ + cos2 θ
) (∂f
∂y
)2
=
(∂f
∂x
)2
+
(∂f
∂y
)2
• Example: If u = f(x, y), where x = r cos θ and y = r sin θ, show that
∂2f
∂x2+
∂2f
∂y2=
∂2f
∂r2+
1
r
∂f
∂r+
1
r2
∂2f
∂θ2
Solution:
∂f
∂r=
∂x
∂r
∂f
∂x+
∂y
∂r
∂f
∂y= cos θ
∂f
∂x+ sin θ
∂f
∂y
∂f
∂θ=
∂x
∂θ
∂f
∂x+
∂y
∂θ
∂f
∂y= −r sin θ
∂f
∂x+ r cos θ
∂f
∂y
∂2f
∂r2=
∂
∂r
(cos θ
∂f
∂x+ sin θ
∂f
∂y
)= cos θ
∂
∂r
∂f
∂x+ sin θ
∂
∂r
∂f
∂y
= cos θ
(∂x
∂r
∂2f
∂x2+
∂y
∂r
∂2f
∂y∂x
)+ sin θ
(∂x
∂r
∂2f
∂x∂y+
∂y
∂r
∂2f
∂y2
)
= cos2 θ∂2f
∂x2+ 2 cos θ sin θ
∂2f
∂x∂y+ sin2 θ
∂2f
∂y2
∂2f
∂θ2=
∂
∂θ
(−r sin θ
∂f
∂x+ r cos θ
∂f
∂y
)= −r cos θ
∂f
∂x− r sin θ
∂f
∂y− r sin θ
∂
∂θ
∂f
∂x+ r cos θ
∂
∂θ
∂f
∂y
= −r cos θ∂f
∂x− r sin θ
∂f
∂y− r sin θ
(∂x
∂θ
∂2f
∂x2+
∂y
∂θ
∂2f
∂y∂x
)+ r cos θ
(∂x
∂θ
∂2f
∂x∂y+
∂y
∂θ
∂2f
∂y2
)
= −r cos θ∂f
∂x− r sin θ
∂f
∂y+ r2 sin2 θ
∂2f
∂x2− 2r2 sin θ cos θ
∂2f
∂x∂y+ r2 cos2 θ
∂2f
∂y2
=⇒ ∂2f
∂r2+
1
r
∂f
∂r+
1
r2
∂2f
∂θ2=
(cos2 θ + sin2 θ
) ∂2f
∂x2+
(cos2 θ + sin2 θ
) ∂2f
∂y2=
∂2f
∂x2+
∂2f
∂y2
• Cylindrical coordinates in three dimensions:
x = r cos θ
y = r sin θ
z = z
, r ≥ 0, 0 ≤ θ ≤ 2π, z ∈ R.
• Example: In cylindrical coordinates, r = a describes an infinitely long cylinder with cross section acircle of radius a.
• Polar coordinates in three dimensions (Spherical coordinates):
x = r sin θ cos φ
y = r sin θ sin φ
z = r cos θ
, r ≥ 0, 0 ≤ θ ≤ π, 0 ≤ φ ≤ 2π.
CHAPTER 2 MULTIVARIABLE AND VECTOR DIFFERENTIAL CALCULUS 9
−2−1
01
2
−2
−1
0
1
2−2
−1
0
1
2
Figure 4. The cylinder r = 2, −2 ≤ z ≤ 2.
φ
θ
r
x
y
z
Figure 5. Polar coordinates in three dimensions.
• Example: In spherical coordinates, r = a describes a sphere of radius a.
• Partial derivative in three-dimensional polar coordinates: If u = f(x, y, z), where x =r sin θ cos φ, y = r sin θ sin φ and z = r cos θ, then
∂x
∂r
∂x
∂θ
∂x
∂φ
∂y
∂r
∂y
∂θ
∂y
∂φ
∂z
∂r
∂z
∂θ
∂z
∂φ
=
sin θ cos φ r cos θ cos φ −r sin θ sin φ
sin θ sin φ r cos θ sin φ r sin θ cos φ
cos θ − r sin θ 0
10 CHAPTER 2 MULTIVARIABLE AND VECTOR DIFFERENTIAL CALCULUS
−2
−1
0
1
2
−2
−1
0
1
2−2
−1.5
−1
−0.5
0
0.5
1
1.5
2
Figure 6. The sphere r = 2.
∂r
∂x
∂r
∂y
∂r
∂z
∂θ
∂x
∂θ
∂y
∂θ
∂z
∂φ
∂x
∂φ
∂y
∂φ
∂z
=
sin θ cos φ sin θ sin φ cos θ
cos θ cos φ
r
cos θ sin φ
r−sin θ
r
− sin φ
r sin θ
cos φ
r sin θ0
• Fact: In spherical coordinates,
∂2u
∂x2+
∂2u
∂y2+
∂2u
∂z2=
1
r
∂2
∂r2(ru) +
1
r2 sin θ
∂
∂θ
(sin θ
∂u
∂θ
)+
1
r2 sin2 θ
∂2u
∂φ2.
5. Revision of Vectors
• A vector is a quantity that has both magnitude and direction. It is often represented by an arrow ora directed line segment. The length of the arrow represents the magnitude of the vector and the arrowpoints in the direction of the vector. A vector is usually denoted by a boldface letter (v) or by putting anarrow above the letter (~v).
• In three dimensions, a vector can be represented in the form
v = 〈v1, v2, v3〉which is a vector obtained by moving from the initial point v1 units in the x-direction, followed by v2 unitsin the y-direction, and finally v3 units in the z-direction.
CHAPTER 2 MULTIVARIABLE AND VECTOR DIFFERENTIAL CALCULUS 11
u
v
Figure 7. Vectors.
• The components of the vector v =−→PQ from the point P (x1, y1, z1) to the point Q(x2, y2, z2) is
v = 〈x2 − x1, y2 − y1, z2 − z1〉.
• The magnitude/length of the vector v = 〈v1, v2, v3〉 is
|v| =√
v21 + v2
2 + v23.
• Addition and scalar multiplication of vectors: If u = 〈u1, u2, u3〉, v = 〈v1, v2, v3〉, and c is aconstant, then
u + v =〈u1 + v1, u2 + v2, u3 + v3〉cv =〈cv1, cv2, cv3〉
• Standard unit vectors: The standard unit vectors in three dimensions are i = 〈1, 0, 0〉, j = 〈0, 1, 0〉,k =〈0, 0, 1〉. A vector v = 〈v1, v2, v3〉 can be written as v1i + v2j + v3k.
12 CHAPTER 2 MULTIVARIABLE AND VECTOR DIFFERENTIAL CALCULUS
• Unit vectors: A unit vector is a vector with magnitude 1. Given a vector v, the unit vector in the
direction of v is u =v
|v| .
• Example: Find the unit vector in the direction of the vector v = 2i− 3j + 6k.
Solution:
|v| = √4 + 9 + 36 = 7
Therefore the unit vector in the direction of v is
u =2i− 3j + 6k
7=
2
7i− 3
7j +
6
7k.
• Dot product: The dot product of two vectors u = 〈u1, u2, u3〉 and v = 〈v1, v2, v3〉 is defined as
(a) u× v = −v × u(b) If u and v are parallel, u× v = 0.(c) u× v is perpendicular to u and v.
• Fact: If θ is the angle between u and v, then
|u× v| = |u||v| sin θ.
• Physical application of cross product: For a force F acting on a rigid body at a point P given by
a position vector r =−→OP , the torque τ is defined as
τ = r× F.
It measures the tendency of the body to rotate about the origin.
14 CHAPTER 2 MULTIVARIABLE AND VECTOR DIFFERENTIAL CALCULUS
6. Scalar Functions and Vector Valued Functions
• Definition: A scalar function is a function which takes values in R.
• Example:
(a) The distance D(t) of an object from a fixed point as a function of time.(b) The temperature function of an object T (x, y, z). Here (x, y, z) specify a point in the object.
• Definition: A vector function is a function which takes values in Rn, where n ≥ 2.
• Example:
(a) The position r(t) = 〈x(t), y(t), z(t)〉 of an object from a fixed point as a function of time.(b) The electric field E(x, y, z) = 〈E1(x, y, z), E2(x, y, z), E3(x, y, z)〉. Here (x, y, z) specify a point in
the space.
• If D is a subset of R3, f : D → R is called a scalar field , and F : D → R3 is called a vector field .
• Definition: For a vector valued function F : D → Rn, the derivatives are defined componentwise.
• Example: A curve in three-space can be described by a vector valued function
r(t) = x(t)i + y(t)j + z(t)k, a ≤ t ≤ b.
The tangent vector to the curve at the point (x(t0), y(t0), z(t0)) is given by
r′(t0) = lim∆t→0
r(t0 + ∆t)− r(t0)
∆t= lim
∆t→0
(x(t0 + ∆t)− x(t0)
∆ti +
y(t0 + ∆t)− y(t0)
∆tj +
z(t0 + ∆t)− z(t0)
∆tk
)
=x′(t0)i + y′(t0)j + z′(t0)k
• Example: Find the tangent vector of the curve r(t) = 〈cos t, sin t, t〉 at the point (1, 0, 2π).
Solution: r′(t) = 〈− sin t, cos t, 1〉. At the point (1, 0, 2π), t = 2π. The tangent vector to the curve at thepoint (1, 0, 2π) is r′(2π) = j + k.
7. Gradient and Directional Derivative
• In vector calculus, the del or nabla operator is the vector operator ∇ =∂
∂xi +
∂
∂yj +
∂
∂zk.
• Gradient: The gradient of a scalar function f(x, y, z) is defined as
grad f(x, y, z) = ∇f(x, y, z) =∂f
∂xi +
∂f
∂yj +
∂f
∂zk.
• Example: Find the gradient of the function f(x, y, z) = x3yz2.
CHAPTER 2 MULTIVARIABLE AND VECTOR DIFFERENTIAL CALCULUS 15
−2−1
01
2
−2
−1
0
1
20
5
10
15
Figure 10. The curve r(t) = 〈cos t, sin t, t〉.
Solution:
∂f
∂x= 3x2yz2,
∂f
∂y= x3z2,
∂f
∂z= 2x3yz
=⇒ ∇f(x, y, z) = 3x2yz2i + x3z2j + 2x3yzk
• Directional Derivative: Let u = 〈u1, u2, u2〉 be a unit vector and f(x, y, z) a scalar function. Thedirectional derivative of f at a point (x0, y0, z0) in the direction of u is
Duf(x0, y0, z0) = limh→0
f(x0 + u1h, y0 + u2h, z0 + u3h)− f(x0, y0, z0)
h
=u1∂f
∂x(x0, y0, z0) + u2
∂f
∂y(x0, y0, z0) + u3
∂f
∂z(x0, y0, z0)
=∇f(x0, y0, z0) · u
• Important Note: When defining directional derivative, u must be a unit vector.
• Example: Let f(x, y, z) = y sin z + 2z cos x + 3xe−y. Find the directional derivative of f at (0, 0, 0) inthe direction of 3i− 2j− 6k.
Solution: The unit vector in the direction of v = 3i− 2j− 6k is u =v
|v| =3
7i− 2
7j− 6
7k
∇f(x, y, z) =(−2z sin x + 3e−y
)i +
(sin z − 3xe−y
)j + (y cos z + 2 cos x)k
=⇒ ∇f(0, 0, 0) = 3i + 2k
=⇒ The directional derivative of f at (0, 0, 0) in the direction of 3i− 2j− 6k is
Duf(0, 0, 0) = ∇f(0, 0, 0) · u = −3
7
16 CHAPTER 2 MULTIVARIABLE AND VECTOR DIFFERENTIAL CALCULUS
• Maximum and minimum rate of change: If ∇f(x0, y0, z0) 6= 0, then
I. At the point P0 = (x0, y0, z0), the maximum rate of change of the function f(x, y, z) is in thedirection of ∇f(x0, y0, z0). The maximum rate of change is |∇f(x0, y0, z0)|.
II. At the point P0 = (x0, y0, z0), the minimum rate of change of the function f(x, y, z) is in thedirection of −∇f(x0, y0, z0). The minimum rate of change is −|∇f(x0, y0, z0)|.
Proof:
Duf(x0, y0, z0) is maximum =⇒ ∇f(x0, y0, z0) · u = |∇f(x0, y0, z0)||u| cos θu is maximum =⇒ θu = 0
Duf(x0, y0, z0) is minimum =⇒ ∇f(x0, y0, z0) · u = |∇f(x0, y0, z0)||u| cos θu is minimum =⇒ θu = π
• Example: Let f(x, y, z) = xy2 − 4x2z + 8y2z3. Find the direction from (1,−1, 1) in which f has itsmaximum and minimum rates of change, and find the values of these rates of change.
Therefore, from the point (1,−1, 1),f has maximum rate of change in the direction of −7i− 18j + 20k with maximum rate of change
√773.
f has minimum rate of change in the direction of 7i + 18j− 20k with minimum rate of change −√773.
• Level Surface: A level surface of a scalar function f(x, y, z) is the locus of points (x, y, z) satisfyingf(x, y, z) = k for some constant k.
• Fact: Let P0(x0, y0, z0) be a point on the level surface f(x, y, z) = k (i.e. f(x0, y0, z0) = k). If∇f(x0, y0, z0) 6= 0, then ∇f(x0, y0, z0) is normal to the level surface f(x, y, z) = k at P0. Moreover, thetangent plane to the level surface f(x, y, z) = k at the point P0 is
∂f
∂x(x0, y0, z0)(x− x0) +
∂f
∂y(x0, y0, z0)(y − y0) +
∂f
∂z(x0, y0, z0)(z − z0) = 0.
Proof: Let r(t) = x(t)i + y(t)j + z(t)k be any curve on the surface with r(t0) = x0i + y0j + z0k. Thenf(x(t), y(t), z(t)) = k. Differentiating with respect to t, we have
∂f
∂x
dx
dt+
∂f
∂y
dy
dt+
∂f
∂z
dz
dt= 0 =⇒ ∇f(x0, y0, z0) · r′(t0) = 0
Therefore ∇f(x0, y0, z0) is perpendicular to any curve lying on the surface and passing through (x0, y0, z0).
• Example: Let a > 0 be a constant. Find a normal vector and the tangent plane to the surfacex2 + 4y2 + (z − 4a)2 = 9a2 at the point (2a, a, 3a).
Solution: Let f(x, y, z) = x2 + 4y2 + (z − 4a)2. Then
∇f(x, y, z) =2xi + 8yj + 2(z − 4a)k
∇f(2a, a, 3a) =4ai + 8aj− 2ak
CHAPTER 2 MULTIVARIABLE AND VECTOR DIFFERENTIAL CALCULUS 17
Therefore, a vector normal to the surface x2 + 4y2 + (z − 4a)2 = 9a2 at the point (2a, a, 3a) is 2i + 4j− k,and the tangent plane to the surface at (2a, a, 3a) is
2(x− 2a) + 4(y − a)− (z − 3a) = 0 or 2x + 4y − z = 5a.
• Fact: The tangent plane to the surface z = f(x, y) at the point (x0, y0, z0), where z0 = f(x0, y0), isgiven by
z − z0 = fx(x0, y0)(x− x0) + fy(x0, y0)(y − y0).
Proof: The surface z = f(x, y) can be considered as a level surface F (x, y, z) = f(x, y)− z = 0. Thereforethe tangent plane (x0, y0, z0) is
Therefore the equation of the tangent plane at the point (2, 1, 13) is
z − 13 = −4(x− 2)− 6(y − 1) =⇒ 4x + 6y + z = 27.
−4−3−2−101234−2−1012
−10
−5
0
5
10
15
20
25
30
y
x
z
Figure 11. z = 20− x2 − 3y2 and its tangent plane at (2, 1, 13).
18 CHAPTER 2 MULTIVARIABLE AND VECTOR DIFFERENTIAL CALCULUS
8. Divergence and Curl
• Divergence: The divergence of the vector field F(x, y, z) = F1(x, y, z)i + F2(x, y, z)j + F3(x, y, z)kis
div F = ∇ · F =
(∂
∂xi +
∂
∂yj +
∂
∂zk
)·(F1i + F2j + F3k
)=
∂F1
∂x+
∂F2
∂y+
∂F3
∂z.
• Example: Find the divergence of the vector field F(x, y, z) = 2x2zi− y2j + e2zk.
Solution:
∂F1
∂x=
∂
∂x
(2x2z
)= 4xz
∂F2
∂y=− ∂
∂y
(y2
)= −2y
∂F3
∂z=
∂
∂z
(e2z
)= 2e2z
=⇒ divF =∇ · F = 4xz − 2y + 2e2z
• Fact: Physically, ∇ · F represents the rate of stretching or expansion of F. If F is the velocity of afluid flow, div F measures the outward flux per unit volume of the flow.
• Curl: The curl of the vector field F(x, y, z) = F1(x, y, z)i + F2(x, y, z)j + F3(x, y, z)k is
curl F = ∇× F =
∣∣∣∣∣∣∣
i j k∂
∂x
∂
∂y
∂
∂zF1 F2 F3
∣∣∣∣∣∣∣=
(∂F3
∂y− ∂F2
∂z
)i−
(∂F3
∂x− ∂F1
∂z
)j +
(∂F2
∂x− ∂F1
∂y
)k.
• Example: Find the curl of the vector field F(x, y, z) = 2x2yzi− xy3zj + x2yz2k.
Solution:
curlF(x, y, z) = ∇× F(x, y, z) =
∣∣∣∣∣∣∣
i j k∂
∂x
∂
∂y
∂
∂z2x2yz −xy3z x2yz2
∣∣∣∣∣∣∣
=
(∂
∂y
(x2yz2
)− ∂
∂z
(−xy3z))
i−(
∂
∂x
(x2yz2
)− ∂
∂z
(2x2yz
))j +
(∂
∂x
(−xy3z)− ∂
∂y
(2x2yz
))k
=(x2z2 + xy3)i + (2x2y − 2xyz2)j− (y3z + 2x2z)k
• Fact: Physically, ∇× F represents the rotation or twisting of the vector field F.
• If a vector field F is such that ∇× F = 0, then the vector field is called irrotational .
CHAPTER 2 MULTIVARIABLE AND VECTOR DIFFERENTIAL CALCULUS 19
• Important Identity – Curl of Gradient: For a scalar function f(x, y, z),
curl grad f = ∇× (∇f) = 0.
Proof:
∇× (∇f) =∇×(
∂f
∂xi +
∂f
∂yj +
∂f
∂zk
)=
∣∣∣∣∣∣∣∣∣
i j k∂
∂x
∂
∂y
∂
∂z∂f
∂x
∂f
∂y
∂f
∂z
∣∣∣∣∣∣∣∣∣
=
(∂2f
∂y∂z− ∂2f
∂z∂y
)i−
(∂2f
∂x∂z− ∂2f
∂z∂x
)j +
(∂2f
∂x∂y− ∂2f
∂y∂x
)k = 0
• Example: Let f(x, y, z) = exp(x + 2y + 3z). Find grad f and verify that curl grad f = 0.
CHAPTER 2 MULTIVARIABLE AND VECTOR DIFFERENTIAL CALCULUS 21
Appendix A. Vector Differential Calculus in Cylindrical Coordinates
In cylindrical coordinates
x = r cos θ
y = r sin θ
z = z
Let er, eθ, ez be unit vectors in the r, θ, z directions. It is immediate that ez = k. Given a functionf(x, y, z),
∂f
∂r=
∂f
∂x
∂x
∂r+
∂f
∂y
∂y
∂r+
∂f
∂z
∂z
∂r=
⟨∂f
∂x,∂f
∂y,∂f
∂z
⟩·⟨
∂x
∂r,∂y
∂r,∂z
∂r
⟩= ∇f ·
⟨∂x
∂r,∂y
∂r,∂z
∂r
⟩,
∂f
∂θ=
∂f
∂x
∂x
∂θ+
∂f
∂y
∂y
∂θ+
∂f
∂z
∂z
∂θ=
⟨∂f
∂x,∂f
∂y,∂f
∂z
⟩·⟨
∂x
∂θ,∂y
∂θ,∂z
∂θ
⟩= ∇f ·
⟨∂x
∂θ,∂y
∂θ,∂z
∂θ
⟩.
Since
Derf =∇f · er,
Deθf =∇f · eθ,
we find that
er =
⟨∂x∂r
, ∂y∂r
, ∂z∂r
⟩∣∣⟨∂x
∂r, ∂y
∂r, ∂z
∂r
⟩∣∣ = cos θi + sin θj,
eθ =
⟨∂x∂θ
, ∂y∂θ
, ∂z∂θ
⟩∣∣⟨∂x
∂θ, ∂y
∂θ, ∂z
∂θ
⟩∣∣ = − sin θi + cos θj.
In other words,
er
eθ
ez
=
cos θ sin θ 0− sin θ cos θ 0
0 0 1
ijk
ijk
=
cos θ − sin θ 0sin θ cos θ 0
0 0 1
er
eθ
ez
.
On the other hand,
∂f
∂r∂f
∂θ∂f
∂z
=
∂x
∂r
∂y
∂r
∂z
∂r∂x
∂θ
∂y
∂θ
∂z
∂θ0 0 1
∂f
∂x∂f
∂y
∂f
∂z
=
cos θ sin θ 0
−r sin θ r cos θ 0
0 0 1
∂f
∂x∂f
∂y
∂f
∂z
∂f
∂x∂f
∂y
∂f
∂z
=
cos θ − sin θ
r0
sin θcos θ
r0
0 0 1
∂f
∂r∂f
∂θ∂f
∂z
22 CHAPTER 2 MULTIVARIABLE AND VECTOR DIFFERENTIAL CALCULUS
Therefore,
∇f =∂f
∂xi +
∂f
∂yj +
∂f
∂zk
=
(cos θ
∂f
∂r− sin θ
r
∂f
∂θ
)(cos θer − sin θeθ) +
(sin θ
∂f
∂r+
cos θ
r
∂f
∂θ
)(sin θer + cos θeθ) +
∂f
∂zez
=∂f
∂rer +
1
r
∂f
∂θeθ +
∂f
∂zez.
Given a vector field F = F1i + F2j + F3k, we can write it in cylindrical coordinates:
F = F1i + F2j + F3k = Frer + Fθeθ + Fzez.
We have
Frer + Fθeθ + Fzez = F1 (cos θer − sin θeθ) + F2 (sin θer + cos θeθ) + F3ez
Therefore,
Fr
Fθ
Fz
=
cos θ sin θ 0− sin θ cos θ 0
0 0 1
F1
F2
F3
F1
F2
F3
=
cos θ − sin θ 0sin θ cos θ 0
0 0 1
Fr
Fθ
Fz
Therefore, in cylindrical coordinates,
∇ · F =∂F1
∂x+
∂F2
∂y+
∂F3
∂z
=
(∂r
∂x
∂
∂r+
∂θ
∂x
∂
∂θ
)(cos θFr − sin θFθ) +
(∂r
∂y
∂
∂r+
∂θ
∂y
∂
∂θ
)(sin θFr + cos θFθ) +
∂Fz
∂z
=
(cos θ
∂
∂r− sin θ
r
∂
∂θ
)(cos θFr − sin θFθ) +
(sin θ
∂
∂r+
cos θ
r
∂
∂θ
)(sin θFr + cos θFθ) +
∂Fz
∂z
=∂Fr
∂r+
1
rFr +
1
r
∂Fθ
∂θ+
∂Fz
∂z
=1
r
∂
∂r(rFr) +
1
r
∂Fθ
∂θ+
∂Fz
∂z.
∇× F =
(∂F3
∂y− ∂F2
∂z
)i +
(∂F1
∂z− ∂F3
∂x
)j +
(∂F2
∂x− ∂F1
∂y
)k
=
((sin θ
∂
∂r+
cos θ
r
∂
∂θ
)Fz − ∂
∂z(sin θFr + cos θFθ)
)(cos θer − sin θeθ)
+
(∂
∂z(cos θFr − sin θFθ)−
(cos θ
∂
∂r− sin θ
r
∂
∂θ
)Fz
)(sin θer + cos θeθ)
+
((cos θ
∂
∂r− sin θ
r
∂
∂θ
)(sin θFr + cos θFθ)−
(sin θ
∂
∂r+
cos θ
r
∂
∂θ
)(cos θFr − sin θFθ)
)ez
=
(1
r
∂Fz
∂θ− ∂Fθ
∂z
)er +
(∂Fr
∂z− ∂Fz
∂r
)eθ +
(1
r
∂
∂r(rFθ)− 1
r
∂Fr
∂θ
)ez.
CHAPTER 2 MULTIVARIABLE AND VECTOR DIFFERENTIAL CALCULUS 23
Appendix B. Vector Differential Calculus in Spherical Coordinates
One can show similarly that in spherical coordinates
x = r sin θ cos φ
y = r sin θ sin φ
z = r cos θ
,
er
eθ
eφ
=
sin θ cos φ sin θ sin φ cos θcos θ cos φ cos θ sin φ − sin θ− sin φ cos φ 0
ijk
ijk
=
sin θ cos φ cos θ cos φ − sin φsin θ sin φ cos θ sin φ cos φ
cos θ − sin θ 0
er
eθ
eφ
.
∇f =∂f
∂rer +
1
r
∂f
∂θeθ +
1
r sin θ
∂f
∂φeφ,
∇ · F =1
r2
∂
∂r
(r2Fr
)+
1
r sin θ
∂
∂θ(sin θFθ) +
1
r sin θ
∂Fφ
∂φ
∇× F =
(1
r sin θ
∂
∂θ(sin θFφ)− 1
r sin θ
∂Fθ
∂φ
)er +
(1
r sin θ
∂Fr
∂φ− 1
r
∂
∂r(rFφ)
)eθ
+
(1
r
∂
∂r(rFθ)− 1
r
∂Fr
∂θ
)eφ.
References
[1] James Stewart, Calculus, Thomson.[2] C. Henry Edwards and David E. Penny, Calculus Early Transcendentals, Pearson.[3] Erwin Kreyszig, Advanced Engineering Mathematics, Wiley.[4] Peter V. O’Neil, Advanced Engineering Mathematics, Thompson.