Lecture Notes on
Multivariable Calcul us
by M Niksirat
1
Lecture
Background materials
1 The set of real numbers
Calculus is a branch of mathematics dedicated to exploring the characteristics of “functions.” From a
physical perspective, a function refers to the assignment o f a scalar value to each point within a set,
known as the domain or focal set. The values collectively constitute the range of this assignment or
function This assignment can be represented as f: D
f
!R
f
, where D
f
is the domain of the function,
and R
f
is the range. Generally, the domain of a function is a subset D of R
n
, where R
n
represents
the set of all n-tuples f(x
1
; :::; x
n
)g, with each x
j
denoting a point in R.
To grasp the intricacies of functions, the focal point of Calculus, it is essential to initially comprehend
the properties of a function's domain and range. In this context, we introduce the space R
n
and
delve into its algebraic and topological properties.
The set of real numbers, denoted by R, serves as a mathematical representation of one-dimen-
siona l “continuum” objects, conceptualized as “straight” lines. The term “continuum” implies the
theoretical possibility of infinite divisions within the object. Straightness, a geometric property
easily grasped by all, refers to lines devoid of curvature. This perception gives R a geometric
interpretation as a straight line, commonly referred to as the x-axis or y-axis in the xy-plane or in
thre e-dimensional space.
Similarly, R
2
can be envisioned as an unbounded straight plane without curvature, and R
3
rep-
resents space without curvature, extending this pattern further. The elements o f R
n
have a dual
nature; they can be viewed both as points x=(x₁; :::; xₙ) and alternatively as vectors x~ =(x₁; :::; xₙ).
These two interpretations lead to distinct structures on R
n
.
x
2
x
~
x
1
x
n
x
1
x
2
x
n
x
1.1 R
n
as a vector space
As a set of vectors, R
n
b ecomes a vector space through the introduction of two operations: vector
addition and scalar multiplication. For two vectors x~ = (x₁; :::; xₙ) and y~ =(y ₁; :::; yₙ), these opera-
tions are defined as follows:
x~ + y~ = (x
1
+ y
1
; : : : x
n
+ y
n
):
Multiplying by a scalar λ, means
λ y
~
= (λx
1
; : : : ; λx
n
):
2
x
~
+ y
~
λx~ ; λ > 0
λ x~ ; λ < 0
x~
x~ ¡ y~
x~
y
~
It is evident that R
n
is closed under these operations, meaning that for any vectors x~ ; y~ in R
n
, and
scalars λ
1
; λ
2
2R, the vectorλ
1
x~ + λ
2
y~ is in R
n
is also in R
n
. Additionally, the fo llowing properties
hold for vectors x~ ; y~ ; z~ 2R
n
, and scalar λ2R:
i. x
~
+ y
~
= y
~
+ x
~
ii. λ (x~ + y~) = λ x~ + λ y~
iii. (x~ + y~) + z~ = x~ + (y~ + z~)
The set fi
^
; j
^
g wh ere i
^
=
1
0
; j
^
=
0
1
is called the standard basis for R
2
. In fact, each vec tor
x~ = (x
1
; x
2
) in R
2
can be uniquely written as
x~ = x
1
i
^
+ x
2
j
^
:
The set fi
^
; j
^
; k
^
g where i
^
= (1; 0; 0); j
^
= (0; 1; 0) and k
^
= (0; 0; 1) is the standard basis for R
3
as any
vector x~ = (x
1
; x
2
; x
3
) can be uniquely expressed as:
x~ = x
1
i
^
+ x
2
j
^
+ x
3
k
^
:
The set fe^
1
; : : : ; e^
n
g where
e^
1
= (1; 0; : : : ; 0); e^
2
= (0; 1; 0; : : : ; 0); : : : ; e^
n
= (0; 0; : : : ; 1)
is the standard basis for R
n
.
As a vector space, R
n
also admits another operation called the dot product. For two vectors
x~ = (x
1
; : : : ; x
n
) and y~ = (y
1
; : : : ; y
n
), the dot product x
~
·y
~
is defined as:
x~ ·y~ =
X
j=1
n
x
j
y
j
:
In particular if y~ = x~ , then
x~ ·x~ =
X
j=1
n
x
j
2
;
3
known as the square magnitude of x~ and is denoted by jx~ j
2
. Accordingly, the magnitude of a vector
x~ is defined as:
jx~ j=
X
j=1
n
x
j
2
v
u
u
u
u
t
:
Definition 1. Two non-zero vectors x~ and y~ are called orthogonal to each other if x~ · y~ = 0. In
particular the vectors e
^
j
are mutually orthogonal to each other, i.e., e
^
i
·e
^
j
= δ
i; j
where δ
i;j
=
1 i = j
0 i =/ j
:
Exercise 1. Show that the dot product satisfies the fo llowing properties:
a) jx~ + y~ j≤jx~ j+ jy~ j
b) jx~ + y~ j
2
¡jx~ ¡ y~ j
2
= 4 x~ · y~
Exercise 2. Pr ove tha t i f x~
1
; : : : ; x~
m
are mutua lly orthogonal, then
jx~
1
+ ··· + x~
m
j
2
= jx~
1
j+ ··· + jx~
m
j
2
:
An important property of t he dot product is the Cauchy-Schwarz inequality:
x~ · y~ ≤jx~ jjy~ j:
This inequ ality is a consequence of the trivial inequality 0 ≤jλ x~ + y~ j
2
for all scalar λ. Expanding
the right-hand side, we obtain :
λ
2
jx~ j
2
+ 2λ x~ · y~ + jy~ j
2
≥0:
This inequality holds true, ensuring the validity of the Cauchy-Schwarz inequality. The Cauchy-
Schwarz inequality becomes an equality only if x
~
and y
~
are linearly dependent in the sense x
~
= α y
~
for some scalar α ≥0. Consequently, we obtain:
¡jx~ jjy~ j≤x~ ·y~ ≤jx~ jjy~ j:
Through the fact:
¡1 ≤
x~ · y~
jx
~
jjy
~
j
≤1;
we can define θ, the angle between two vectors x~ and y~ as
cos(θ) =
x~ · y~
jx~ jjy~ j
:
Evidently, the angles θ for 0;
π
2
and π results to the relations x
~
·y
~
=jx
~
jjy
~
j, x
~
·y
~
=0 and x
~
·y
~
=¡jx
~
jjy
~
j.
4
In addition to the dot product, there is another vector multiplication defined in R
3
known as the
cross o r external product. For vect ors x~ =(x
1
; x
2
;x
3
), and y~ = (y
1
; y
2
; y
3
), the cross product is d efined
as:
x~ ×y~ =
i
^
j
^
k
^
x
1
x
2
x
3
y
1
y
2
y
3
= (x
2
y
3
¡x
3
y
2
)i
^
+ (x
3
y
1
¡x
1
y
3
)j
^
+ (x
1
y
3
¡x
3
y
1
)k
^
:
It is evident through the properties of the determinant that x
~
·(x
~
× y
~
) = y
~
·(x
~
× y
~
) = 0 and thus
x
~
×y
~
is orthogonal to the plane spanned by x
~
and y
~
.
θ
x~
y~
A = jx~ × y~ j
x~ × y~
By a simple c alculation, it is seen:
jx~ ×y~ j
2
+ (x~ · y~)
2
= jx~ j
2
jy~ j;
and by the relation (x
~
·y
~
)
2
= jx
~
j
2
jy
~
j
2
cos
2
(θ), we obtain the following equality:
jx~ ×y~ j= jx~ jjy~ jsin(θ):
The figure below shows the proof by a geometrical argument:
A = ju~ jh = ju~ jjv~ jsin(θ)
θ
v~
u~
h = jv
~
jsin(θ)
This relation in turn leads to:
x
~
×y
~
= jx
~
jjy
~
jsin(θ) n
^
;
where n^ =
x~ × y~
jx~ × y~ j
is the unit ortho gonal vector on the plane spanned by x~ and y~.
Exercise 3. Show the following relati on for any thr ee vectors x~ ; y~ ; z~ in R
3
x~ ·(y~ ×z~) = y~ ·(z~ ×x~ ):
Exercise 4. Pr ove the relation
x~ ×(y~ ×z~) = (x~ ·z~)y~ ¡(x~ · y~)z~
5
Hint : You may wish fi rst to show the relation when y~ ; z~ are orthogonal, and then generalize this fact for no n-
or thogonal vectors y~ ; z~.
Use the above formula and determine the conditions that the following equality holds
x~ ×(y~ ×z~) = (x~ × y~) ×z~:
For each vector space R
n
, we can define a vector subspace R
m
for m ≤n . In fact the set of vectors
(
x
1
; : : : ; x
m
; 0; : : : ; 0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{z
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
m+1;···;n
!)
;
is a vector subspace of R
n
. This subspace is spanned by the standard vectors {e^
1
;: : : ; e^
m
} from the
basis fe^
1
; : : : ; e^
n
g. In this manner, we can write
R
n
= R
m
⊕R
?
m
;
where R
?
m
is the subspace
R
?
m
=
(
0; : : : ; 0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{z
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
1; : : : ;m
; x
m+1
; : : : ; x
n
!)
:
Every single vector in R
m
is orthogonal to all vectors in R
?
m
and vice versa. For example, the
subspace R
2
from R
3
can be represented by the set f(x; y; 0)g and its complement subspace R
?
2
as
f(0; 0; z)g. Therefore, every vector in R
3
can be uniquely expressed in terms of a vector in R
2
and
a vector in R
?
2
(x; y; z) = (x; y; 0) + (0; 0; z):
Exercise 5. Show that the space spanned by the vectors U = spanf(x; x; z)g is a 2-dimensional su bspace of R
3
.
Fo r this, show that U is closed under vector ad diti on and scal ar multiplication. Propose a basis for U and find
its orthogonal complement U
?
that R
3
= U ⊕U
?
.
1.2 Topological structure
As a set of points, R
n
p ossesses some topological properties. Here we only we introduce the concepts
as open and closed set, the boundary point, and conn ectedness.
Firstly, the distance (Euclidean) from a point x=(x₁; :::; xₙ) to the origin is defined as:
jxj= x
1
2
+ ···+ x
n
2
p
:
The distance between two points x=(x₁; :::; xₙ) and y =(y₁; :::; yₙ) is defined as:
jx ¡ y j= (x
1
¡y
1
)
2
+ ···+ (x
n
¡y
n
)
2
q
:
The notion of distance enables us to define the notion of t he limit of a sequence of points. Let (xₘ)
be a sequence of points in R
n
, where each xₘ has n components:
x
m
= (x
1
m
; x
2
m
; : : : ; x
n
m
):
6
A sequence (x
m
) converges to a point a = (a
1
; : : : ; a
n
) and rep resented as:
lim
m!1
x
m
= a;
if
lim
m!1
jx
m
¡aj= 0:
It's noteworthy that if:
jx
m
¡aj:= (x
1
m
¡a
1
)
2
+ ··· + (x
n
m
¡a
n
)
2
q
!0;
then each component x
k
m
approaches a
k
for k = 1; : : : ; n, i.e.,
lim
m!1
x
k
m
= a
k
:
An open ball of radius r centered at a 2R
n
is defin ed as:
B
r
(a) = fx 2R
n
; jx ¡aj< rg:
The closed ball is denoted as B
¯
r
(a) at includes the boundary circle as well:
B
¯
r
(a) = fx 2R
n
; jx ¡aj< rg:
The boundary circle itself is equal to the set fx; jx ¡aj= rg.
r
a
x
y
a
r
y
x
a
y
r
x
B
r
(a)
B
¯
r
(a)
bndfB
r
(a)g
The ball of radius r centered at the origin is denote d for simplicity at B
r
. Sometimes we need
consider ball with the center excluded. This set is denoted by B
r
0
(a) and is defined as:
B
r
0
(a) = fx; 0 < jx ¡aj< rg:
Definition 2. A set D ⊂R
n
is called open if for any point a 2D, there is r > 0 such that B
r
(a)⊂D.
D
c
D
B
r
(a)
If D is an open set then its complement D
c
is closed. The complement set D
c
is defined as
D
c
= fx 2R
n
; x 2Dg:
7
A set D ⊂R
n
is called bounded if there is r > 0 such that D ⊂B
r
(0). The boundary o f a bounded
set D is the set of points a such that for any r > 0, the set B
r
(a) contains points of D and D
c
, that is,
B
r
(a) \D =/ ;; B
r
(a) \D
c
=/ ;:
Example 3. The set f(x; y); x > 0; y > 0g⊂R
2
is open. The set f(x; y); x ≥0; y ≥0g is closed. The
set f( x; y); x ≥0; y > 0g is neither open not closed.
Exercise 6. Pr ove tha t a set D is closed if either one of the conditions ho lds
a) It contains all its boundary points.
b) if any convergent sequence (x
m
); x
m
2D converges in D.
Exercise 7. Let D be a bou nded set. Show that bnd(D) is closed.
Exercise 8. Decide if the set A =
1
n
; n = 1; 2; 3; ···
is closed or not .
Exercise 9. Show that the set A =
y; 0 < y <
1
x
; x > 0
is open. Find bn d(A).
Exercise 10. If D
1
; D
2
ar e open sets show that D
1
[D
2
and D
1
\D
2
ar e open. Repeat the argument i f D
1
; D
2
ar e closed.
Definition 4. A set D is called path connected if for any two points x; y in D, there exits a curve
C in D that connects x and y. A set is called simply connected if for every closed curve in D, the
enclosed region in C belongs to D.
not simply connected
simply connected
2 Line ar algebra
In the preceding section, we examined two fundamental structures of R
n
: the vector space structure
and the topological structure. These two structures give rise to two interrelated fields of math-
ematics: 1) Linear Algebra, and 2) Calculus. In this section, we will delve into the foundational
concepts of linear algebra.
Not e. Linear algebra is a branch of mathematics that study the properties of linear mappings
between vector spaces. It is a fundamental to ol in various fields, including physics, computer science,
and engineering. Here we introduce only basic concepts of linear algebra.
2.1 Linear mappings and matrix representati o n
First, we present the following important definition:
8
Definition 5. A mapping L: R
n
!R
m
is called linear if for any scalars λ
1
; λ
2
and any vectors x~ ;
y~ 2R
n
, the following relation holds
L(λ
1
x
~
+ λ
2
y
~
) = λ
1
L(x
~
) + λ
2
L(y
~
):
It is simply seen that if L is linear then L(0) = 0. In fact, L[0] = L[0 ¡0] = L[0] ¡L[0] = 0.
Anot her important fact is the matrix representation o f a linear mapping. Equipped with the stan-
dard vectors e
1
^ ; : : : ; e^
n
, we can represents a linear mapping L: R
n
!R
m
by an m ×n matrix A
L
as:
A = [T (e^
1
)jT (e^
2
)j···jT (e^
n
)]:
Note that for each e
j
^, the vector T (e
j
^) is in R
m
and thus the matrix A
L
has m rows and n columns.
It is also evident that by the matrix-vector multiplication, we have: L[e
j
^] = A
L
(e^
j
) and thus tor any
vector x
~
= x
1
e
^
1
+ ···+ x
n
e
^
n
, the equality L[x
~
] = A
L
(x
~
) holds.
Exercise 11. Assume that T : R
2
!R
2
has the matrix representation A
2×2
=
1 1
0 1
in the standard basis fi
^
; j
^
g
Find the matrix representation of T in the basis fv~
1
; v~
2
g where v~
1
=
1
1
and v~
2
=
1
¡1
.
Exercise 12. Prove that a matrix 2×2 m aps any parallelogram to a par allelogram. Recall th at any para llelogram
constructed on u~ and v~ is the set of vectors w~ = t u~ + (1 ¡t) v~ f or t 2[0; 1].
Exercise 13. Verify that the the matrix R
θ
=
cos(θ) ¡sin(θ)
sin(θ) cos(θ)
rotates vector s in t he plane by θ degree counter-
clockwise. Verify that R
θ
1
R
θ
2
= R
θ
1
+θ
2
and conclude that R
θ
R
¡θ
is the identity matrix
1 0
0 1
.
Definition 6. Let L: R
n
!R
m
be a linear mapping. The kernel of L (or the null space), denoted by
ker(L) is the set of all vectors z~ 2R
n
such that L(z~) = 0 2R
m
. The image of L denoted by Im(L) is
the set of all vectors y~ 2R
m
such that there exists a vector x~ 2R
n
that y~ = L(x~ ).
It is simply seen that ker(L) ⊂R
n
is a subspace, that is, ker(L) is closed under vector addition and
scalar multiplication. In other words, for any n~
1
; n~
2
2ker(L) and arbitrary scalars λ
1
; λ
2
, the vector
λ
1
n~
1
+ λ
2
n~
2
lies in ker(L). Similar ly, it is simply seen that Im(L) is a vector subspace of R
m
. We
have the following theorem.
Theorem 7. Assume that L: R
n
!R
m
is a linear mapping. The following relation holds
n = dim ker(L) + dim Im(L): (1)
Let U denote ker(L). If dim(U) = n, then L(R
n
) = f0g and then dim(Im(L)) = n, the equality is
evide nt. Let dim(U) = r < n. Let U
?
b e the orthogonal complement such that R
n
= U ⊕U
?
. We
have dim(U
?
) = n ¡r. Any vector x~ 2R
n
can be expressed as
x~ = α z~ + β x~
1
;
for z~ 2U and x~
1
2U
?
, and then L(x~ ) = βL(x~
1
). Let fv~
r+1
;:::; v~
n
g be n linearly independent vectors
in U
?
. Then L(R
n
) = span fv~
r+1
; : : : ; v~
n
g, and then dim(Im(L)) = n ¡r.
9
2.2 Linear mappings from R
n
to R
n
2.2.1 Determinant
Let A
3×3
b e the representation of a linear mapping L: R
3
!R
3
. As we saw, the columns of A are
L(e^
1
); L(e^
2
) and L(e^
3
). Let's denote
L(e
^
j
) =
0
B
B
@
a
1j
a
2j
a
3j
1
C
C
A
;
and then
a
1;1
a
1;2
a
1;3
a
2;1
a
2;2
a
2;3
a
3;1
a
3;2
a
3;3
= L(e
^
1
) ·
e^
1
a
1;2
a
1;3
e^
2
a
2;2
a
2;3
e^
3
a
3;2
a
3;3
;
with assumption that the determinant at the right is calculated in terms of the first column.
Following the relation
e^
1
a
1;2
a
1;3
e
^
2
a
2;2
a
2;3
e^
3
a
3;2
a
3;3
= L(e^
2
) ×L(e^
3
);
we can write
jdet(A)j= jL(e
^
1
)jjL(e
^
2
) ×L(e
^
3
)jcos(θ);
where θ is the angle betwee n L (e^
2
) ×L(e^
3
) and L(e^
1
). On the other hand, jL(e^
2
) ×L(e^
3
)j is the
area of the parallelogram constructed on L(e^
2
) and L(e^
3
), and jL(e^
1
)jcos(θ) is the height of the
cube constructed by L(e^
2
); L(e^
2
) and L(e^
1
).
θ
L(e
3
^ )h
L(e^
3
)
L(e^
2
)
L(e^
2
) ×L(e^
3
)
In general, the determinant of a matrix A
n×n
is equal to the algebraic volume of a hyp ercube
const ructed on the vectors in the set fL(e^
1
); : : : ; L(e^
n
)g. For a mapping L: R
2
!R
2
this is evident
by the following figure:
L(i
^
)
L(j
^
)
j
^
i
^
In particular, if the vectors L(e^
1
); : : : ; L(e^
n
) are linearly independent, then the volume is non-
degenerate, and then L(R
n
) = R
n
, that implies that L is one-to-one. Thus, if det(A) =/ 0, then the
associated linear mapping L is one-to-one, onto and thus invertible.
10
It is also seen that det(A) = λ
1
···λ
n
, where λ
1
;: ::; λ
n
are eigenvalues ( real or complex) of A. Recall
that the characteristic polynomial p(λ) of a matrix A is defined as p(λ) = det(A ¡λId), and thus
det(A) = p(0). The characteristic polynomial can be written as p(λ) = (¡1)
n
(λ ¡λ
1
)···(λ ¡λ
n
),
and then p(0) = λ
1
···λ
n
. In particular, if det(A) = 0, then at least one of eigenvalues are zero.
With the aid of above geometrical interpretation, we can justify several properties of the determi-
nant. For example, since
(αL(e^
2
) + βL(e^
3
)) ×L(e^
3
) = α ( L(e^
2
) ×L(e^
3
));
then if we add a column of a matrix with a linear combination of other column does not change
the determinant. If jdet(A)j is the volume of the cube constructed on the columns of A, then
interchanging the columns does not change the absolute value of the determinant. We have the
following important property of the determinant for any two n ×n matrices:
det(AB) = det(A) det(B):
2.2.2 Eigenvalues and Eigenvectors
A vector u
~
2 R
n
¡ f0g is called an eigenvector of a linear mapping L: R
n
! R
n
if there exists
a scalar λ such that L(u
~
) = λu
~
. It is seen that if u
~
is an eigenvector, then any vector of the
form v
~
= tu
~
; t =/ 0 is an eigenvector. Accordingly, one can d efine an eigendirection of f that is
spanfu
~
g: = ft u
~
; t 2Rg.
λu~ = L(u~ )
L
u~
If A represents a linear mapping L, t hen the eigenvalue-eigenvector relationship can be written as
(A ¡λId) u~ = 0;
and thus the matrix A ¡λId can not be invertible. Recall that if (A ¡λId) is invertible, the equation
(A ¡λId) x~ = 0 has a unique solution x~ = 0, while eigenvector u~ is a n on-zero vector. Since (A ¡λId)
is not invertible, then we have: det(A ¡λId)= 0. Expanding the determi nant results to a polynomial
in terms of λ which is called the characteristic p olynomial p(λ) associated to A. This determinant
can be expressed as
p(λ) = ( ¡1)
n
λ
n
+ α
1
λ
n¡1
+ ··· + α
n
;
for some constants α
1
; : : : ; α
n
.
An immediate result is that a linear mapping can have at most n real distinct eigenvalues. A linear
mapping may have no real eigenvalue. For example, the rotation matrix
R
θ
=
cos(θ) ¡sin(θ)
sin(θ) cos(θ)
;
11
has no real eigenvalue as it rotates all vectors with θ angle counter-clockwise.
Theorem 8. If L: R
n
!R
n
has n distinct eigenvalues λ
1
;:::; λ
n
, then their associated eigenvectors
u~
1
; : : : ; u~
n
are linearly independent.
Proof. Without l oss of generality, assume that u
~
1
; : : : ; u
~
k
are linearly independent vectors for
1 ≤k < n. Then the vector u
~
k+1
can be written as a linear combination
u
~
k+1
= c
1
u
~
1
+ ··· + c
k
u
~
k
;
where we assume that c
j
=/ 0. Applying A to this equality results to
λ
k+1
u~
k+1
= c
1
λ
1
u~
1
+ ···+ c
k
λ
k
u~
k
:
On the other hand, we have
λ
k+1
u~
k+1
= c
1
λ
k+1
u~
1
+ ···+ c
k
λ
k+1
u~
k
;
and hence
c
1
(λ
k+1
¡λ
1
) u~
1
+ ···+ c
k
(λ
k+1
¡λ
k
) u~
k
= 0:
Since eigenvalues are distinct, then the above coefficients are nonzero. This implies that the vectors
u~
1
; ···; u~
k
are linearly dependent, a c ontradiction.
2.3 Linear equations
Consider a linear mapping L: R
n
!R
n
. This ma pping L is termed “one-to-one” if the dimension of
the kernel of L, denoted as ker(L), is zero, meaning that ker(L) = f0g. In this scenario, the dimension
of the image of L, denoted as Im(L), is n, and consequently, L is onto. If A
n×n
repre sents the
matrix of L, then L is referred to as “full-rank” if L is one-to-one.
A matrix is full-rank if its column are linearly independent. Recall that column j of A is L(e
j
^
), and
thus A is full-rank if the set fL(e
j
^
)g is a set of linearly independent vectors.
Now consider the linear equation A x~ = b, where b 2R
n
is an a rbitrary vector. If A is full-rank then
the equation is solvable for any b. In fact, in this case, the inverse of A which is denoted by A
¡1
exists and then the unique solution is x~ = A
¡1
b. If A is not full-rank, there is no guarantee for the
existence of a solution. Recall that if dim(ker(L)) = m < n, the dimension of Im(L) is n ¡m, and
the equation Ax~ = b is solvable if and only if b 2Im(L). In this case, the solution s not unique, since
if x~ is a solution to the equation, then for any z~ 2ket(L), the vector x~ + z~ is a lso a solution.
Theorem 9. Let L
t
be the transpose of the linear mapping L: R
n
!R
n
that is defined through the
relation: L(x~ ) · y~ = x~ ·L
t
(y~). Then ker(L
t
) = [Im(L)]
?
.
The proof is straightforward. Let z~ 2ker(L
t
) and r~ 2Im(L) are arbitrary vectors. We need to show
that z~ ·r~ = 0. Since r~ 2Im(L), there exists a vector x~ such that L(x~ ) = r~. Then
z
~
·r
~
= z
~
·L(x
~
) = L
t
(z
~
) ·x
~
= 0;
12
as z~ 2ker(L
t
).
Corollary 10. The linear equation L(x~ ) = b is solvable if and o nly if b 2[ker(L
t
)]
?
.
Exercise 14. Let A =
2 6
1 3
. For what valu es of b 2R
2
, the equati on Ax~ = b is solvable? Verify that the solutions
of the equation Ax~ =
4
2
has the f orm x~ = t
¡3
1
+
2
0
for t 2(¡1; 1).
Exercise 15. Let L: R
n
!R
n
be a linear mapping and let x
1
~ ; x~
2
be two solution s to the linear equation f(x~ ) = b.
Show that x~
1
¡ x~
2
2 ker(L), and con clude every solution to the equation can be repr esented by z~ + x~ where
z~ 2ker(L).
Exercise 16. Let L: R
n
!R
n
be a linear mapping and suppose x~
1
is a solution to f (x~ ) = b
1
and x~
2
is a solution
to f(x~ ) = b
2
. Show that x~
1
+ x~
2
is a solution to f (x~ ) = b
1
+ b
2
.
Exercise 17. Find ker(L
t
) of the matrix A =
2 6
1 3
and verify that b =
4
2
is orthogonal to ker(L
t
).
Exercise 18. Suppose n ≥m and L: R
n
!R
m
is a linear mapping. Show that if dim ker (L) = n ¡m, then the
linear equation f (x~ ) = b is solvable for any b 2R
m
. Wh at if dim ker(L) > n ¡m? If n > m and dim ker(L) = n ¡m,
show t hat the equation f (x~ ) = b has infinitely ma ny solutions.
2.4 Straight line s and planes in R
3
Let r~ = (r
1
; : : : ; r
n
) be a given ve ctor. This vector can be used to write a parametric equation of
a straight line as: γ(t) = t r~, where t 2(¡1; 1). This line passes through the origin and thus t he
equation of a parallel line passing through a = (a
1
; : : : ; a
n
) can be written as:
γ(t) = a + t r~ :
Note that for any to points x = (x
1
;:::; x
n
) and y = (y
1
;:::; y
n
) on this line, the vector yx = y ¡x =
(y
1
¡x
1
; : : : ; y
n
¡x
n
) is parallel to r~ . In fact, if a + t
1
r~ = x and a + t
2
r~ = y for some values t
1
and
t
2
, then yx = (t
2
¡t
1
) r~. For this reason, the vector r~ is called the direct ional vector of the line. If
we write this representation as:
x
1
(t) = a
1
+ tr
1
; : : : ; x
n
(t) = a
n
+ tr
n
;
then by eliminating t, we obtain an algebr aic representation for the line as:
x ¡a
1
r
1
= ···=
x ¡a
n
r
n
:
r~
x
y
yx
yxjjr~
13
The parametric equation of a plane in R
3
given two linearly independent vectors r~
1
;r~
2
can be written
as
Σ(t; s) = t r~
1
+ s r~
2
;
where t; s ranges from ¡1 to 1. This plane passes through the origin and a parallel translation
to the point a is
Σ(t; s) = a + t r~
1
+ s r~
2
:
Note that orthogonal complement subspace of the plane is a one dimensional object spanfn~ g where
n
~
is orthogonal to all vectors in the plane. If x = (x; y; z) is an arbitrary point on the plane, then
the vector xa = x ¡a is an arbitrary vector on the plane and then: xa ·n~ = 0. If n~ = (n
1
; n
2
; n
3
),
and a = (x
0
; y
0
; z
0
), then the equation reads
n
1
(x ¡x
0
) + n
2
(y ¡ y
0
) + n
3
(z ¡z
0
) = 0 ;
or equivalently
n
1
x + n
2
y + n
3
z = n
1
x
0
+ n
2
y
0
+ n
3
z
0
:
a
x
(xa)?n~
n~
xa = x ¡a
In general, a hyperplane of dimension m in R
n
for n > m can be represented parametrically as
Σ(t
1
; : : : ; t
m
) = a + t
1
r~
1
+ ···+ t
m
r~
m
;
for m linearly independent vectors r
~
1
;:::; r
~
m
. Since the orthogon al complement subspace of the plane
is an m
0
= n ¡m dimensional subspace U
?
= spanfr~
m+1
: : : ; r~
n
g, t hen the equation of the plan can
be written as n~ ·xa= 0, where n~ is an arbitrary vector in U
?
and x is an arbitrary point on the plane.
The int ersection of two planes in R
3
can be empty or a line depending on their position to each
other. For example, two planes P
1
: a
1
x + b
1
y + c
1
z = d
1
and P
2
: a
2
x + b
2
y + c
2
z = d
2
intersect if their
normal vectors n
~
1
= (a
1
; b
1
; c
1
) and n
~
2
= (a
2
; b
2
; c
2
) are not parallel to each other. In this case, the
intersection line will be parallel to n~
1
×n~
2
n~
1
×n~
2
=
i
^
j
^
k
^
a
1
b
1
c
1
a
2
b
2
c
2
= (b
1
c
2
¡c
1
b
2
; c
1
a
2
¡a
1
c
2
; a
1
b
2
¡b
1
a
2
);
14
Hence, t he equation of the intersection line is
x ¡x
0
b
1
c
2
¡c
1
b
2
=
y ¡ y
0
c
1
a
2
¡a
1
c
2
=
z ¡z
0
a
1
b
2
¡b
1
a
2
;
where (x
0
; y
0
; z
0
) is a point on the intersect ion of P
1
; P
2
.
Example 11. Find the intersect ion of two plane P
1
: 2 x + y = 1, P
2
: y ¡z = ¡1.
Solution. The associated normal vectors of two plains are n~
1
= (2; 1; 0), n~
2
= (0; 1; ¡1), and they a re not parallel.
The intersection line of two plains are in the direction of
n~
1
×n~
2
= (¡1; 2; 2):
Obviously, the point p
0
= (0; 1; 2) lies on both plains, and thus the i ntersection line equation is
x
¡1
=
y ¡1
2
=
z ¡2
2
:
Example 12. Let's prove that if two planes in R
3
have a point in common, then two planes
intersects each other in a line or are the same. Let's two planes n
1
x + n
2
y + n
3
z = d
1
and n
1
0
x +
n
2
0
y + n
3
0
z = d
2
have a point (x
0
; y
0
; z
0
) in common. Consider the following linear equation:
2
6
6
4
n
1
n
2
n
3
n
1
0
n
2
0
n
3
0
n
1
¡n
1
0
n
2
¡n
2
0
n
3
¡n
3
0
3
7
7
5
0
@
x
y
z
1
A
=
0
@
d
1
d
2
d
1
¡d
2
1
A
:
Obviously, the point (x
0
; y
0
; z
0
) is a solution to the system. However, the coefficient matrix is not
full rank as its determinant is zero. Then this point can not be the unique solution of this system.
If the rank of the matrix is 2, then the null space of the matrix is 1, and then these two planes
intersect each other along a line. If the rank of the matrix is 1, then two planes are the same.
Example 13. Let P
1
and P
2
are two planes in R
4
a) If P
1
; P
2
intersect each o ther at only one point, prove that any parallel transformations of
P
1
and P
2
intersects each other at only one point.
b) If P
1
; P
2
intersect each other along a line, then there exist parallel transl ations of P
1
; P
2
that
make them disjoint.
Solution.
a) Since the orthogonal comp lement of P
1
is a 2-dimensional space, the equation for P
1
can be written as
n
1
x + n
2
y + n
3
z + n
4
w = d
1
m
1
x + m
2
y + m
3
z + m
4
w = d
2
:
Similarly, for P
2
, we can w rite
n
1
0
x + n
2
0
y + n
3
0
z + n
4
0
w = d
1
0
m
1
0
x + m
2
0
y + m
3
0
z + m
4
0
w = d
2
0
:
15
These four equation can be written in the matrix fo rm Ax = b as:
2
6
6
6
6
6
6
4
n
1
n
2
n
3
n
4
m
1
m
2
m
3
m
4
n
1
0
n
2
0
n
3
0
n
4
0
m
1
0
m
2
0
m
3
0
m
4
0
3
7
7
7
7
7
7
5
0
B
B
B
B
B
B
@
x
y
z
w
1
C
C
C
C
C
C
A
=
0
B
B
B
B
B
B
@
d
1
d
2
d
1
0
d
2
0
1
C
C
C
C
C
C
A
:
If two planes intersect only at one point, then A is ful l-rank, and thus for any translation of d
1
; d
2
; d
1
0
; d
2
0
,
the equation has only one solution.
b) If the two planes inters ect along a line, then the rank of A is 3 a nd the n the dimen sion of its null space
is 1. For any vector b in this null space, the equation Ax = b does not have a so lution, and thus there are
parallel translatio ns of P
1
and P
2
that separate these two pl anes.
16
Lecture: M ul tivariable functions
This section will delve into the following essential concepts:
1. Multivariable functions, their engineering and geometrical interpretations.
2. Defining the domain and range of multivariable functions.
3. Exploring various geometrical representations of multivariable functions.
4. Understanding linear functions in R
n
(n-dimensional real space).
3 Introduction: single-variable functions
A single-variable function f(x) defined on a domain I ⊂R can be considered either as the assigning
a value f(x) to every point in x in I as x 7!f(x), or as the “action” of f on the input x to produce
output y as y = f(x). From an engineering point of view, the assignment x 7!f(x) can be interpreted
as the mass density of point x, the temperature of point x, the height or any other scalar value.
There are two type of single-variable functions: 1) explicit, say y = f(x), and 2) implicit function.
In an implicit function, the value of y is given “implicitly” trough an equation, say g(x; y) = 0. Here,
the variable y is considered as a function of x, and if we solve g(x; y) = 0 for y, then we obtain an
explicit function for y as y = f(x). In this case, we can write g(x; f(x)) ≡0 for x in an interval.
The geometrical representation of a single-variable function is the set of points (x; y) in the xy-
plane. For example, for an explicit function y = f (x), the value y can be interpreted as the height
over the domain in the x-axis, as shown below:
x
y
y = f(x)
For an implicit function, there may exist more than one height for each x. For example, there are
two values for each x in the implicit function x
2
+ y
2
= a
2
for ¡a < x < a:
x
y
y = a
2
¡x
2
p
y = ¡ a
2
¡x
2
p
17
Not e. To avoid common confusion, we need to distinguish between the function f and its value
y = f (x) at x. In fact, in writing y = f (x), the function is f , the input to the function is x, and
the result or output of this function is y. For example, in writing f (x) = sin(x + 1), we mean
f() = sin( ¡1) for any expression that can be put in .
4 Multivariable functions
4.1 Algebraic statement
A function f of two independent variable x and y is denoted as f(x; y), and similarly of three
independent variables x; y; z, as f (x; y; z). In general, for n independent variable x
1
; : : : ; x
n
, a n-
variable function is denoted as f (x
1
; : : : ; x
n
). Even though, there are major differen ces between
single-variable calculus and multivariable ones, as we will see in sequel, almost all relations hold
for two-variable functions f(x; y) hold also for higher-dimensional variable functionsf ( x
1
; : : : ; x
n
).
Therefore, we restrict our presentations in this set of lectures mainly to two-variable, and sometimes
thre e-va riable functions.
Since variables x and y are independent, we can associate them with two axis x and y in R
2
and
consider the function f (x; y) as an assignment of points (x; y) in R
2
to a value z = f (x; y) in R,
and write f : R
2
!R. Similarly, a three-variable function is an assignment of points (x; y; z) in R
3
consisting axis x; y; z to a value u = f(x; y; z) as shown below:
y
(x; y)
R
R
x
f
f
(x; y; z)
x
y
z
f(x; y; z)f(x; y)
However, a function can be defined only a subset of R
2
or R
3
and not of whole of these sets. In this
case, we can write a two -variable function f as f : D
f
⊂R
2
!R, where D
f
is called the domain of
f. Accordingly, the i,age f (D
f
) is a subset of R which is called the image of f, or the image of D
f
under f .
R
(x; y)
D
f
x
y
Domain
Range
z
R
f
Example 14. Consider the function f(x; y) = ln
1 ¡ 1 ¡x
2
¡y
2
p
. We determine the domain
D
f
and the range R
f
of the given function. To ensure the function's validity, we must have
1 ¡x
2
¡y
2
≥0; ^ 1 ¡ 1 ¡x
2
¡y
2
p
> 0:
18
Combining these conditions, we obtain the domain as the intersection of the sets f(x; y); x
2
+ y
2
≤1g
and f(x; y); 0 < x
2
+ y
2
≤1g, which gives us:
D
f
= f(x; y); 0 < x
2
+ y
2
≤1g:
This set represents a disk of radius 1, excluding the ori gin. Now, for any (x; y) in D
f
, we have
0 < 1 ¡ 1 ¡x
2
¡y
2
p
≤1:
As the logarithm is a n increasing function, we find that the range of the function is R
f
= (¡1; 0].
Remark. From the mathematics point of view, we should keep in mind that even we write a two
variable function as f (x; y), it is f that is a function and f (x; y) is the value. The following example
helps to understand this difference better.
Example 15. Let's find f( x; y) if
f(x ¡y; x + y) = xy + y
2
:
To determi ne the function f, we take u = x ¡ y and v = x + y, and then we obtain x =
v + u
2
and
y =
v ¡u
2
. Thus, f (u; v) is defined as
f(u; v) =
v
2
¡u
2
4
+
(v ¡u)
2
4
=
v
2
+ uv
2
:
Finally, we obtain f(x; y) =
y
2
+ xy
2
.
4.2 Engineering interpretation
From the engineering point of view, a function f(x; y) is considered as an scalar field, and assignment
of a physical quantity like mass density, temperature, density of energy or any othe r physical
quantities to the point (x; y) of a set. The set itself, is a mathematical model for the focal object
like a fluid, a metal plate or any other physical objects. For this reason, a two-variable function f
can be written as (x; y) 7!f(x; y), and a three-variable function f as: (x; y; z) 7! f(x; y; z).
For instance, assume that the function ρ(x; y) = 1 + x ye
¡x
2
¡y
2
represents the density of some
material of a plate in the shape of a square. This density can be visually illustrate as:
19
As we observe, we can recognize spots with high density and with low density. Calcu lus, as a field
in mathematics has been developed to help physicist and engineer to study the properties of these
distributions and to determine their b ehavior in space and time. For example, we we wish determine
points of t he above mass distribution with the same density. These sets are generally called level
set. The figure below depicts curve of the above density functions with the density ρ = 0.85; 1.15:
As another example, let the function T ( x; y)=xe
¡x
2
¡y
2
denote the temperature of a plate in the
xy-plane. The figure below depicts this distribution and its level sets:
Other important cases in which we encounter with multivariable functions are the function of
time and space. Usually, we denote time with variable t and spatial variables with x; y and z. For
example, consider the above example of temperature distribution function T (x; y) = xe
¡x
2
¡y
2
. As
we know, the heat flows usually from hot spots to cold spots and since the given distribution is
uneven, the temperature changes in time t. In this respect, t he initial temperature of the plane as
given will change in time and we will have a function of three variabl es x; y and t, T (x; y; t). The
rules under which the temperature changes is the subject of advanced course, however, we give some
examples o f it in subsequent lectures. For instance, the temperature of the plate after t = 1 changes
to something shown below
4.3 Geometrical representation
Anot her way to represent a two-variable function is to represent its graph (x; y; f(x; y)) in the xyz-
space. In this way, a function is written as z = f (x; y), where z is interpreted as the height over the
point (x; y) in the xy-plane.
20
f(x; y)
y
(x; y)
x
z
For example, the figures below depict t he surfaces of the density function ρ(x; y) = 1 + xye
¡x
2
¡y
2
and the temperature function T (x; y) = xe
¡x
2
¡y
2
.
The generates surfaces is just to embed the function f (x; y) in the space as the set of points
S = f(x; y; f(x; y))g; (x; y) 2D
f
:
For several applications, this type o f representation is very helpful as it provides us with a visual
behavior of the changes in f . For example, we can recognize maximum and minimum of functions
visually with the aid of its surface representation. The important surfaces that we usually consider in
this course are: a cone of the form z = x
2
+ y
2
p
; a paraboloid z =x
2
+ y
2
; a sphere x
2
+ y
2
+ z
2
= a
2
;
a saddle surface z = x
2
¡ y
2
. We further study more sophisticated surfaces when we learned the
parametric surfaces.
Notice that if y = g(x) is a curve in the xy-plane and z = f(x; y) is a given surface, then the equation
8
<
:
x = x;
y = g(x)
z = f(x; g(x))
;
defines the same curve projected on the surface z = f (x; y).
21
y
(x; g (x); f(x; g(x)))
z
f(x; y)
f(x; g(x))
x
y = g(x)
Example 16. Consider the cylinder x
2
+ z
2
= 2 for arbitrar y y. Since y is arbitrary the disk
x
2
+ z
2
= 2 in the xz-plane extends parallel along y-axis and thus generates a cylinder, as shown
in the following figure. Now, assume that we want to project the straight line y = 0 on the upp er
portion of the cylinder. The equation is
8
>
>
<
>
>
:
x = x
y = 0
z = 2 ¡x
2
p
:
The figure below depicts this projection:
4.4 Implicit functions
Similar to the single-variable implicit f unctions g(x; y) = 0, where y is considered as a function of
x, a two-variable implicit function can be generally represented as:
g(x; y; z) = 0;
where z is considered as a function of x and y, say z = f(x; y). For example, the function
x
2
+ y
2
+ z
2
= 1;
is an implicit function for z, where z canno t be explicitly expressed as a function of x and y. In
fact, for any (x; y), there are two values z = ± 1 ¡x
2
¡y
2
p
. The graph of this function represents
a sphere with a radius of 1.
22
Similarly, the function x
2
+ y
2
¡z
2
= 1 represents a surface called hyperboliod which is shown below:
In genera l, an implicit function, g(x; y; z)=0, defines a surface in the xyz-space. In order to find
change an implicit function to an implicit one, we have to solve t he implicit function for z. Note
that an explicit function z = f(x; y) is a particular case of an implicit one z ¡ f(x; y) = 0.
4.5 Linear functions in R
n
Linear function is the most important type of f unctions in the whole of engineering mathema tics.
Even if a function is not linear, engineers tend to linearize it through a process that we will study
later. A Linear function is a specific type of linear mappings (with the range in R) that we have
studied in linear algebra (see also the appendix to this not). A
Definition 17. A multivariable function z = f(x
1
; : : : ; x
n
) is called linear if it can be expressed in
the form:
z = c
1
x
1
+ ··· + c
n
x
n
;
where c
1
; : : : ; c
n
are some constants. A linear function can be represented by a row-matrix
f := [
c
1
c
2
··· c
n
];
and thus
f(x
1
; : : : ; x
n
) = [
c
1
c
2
··· c
n
]
0
B
B
@
x
1
·
·
·
x
n
1
C
C
A
= c
1
x
1
+ ···+ c
n
x
n
:
An affine function, on the other hand, is defined as
z = c
1
x
1
+ ···+ c
n
x
n
+ d;
23
where d is a constant.
Example 18. The function L(x; y) = x + y is a linear function. This function represent the straight
plane z = x + y in the xyz-space. This function passes through the points
p
1
: (0; 0; 0); p
2
: (1; 0; 1); p
3
: (0; 1; 1):
Recall that a plane in R
3
is uniquely determined by three non-collinear points. The function z =
1 ¡x ¡y is an affine function and defines a plane passing through the points:
q
1
: (1; 0; 0); q
2
: (0; 1; 0); q
3
: (0; 0; 1):
The figure below illustrate this plane:
x
y
z
(0; 1; 0)
(1; 0; 1)
(0; 0; 1)
In a similar manner, the function u = x + y + z defines a hyperplane in R
4
passing through the points
(0; 0; 0; 0); (1; 0; 0; 1 ); (0; 1; 0; 1); (0; 0; 1; 1):
This plane spans the vectors in the set f(1; 0; 0; 1); (0; 1; 0; 1); (0; 0; 1 ; 1)g that can be represented as
P : t
0
B
B
B
B
B
B
@
1
0
0
1
1
C
C
C
C
C
C
A
+ s
0
B
B
B
B
B
B
@
0
1
0
1
1
C
C
C
C
C
C
A
+ w
0
B
B
B
B
B
B
@
0
0
1
1
1
C
C
C
C
C
C
A
:
Indeed, for f unctions defined in higher-dimensional spaces, such as functions with three or more
independent variables, it becomes increasingly difficult to visualize the geometric interpretations
directly. While we can still work wit h and analyze these functions mathematically, their geometric
representation becomes less intuitive as the number of dimensions increases.
5 Exer cises
Exercise 19. Consider the function
f(x; y) =
x
2
+ y
2
2xy
; (x; y) =/ (0; 0):
Show th at f (λx; λy) = f (x; y) for any scalar λ =/ 0. Funct ions that have this property called homogene ous. Find
the fun ction f
¡
1;
y
x
.
24
Exercise 20. Let f be a singl e-variable function given by:
f
y
x
=
x
2
+ y
2
p
y
;
for y > 0. Determine f(x).
Exercise 21. Let z = xf
¡
y
x
. Determine f if we know z = 1 + y
2
p
if x = 1.
Exercise 22. Consider the function f (x; y) =
1
1 ¡ x
2
¡ y
2
p
. Draw the d omain D
f
in the xy-plane.
Exercise 23. Find the domain and range of the function
f(x; y) =
x
2
+ y
2
2xy
:
Hint : note that x
2
+ y
2
≥2xy.
Exercise 24. Find the domain and range of the function
f(x; y) =
y
2
x
4
+ y
4
+ 1
:
Exercise 25. Consider the function
f(x; y) =
1 + x
2
¡ y
2
p
x
; x =/ 0:
Find the set f
¡1
f2g and draw it in the xy-plan e.
Exercise 26. Consider the temperature function T (x; y) = xe
¡x
2
¡y
2
.
a) Determine of the tempera te along the line y = x, and find the maximum and minimum of temperature in
this line.
b) Dete rmine th e temperature of the ring x
2
+ y
2
= 1 and determine the maximum and minimum temperature
on the ring.
Exercise 27. The function z = x
2
generates a surface in R
3
. Draw this surface.
Exercise 28. Consider t he surface generated by th e function z = x
2
+ y
2
. The intersection of this surface with
the plane z = z
0
is a circle x
2
+ y
2
= z
0
. Using this fact, draw the surface of the given function. On the oth er hand,
if we fix y = b, the function reduces to the parabola z = x
2
+ b
2
. This parabola lies on the pla ne y = b, and thus
the surface is the set of a ll parabola z = x
2
+ b
2
f or b 2(¡1; 1). Draw three parabola in the space for b = ¡1; 0; 1.
Exercise 29. Consider the function:
f(x; y) = x
2
+ y
2
p
e
¡ x
2
+y
2
p
:
Thefunction f defines a su rface of revolution in R
3
.
a) Dr aw the surface.
b) We know that the equation re
¡r
= 0.2 is s olved for r ≈0.26 and 2.54. Determine the doma in in the xy-
plane where f < 0.2:
25
Exercise 30. Consider the cone z = x
2
+ y
2
p
. The level curves o f this fu nction is similar to the paraboloid
z = x
2
+ y
2
, however, these are two different surfaces. What is the curve on the s urface for y = 0? Draw the curve s
for y = ¡1; 0; 1.
Exercise 31. We aim to draw the project ion of the circle x
2
+ y
2
= 1 on the upper s urface of the cylinder
x
2
+ z
2
= 1. As we know, the given circle can be parametrized as C(t) = (cos(t); sin(t)) f or t 2[0; 2π]. To project
on the cylinder, we need the z-compone nt (height) of this parametric curve. Since z = 2 ¡x
2
p
on the upper
surface, the height of the curve i s z = 2 ¡cos
2
(t)
p
. The followi ng code in Matlab generates this figu re:
[t,s]=meshgrid(-pi:pi/40:pi);
x=sqrt(2)*cos(t); z=sqrt(2)*sin (t); y=s;
surf(x,y,z,FaceAlpha=1), shadin g interp, axis equal
camlight
t=0:0.01:2*pi;
xt=cos(t);yt=sin(t);zt=sqrt(2-xt.^2);
hold on
plot3(xt,yt,zt,LineWidth=2,Color='r')
xlabel('$x$', 'Interpreter','latex',FontSize=14)
ylabel('$y$', 'Interpreter','latex',FontSize=14)
title('$x^2+y^2=2$', 'Interpreter','latex',FontSize=14)
Exercise 32. Find the projectio n of the lines x = 0 and y = 0 on the surface of the function z = x
2
¡ y
2
. Write
a code i n Matlab that depicts this projection.
Exercise 33. Here we review some simple commads to generate surfaes in R
2
and connect them with th e
associated images in R
2
. Consider the function ρ(x; y) = 1 + sin (πx) sin(πy). Run the following code in Matlab
that gene rate the surface of the function
x=-1:0.01:1;
y=x';
z=1+sin(pi*x).*sin(pi*y);
surf(x,y,z), shading interp
xlabel('$x$','interpreter','latex','fontsize',10)
ylabel('$y$','interpreter','latex','fontsize',10)
zlabel('$z$','interpreter','latex','fontsize',10)
It generate the figure shown be low
a) M odify the code to represent the surface in the domain [¡2; 2] ×[¡2; 2].
b) change the surf to surfc and run the command. It gene rate the surf ace and the level curves
26
c) Use the command surf and add the followi ng code to generate both surface and the image:
hold on; imagesc(x,y,z)
you will get the following figure
d) Run the following code
x=-1:0.01:1;
y=x';
z=1+sin(pi*x).*sin(pi*y);
surfc(x,y,z), shading interp
hold on
contour3(x,y,z,'color','k');
xlabel('$x$','interpreter','latex','fontsize',10)
ylabel('$y$','interpreter','latex','fontsize',10)
zlabel('$z$','interpreter','latex','fontsize',10)
You get the following figure
Exercise 34. Show that the range of a li near function is either the trivial set f0g or t he whole of R.
Exercise 35. Consider the function f(x; y) = 4 ¡x ¡y. This is an affin e function of two independent variables
x; y. The graph of this functio n is a surface in the x yz-space with the equation x + y + z = 4. If we bound y and
x through the relation y = x
2
¡1, the equation reduces to a single-variable function. Find f (x; y) for the given
function y. What is the equati on of the curve ob tai ned by pr ojecting y = x
2
¡1 on the plane x + y + z = 4? The
following fig ure shows this projection :
27
28
Lecture
Limit and Continuity
In this section, we will learn the following fundamental concepts:
1. The concept of limit along a path and the concept of limit.
2. The concept of continuity.
For a fully understanding the concepts of limit and continuity, we need some concepts of the
topological properties of R
n
which are given in the introduction chapter of this notes.
6 Si ngle-variable functions
For a single variable function f (x), we say that the limit of this function at x = a is L if the value
of f (x
n
) for any sequence (x
n
); x
n
=/ a that approaches a, approaches t o L.
f(x
n
)
a L
x
n
In mathematical sense, we can write
jf (x) ¡Lj< " if jx ¡aj< δ;
where " can be as small as we want, while δ depends on the type of the function f. For example, the
function f(x) = x
2
approaches L = 1 if x approaches a = 1. In fact, if we take δ = 1 + "
p
¡1 for " > 0
then it can be shown that jx
2
¡1j< ".
A f unction f ( x) is called continuous t a point x = a if for any sequence (x
n
) approaching a, then
f(x
n
) ! f(a). In mathematical term, we can write
jx ¡aj< δ )jf(x) ¡f(a)j< ";
for any " > 0 we desire. Here δ > 0 is a control interval, that we control the distance of x from a
such that f(x) lies the interval (f(a) ¡"; f(a) + "). Thus, The interval I
x
= jx ¡aj< δ is mapped
by f into the interval I
f(a)
= jf (x) ¡ f(a)j< ", as f(I
x
) ⊂I
f(a)
:
δ
f(a)
"
a
I
x
I
f(a)
Of most important limits in Calculus are the form
0
0
and
1
1
. In particular, in calculus, we are
interested to have a measure how fast or slow a function approaches to its limit f(a) when x !a.
For example, the function f
1
(x) = x approaches the 0 when x !0. The approach is f(x) to 0 is
linear (proportional to the velocity x approaches 0). On the other hand, the function f
2
(x) = x
2
approaches zero so fast (fast of order 2) with respect to approaching x. In fact, we have
lim
x!0
f(x) ¡f(0)
x ¡0
= lim
x!0
x
2
x
= 0:
29
It is inte resting to not that f
3
(x) = jxj
p
approache s zero very slow. In fact,
lim
x!0
f(x) ¡ f (0)
x ¡0
= lim
x!0
jxj
p
x
= ±1:
The figure below shows how slow f
2
(x) approaches zero compare to f
1
(x) = x.
A single variable function f(x) is continuous at a point a if
lim
x!a
f(x) = f(a):
Remark. A unique feature of limit in R
n
is that a sequence (x
n
) approaching a point a has
fundamentally two directions for approaching (from the left and right). An alternating sequence (x
n
)
can be split into two sequences: upper sequence (x
n
)
u
, x
n
> a and x
n
!a and the lower sequence
(x
n
)
l
; x
n
< a and x
n
!a. Thus the convergence of a sequence to a point in x-axis is very simple.
7 Limit of two-variable functio ns
Similar to single-variable functions, a two-variable function f(x; y) has a limit value L at a = (a; b)
if for any sequence (x
n
; y
n
), (x
n
; y
n
) =/ (a; b) and (x
n
; y
n
) !(a; b), we have
lim
(x
n
;y
n
)!(a;b)
jf(x
n
; y
n
) ¡Lj= 0:
This means that the sequence (x
n
; y
n
); n = 1; 2; ··· is mapped to a scalar sequence f (x
n
; y
n
) such
that the distance of f (x
n
; y
n
) to L become as small as we desire.
Note that (x
n
; y
n
) !(a
1
; a
2
) if j(x
n
; y
n
) ¡(a; b)j!0 or equivalently
(x
n
¡a)
2
+ (y
n
¡b)
2
q
!0:
In particular, we should have
lim
n!1
x
n
= a lim
n!1
y
n
= b:
The figure below depicts how a ball of r adius δ centered at a is mappe d into an interval I
"
of radius
" centered at L. Note that f can not take any value at a = (a; b), and thus the ball is excluded that
is denoted by B
δ
0
(a), the ball with the point a excluded. Thus, in mathematical sense, we can write
lim
r!0
f(B
r
0
(a)) = L:
30
L
B
δ
0
(a)
f
"
δ
a
There is a major difference of limit for multivariable function with single-variable ones. While there
exist only two direction (left and write) on axis x for approa ching a sequence to a number, for two
and higher variable functions, here exist infinitely many paths, and this makes it impossible to
investigate all paths for the limit. Thus, for proving the existence of limit we need to employ such
mathematical tools. We learn this fact through a few examples.
Example 19. We want to prove that the function f(x; y) = x
2
+ y
2
has a limit at (0; 0) and this
limit is L = 0. This means tha t for a ball B
δ
0
centered at (0; 0), we have
lim
δ!0
f(B
δ
0
) = 0 :
In another word, for any given " > 0, we can find δ > 0 such that:
0 < j(x; y) ¡(0; 0)j< δ
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{z
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
B
δ
0
)jf (x; y) ¡0j
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{z
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
I
"
< ":
Let " > 0 is given, we need to find δ > 0 such that
0 < x
2
+ y
2
p
< δ )jx
2
+ y
2
j< ":
Evidently, if we ch oose δ = "
p
or any value 0 < δ < "
p
, then f (B
δ
0
) ⊂I
f (0;0)
. The following figure
shows this process schematically:
δ =
1
2
δ =
1
3
δ =
1
4
" =
1
4
" =
1
9
" =
1
16
Since any sequence (x
n
; y
n
) eventually lies in the ball B
δ
0
, then its image lies in the interval I
"
for
" = δ
2
, and thus f (x
n
; y
n
) !0 if δ !0.
Example 20. We aim to show that the limit of the following function at (0; 0) is zero:
f(x; y) =
x
2
y
x
2
+ y
2
; (x; y) =/ (0; 0)
31
The function is not defined at (0; 0). However, we want that for any " > 0 the inequality
jx
2
yj
x
2
+ y
2
< ";
satisfies if there exist δ > 0 such that 0 < x
2
+ y
2
p
< δ. We give the proof by two method. The first
method uses the polar coordinates: x = r c os(θ) and y = r sin(θ). The relation (x; y) !(0; 0) implies
r !0. Therefore
lim
(x;y)!(0;0)
x
2
y
x
2
+ y
2
= lim
r!0
r
3
cos
2
(θ) sin(θ)
r
2
= cos
2
(θ) sin(θ) lim
r!0
r = 0:
Anot her method is as follows. Note that jx
2
yj≤jxj
x
2
+ y
2
2
, and then
jx
2
yj
x
2
+ y
2
≤
jxj
2
;
and when (x; y) !(0; 0), we have
lim
(x;y)!(0;0)
jx
2
yj
x
2
+ y
2
= 0;
and thus
x
2
y
x
2
+ y
2
!0.
Example 21. Now, consider the following function
f(x; y) =
xy
x
2
+ y
2
; (x; y) =/ (0; 0):
We show that this function does not have a limit at (0; 0). Let (x
n
; y
n
) =
1
n
; 0
. Obviously (x
n
;
y
n
) !(0; 0) when n !1. We have
lim
n!1
f(x
n
; y
n
) = 0 :
Now, let's consider the sequence (x
n
; y
n
) =
1
n
;
1
n
. Again ( x
n
; y
n
) !(0; 0) for n !1. In this case,
we have:
lim
n!1
f(x
n
; y
n
) =
1
2
:
It is seen that in two different ways, we obtain two different values for the limit and thus the limit
does not exist.
This scenario can be more complicated than at first may seems. The following example explains the
point.
Example 22. Let's investiga te in the existence of the limit of the following function:
f(x; y) =
x
2
y
x
4
+ y
2
; (x; y) =/ (0; 0):
32
Along any direction y = mx, or the path (x; mx) for x !0, the limit of the function is
lim
x!0
mx
3
x
2
(x
2
+ m)
= 0:
The above relation implies that is we move along any straight line y = mx, we obtain the same limit
for f. How about if we walk along the parabola y = x
2
, or equivalently (x; x
2
)? In this case, we obtain
lim
x!0
x
4
2x
4
=
1
2
;
and thus the limit of the function is not equal to the the limit when we walk the along straight lines,
and hence the function does not have a limit.
8 C ontinuity of two- variable functions
Definition 23. A two-variable function f(x; y) is called continuous at a = (a; b) if
lim
(x;y)!(a;b)
f(x; y) = f(a; b):
From the engineering point of view, the above relatio n ensures us that we do not encounter situation
in which the function f , for example mass density, height or temperature is changes suddenly. This is
the minimum condition we need in engineer to study the fields of such scalars. In subsequent chapters
we introduce stronger conditions which are continuity of the derivative of functions or smoothness.
Consider the function f (x; y)=
e
¡x
2
¡y
2
x
2
+ y
2
. This function is discontinuous at the origin as shown below:
If f represents the temperature distribution across R
2
, this fu nction exhibits a non-physical tem-
perature singularity at the origin, indicating a point of discontinuity. While physics may delve into
such singularities in advanced problems, encountering this phenomen on in everyday applic ations is
exceptionally rare.
Furthermore, for the function f (x; y) =
e
¡x
2
¡y
2
1 ¡x
2
¡ y
2
, discontinuity arises along the circle x
2
+ y
2
= 1.
Notably, within the disk x
2
+ y
2
< 1, the function is positive, approaching +1 near the boundary.
Conversely, in the region x
2
+ y
2
> 1, 1the function is negative, tending towards ¡1 as we approach
the boundary.
33
In the context of temperature representation, the analysis of temp erature change around the circle
x
2
+ y
2
= 1 becomes challenging. While temperature typically flows from hot to cold areas, there is
no discernible flow from the interior (inside x
2
+ y
2
< 1) t o the exterior of this disk.
Example 24. We aim to determine the value of C such that the function
f(x; y) =
8
<
:
x
2
+ (y ¡1)
2
jxj+ jy ¡1j
(x; y) =/ (0; 1)
C (x; y) = (0; 1)
;
is continu ous at (0; 0). To achieve this, we need t o calculate the limit of f at (0; 1). By substituting
x = r cos(θ) and y = 1 + r sin(θ), we obtain:
lim
(x;y)!(0;1)
f(x; y) = lim
r!0
f(r cos(θ); 1 + r sin(θ)) =
1
jcos(θ)j+ jsin(θ )j
lim
r!0
r = 0:
This limit remains constant for all values of θ since 1 ≤jcos(θ)j+ jsin(θ)j< 2 for all θ. The squeeze
theorem justifies this limit result.
Definition 25. A function f(x; y) is continuous in a set D if it is continuous at all points (x; y)2D.
9 Exer cises
Exercise 36. Prove that the limit of the fun ction f (x; y) = xy at (0; 0) is L = 0. Hint: yo may need to use the
inequality 2xy ≤x
2
+ y
2
.
Exercise 37. Find the limit of the fol lowing functions if exists:
a) lim
(x; y)!(1;1)
x + y
x
2
+ y
2
b) lim
(x; y)!(0;0)
x
2
¡ y
2
x
2
+ y
2
c) lim
(x;y)!(0;0)
sin(x) + sin(y)
x + y
d) lim
(x;y)!(0;0)
sin(x) + sin(y)
sin(x + y)
Exercise 38. What can you say about t he li mit of the following functio n at (0; 0)
f(x; y) =
x jy j
p
x
2
+ jy j
Exercise 39. True or false?
a) A fu nction f (x; y) ha s a limit at (a; b) if
lim
x!a
f(x; b);
ex ist.
34
b) If a function f (x; y) has a limit at (a; b), then
lim
x!a
f(x; b);
ex ists.
Exercise 40. Consider the function f (x:y) = e
¡x
2
¡y
2
defined on the b all B
r
(0; 0). Show that
f(B
r
(0; 0)) = (e
¡r
2
; 1];
and then if r !0, f (x; y) ! f(0; 0) = 1.
Exercise 41. Determine the discontinuity points of the f unction :
f(x; y) =
xy ¡1
x
2
¡ y
:
Exercise 42. Assume that f(x; y) is continuous in all points of R
2
. Then for any open interval (a; b), show that
f
¡1
(a; b) is open, where
f
¡1
(a; b) = f(x; y); f(x; y) 2(a; b)g:
35
Lecture
Partial Derivatives
In this section, we will explore essential concepts that lay the foundation for our understanding:
1. Calculating partial derivatives along the x and y-axes at specific points.
2. Gaining insight into the engineering and geometrical interpretations of partial derivatives at
specific points.
3. Investigating higher-order partial derivatives.
10 Single-variable der ivative
As we saw in the previous lecture, the limit
f
0
(a) = lim
x!a
f(x) ¡f(a)
x ¡a
; (2)
determines how fast or slow f approaches a with respect to the linear approach x !a. For example,
if f represents the position function of a particle along x-axis, that is usually denoted by x(t), where
t stands for time, then the limit
x
0
(t
0
) = lim
t!t
0
x(t) ¡x(t
0
)
t ¡t
0
;
gives the velocity of the particle at time t. The function f can denote any physical quantity. In
particular, if f denotes the height a bove the x-axis, the value f
0
(a) is called the slope of tangent
line at the graph of f at x = a.
θ
y = f(x)
T (x) = f(a) + f
0
(a)(x ¡a)
x
y
a
If f is differentiable in an open interval I, then the derivative function
df
dx
is defined for all x 2I,
that is, for any a 2I, we have
df
dx
(a) = f
0
(a):
36
Note that, a function can be differentiable, but the derivative function is not continuous. For
example, consider the following function
f(x) =
8
<
:
x
2
sin
1
x
x =/ 0
0 x = 0
:
The graph is shown below.
This function is differentiable everywhere. In particular, at x = 0, we have
f
0
(0) = lim
x!0
x
2
sin
1
x
¡0
x
= lim
x!0
x sin
1
x
= 0:
On the other hand, the derivative function
df
dx
is
df
dx
(x) = 2x sin
1
x
¡cos
1
x
:
Note that lim
x!0
df
dx
(x) does not exists and then
df
dx
(0) =/ f
0
(0):
When the derivative function of a function is continuous, we call it C
1
. For example, the above
function is differentiable everywhere, but it is not C
1
as
df
dx
(0) does not exist while f
0
(0) exists.
To avoid a common mistake, we should note that if a f unction f is C
1
in an interval I and if
df
dx
> 0
in I (similarly
df
dx
< 0 in I) the function is increasing in I (or decreasing in the second case). For
example, consider the function
f(x) =
8
<
:
x + x
2
sin
1
x
x =/ 0
0 x = 0
:
For all x in an small interval I about x = 0, we have f
0
(x) > 0 for x 2I, however, this function is
neither increasing nor decreasing.
37
11 Partial de rivatives
11.1 Algebraic statement
We first defined the partial d erivative of function at a specific point, and then defined the partial
derivative functions.
Partial derivative at a point. Let f(x; y) be a continuous function defined on an open set D.
Fixed a point (a; b) 2D. The partial derivative of f at (a; b) with respect to x is defined by the limit:
f
x
0
(a; b) = lim
x!a
f(x; b) ¡ f (a; b)
x ¡a
;
as long as the limit exists. Similarly, the partial derivative of f at (a; b) with respect to y is defined
through the limit:
f
y
0
(a; b) = lim
y!b
f(a; y) ¡f(a; b)
y ¡b
;
as long as the limit exists. Another notation that is used for the partial derivative is
@
@x
and
@
@y
, and
thus
@f
@x
(a; b) = f
x
0
(a; b);
@f
@y
(a; b) = f
y
0
(a; b):
We use these notation interchangeably.
Partial derivative functions. The partial der ivative function f
x
0
(x; y) and f
y
0
(x; y) for a two
variable function f(x; y) defined on a ope n set D for all (x; y) 2D is defin ed by the limits:
f
x
0
(x; y) = lim
δx!0
f(x + δx; y) ¡f(x; y)
δx
; f
y
0
(x; y) = lim
δy!0
f(x; y + δy) ¡f(x; y)
δy
:
Note that f
x
0
(x; y) and f
y
0
(x; y) are two variable functions of (x; y) and may or may not be continuous
at a point (a; b) 2D. We will see the importance of continuity of partial derivative functions at a
point later.
Example 26. Consider the function f (x; y) = jxyj
p
. The figure below depicts the surface of this
function
38
As we observe, the function is continuous everywhere. Let's find the partial derivatives of f at the
origin (0; 0). We have
f
x
0
(0; 0) = lim
x!0
f(x; 0) ¡f(0; 0)
x
= lim
x!0
0
x
= 0:
Similarly we obtain f
y
0
(0; 0) = 0. Now, let's evaluate the partial derivative functions f
x
0
(x; y) and
f
y
0
(x; y). For example, we have:
f
x
0
(x; y) =
@
@x
jxyj
p
=
jyj
@ jxj
@x
2 jxyj
p
;
which is not defined at (0; 0), and thus
lim
(x;y)!(0;0)
f
x
0
(x; y) =/ f
x
0
(0; 0):
As a matter of fact, the partial derivatives exists a t all points, however, the partial derivative
functions are not continuous on x and y axes.
Example 27. Consider the function
f(x; y) =
(
xy
x
2
+ y
2
(x; y) =/ (0; 0)
0 (x; y) = (0; 0)
:
This function is not continuous at the origin since as we saw in the previous lecture, it does not
possess a limit at this point. However, the partial deriva tives at this point exist. We have
f
x
0
(0; 0) = lim
x!0
f(x; 0) ¡f(0; 0)
x
= lim
x!0
0
x
= 0;
f
y
0
(0; 0) = lim
y!0
f(0; y) ¡f(0; 0)
y
= lim
y!0
0
y
= 0:
On the other hand, the partial derivative functions are:
f
x
0
(x; y) =
y
3
¡x
2
y
(x
2
+ y
2
)
2
; f
y
0
(x; y) =
x
3
¡xy
2
(x
2
+ y
2
)
2
;
which are not continuous at the origin.
39
The partial derivative for functions of more variables than two is completely similar. For example,
for f = f(x; y; z), we have
f
x
0
(a; b; c) = lim
x!a
f(x; b; c) ¡f(a; b; c)
x ¡a
;
f
y
0
(a; b; c) = lim
y!b
f(a; y; c) ¡ f( a; b; c)
y ¡b
;
and
f
z
0
(a; b; c) = lim
z!c
f(a; b; z) ¡ f(a; b; c)
z ¡c
:
11.2 Engineering inte rpretation
The partial derivatives of a function f at a specific point measure how fast or slow the quantity
represented by f changes along x or y direction s. In other words, f
x
0
(a; b) measures the rate of
change of a physical quantity represented by f (say mass density, temperatu re, energy and so on)
when it starts moving from this point horizontally. Similarly, f
y
0
(a; b) measure the rate of change
of f at (a; b), a vertical increment occurs in y.
Example 28. Let the temperature distribution T (x; y) = xe
¡x
2
¡y
2
◦
C be given over R
2
. The figure
below depicts this function:
The rate at which the temperature drops or rise at (0; 0 ) along the axis of x is:
T
x
0
(0; 0) = lim
x!0
T (x; 0) ¡T (0; 0)
x
= lim
x!0
xe
¡x
2
¡1
x
= 1:
In other word, we can say that T
x
0
(0; 0) = 1
◦
C
unit length
: Similarly, we have: T
y
0
(0; 0) = 0
◦
C
unit length
.
The figure below depicts these cases schematically.
T
y
0
= 0
T
x
0
= 1
T
x
0
= ¡1
T
y
0
= 0
x
y
Thus, for a small distance δx, we expect that the temperature is about
T (δx; 0) ≈T (0; 0 ) + T
x
0
(0; 0)δx = 1 + δx
◦
C:
40
Moving backward (along ¡x), the temperature drops at the rate ¡1
◦
C
unit length
. This increasing
and decreasing of the temperature is evident from the above figure. Walking along y-direction from
the origin, causes no rate of change as T
y
0
(0; 0) = 0. The plot of leve l curves also indicative for these
calculations. The point (0; 0) lies on a level curve which is ve rtical and thus waking along it does
not change the temp erature.
11.3 Geometrical interpretation
Recall the the geometry of a function z = f(x; y) is a surface S in the space xyz. For any fixed y = b,
the function z = f (x; b) defines a space curve represented as:
r(x) = (x; b; f (x; b)):
This curve lies on the surface S. From the geometrical point of view, this space curve is obtained by
projecting the straight line (x; b) in the xy-plane on the surface S. On the other hand, the derivative
of this curve at a point x = a, i.e.,
r
x
0
(a) = (1; 0 ; f
x
0
(a; b));
represents the tangent vector to this curve. Accordingly, f
x
0
(a; b) is equal to the slope of this tangent
vector in the direction of x-axis. Similarly, the value f
y
0
(a; b) is the slope of tangent vector of the
curve
r(y) = (a; y; f( a; y));
in the direction of the y-axis. The figure below depicts this scenario for the function f (x; y) =
xe
¡x
2
¡y
2
at (0; 0):
The tangent vector for this functio n is r
x
0
(0) = (1; 0; 1). This tangent vector makes angles
π
4
; 0 ;
π
4
with axes x; y and z respectively.
41
12 Higher-order par tial derivat ives
Higher-order partial derivatives like
@
2
@x
2
;
@
2
@y
2
;
@
2
@x@y
and so on are defined in a similar manner. For
example, the second-order partial derivative f
xx
of a multivariable function f is defined as
f
xx
00
=
@
2
f
@x
2
=
@
@x
@f
@x
:
Similarly, we have f
x y
00
=
@
@x
@f
@y
and f
yx
00
=
@
@y
@f
@x
.
For most functions we study in lectures, the order of differentiation does not change the result, i.e,
f
xy
00
= f
yx
00
, or:
@
@x
@f
@y
=
@
@y
@f
@x
:
However, there are functions that do not satisfy this relation.
The interpretations of higher-order derivatives in physics are clear. In fact, f
x x
is a measure of the
rate of change of the rate of change of f along x, or the accelerating of particle if f represents the
location function.
13 Exercises
Exercise 43. Let f be given by
f(x; y) = xy +
x
y
r
:
Evaluate f
x
0
(1; 1) and show that the deriva tive function f
x
0
(x; y) is continuous at (1; 1).
Exercise 44. Let r = x
2
+ y
2
p
. Show t he fo llowing relations:
a)
@
@x
¡
1
r
2
+
h
@
@y
¡
1
r
i
2
= 1:
b) x
@
@x
¡
1
r
+ y
@
@y
¡
1
r
= r:
Exercise 45. For any continuo usly differentiable function h(x), show that the function f(x; y) = h(x) e
x
satisfies
the relation
f
x
0
+ f
y
0
= f :
Exercise 46. For any continuously differentiable function h(x), show that the function f(x; y) = h
¡
y
x
satisfies
the relation
xf
x
0
+ yf
y
0
= 0:
Exercise 47. Assume that for a function f(x; y), we know f
x
0
(x; y) =
x
2
+ y
2
x
.
a) Find all possible functions f(x; y) with the given partial d eri vative.
b) Find f(x; y) such that f (1; y) =
1
2
+ y.
42
Exercise 48. Let f ; g; h are smooth sin gle-variable functions. Show that the function u = f(x ¡y) g(y ¡z) h(z ¡
x) satisfie s the equation:
u
x
+ u
y
+ u
z
= 0:
Exercise 49. The temperature function is by: T (x; y) = xe
¡x
2
¡y
2
. For the temper ature functi on, fix y = b and
the represent obtained function as a single-variable function T
b
(x) = e
¡b
2
xe
¡x
2
. Det ermine the maximum and
minimum point of the fu nction. Determine intervals where the temperature drops.
Exercise 50. Show that the funct ion u(x; t) =
1
4πt
p
e
¡
x
2
4t
satisfies the equation: u
t
= u
xx
Exercise 51. Assume that f is a smooth single variable function. Show that the function u(x; t) = f (x + c t)
satisfies the equation:
@
2
u
@t
2
= c
2
@
2
u
@x
2
Exercise 52. Let (a; b; c) is a fixed point in R
3
, and let r(x; y; z) denote the function r as:
r(x; y; z) = (x ¡a)
2
+ (y ¡b)
2
+ (z ¡a)
2
p
;
Show the the following relation holds for any point (x; y; z) =/ (a; b; c).
@
2
@x
2
1
r
+
@
2
@y
2
1
r
+
@
2
@z
2
1
r
= 0:
43
Lecture
Directional derivative and D erivative
This section will cover the following key concepts:
1. Directional derivatives along unit-length vectors at specific p oints.
2. Derivative and total differential
14 Single-variable functions
The derivative function f(x) at x = a, is a value f
0
(a) such that
lim
x!a
f(x) ¡f(a) ¡ f
0
(a)(x ¡a)
jx ¡aj
= 0:
This expression can put in another way using t he notation o as:
f(x) ¡f(a) = f
0
(a) (x ¡a) + o(jx ¡aj);
where o(jx ¡aj) is understood in the following way:
lim
x!a
o(jx ¡aj)
x ¡a
= 0:
In other word, the error b etween the function f(x), and the affine function
T (x) = f(a) + f
0
(a) (x ¡a)
is very small, smaller that jx ¡aj as o(jx ¡aj) jx ¡aj. Recall that T (x) is the equation of the
tangent line on the graph o f the function f at x = a. For this reason, people sometimes write:
f(x) ≈f(a) + f
0
(a) (x ¡a);
where ≈ stands for the approximation. Therefore, the function T (x) is called the linear approxima-
tion of f (x) at x = a.
From a pure algebraic view, the differential of a function y = f(x) is written as
dy = f
0
(x) dx;
where dx and dy are arbitrary increment on x and y axis. The expression dy is denoted also by df
is called the differential of f, while
df
dx
is called the derivative of f.
44
y = f (x)
y
x
dy
T (x)
dx
15 Directional derivative
As we h ave observed in the preceding lectures, partial derivatives of a function f (x; y) provide
insights into the rate of change of f along the x or y-axis, or alternatively, the slope of tangent
lines projected by horizontal or vertical lines to the surface of f . However, a natur al question arises
here: How can we measure the rate of change of f in an arbitrary direct ion r^ where jr^j= 1?
Definition 29. Let r^ =
α
β
be a unit vector in the xy-plane, i.e., je^j= α
2
+ β
2
p
= 1. Given a
function f(x; y), the directional derivative of f(x; y) at the point (a;b) in the direction of r~ is defined
through the following limit, provided the limit exists:
D
r
f(a; b) = lim
t!0
f(a + αt; b + βt) ¡ f (a; b)
t
:
Note that if r^ = i
^
then D
r
f(a; b) = f
x
0
(a; b), and if r^ = j
^
, then D
r
f(a; b) = f
y
0
(a; b).
The increment of f at p = (a; b) in the direction r^ = (α; β) is ∆
r
f(p) = f(p + t r^) ¡f(p). Thus, the
directional derivative of f in the direction r^ can be written as
D
r
f(p) = lim
t!0
∆
r
f(p)
t
:
This idea is denoted in the following diagram schematically.
p = (a; b)
f(p)
f(p + tr
^
)
∆
r
f(p) = f (p + tr^) ¡ f(p)
r^ = (α; β)
p + tr^
Example 30. Let's find t he directional derivative of the f unction T (x; y) = xe
¡x
2
¡y
2
at (0; 0) in
the direction r~ =
1
1
. First, we should normalize the vector by dividing it by its magnitude:
r^ =
0
B
B
@
2
p
2
2
p
2
1
C
C
A
:
45
Using the relation, we obtain
D
r
f(0; 0) = lim
t!0
f
2
p
2
t;
2
p
2
t
¡0
t
= lim
t!0
2
p
2
e
¡t
2
=
2
p
2
:
Now, let's r^ =
α
β
is arbitrary unit vector. We would like determine in what direction, the rate of
change of T is maximum. SInce r^ is unit, there exist θ such that α = cos(θ) and β = sin(θ). We have
D
r
(0; 0) = lim
t!0
f(cos(θ) t; sin(θ) t) ¡0
t
= cos(θ)lim
t!0
e
¡t
2
= cos(θ):
Thus, the maximum rate of change is along x-axis corresponding θ = 0, and the minimum rate of
change is attained when θ = π, the opposite direction of x-axis. For θ =
π
2
corresp onding y-axis, the
rate of change is zero.
Is there any relationship between t he directional derivative of a multivariable funct ion f and its
partial derivatives? The answer is positive under an important condition which is state din the
following theorem.
Theorem 31. Let f (x; y) be a function with continuous partial derivative functions f
x
0
and f
y
0
at a
point (a; b), and let r^ =
α
β
be a unit vector. Then, the directional derivative of f with respect to
r at the point (a; b) is given by:
D
r
(a; b) = f
x
0
(a; b) α + f
y
0
(a; b) β: (3)
For the proof, we should wait until to lean the concept of the derivative of a function which is
presented in the next lecture. Here, we solve an example to show that why the continuity of partial
derivatives are essential and can not be relaxed.
Example 32. Consider the function
f(x; y) =
8
<
:
x
2
y
x
2
+ y
2
(x; y) =/ (0; 0)
0 (x; y) = (0; 0)
:
It is simply seen that f
x
0
(0; 0) = f
y
0
(0; 0) = 0. However, for r^ =
2
p
2
;
2
p
2
, we have
D
r
f(0; 0) = lim
t!0
f
2
p
2
t;
2
p
2
t
t
=
2
p
4
:
46
This implies that D
r
f(0; 0) =/
2
p
2
f
x
(0; 0) +
2
p
2
f
y
(0; 0). The reason is that the partial derivative
functions f
x
0
(x; y) and f
y
0
(x; y) are not continuous at (0; 0). For instance, we have
f
x
0
(x; y) =
2xy
3
(x
2
+ y
2
)
2
;
which is not continuous at (0; 0).
Example 33. Consider the function f(x; y) = e
¡x
2
¡y
2
. Find the directional derivative of f at (1; 1)
is all possible directions r^ and determine the directio n along which the derivative is maximum and
minimum.
Solution. T he funct ion is smooth and thus we can use t he formula (3). Let r^= (cos(θ); sin(θ)), for 0≤θ ≤2π then
D
r
f(0; 0) = f
x
0
(1; 1) cos(θ) + f
y
0
(1; 1) si n(θ);
and for f
x
(1; 1) = ¡2xe
¡x
2
¡y
2
j
(1;1)
=¡2e
¡2
, and f
y
(1; 1) = ¡2ye
¡x
2
¡y
2
j
(1;1)
=¡2e
¡2
, we obtain
D
r
f(1; 1) = 2e
¡2
(¡cos(θ) ¡sin(θ)):
To det ermine the maximum and minimum values of the derivative, we need to determin e θ to maximum and
minimize the expression g(θ) = ¡cos(θ) ¡sin(θ). Taking derivative g
0
(θ) = 0 gives θ =
π
4
;
5π
4
. Thus the maximum
and minimum values of g(θ) are 2
p
and ¡ 2
p
, an d then the maximum rate of change of f at (1; 1) is attain ed
in the direction θ =
3π
4
with value M = 2 2
p
e
¡2
and m = ¡2 2
p
e
¡2
. It is interesting to note re relati on of this
dir ectio ns and the level curve of f at (1; 1).Note that directions are perpendicular to the level curve sh own in the
figure below . The inward direction toward the origin is the direction th at has maximum rate of change since f
attains is maximum value at (0; 0). The outward direction is the direction with minimum rate of change as along
this direct ion f decreases very s harp .
(1; 1)
θ =
π
4
f(x; y) = e
¡2
θ =
5π
4
16 Derivative and total diffe rential
16.1 Algebraic statement
Definition 34. Let f (x; y) be defined on an open domain D, and let (a; b) 2D. Assume furthermore
that partial derivative functions
@f
@x
and
@f
@y
are continuous at (a; b). Then, the derivative of f at
(a; b) is defined as the following 1 ×2 matrix:
f
0
(a; b) =
f
x
0
(a; b) f
y
0
(a; b)
;
47
A function f is called differentiable in an open set D if f
0
exists for all points (a; b) 2D.
Note that the derivative f
0
(a; b) is a linear function; thus, f
0
(a; b) is a mapping that takes vectors
in R
2
and map them into R.
Example 35. Let's find the derivative of the function f (x; y) = e
¡x
2
¡y
2
at the point (1; 1). The
partial derivative functions f
x
= ¡2xe
¡x
2
¡y
2
and f
y
= ¡2ye
¡x
2
¡y
2
are cont inuous everywhere in R
2
and in particular at the given point (1; 1). Therefore, we obtain:
f
0
(1; 1) =
¡2e
¡2
¡2e
¡2
:
Let v~ be the vector from the point p
0
= (1; 1) to p = (2; 1). This vector cs equal v~ =
1
0
, and thus
this vector is taken by f
0
(1; 1) to the value
f
0
(1; 1)
1
0
=
¡2e
¡2
¡2e
¡2
1
0
= ¡2e
¡2
:
If point p moves toward p
0
as p = (1 + x; 1), x !0, we have
lim
x!0
f(1 + x; 1) ¡ f(1; 1) ¡
¡2e
¡2
¡2e
¡2
x
0
jxj
= lim
x!0
e
¡1
e
¡(1+x)
2
¡e
¡2
+ 2e
¡2
x
jxj
:
Using :'Hospital rule it is simply seen that the limit approaches 0 and thus the linear mapping
f
0
(1; 1) =
¡2e
¡2
¡2e
¡2
approximates very well the function f(x; y) in the adjacent p oints of (1; 1) .
Theorem 36. Assume that f (x; y) is differentiable at the point (a; b), that is, the partial derivative
functions
@f
@x
and
@f
@y
are continuous functions at (a; b). Then, we have
lim
(x;y)!(a;b)
f(x; y) ¡ f( a; b) ¡ f
0
(a; b)
x ¡a
y ¡b
(x ¡a)
2
+ (y ¡b)
2
p
= 0: (4)
Again, the differentiability is essential here. Fo r example , consider the function f(x; y) = jxy j
p
. It
is simply seen that f
x
(0; 0) = f
y
(0; 0) = 0. We have
lim
(x;y)!(0;0)
f(x; y) ¡ f( 0; 0) ¡
f
x
0
(0; 0) f
y
0
(0; 0)
x
y
x
2
+ y
2
p
= lim
(x;y)!(0;0)
jxyj
p
x
2
+ y
2
p
:
48
It is seen that the limit do es not exist. The reason that the function is not differentiable at (0; 0)
and thus f
0
(0; 0) do es not exists.
Definition 37. (Total differential) Associated to the derivative of a function, the following
expression is called the differential of a two-variable differentiable function f (x; y):
df = f
x
0
(x; y) dx + f
y
0
(x; y) dy:
For the function f (x; y) = e
¡x
2
¡y
2
, the differential of f at (1; 1) is
df = ¡2e
¡2
dx ¡2e
¡2
dy:
The above expression is a natural generalization of the differential of a single variable f unction f (x)
which is: df = f
0
(x) dx.
16.2 Linear approximation
The derivative of a function f(x; y) at a point (a; b) c an be leveraged to approximate the function
using an affine function as follows:
f(x; y) ¡ f(a; b) ≈ f
x
0
(a; b)(x ¡a) + f
y
0
(a; b)(y ¡b);
where the approximation is understood in the following se nse
f
x
0
(a; b)(x ¡a) + f
y
0
(a; b)(y ¡b) = o(jx ¡a; y ¡bj):
Let's solve a few example to illustrate how these formula can be used for approximation of no-linear
functions.
Example 38. Consider the function
f(x; y) = 6 ¡x
2
¡y
2
p
:
We would like to approximate the value f(0.8;1.1) by the above approximation formula. If we choose
a = 1, b = 1, then we obtain
f(0.8; 1.1) ¡ f (1; 1) ≈ f
x
0
(1; 1)(¡0.2) + f
y
0
(1; 1) (0.1):
With values f(1; 1) = 2, f
x
0
(1; 1) = ¡
1
2
, and f
y
0
(1; 1) = ¡
1
2
, we obtain
f(0.8; 1.1) ≈2.05:
With true value f (0.8; 1.1) = 2.037, we observe that the approximation is acceptable.
49
17 Proofs
Proof. (of the theorem on differentiability) We have
f(x; y) ¡f( a; b) = f(x; y) ¡ f(a; y) + f(a; y) ¡ f(a; b);
and by mean value t heorem for the expression f (x; y) ¡ f(a; y), we have
f(x; y) ¡ f(a; y) = f
x
0
(ξ ; y)(x ¡a);
for some ξ between a and x. Similarly, we have
f(a; y) ¡ f(a; b) = f
y
0
(a; η) (y ¡b);
for some value η between b and y. Thus, we have
f(x; y) ¡ f(a; b) ¡ f
0
(a; b)
x ¡a
y ¡b
(x ¡a)
2
+ (y ¡b)
2
p
=
(x ¡a)[f
x
0
(ξ ; y) ¡ f
x
0
(a; b)] + (y ¡b)[f
y
0
(a; η) ¡f
y
0
(a; b)]
(x ¡a)
2
+ (y ¡b)
2
p
:
To calculate the limit, we can use the polar coordinate
x = ar cos(θ); y = b + r sin(θ);
and obtain the desired limit as:
lim
(x;y)!(a;b)
cos(θ)[f
x
0
(ξ ; y) ¡ f
x
0
(a; b)] + sin(θ)[f
y
0
(a; η) ¡f
y
0
(a; b)] = 0:
Note that when x !a and y !b, then ξ !a and η !b.
Proof. (of theorem directional derivative) Let r^ =
α
β
, and f (a; y) is a differentiable
function. The directional derivative of f at (a; b) along r
^
is defined as:
D
r
f(a; b) = lim
t!0
f(a + αt; b + βt) ¡ f (a; b)
t
:
Using the above theorem, we have
f(a + αt; b + βt) ¡ f (a; b) = f
x
0
(a; b) αt + f
y
0
(a; b)βt + o (t);
where o(t) approaches zero faster than t, that is,
o(t)
t
!0 when t !0.
and using the above formula, we obtain
D
r
f(a; b) = lim
t!0
f
x
0
(a; b) αt + f
y
0
(a; b)βt + o(t)
t
= αf
x
0
(a; b) + βf
y
0
(a; b);
50
and this completes the proof.
18 Exercises
Exercise 53. Consider the function
f(x; y) =
8
<
:
x
3
y
x
4
+ y
2
(x; y) =/ (0; 0)
0 (x; y) = (0; 0)
:
Show the relation D
r
f(0; 0) = 0 for all directions r^ = (α; β) and thus
D
r
f(0; 0) = αf
x
(0; 0) + βf
y
(0; 0):
However, the function f is not continuous at (0; 0).
Exercise 54. Approximate the value 2.01
1.99
.
Exercise 55. The central angle of a circular sector is θ
0
and the ra dius r
0
. We ai m to decrees the angle by dθ.
Show that if we aid to keep the area constant, the ra dius must in creases by
dr =
r
0
2θ
0
dθ:
Exercise 56. The period of a pendulum is derived by the formula
T (l; π; g) = 2π
l
g
r
;
wher e the values are mea sured as π
0
= 3.14 and g
0
= 9.8 and l
0
= 1.22 by rounding off with 2 de cimal digits . Use
the linear approximati on and find the linear error.
Exercise 57. The point (x
0
; y
0
) makes angle θ with the x-axis an d distance r
0
. Show that if this point changes
to (x
0
+ dx; y
0
+ dy), then dθ, the i ncrement in θ follows the rule
dθ =
¡y
0
r
0
dx +
x
0
r
0
dy:
Exercise 58. Consider the function f (x; y) = x
2
+ xy ¡ y
2
. Fi nd the differential of f at (1; 0) and show that the
relation (4) holds for the derivative.
Exercise 59. Consider the function f(x; y) =(x
2
+ y
2
)
α
wher e α is a positi ve number. Find and interval for α such
that the function is diffe rentiable at (0; 0). For α =
2
3
, find the deri vative of f at (0; 0) and verify the relation (4).
Exercise 60. If f is a linear function, show t hat f
0
(a; b) = f for any point (a; b)
Exercise 61. Consider the function
f(x; y) =
8
<
:
x
2
y
x
2
+ y
2
(x; y) =/ (0; 0)
0 (x; y) = (0; 0)
:
Show that the given func tio n does not satisfy the approxim ati on formula (4) at (0; 0). Explain the reason of this
result. What can you say about the function: g(x; y) = yf(x; y), where f is the above funct ion?
51
Lecture
Gradient and tangent plane
19 Gradient
19.1 Algebraic statement
In the previous lecture, we saw that if partial derivative functions f
x
0
; f
y
0
of a function f (x; y) are
continuous, then its derivative is defined by the 1 × 2 matrix: f
0
=
f
x
0
f
y
0
and the directional
derivative D
r
f along a unit direction r
^
=
α
β
at a point (a; b) is equal to
D
r
f(a; b) = f
0
[r^] = α f
x
0
(a; b) + βf
y
0
(a; b): (5)
Let's have a look again at the formula (5) and rewrit e it as the dot product of two vectors, i.e.,
D
r
f(a; b) =
f
x
0
(a; b)
f
y
0
(a; b)
!
·
α
β
:
The first vector at the right-hand side is called the gradient vector of f(x; y) at ( a; b) and is denoted
as:
rf (a; b) =
f
x
0
(a; b)
f
y
0
(a; b)
!
:
The gradient vector is also can be considered as the action of the differential ope rator r:=
0
B
B
@
@
@x
@
@y
1
C
C
A
(rea d nabla) on the scalar function f resulting a vector:
r[f ] =
f
x
f
y
:
What is the advantage of this interpretation, t he interpretation of the d ifferential f
0
as a vector
rf ? Recall that every vector has a direction a nd a magnitude. First natural question is this: To
what directio n does rf(x; b) point to? Let's write the directional derivative as:
D
r
f(a; b) = rf (a; b) ·r^:
Recall from linear algebra that the dot product of two vectors u~ and v~ can be expressed as:
u~ ·v~ = ju~ jjv~ jcos(θ);
52
where θ is the angle between these two vectors. If u~ is fixed, the maximum of the dot product
happens when cos(θ)=1 or equivalently if θ=0, which means v~ is parallel to u~ . Based on this result,
the maximum of D
r
f(a; b) is achieved if r^ is in the direction of rf(a; b), that is, if:
r^ =
rf(a; b)
jrf (a; b)j
;
as long as rf (a; b) is a non-zero vector. Note that jr^j= 1, and we need to normalize rf. Therefore,
rf (a; b) points toward the directi on that f experiences its largest rate of change. The direction
¡rf
jrf j
is the direction that f has largest negative rate of change. As we will see below, this r esults
helps us to search for the maximum and minimum points of a function in a domain.
The second natural question is about the magnitude of rf (a; b). Thi s magnitude is equal to the
maximum rate of change of f at (a; b) in all possible directio ns.
Example 39. The gradient of the function f (x; y) = e
¡x
2
¡y
2
at (1 ; 1) is
rf(1; 1) = ¡2e
¡2
1
1
:
The direction with maximum rate of change is
r
^
=
0
B
B
@
¡ 2
p
2
¡ 2
p
2
1
C
C
A
;
which is the angle θ =
5π
4
. This result is the same as we derived in the previous lecture. The direction
¡r^ points toward the direction with largest negative rate of change.
19.2 Guided path to function maxima
The results in the previous section helps us to determine the point with maximum and minim values
for a function. Let's consider the following function:
f(x; y) = xye
¡
x
2
+y
2
18
:
This function has two peaks at (3; 3) and (¡3; 3). Suppose we start at the point (1; 0) and want
to ascend one of these summits without knowing their locations. To do this, we'll move along the
gradient dire ction r~ =
rf
jrf j
. At the point (1; 0), we have rf(1; 0) = [
0; 0.946
], so r^ = [
0 1
]. We 'll
take a step in this direction, but it's important to keep our steps short since r^ changes at different
points. Let's take a step of 0.2 r^ along the direction, leading to the new point:
(x
1
; y
1
) = (x
0
; y
0
) + 0.2 r^ = (1; 0.2):
Now, we calculate the gradient direction and r^ at this new point: r^ = [
0.176 0.984
]. Thus, the updated
point becomes:
(x
2
; y
2
) = (1.035; 0.397):
53
By continuing this process, we construct a path (x
n
; y
n
) that gradually approaches the summit. The
figure below illustrates the path we should follow to reach the summit.
The following figures illustrate planner and space view of the gradient paths toward the summits:
The figure above is generated by the following code in Matlab:
x=-3:0.1:3;
y=x';
f=x.*y.*exp(-x.^2-y.^2);
[fx,fy]=gradient(f);
surf(x,y,f), shading interp
l=streamslice(x,y,fx,fy);
for i=1:length(l)
fi = interp2(x,y,f,l(i).XData, l(i).YData);
l(i).ZData=fi;
end
19.3 Tangent plane
Our goal is to show that the affine function
T (x; y) = f(a; b) + f
x
0
(a; b)(x ¡a) + f
y
0
(a; b) (y ¡b);
is the tange nt plane on the surface of the function z = f (x; y). This result is a natural generalization
of the similar fact about single-variable funct ion T (x) = f(a) + f
0
(a) (x ¡a) which is the equation
of tangent line.
54
Recall that to write the equation of tangent plane on the surface S: (x; y; f(x; y)) at the point
p
0
= (a; b; f (a; b)), we need a perpendicular vector on S at the given point.
y
z
x
(¡f
x
0
(a; b); ¡f
y
0
(a; b); 1)
T
1
= (1; 0; f
x
0
(a; b))
T
2
= (0; 1; f
y
0
(a; b))
(a; y; f (a; y))
(x; b; f(x; b))
From the previous lectures, we know that the vectors T
1
= (1; 0; f
x
0
(a; b)) and T
2
= (0; 1; f
y
0
(a; b))
are tangent on the surface S, and then T
1
×T
2
is perpendicular on S at the point p
0
. On the other
hand, we have:
T
1
×T
2
= (¡f
x
0
(a; b); ¡f
y
0
(a; b); 1);
and then the equation of the tangent plane is obtained as:
¡f
x
0
(a; b)(x ¡a) ¡ f
y
0
(a; b)(y ¡b) + z ¡ f (a; b) = 0;
or equivalently
z = f(a; b) + f
x
0
(a; b)(x ¡a) + f
y
0
(a; b) (y ¡b):
Example 40. Let's find the equation of tangent plane on the point (1; 1; 2) on the sphere
x
2
+ y
2
+ z
2
= 6:
Rewriting the implicit function in the explicit form z = 6 ¡x
2
¡y
2
p
(we should cho ose the upp er
upper sphere due to the given point), we obtain
z
x
(1; 1) = z
y
(1; 1) =
¡1
2
;
and then, the equation of the tangent plane i s:
z = 2 ¡
1
2
(x ¡1) ¡
1
2
(y ¡1);
or equivalently
x + y + 2 z = 6 :
55
Remark. Note that the equation of tangent plane is completely the same as the approximation
property of the differential, i.e.,
f(x; y) ≈f( a; b) + f
x
0
(a; b)(x ¡a) + f
b
0
(a; b)(y ¡b):
Therefor, t he linear approximation is the approximation by tangent plane, as we will see later, the
above expression is the linear terms of the Taylor expansion formula for the multivariable functions.
A natural question arises here: how can we write the equation of tangent plane on surfaces described
by implicit functions? Note that an explicit function z = f (x; y) can be written as implicit one as:
u := z ¡f(x; y) = 0. The perpendicular vector to this surface is just its gradient:
ru = (¡f
x
; ¡f
y
; 1 ):
Can we say that the perpendicular vector to the surface g(x; y; z) = 0 is just its gradient, that is,
rg = (f
x
; f
y
; f
z
)? The answer is positive. In fact, by the total differential, we have dg =0, a nd since
dg = g
x
0
dx + g
y
0
dy + g
z
0
dz = rg ·
0
@
dx
dy
dz
1
A
;
we reach the fact that rg is perpendicular to to the t angent plane.
For a two variable f unction g(x; y) = 0, the total differential is
g
x
0
dx + g
y
0
dy = 0;
and thus the slope of tangent line is y
0
=
¡g
x
0
g
y
0
. Therefore, the slope of normal line is
g
y
0
g
x
0
, and the line
with the directional vector (g
x
0
; g
y
0
) is normal to the level curves. In general, we have:
Theorem 41. The gradient rg are perpendicular to the level curves or surfaces g = c where g is a
function of any variable (x
1
; : : : ; x
n
).
Example 42. Consider the function
g: x
2
+ y
2
+ z
2
¡6 = 0:
the gradient of g at (1; 1; 2) is
rg(1; 1; 2) = (2; 2; 4);
56
and thus the equatio n of tangent plan is
2(x ¡1) + 2(y ¡1) + 4(z ¡2) = 0;
or equivalently
x + y + 2 z = 6 :
20 Exercises
Exercise 62. Determine the direction r^ along which the function f(x; y) = 1 + sin(πx) si n(πy) attain s its max-
imum rate of change at
¡
π
4
;
π
4
.
Exercise 63. Does a tangent plane exist at the point (0; 0) for the surface defined by the following fu nction?
f(x; y) =
8
<
:
x
2
y
x
2
+ y
2
(x; y) =/ (0; 0)
0 (x; y) = (0; 0)
:
Exercise 64. Write down the equation of tangent plane to the following functions at the given points:
a) z = x
2
+ y
2
at (0; 0; 0)
b) x
2
+ y
2
¡z
2
= 1 at (2; 1; 2).
Exercise 65. What is the position of two p lanes x + y + z = 1 and x + y + z = 3 with respect to each other.
Exercise 66. What is the position of two p lanes x + y + z = 1 and x ¡z = 3 with respect to each other.
Exercise 67. What is the position of the plane x + y + z = 3 and the line x = y = z.
Exercise 68. Find a point on the e llipsoid
x
2
a
2
+
y
2
b
2
+
z
2
c
2
= 1;
that the normal line a t that poi nt makes equal ang les with the coordinate lines.
Exercise 69. Prove that the sum of segments an arbitrary tangent plane on the surface
x
p
+ y
p
+ z
p
= a
p
;
make with the c oordinate axes is equal a.
Exercise 70. Find the angle that two surfaces
x
2
+ y
2
+ z
2
¡2x = 0; x
2
+ y
2
= 1;
make at the point
1
2
;
3
p
2
; 0
. The angle between two surfaces at a point is defin ed by the angle between their
normal ve ctors at tha t point.
Problem 1. In this problem, we are concerned with the gradient of a two-var iable function z = f(x; y). Recall
that the gra dient rf at a point (x₀; y₀) of D
f
ex ists if the partial derivatives of f are continuous at (x₀ ; y₀). In
our lectur es, we learned that on e of the fundamental pr operties of rf is that it points in the direction where f
undergoes its most significant rate of change.
Let's consider the following f unction:
f(x; y) = (x ¡ y
2
) e
¡x
2
¡y
2
:
57
To identify the maximu m point(s) of f , we can initiate the process from a point (x₀; y₀) and move in the
dir ectio n o f the gradient rf (x₀ ; y₀) to reach a new point (x₁; y₁) such that f (x₁; y₁)> f(x₀; y₀). At this new po int
(x₁; y₁), we repeat the procedure, moving along rf(x₁; y₁), and obtain another po int (x₂; y₂) with the property
f(x₂; y₂)> f (x₁; y₁). We continue this iterati ve process until we reach the maximum point (x
∗
; y
∗
).
a) Take (x
0
; y
0
) = (¡0.2; 1) and find (x
1
; y
1
) usin g the following formula:
(x
1
; y
1
) = (x
0
; y
0
) + hrf (x
0
; y
0
);
wher e h is a small number, say h = 0.1.
b) Use the same formula and fi nd (x
2
; y
2
).
If we repeat the procedu re, we will find a curve that leads us to the maximu m. The graph is shown below.
If f is interpreted as height, the graph looks like as foll ows:
In physics and engineering , we call these curves the gradient flow lines.
c) To find minimum, we should take steps in the opposite direction of rf . This means that h is a n egative
number. The following code in Matlab, gives the minimum point starting at (1; 0.5).
f=@(x,y) (x-y.^2).*exp(-x.^2-y.^2);
fx=@(x,y) (1-2*x^2+2*x*y^2).*exp(-x^2-y^2);
fy=@(x,y) -2*y*(1+x-y^2).*exp(-x^2-y^2);
x0=1;y0=0.5; h=-0.1;X=[x0,y0];
while abs(fx(x0,y0))+abs(fy(x0,y0))>0.0001
x0=x0+h*fx(x0,y0);
y0=y0+h*fy(x0,y0);
X=[X;[x0,y0]];
end
x=-2:0.1:2;
y=x';
58
imagesc(x,y,f(x,y),'alphadata',0.5)
hold on
plot(X(:,1),X(:,2),'color','r','LineWidth',1.5)
[X(end,1),X(end,2)]
Run the code and attach the graph t o your solution. What is the mi nimum point of this procedure?
59
Lecture
Chai n r ule
In this section, we'll learn the following fu ndamental concepts:
1. The Chain Rule formula for single variable functions.
2. The Enginee ring inte rpretation of the chain rule, particularly its application to changes in
density or temperature functions along a parametric curve.
3. The Geometrical interpretation of the chain rule, especially how it relates to embedding a
curve into a surface.
21 Single-variable functions
Let f(x) be a single variable function when x is itself a function of another variable t. i.e., x = x(t).
Therefore, f is in final analysis is a function of t and we can define
df
dt
(x(t)). As we learned in
previous courses, this derivative is equal to
df
dt
(x(t)) = f
0
(x(t))
dx
dt
(t):
This result is an immediate consequence of the definition of the derivative by limit:
df
dt
(x(a)) = lim
x!a
f(x(t)) ¡ f (x(a))
x(t) ¡x(a)
x(t) ¡x(a)
t ¡a
= f
0
(x(a)) x
0
(a):
y = f (x)
x(a)
f(x(a))
x(t) f(x)
a
xt
The chain rule implies the speed with that f(x(t)) changes depends on the speed of change of the
function x(t) times to t he speed at which f changes at x.
22 Multivariable chain rule- Type I
22.1 Algebraic statement
Let's consider a continuously differentiable f unction f(x; y) defined on a domain D ⊂R
2
. Assume
that both x and y are functions of a variable t, that is, x = x(t) and y = y(t). In the end, f becomes
a function of a single variable t, which we can denote as f (x(t); y(t)). With this interpretation, the
ordinary derivative of f at time t = a is possible and is equal to:
df
dt
(x(a); y(a)) = f
x
0
(x(a); y(a))
dx
dt
(a) + f
y
0
(x(a); y(a))
dy
dt
(a); (6)
60
as long as the partial derivative functions f
x
0
and f
y
0
are continuous, and moreover x(t) and y(t) are
differentiable functions. This formula is an immediate result of the differentiability of f, x and y.
To show how this results from the previous concepts, we give its proof here.
Proof. (of formula 6) By the definition of ordinary derivative, we have:
df
dt
(x(a); y(a)) = lim
t!a
f(x(t); y(t)) ¡f( x(a); y(a))
t ¡a
:
On the other hand, using the differentiability of f , we can write
f(x(t); y(t)) ¡f(x(a); y(a)) = f
x
0
(x(a); y(a)) [x(t) ¡x(a)] + f
y
0
(x(a); y(a)) [y(t) ¡ y(a)] + R;
where the reminder R i s equal to
R = o(jx(t) ¡x(a); y(t) ¡ y(a)j):
Therefore, we have
df
dt
(x(a); y(a)) = f
x
0
(x(a); y(a))lim
t!a
x(t) ¡x(a)
t ¡a
+ f
y
0
(x(a); y(a))lim
t!a
y(t) ¡y(a)
t ¡a
+ lim
t!a
R
t ¡a
:
Note that
lim
t!a
x(t) ¡x(a)
t ¡a
= x
0
(a); lim
t!a
y(t) ¡ y( a)
t ¡a
= y
0
(a);
and
lim
t!a
R
t ¡a
= lim
t!a
R
t ¡a
= lim
t!a
R
jx(t) ¡x(a); y(t) ¡y(a)j
jx(t) ¡x(a); y(t) ¡ y(a)j
t ¡a
:
Since, we have
lim
t!a
R
jx(t) ¡x(a); y(t) ¡ y(a)j
= lim
t!a
o(jx(t) ¡x(a); y(t) ¡y(a)j)
jx(t) ¡x(a); y(t) ¡y(a)j
= 0;
and x(t) and y(t) are differentiable function, we get
lim
t!a
R
t ¡a
= 0;
and then the f ormula of the chain rule is proved.
Example 43. Consider the function z = x
2
¡ y
2
and assume x = cos(!t), and y = sin(!t), where
! is a positive constant are given. In the final analysis, z is a function of the single variable t, and
thus we have:
dz
dt
= (2x(t)) (¡! sin(!t)) ¡(2y(t)) (! cos(!t)) = ¡2!(y(t) cos(!t) + x(t) sin(!t)):
61
Substituting for x(t) and y(t) with their functions, we obtain:
dz
dt
= ¡2! sin(2!t):
An alternative approach is to first calculate z(t) and then take its derivative as:
z(t) = cos
2
(!t) ¡sin
2
(!t) = cos(2!t);
which leads to
dz
dt
= ¡2! sin(2!t), the same result as before. However, as we will see later, the Chain
Rule has signifi cant engineering implications for future courses.
22.2 Implicit functions and their partial derivatives
Functions of the type g(x; y) = 0 or g(x; y; z) = 0 are called implicit functions. In the first equation,
the funct ion bounds variables x; y such that sometime o ne variable ca be solved in terms of another
variable. The set of points that satisfies an implicit function, say g(x; y) = 0 is generally called the
level set. This set may be empty, including one point or a curve in the xy-plane. For example, the
function x
2
+ y
2
+ c = 0 has empty solution if c > 0, consisting one point of c = 0, and a circle if c < 0.
Based on a fundamental fact in mathematics, the implicit function g(x; y) = 0 can be solved explic-
itly for y in terms of x in an open interval, if
i. there exists a point (x
0
; y
0
) such that g(x
0
; y
0
) = 0 and
ii. the relation g
y
(x
0
; y
0
) =/ 0 holds.
For example, the function x
2
+ y
2
= 1 holds for (x
0
; y
0
) = (0; 1), and at this point, we have
g
y
(0; 1) = 2yj
(0;1)
=2 =/ 0:
Note that, the given implicit function can be solved for y as y(x) = 1 ¡x
2
p
in t he inte rval (¡1; 1).
The positive branch is chosen to satisfy the condition (0; 1 ). If (x
0
; y
0
) changes to (0; ¡1), then we
can choose the function y(x) = ¡ 1 ¡x
2
p
in the interval (¡1; 1). Note also that at the point ( 1 ; 0)
or (¡1; 0), there is no an op en set containing the given point that the implicit function is solved for x.
The implicit function g(x; y; z) = 0 defines a surface if we assume that z = z(x; y). In this case, the
partial derivatives are
g
x
+ g
z
z
x
= 0; g
y
+ g
z
z
y
= 0:
If y = y(x) and z = z(x), the function defines a curve. In this case , the partial derivative with
respect to x is just the total derivative
dg
dx
: =g
x
0
+ g
y
0
dy
dx
+ g
z
0
dz
dx
= 0:
22.3 Engineering inte rpretation of chain rule
Let T (x; y) be a given temp erature distribution over the plane xy, and let r(t) = (x(t); y(t)) be a
curve in this p lane. The restrictio n of T to this curve is just T (r(t)) = T (x(t); y(t) ). The figure
below depicts this scenario for a specific temperature function and a curve r(t):
62
A natural question arises: how the temperature T changes along r? In previous lectures, we learned
tow a multivariab le function changes in a given direction r
^
, which is called the directional derivative.
The generalization of directional derivative is the derivative along a curve r(t). According to the
formula (6), the rate of change of T along r(t) is:
dT
dt
(r(t)) = rT (r(t)) ·r
0
(t);
where r
0
(t) = (x
0
(t); y
0
(t)). But what is r
0
(t)? from the geometrical point of view, r
0
(t) at any fixed
t = t
0
is the tangent vector on the curve r(t) at t = t
0
.
Recall that rT (r(t)) ·
r
0
(t)
jr
0
(t)j
is just the directional derivative of T along the direction r^ =
r
0
(t)
jr
0
(t)j
.
What is the physical meaning of r
0
(t)? We can interpre t r(t) as the trajectory or path of mass
particle moving in the field T (x; y). If r(t) repre sent the location of this partic le at time t, then
r
0
(t) represents the velocity vector of this mass particle.
Example 44. Let T (x; y) = xye
¡x
2
¡y
2
is a given temperature filed. A person runs along the path
r(t)= (cos(t); sin(t)) in this filed. Determine the rate of change of temperature the person experience
in this travel. Determine the rate of change of temperatu re at time t = π:
Solution 1. We have
T
x
0
(x; y) = y(1 ¡2x
2
) e
¡x
2
¡y
2
, T
y
0
(x; y) = x(1 ¡2y
2
) e
¡x
2
¡y
2
;
and then
T
x
0
(r(t)) = ¡sin(t) co s(2t) e
¡1
; T
x
0
(r(t)) = cos(t) cos(2t) e
¡1
Ther efore
dT
dt
(r(t)) = (¡sin(t) cos(2t) e
¡1
)(¡sin(t)) + (cos(t) cos(2t) e
¡1
)(cos(t)) = cos(2t) e
¡1
:
Note that we initia lly c ould calculate T (r(t)) =
e
¡1
2
sin(2t), and then
dT
dt
(r(t)) = e
¡1
cos(2t) .
63
At time t = π, the rate of change of the temperature is
dT
dt
(r(π)) = e
¡1
which is positive implying th at the person
ex perience of decreases of temperature at this time.
The rea der can imaging the sign of t he rate of change at time t =
π
2
or t =
3π
2
.
Example 45. Suppose the mass density function of some substance is given by
ρ(x; y) = e
¡x
2
¡y
2
:
A particle moves along the hyperbola x
2
¡y
2
= 1 given by the mapping r(t) = (cosh(t); sinh(t)).
a) Determine the location and the density of the particle at time t = 0 .
b) At what rate does the den sity changes at this time?
c) Justify your answer.
Solution. Note that the given parametric mapping is a true paramet rization of the hyperbola x
2
¡ y
2
= 1, as:
cosh
2
(t) ¡sinh
2
(t) = 1:
a) The location of the particle at t = 0 is (1; 0), and its den sity is ρ
0
= e
¡1
.
b) The density of the particle at arbitr ary t is
ρ(t) = e
¡cosh(2t)
;
wher e we us ed the formula: cosh
2
(t) + sinh
2
(t) = c osh(2t). Ther efore, the rate of change o f this particle at
ar bitrary t is:
dρ
dt
= ¡2 sinh(2t) e
¡cosh(2t)
:
At time t = 0, this rate o f change is
dρ
dt
t=0
= 0:
c) To justify t his answer, we note that the level cu rve of the density fun ction is circle s centered at the origin,
and thus the circle
x
2
+ y
2
= e
¡1
;
is a curve passing through the point (1; 0) of constant den sity ρ = e
¡1
. On the other hand, the path of the
particle following the hyperbola x
2
¡ y
2
= 1 with the parametrization r(t) is tangent to this leve l curve.
Thus, the rate of change of the density is zer o:
64
-1 0 1 2
-1
-0.5
0
0.5
1
22.4 Geometrical interpretation of chain rule
Using chain rule, we can show that the gradient of an implicit function g(x; y; z) = 0 is perpendicular
to the surface S defined by this function. To show that, let the curve r(t) defined by the functions
x = x(t), y = y(t) and z = z(t) be an arbitrary curve on this surface. This means that there is an
open interval (t
0
; t
1
) such that
g(x(t); y(t); z(t)) ≡0; t 2(t
0
; t
1
)
where ≡ stands for identically zero. This implies that
dg
dt
(x(t); y(t); z(t)) ≡0, that using chain rule,
we can write
rg(x(t); y(t); z(t)) ·
dx
dt
;
dy
dt
;
dz
dt
≡0:
The vector
dx
dt
;
dy
dt
;
dz
dt
is tangent vector on the surface S for any fixed t, and thus rg(x(t); y(t);
z(t)) is perpendicular to this tangent vector. Since the curve r(t) is arbitrary, then rg(x(t); y(t);
z(t)) is perpendicular to the surface S.
r
2
(t)
r
1
(t)
rg
S: g = 0
x
y
z
23 Chain rule- Type II
Consider a function z = f(x; y) and let x and y be functions of two indep endent variables t and s,
i.e., x = x(t; s) and y = y(t; s). In subsequent chapters, we will present the geometrical interpretation
of this type of mappings in greater d etail. For now, we o nly present the formula for the chain rule.
Since in the final analysis the function z is a function of two variables t and s, we can determine
the partial derivatives of z with respect to these two variables. Assuming that f , x, and y are
differentiable functions of their variables, the partial derivatives of f are defined as:
@z
@t
= f
x
0
(x(t; s); y(t; s))
@x
@t
+ f
y
0
(x(t; s); y(t; x))
@y
@t
;
65
and similarly
@z
@s
= f
x
0
(x(t; s); y(t; s))
@x
@s
+ f
y
0
(x(t; s) ; y(t; s))
@y
@s
:
The poof of these formula is almost similar to the proof of the cha in rule of type-I.
Example 46. Consider a function f(x; y), and assume that x = t ¡s, and y = t + s. The following
figure shows the geometry of this composition:
t
s
x
y
x(t; s)
y(t; s)
f(x; y)
R
D
D
1
Here the function can also denote the mass density of the region D
1
in the xy-plane or any other
physical quantity. The partial derivative
@f
@t
measures how the final value of f changes with hori-
zontal change of t in the domain D in ts-plane. For instance, let f be given by f(x; y)= xe
¡y
. Then,
the partial derivatives are respectively
f
t
0
= (e
¡y
) (1) + (¡xe
¡y
)(1) = e
¡y
(1 ¡x) = e
¡t¡s
(1 ¡t + s);
f
s
0
= (e
¡y
) ( ¡1) + (¡xe
¡y
)(1) = ¡e
¡y
(1 + x) = ¡e
¡t¡s
(1 + t ¡s):
Example 47. The polar coordinate is a mapping of the above form. Consider a function f(x; y)
where x = r cos(θ) and y = r sin(θ) of two variables r; θ, where 0 ≤r < 1 and ¡π ≤θ ≤π. This is
shown below:
r
π
¡π
θ
0
r
0
θ
0
r
0
x
y
θ
R
f(x; y)
x = r cos(θ)
y = r sin(θ)
If a particle move horizontally with θ = θ
0
, the function f(r cos(θ
0
); r sin(θ
0
)) (that can represent
any physical quantity over the xy-plane) changes with the rate
f
r
0
(r; θ
0
) = f
x
0
(r cos(θ
0
); r sin(θ
0
)) cos(θ
0
) + f
y
0
(r cos(θ
0
); r sin(θ
0
)) sin(θ
0
):
66
Similarly, if a particle moves vertically, the functions f changes appropriately.
24 Exercises
Exercise 71. Let y = f (x) be a differentiable single-variable function where x = x(t; s) is a function of two
variables. Find
@y
@t
and
@y
@ s
. In particular if x = t
2
+ s
2
show that y s ati sfie s the equation
¡s
@y
@t
+ t
@y
@s
= 0:
Exercise 72. Consider the function z = xy, where x = e
t
and y = e
¡t
. What is
dz
dt
?
Exercise 73. Show that the functions of the form f(x; y) = h(y ¡x
2
) for arbitrary smooth functions h sat isfies
the equation
f
x
0
+ 2xf
y
0
= 0:
Exercise 74. Consider the following system
u + v = x + y
xu + yv = 1
:
Assuming that u = u(x; y) and v = v(x; y), det ermine u
x
and v
y
.
Exercise 75. Let z = z(x; y) tha t satisfies the equations
x = u + v; y = u
2
+ v
2
; z = u
3
+ v
3
:
Find
@z
@x
and
@z
@y
.
Exercise 76. Assume that the curve r(t) = (x(t); y(t)) is a level cu rve of the function z = f (x; y). Show that
rf (r(t)) is perpendicula r to r
0
(t). This proble m just ifies the fact that rf is perpendi cular to the level curves.
Exercise 77. A functi on f (x; y) is called homogeneous of order n if
f(λx; λy) = λ
n
f(x; y);
for any λ =/ 0. Use the following relation
xf
x
0
(x; y) + yf
y
0
(x; y) = nf (x; y):
Exercise 78. Find f
x
0
if f = f(x; y; z); y = φ(x) and z = (x; y).
Exercise 79. In the above example , suppose t hat the particle follows the following rule alon g the hyperbola
x
2
¡ y
2
= 1:
r(t) = (cosh(t ¡1); sinh(t ¡1)):
At time t = 0, this particle is at the point (cosh(1); ¡ sinh(1)), and it arrive at the point (1; 0) at time t = 1. Show
the relation:
dρ
dt
(r(t))j
t=1
= 0:
Similarly, the particle can move along the given hyperbola in differe nt ways, for instances
r(t) = (cosh(1 ¡t); sinh(1 ¡t)); γ(t) = (cos h(2t); sinh(2t)):
67
Explain the motion of the particle according to each given para metric function r(t) and show that for all them,
we h ave
dρ
dt
(r(t)) = 0;
at the time of thei r passing through the point (1; 0). Note that the gradient of ρ = e
¡1
at the point (1; 0) is
parallel to the hyperbola x
2
¡ y
2
= 1 at this point.
Exercise 80. A runner is following the path of a hyperbola given by r(t) = (cosh(αt); sinh (αt)) in a field with a
temperature distribution represented by T (x; y) =30e
¡x
2
¡y
2
. Let's assume that the runner is wearing a wristwatch
with markings ranging from T = 0 to T = 30. Find t he angul ar velocity of the watch's ha nd in terms of α. Create
a plot depicting the angular veloc ity a s a function of time for α = 1; 2, within the time interval [¡2; 2]. Your graph
should be similar to the one depicted below
Exercise 81. Consider a met al wire that can be described by the fun ction y = g(x).Assume that ρ(x; g(x)) is
the mass density function of this metal wire.
(x; g(x))
x
ρ(x; g(x))
y
If ρ is not a constant fu nction, give a condition such that the rate of change of the density is zero.
Exercise 82. Write the equation of tangent pl ane on t he surfa ce of the implicit function ze
xy
= e
z
at the point
(1; 1; 1).
Exercise 83. Show that the direct ional derivative of the functi on f(x; y) =
y
2
x
alo ng the normal direction to the
elli pse 2x
2
+ y
2
= c
2
for x =/ 0 is always zero.
Exercise 84. Find the directional derivative of the function f (x; y; z) = x
2
+ y
2
+ z
2
alo ng the norma l vector to
the ellipsoid
x
2
a
2
+
y
2
b
2
+
z
2
c
2
= 1 on the surface.
Exercise 85. Find the unit nor mal vector n
^
on the surface:
x
2
+ y
2
+ z
2
= c
2
;
and then find the directional derivative of the function f (x; y; z) = xyz at the point
c
3
p
;
c
3
p
;
c
3
p
.
Exercise 86. find z
x
0
and z
y
0
if g(x; y; z) = 0 and z = '(x; y).
Exercise 87. Let h(u; v) is a differ entiable function and u = y ¡z, v = z ¡x. Show that the function h satisfie s
the relation
h
x
0
+ h
y
0
+ h
z
0
= 0
68
Exercise 88. Consider the function z = 1 + sin(πxy), and let x; y are given in terms of independent variable t; s as:
x(t; s) = a
1
t + b
1
s; y(t; s) = a
2
t ¡b
2
s;
wher e a
1
; b
1
; a
2
and b
2
are constants. Determine
@z
@t
;
@z
@s
and
@
2
z
@t
2
;
@
2
@s
2
and
@
2
@t@s
.
Problem 2. Assume that single variable functions f(u); g(v) are smooth. Define the funct ion
w = f(u) + g(v);
wher e u = αx + βy and v = βx + αy. We assume that α
2
¡ β
2
=/ 0 and α:β =/ 0.
a) Ca lcula te w
xx
; w
yy
and w
xy
.
b) Find an expression in the form:
1
A
w
xx
+
1
B
w
yy
+
1
C
w
xy
= 0:
Determine A; B and C.
69
Lecture
Taylor polynomials
In this section, we present the notion of the Taylor polynomial for functions of two variables:
1. Taylor polynomials
2. Hessian matrix
25 Single-variable functions
A single-variable continuously differentiable function of order r f(a) can be approximated at a point
x = a in terms of polynomials in the set f1; x ¡a; : : : ; (x ¡a)
r
g as
f(x) ≈c
0
+ c
1
(x ¡a) + ···+ c
r
(x ¡a)
r
;
where c
j
can be determined if we assume that the approximation is exact for derivatives up to order
of r, that is,
f
(j)
(a) =
d
dx
fc
0
+ c
1
(x ¡a) + ···+ c
r
(x ¡a)
r
g
x =a
;
for j = 0;:::; r. It is simply seen that c
0
= f (a); c
1
= f
0
(a) and in general c
j
=
1
j!
f
(j)
(a). This is called
the Taylor polynomial
f(x) ≈f(a) + f
0
(a)(x ¡a) + ···+
1
r!
f
(r)
(a) (x ¡a)
r
:
In particul ar, or a single-variable functio n f (x) differentiable of order 2, we can approximate the
function at x = a as
f(x) = f (a) + f
0
(a) (x ¡a) +
1
2
f
00
(a) (x ¡a)
2
+ o(jx ¡aj
2
);
where o(jx ¡aj
2
) is understood in t he sense
lim
x!a
o(jx ¡aj
2
)
jx ¡aj
2
= 0:
The first two terms of the right hand side is just the linear approximation:
f(x) = f(a) + f
0
(a) (x ¡a) + o(jx ¡aj);
and the extra term
1
2
f
00
(a) (x ¡ a)
2
makes the approximation precise of order o(jx ¡ aj
2
). For
example, the function f(x) =
1
1 + x
2
can be approximated at x = 0 of order 2 by the above f ormula a s
f(x) ≈1 ¡x
2
:
70
This result, in particular, helps us to have an imagine of the given function in adjacent of point
x = 0 as the derivative f
0
(0) = 0 does not provide us with significant information about f at this
point expect this point is a critical point.
In general, a critical point for a function f (x) is a point that either f
0
= 0 at that point or f
0
does
not exist at that point. The important result which is known as Fermat's theorem states that if f
is different iable at x = a and if x = a is a maximum or minimu m point for f , then f
0
(a) = 0. The
reverse of course does hold, that is, the equality f
0
(a) = 0 does not imply that x = a is a maximum
or minimum point for f.
26 Taylor polyno mial for two-variable functions
26.1 Polynomials of order 2
A two-variable function f (x; y) can be approximated at a point (a; b) in terms of the polynomials
in the set f1; x ¡a; y ¡b; (x ¡a)
2
; (y ¡b)
2
; (x ¡a)(y ¡b); : : : g as
f(x; y) ≈c
0
+ c
1
(x ¡a) + c
2
(y ¡b) + c
3
(x ¡a)
2
+ c
4
(x ¡a) (y ¡b) + c
5
(y ¡b)
2
+ ···
If the partial derivatives of f are continuous, the constants c
j
can be determined as follows. For x = a;
y = b, the right-hand side is reduced to c
0
and the left-hand side is f (a; b) and thus c
0
= f(a; b). To
determine c
1
, we can calculate f
x
0
and substitute x = a; y = b that results c
1
= f
x
0
(a; b ). Continuing
this procedur e, we obtain:
c
2
= f
y
0
(a; b); c
3
=
1
2
f
xx
00
(a; b); c
4
= f
x y
00
(a; b); c
5
=
1
2
f
yy
00
(a; b); ···:
Thus, one can write f(x; y) approximately as follows up to order 2:
f(x; y) ≈ f(a; b) + f
x
0
(a; b) (x ¡a) + f
y
0
(a; b) (y ¡b) +
1
2
f
x x
00
(a; b)(x ¡a)
2
+
f
x y
00
(a; b)(x ¡a) (y ¡b) +
1
2
f
yy
00
(a; b)(y ¡b)
2
:
Note that the terms of second-order derivative can be put in the matrix form as
1
2
(
x ¡a; y ¡b
)
"
f
x x
00
(a; b) f
xy
00
(a; b)
f
xy
00
(a; b) f
yy
00
(a; b)
#
x ¡a
y ¡b
;
71
and thus, we can rewrite the above formula as follows:
f(x; y)≈f (a;b)+
f
x
0
(a; b) f
y
0
(a; b)
x ¡a
y ¡b
+
1
2
(x ¡a; y ¡b)
"
f
xx
00
(a; b) f
xy
00
(a; b)
f
xy
00
(a; b) f
y y
00
(a; b)
#
x ¡a
y ¡b
The square matrix at the right is called Hessian matrix after the German mathematician Otto Hesse,
and is denoted as:
H
f
(a; b) =
"
f
x x
00
(a; b) f
xy
00
(a; b)
f
xy
00
(a; b) f
yy
00
(a; b)
#
:
Example 48. Consider the function
f(x; y) = xe
y
+ ye
x
:
The Taylor polynomial of order 2 of the function at (0; 0) is:
f(x; y) ≈x + y + 2xy:
The Hessian matrix of this function is
H
f
(0; 0) =
0 2
2 0
;
and then the second-ord er polynomial of the Taylor series is:
1
2
(x; y)
0 2
2 0
x
y
= 2xy:
The expression at the right is a very good approximation of function for points (x; y) in adjacent of
(0; 0). The figure below shows the original function and its polynomial approximation in the same
coordinate:
Note that in the approximation function z = x + y + 2xy, the linear term is just the equation of
tangent plane on the surface of f at the point (0; 0):
¡x ¡ y + z = 0:
The figure below shows the surface and its tangent plane at (0; 0; 0):
72
Note that this plane with the equation z = x + y satisfies the main property of the approximation,
that is,
lim
(x;y)!(0;0)
f(x; y) ¡z
x
2
+ y
2
p
= lim
(x;y)!(0;0)
xe
y
+ ye
x
¡x ¡ y
x
2
+ y
2
p
= lim
(x;y)!(0;0)
2xy
x
2
+ y
2
p
= 0:
Example 49. In this example, we show how the Taylor polynomial helps us to figure out the shape
of a function at a point. Let's consider the function f (x; y) = e
x
2
+y
2
and. It is simply seen that
f
x
0
(0; 0) = f
y
0
(0; 0) = 0 and moreover:
f
x x
00
(0; 0) = 2; f
yy
00
(0; 0) = 2; f
xy
00
(0; 0) = 0
Using the Tayl or polynomial for f , we can write it as:
f(x; y) ≈f( 0; 0) +
1
2
(
x y
)
2 0
0 2

x
y
= 1 + x
2
+ y
2
:
This means that the function f in a neighborhood of (0; 0) looks like the function 1+x² + y². This
function is a paraboloid shown below, and as we observe, the po int (0; 0) is a local minimum for the
new function. This implies that the function f (x; y) attains its local minimum at (0; 0) too. The
figure below shows the two surfaces together:
Now, let's consider the fu nction g(x; y) = e
¡x
2
¡y
2
. Again, it is seen that g
x
0
(0; 0) = g
y
0
(0; 0) = 0 and
the Taylor polynomial of order 2 for g is:
g(x; y) ≈1 +
1
2
(
x y
)
¡2 0
0 ¡2

x
y
= 1 ¡x
2
¡y
2
:
The surface of g and its Taylor approximation is shown below. As we observe, the point (0; 0) is a
local maxima for the function g as the paraboloid 1 ¡x
2
¡y
2
has a maximum a t this po int.
73
Now, consider the function h(x; y) = e
x
2
¡y
2
. The Taylor polynomial for this function at (0; 0) is:
h(x; y) ≈1 +
1
2
(
x y
)
2 0
0 ¡2

x
y
= 1 + x
2
¡y
2
:
Hence, the function h resembles a saddle in the vicinity of (0; 0). The surface of h and its Taylor
polynomial approximation is shown below.
As we observe, the point (0; 0) is neither a maximum nor a minimum point. Along the direction
y = 0, the Taylor polynomial looks like 1 + x
2
, and thus (0; 0) along this direction is a minimum.
Along the direction x = 0, the Taylor p olynomial becomes 1 ¡ y
2
, and thus (0; 0) along y-direction
is a maximum. Points of this type are called sadd le points.
26.2 Polynomials of order n
In general, the Taylor polynomials of a smooth function f(x; y) of order n at a point (a; b) can be
written as
f(x; y) ≈ f(a; b) +
X
k=1
n
1
k!
(x ¡a)
@
@x
+ (y ¡b)
@
@y
k
f(a; b):
where
(x ¡a)
@
@x
+ (y ¡b)
@
@y
k
f :=
X
j=0
k
k!
(k ¡ j)! j!
(x ¡a)
k¡j
(y ¡b)
j
@
k¡j
f
@x
k¡j
@
j
f
@y
j
:
74
For example, for k = 2, we have
(x ¡a)
@
@x
+ (y ¡b)
@
@y
2
f(a; b) = (x ¡a)
2
f
xx
00
(a; b) + 2 (x ¡a) (y ¡b) f
xy
00
(a; b) + (y ¡b)
2
f
yy
00
(a; b):
In particular, for a = b = 0, the series is called the Maclaurin's series:
f(x; y) ≈ f(0; 0) +
X
k=1
n
1
k!
x
@
@x
+ y
@
@y
k
f(0; 0):
It turns out that the approximation is exact of order n, that is, for r = (x; y), we have
lim
x!(0;0)
f(x; y) ¡T
n
(x; y)
jrj
n
= 0;
where
T
n
(x; y) = f(0; 0) +
X
k=1
n
1
k!
x
@
@x
+ y
@
@y
k
f(0; 0):
27 Taylor polyno mials for three-variable functions
A smooth function f(x; y; z) can be expanded at a point (a; b; c) in terms of the polynomials x ¡a;
y ¡b and z ¡c. The linear approximation is
f(x; y; z) ≈f(a; b; c) + f
x
0
(a; b; c) (x ¡a) + f
y
0
(a; b; c) (y ¡b) + f
z
0
(a; b; c) (z ¡c):
The higher-order expansion is completely similar to two-variable functions. For e xample, the second-
order term of the expansion includes the terms
(
x ¡a y ¡b z ¡c
)
2
6
6
4
f
x x
00
f
xy
00
f
xz
00
f
xy
00
f
yy
00
f
yz
00
f
xz
00
f
yz
00
f
zz
00
3
7
7
5
0
@
x ¡a
y ¡b
z ¡c
1
A
:
The hessian matrix in this case is the matrix in the middle, i.e.,
H
f
:=
2
6
6
4
f
x x
00
f
xy
00
f
xz
00
f
xy
00
f
yy
00
f
yz
00
f
xz
00
f
yz
00
f
zz
00
3
7
7
5
:
28 Exercise
Exercise 89. The Taylor polyn omial for a two-variable function f (x; y) can be derived using the form ula fo r
the s ingle variable functions. If we consider f (x; y) as a function of x, we can write
f(x; y) ≈ f(a; y) + f
x
0
(a; y)(x ¡a) +
1
2
f
x
00
(a; y)(x ¡a)
2
+ ···
75
Substitute the expansi ons of f (a; y) and f
x
0
(a; y) and f
x x
00
(a; y) in the series and obtain the Taylor formula up to
or der 2.
Exercise 90. Write down the Taylor polynomi al of t he function f (x; y) =
1
1 + x
2
+ y
2
of order 2 at the point (0; 0).
Exercise 91. If f (x; y) is a polynomial of ord er N , show that f (x; y) =T
N
(x; y), where T
n
(x; y) is the Maclaurin's
se ries of f .
Exercise 92. Expand t he function f(x; y) = e
x
sin(y) up to order three at (0; 0). Comp are the result wit h the
multipl icatio n of the Maclaurin's series of functions e
x
and sin(y).
Exercise 93. Expand the function f (x; y) = cos(x) cos (y) up to order thre e at (0; 0). Co mpare the result with
the multiplication of the Maclaurin's series of functions cos(x) and cos(y).
76
Lecture
Critical points and loc al extrema
In this section, we will explore the following fundamental concepts:
1. Critical points.
2. The maximum and minimum points of a function.
3. Hessian matrix and the classification of critical points.
29 Single-variable functions
It is often happen in engineering to study the behavior of a function f(x) near a point x = a, a focal
or working point. To do that, the best approach is to linearize the function at this point and study
the linear function:
T (x) = f(a) + f
0
(a)(x ¡a):
However, when f
0
(a) = 0, we need one more order of derivative and use the quadratic form:
f(x) ≈f(a) +
1
2
f
00
(a) (x ¡a)
2
:
Evidently, if f
00
(a) > 0, the function look like a parabola at in vicinity of x = a with a minimum at
this point. In fact,
f(x) ¡f(a) ≈
1
2
f
00
(a) (x ¡a)
2
> 0;
for all x in an interval a round a. If f
00
(a) < 0, then
f(x) ¡f(a) ≈
1
2
f
00
(a) (x ¡a)
2
< 0;
and thus x = a is a maximum point for the function. If f
00
(a) = 0, we need higher-order terms
to determine the nature of the point x = a. In particular, if f
000
(a) =/ 0, the function looks like a
polynomial of order 3 as:
f(x) ≈ f (a) +
1
6
f
000
(a) (x ¡a)
3
:
In this case, x = a is an inflection point for f .
In general, a point x = a is called a local maximum of a function f(x), if there exist an interval
I = (a ¡δ; a + δ) 2D
f
such that
f(x) ≤ f (a); 8x 2I:
77
Similarly, we can define a local minimum point for a single variable function. Note that being a
local max or min point, the point should be in an open interval in the domain of the function, and
not for example, on the boundary of the domain.
Even though , being a local max or min point does not need that the function to be differentiable,
the reverse is imp ortant for us.
Theorem 50. (Fermat) Assume that a function f is differentiable at x = a, and that x = a is a
local min or max point for f, then f
0
(a) = 0.
The proof is an immedia te result of the definition of derivative:
f
0
(a) = lim
δx!0
f(a + δx) ¡ f(a)
δx
:
If a is a maximum point and δx !0
+
, then f
0
(a) ≥0, and if δx !0
¡
, then f
0
(a) ≤0, that implies
f
0
(a) = 0. A similar pro of holds if a is minimum point.
30 Critical points
Definition 51. A point ( a; b) is termed a critical point of a function (x; y) if either of the following
conditions holds:
1. f
0
(a; b) = [
0 0
], which signifies that the gradient of f at (a; b) is zero. In turn, the rate o f
change of f at (a; b) along any direction is zero.
2. That f is not differentiable at this point, this means that either f
x
0
(a; b); f
y
0
(a; b) does not exist
or the partial derivative functions f
x
0
; f
y
0
are not continuous at (a; b).
Example 52. The point (0; 0) is a critical point for the function f (x; y) = x
2
+ y
2
p
as partial
derivatives f
x
0
(0; 0); f
y
0
(0; 0) do not exist. For example, we have
f
x
0
(0; 0) = lim
x!0
x
2
p
x
;
which does not exist. This p oint is also a critical point for the function
f(x; y) =
8
<
:
x + y +
x
2
y
x
2
+ y
2
(x; y) =/ (0; 0)
0 (x; y) = (0; 0)
:
Even though, we have f
x
0
(0; 0) = f
y
0
(0; 0) = 1, the partial derivative functions f
x
0
and f
y
0
are not
continuous at this po int. The point (0; 0) is a critical point for the function f( x; y) = x
2
+ y
2
as
f
0
(0; 0) = [
0 0
].
Example 53. Consider the function
f(x; y) = xe
y
+ ye
x
:
78
The partial derivative functions are:
f
x
0
(x; y) = e
y
+ ye
x
; f
y
0
(x; y) = xe
y
+ e
x
:
Thus, we reach the following system for the critical p oint(s):
e
y
+ ye
x
= 0
xe
y
+ e
x
= 0
:
By the symme try, we can assume x = y, and obtain x = y = ¡1. Thus, at the obtained point, we
have f
0
= [
0 0
]. Let's write the Taylor polynomial of the function at this point. We have
f
x x
00
(¡1; ¡1) = f
yy
00
(¡1; 1) = ¡e
¡1
; f
xy
00
(¡1; 1) = 2e
¡1
:
Therefore, the Taylor polynomial of the function is
f(x; y) u ¡2e
¡1
¡
1
2
e
¡1
(x + 1)
2
¡
1
2
e
¡1
(y + 1)
2
+ 2e
¡1
(x + 1) (y + 1):
A simple simplifying yields:
f(x; y) ≈¡e
¡1
1 +
1
2
x
2
+
1
2
y
2
¡2xy ¡x ¡y
:
The figure below shows this function. As it is observed, the function looks like a saddle in vicinity
of this critical point.
Definition 54. A point p = (a; b) is regarded as an isolated critical point for a function f(x; y)
if there exists an open disk B
r
(p) for some r >0 such that within this disk, the function f has no
critical points other than p.
For example, consider the function
f(x; y) =
(
0 x
2
+ y
2
< 1
x
2
+ y
2
¡1 x
2
+ y
2
≥1
:
The p oints on the circle x
2
+ y
2
= 1 are critical points of the function as the partial derivative
functions are not continuous on the circle x
2
+ y
2
= 1 even though the function is continues at the
circle. For this rea son, the points on this circle is not an isolated critical points as any neighborhood
of one point on this circle, contains infinitely many other points on the c ircle.
79
31 Local ma x and min
Definition 55. Assume that the function f is defined in an open domain D
f
. A point p = (a; b) 2D
f
is termed a local maximum point of f if there exists an r >0 such that the open ball B
r
(p) ⊂D
f
and
for all (x; y)2B
r
(p), we have: f (x; y) > f(a; b). Similarly, a point p = (a; b) 2D
f
is considered a
local minimum point of f if there is an r>0 such that B
r
(p) ⊂D
f
, and for all (x; y) 2B
r
(p), we
have: f (x; y) < f (a; b).
B
r
(p)
p
D
f
x
y
Theorem 56. If (a; b) is either a local max or min point for a function f(a; b) and if f is differ-
entiable at this point, then f
0
(a; b) = [
0 0
].
The proof of the theorem is similar to the single-variable case. Since f is differentiable at (a; b),
then it is enough to show that f
x
(a; b) = f
y
(a; b) = 0. Without loss of generality, assume that ( a; b)
is a local min point. Note that
f
x
(a; b) = lim
x!a
f(x; b) ¡ f (a; b)
x ¡a
;
and if x > a , we obtain f
x
(a; b) ≥0, and if x < a, we obt ain f
x
(a; b) ≤0 that gives f
x
(a; b) = 0. The
proof for f
y
(a; b) is completely similar.
However, b eing a max or min point does not necessary implies that the function is differentiable at
the point. For example, the point (0; 0) is a local min for the function f(x; y) = x
2
+ y
2
p
, however,
the function is not differentiable at this point. On the other hand, the condition f
0
(a; b) = 0 do es
not imply that f has a local min o r max at (a; b).
Therefore, to determine the local max and min for a differentiable function f, we can solve the
system f
0
= 0, f or example, for a two-variable function f (x; y), the system reads
(
f
x
0
(x; y) = 0
f
y
0
(x; y) = 0
:
The solution(s) of the above system is a candidate for being local min or max of the equation. How
can we determine if a solution of the above system is a local min, local max or none of them? We
present a theorem for twic e differentiable functions f(x; y). Recall from the previo us lecture the
Taylor formula:
f(x; y) ≈f( a; b) + f
0
(a; b)
x ¡a
y ¡b
+
1
2
(
x ¡a y ¡b
) H
f
(a; b)
x ¡a
y ¡b
:
If f
0
(a; b) = [
0 0
], then
f(x; y) ¡ f(a; b) ≈
1
2
(
x ¡a y ¡b
) H
f
(a; b)
x ¡a
y ¡b
:
80
Therefore, if (a; b) is a maximum point, then
(
x ¡a y ¡b
) H
f
(a; b)
x ¡a
y ¡b
≤0;
and if (a; b) is a local min, then
(
x ¡a y ¡b
) H
f
(a; b)
x ¡a
y ¡b
≥0:
Therefore, being a local min or max depends on the Hessian matrix H
f
(a; b). We have the following
theorem
Theorem 57. Assume that f is a twice differentiable function and f
0
(a; b) = [
0 0
]. Then (a; b
0
) is:
a) a maximum point of f if det(H
f
(a; b)) > 0 and f
xx
00
(a; b) < 0,
b) a minimum point of f if det(H
f
(a; b)) > 0 and f
xx
00
(a; b) > 0,
c) a saddle point of f if det(H
f
(a; b)) < 0.
If det(H
f
(a; b)) = 0, additional information is needed to determine the type of the point.
Example 58. Let f
1
(x; y) = x
2
+ y
2
, f
2
(x; y) = ¡x
2
¡y
2
and f
3
(x; y) = x
2
¡y
2
. The point (0; 0) is
an isolated critical point for all the given functions. Their Hessian matrices are:
H
f
1
(0; 0) =
2 0
0 2
; H
f
2
(0; 0) =
¡2 0
0 ¡2
; H
f
3
(0; 0) =
2 0
0 ¡2
:
We have det(H
f
1
) = det(H
f
2
) > 0 , but
@
2
f
1
@x
2
> 0 and
@
2
f
2
@x
2
< 0, and then (0; 0 ) is a local minimum for
f
1
and a local maximum for f
2
. This point is a local saddle point for f
3
as det(H
f
3
) < 0. The figures
below depict the surfaces of this funct ions
81
Example 59. Consider the function f( x; y) = x
2
+ y
2
+ 2αxy, where α =/ ±1. Let's determine the
critical point s of the given function first. The system reads
2x + 2αy = 0
2y + 2αx = 0
:
Eliminating x reduces to (α
2
¡1)y = 0, and thus y = 0 as α =/ ±1. Thus, (0; 0) is the only critical
point of the given function. The Hessian matrix at the given point is
H
f
(0; 0) =
2 2α
2α 2
;
and thus det(H
f
(0;0 ))=4(1¡α
2
). Therefore, the point (0; 0) is a local min if ¡1< α < 1 and a saddle
if α > 1, or α < ¡1. It is interesting to note the level curves of this function. For ¡1< α <1, the curves
x
2
+ y
2
+ 2αxy = C
are ellipses as shown below. In this case, the multiplicative term only rotate a horizontal ellipse to
some axis. For α > 1 or α < ¡1, the level curves are some rotated hyperbola.
The surfaces of these functions are shown below. The figure on the left is for α =
1
2
and on the left
for α = 2.
Example 60. Consider the function f(x; y) = xye
¡x
2
¡y
2
. This function has five isolated critical
points:
(0; 0);
2
p
2
;
2
p
2
;
2
p
2
; ¡
2
p
2
;
¡
2
p
2
;
2
p
2
;
¡
2
p
2
; ¡
2
p
2
:
The Hessian matrix for this function is:
H
f
= e
¡x
2
¡y
2
"
¡2xy(3 ¡2x
2
) (1 ¡2x
2
)(1 ¡2y
2
)
(1 ¡2x
2
)(1 ¡2y
2
) ¡2xy(3 ¡2y
2
)
#
:
82
Let's evaluate the Hessian matrix at these critical points:
• At (0; 0), H
f
(0; 0) is:
H
f
(0; 0) =
0 1
1 0
;
The determinant of H
f
(0; 0) is negative, implying t hat (0; 0) is a saddle point. In fact , f
increases along the direction of y =x and decreases along the direction of y =¡x, even though
the rate of change of f at (0; 0) is zero.
• At
2
p
2
;
2
p
2
and
¡
2
p
2
; ¡
2
p
2
the Hessian matrix becomes:
H
f
= e
¡1
¡1 0
0 ¡1
:
These points are maximum points of f .
• At
2
p
2
; ¡
2
p
2
,
¡
2
p
2
;
2
p
2
the Hessian matrix becomes:
H
f
= e
¡1
1 0
0 1
;
These points are minimum points of f.
So, this analysis helps us classify these critical points as saddle points, maximum points, and
minimum points of the function f (x; y).
32 A linear algebr aic viewpoint of the classification
We have seen that when f
0
(a; b
0
) = [
0 0
], we can approximate f as:
f(x; y) ¡f( a; b) ≈
1
2
(
x ¡a y ¡b
) H
f
(a; b)
x ¡a
y ¡b
:
Therefore, that (a; b) to be a local min or max depends on the sign of the expression
(
x ¡a y ¡b
) H
f
(a; b)
x ¡a
y ¡b
;
for any x; y in a vicinity of (a; b). Now, we use our knowledge from linear algebra.
Definition 61. A matrix A
2×2
(actually in general dimension) is called positive definite if for any
vector x~ in R
2
, we have x~
t
A x~ > 0. It is called semi-positive definite if x~
t
A x~ ≥0. A matrix is called
negative (semi-negative) definite if x
~
t
A x
~
< 0 (x
~
t
A x
~
≤0).
83
We have the following theorem:
Theorem 62. If A has two eigenvalues λ
1
; λ
2
both positive, the matrix A is positive definite, and
if bo th eigenvalues are negative, the matrix is negative definite.
According to a theorem in linear algebra, the matrix H
f
(a; b) can be expressed as follows:
H
f
(x
0
; y
0
) = Q
t
λ
1
0
0 λ
2
Q;
where λ
1
; λ
2
are the eigenvalues of H
f
(a; b) and Q is the matrix of the orthogonal eigenvectors of
H
f
(a; b). Consequently, we can write:
(
x ¡a y ¡b
) H
f
(a; b)
x ¡a
y ¡b
= (
x ¡a y ¡b
)Q
t
λ
1
0
0 λ
2
Q
x ¡a
y ¡b
:
Now, let's take the vector X as:
X = Q
x ¡a
y ¡b
;
that leads
(
x ¡a y ¡b
) H
f
(a; b)
x ¡a
y ¡b
= X
t
λ
1
0
0 λ
2
X:
Representing X =
A
B
, we get
X
t
λ
1
0
0 λ
2
X = λ
1
A
2
+ λ
2
B
2
:
Thus, if λ
1
and λ
2
are both po sitive, we have
f(x; y) ¡ f(a; b) ≈λ
1
A
2
+ λ
2
B
2
> 0:
which implies that (a; b) is a local minimum point of f. Conversely, if both λ₁ and λ₂ are negative,
then:
f(x; y) ¡ f(a; b) ≈λ
1
A
2
+ λ
2
B
2
< 0;
indicating that (a; b) is a maximum point of f . When one eigenvalue is p ositive and the other is
negative, f (x; y)¡f(a; b) is positive in one direction and negative in another, signifying a saddle
point.
But what is the relationship between the determinant of a matrix and its eigenvalues? The reader
can refer to the first chapter of this lecture to recall this relation. In fact, we have for a matrix A
2×2
,
we have det(A)= λ
1
λ
2
. Thus if det(A) > 0, both eigenvalues have the same sign. Moreover, we know
tr(A)= λ
1
+ λ
2
and thus if f
xx
+ f
yy
> 0, then both λ
1
; λ
2
are positive. Since det(H
f
)= f
x x
f
yy
¡f
xy
2
,
the condition det(H
f
) > 0 implies that the signs of f
xx
and f
yy
are the same.
84
Remark. Let's consider the function
f(x; y) = (y ¡x
2
) (y ¡2x
2
):
The origin (0; 0) is not either a minimum or maximum point for f . In fact, the function f is negative
between two parabola y = x
2
and y = 2x
2
and are positive outside of these two parabola:
f < 0
f < 0
f > 0
f > 0
It is simply seen that the origin is a degenerate point, that is, det H
f
(0; 0) = 0. Even though, the
origin is not a min or max for f , it is seen that the function f along any straight line y = mx has
its minimum at x = y = 0. I n other words, f attains its minimum along any line passing through
the origin, however, this point is not a local minimum point for f. Thu s, being a min along any
direction is a necessary condition for a local minimu m point, it is not sufficient condition.
33 Exercise
Exercise 94. find the cri tical point(s) of the following functions
a) f (x; y) = 1 + x
3
+ y
3
¡xy
b) f (x; y) = xe
¡x
2
¡y
2
c) f(x; y) = x
2
¡ y
2
Exercise 95. Consider the function f (x; y) = xye
¡x
2
¡y
2
a) Find the critical point of the given fun ction.
b) Write down the Taylor polynomial of the function at the critical point. Draw the surface of the function
and its Taylor polynomials in vicinity of each critical point.
Exercise 96. Consider the function f (x; y) = cos (x) cos(y). Write the Taylor expansion of f up to order 2 at
the origin and determ ine the type of t he point (0; 0).
Exercise 97. Consider the function
f(x; y) =
(
0 x
2
+ y
2
< 1
(x
2
+ y
2
¡1) e
¡x
2
¡y
2
x
2
+ y
2
≥1
:
Find the cri tical points of the function. Show that the points on the circle x
2
+ y
2
= 2 are maximum points of
the fun ction.
Exercise 98. Classify the critical points of the following functions
a) f (x; y) = x
2
+ y
2
85
b) f (x; y) = ¡x
2
¡ y
2
c) f(x; y) = x
2
¡ y
2
d) f (x; y) = x
3
+ 3xy
2
¡15x + 12 y
Exercise 99. Consider the function f (x; y) = x
4
+ y
4
. Determine the type of critical point (0; 0) f or the function.
Exercise 100. Consider two functi ons f (x; y) = x
4
+ y
2
and g(x; y) = ¡x
4
+ y
2
. Show that t hese two functions
have the same critical point (0; 0) and the same Hessian matrix at this point. However, these two funct ions have
different behaviors in ad jacent to (0; 0).
Exercise 101. Classify the cri tical point of the fu nction f(x; y) = xe
y
+ ye
x
.
Exercise 102. What con ditions on a; b; c guarantee that the functio n f(x; y) = ax
2
+ 2bxy + cy
2
has a local
max, in or saddle a t the origin (0; 0)?
Exercise 103. Consider the fu nction f(x; y) = y
2
¡x
4
. Show that the origin is a maximum point along the x-
axis, and is minimum along any other di rection. However, this point is a degenerate point and is not a saddle point.
86
Lecture
Lagrange multiplier method
In this section, we will explore the following fundamental concepts:
1. Conditional maximum and minimum (extremum) of two and three variable functions.
2. The Lagrange multiplier method.
3. The geometrical interpretation of the Lagrange multiplier method.
34 Conditional max and min
34.1 Algebraic statement
In our previous lecture, we learned how to determine local maxima and minima of functions defined
on an open set. Recall that for a continuously differentiable function f(x; y), the local min and max
point are obtained by investigating critical points obtained by solving the system f
0
(x; y) = [
0 0
].
This system required that the critical points are located in an o pen neighborhood of the domain
D
f
, that is, p = (a; b) is a critical point of f (x; y) if f could be defined in an open disk B
r
(p) for
some r > 0.
Now, let's explore a new problem, the conditional maximization and minimization, which involves
maximizing or minimizing a function f (x; y) subject to a condition g(x; y)=0:
8
<
:
max f(x; y)
subj. to:
g(x; y) = 0
: (7)
What difficulty does this type of maximization cause? Note that the geometry of the implicit
function g(x; y) = 0 is a curve in the xy-plane. Let's denote t his curve by C. Then we need to
maximize or minimize f(x; y) along the curve C. Then we are unable to write f
0
(x; y) = [
0 0
] since
there is no open set B
r
(p) on a curve.
f(x; y)
87
In general dimension, a conditional optimization (max or minimization) reads:
8
>
>
>
>
>
>
>
>
>
>
<
>
>
>
>
>
>
>
>
>
>
:
min f(x
1
; : : : x
n
)
subject to:
g
1
(x
1
; : : : ; x
n
) = 0
: : :
g
m
(x
1
; : : : ; x
n
) = 0
;
where g
1
= 0; : : : g
m
= 0 for m < n are the conditions of the optimization.
34.2 Engineering statement
The conditional maximization or minimization occurs often in real-world problems. The reason
is that increasing p rofit is always limited by the external restrictions. For instance, suppose a
manufactures wants to produce containers in the shape of a cylinder with volume V
0
. What are
the dimensions of the cylinder that minimizes the cost of the production? The cost is proportional
to the material used to produce the container, which in turn is proportional to the surface of the
cylinder. Thus, for radius r and height h, the surface of the cylind er is
S = 2πr
2
+ 2πrh:
If cost is proportional to the surface area, then the cost function is
C(r; h) = C
0
S = C
0
(2πr
2
+ 2πrh):
Thus the problem reads
(
min C(r; h)
subject to: πr
2
h = V
0
:
In gen eral, there may exist more than one factor that restricts maximizing the profit (or minimizing
the cost). This type of problems are called multi-factor decisions, optimizing the goal functions
restricted by several internal or external factors.
35 Lagrange mult iplier met hod
We first introduce the following theorem:
Theorem 63. Assume that the set ! = f(x; y); g(x; y) = 0g is a bounded subset of R
2
, and further
suppose that f: ! !R is a continuous function, then f attains its maximum and minimum on !.
Moreover, if g is a continuousl y differentiable function such that rg(p) =/
0
0
for all p 2!, and if
f is a continuously differentiable function, then the following relation holds for all maximum and
minimum points p
¯
of f on !:
rf(p¯) = λrg(p¯);
where λ is a constant that depends on p
¯
.
88
The above theorem suggest the following strategy to solve the conditional maximization (7): Makes
the function F as
F (x; y; λ) := f(x; y) ¡λg(x; y):
The maximum and minimum of the function F are obtained by solving the system:
r
(x;y;λ)
F (x; y; λ) = 0;
or equivalently:
8
>
>
<
>
>
:
f
x
0
= λg
x
0
f
y
0
= λg
y
0
g(x; y) = 0
:
Evidently, the solutions of the system rF = 0 yields only the candidate for the maximum an
minimum. To classify the critical points of F , we need the second-order derivative. The Hessian
matrix of F at the critical points enables us to decide about the type of the critical point:
H
F
:=
"
F
x x
00
F
xy
00
F
xy
00
F
yy
00
#
:
If det H
F
> 0 and if F
xx
00
> 0, the critical point is minimum. If det H
F
> 0 and F
xx
00
< 0, the critical
point is maximum.
The method in higher dimension is the same. For example, to solve the optimization problem
8
<
:
max f (x; y; z)
subj. to:
g(x; y; z) = 0
;
we make the function
F (x; y; z; λ) := f(x; y; z) ¡λg(x; y; z);
and then solve the system
r
(x;y;z ;λ)
F (x; y; z; λ) = 0:
Example 64. Let's solve the following problem: Maximize the function e
¡x
2
¡y
2
subject to the
condition x
2
¡ y
2
= 1. Here the function f i s f (x; y) = e
¡x
2
¡y
2
and the condition is g (x; y) :=
x
2
¡y
2
¡1. We have
rf(x; y) =
¡2xe
¡x
2
¡y
2
¡2ye
¡x
2
¡y
2
!
;
and then the Lagrange equations are:
8
>
>
>
>
<
>
>
>
>
:
xe
¡x
2
¡y
2
= ¡λx
ye
¡x
2
¡y
2
= λy
x
2
¡y
2
= 1
:
89
Multiplying the first equation by y and the second one by x and adding them, we reach
xye
¡x
2
¡y
2
= 0 )xy = 0:
So either x = 0 or y = 0. If x = 0, we have ¡y
2
= 1, a contradiction, and thus y = 0 and x = ±1.
Therefore, the maximum of of f on g(x; y) = 0 occurs at (±1; 0) with the value e
¡1
.
Example 65. Let's determine the maximum value of the function f (x; y) = x y subject to the
const raint x² + y² =1 using the Lagrange multiplier method. The equations are as follows:
rf = λrg
g = 0
;
for g(x; y) = x
2
+ y
2
¡1. This leads to the system:
8
>
>
<
>
>
:
y = 2λx
x = 2λy
x
2
+ y
2
= 1
:
Since λ =/ 0, we obtain by dividing first-two equations:
y
x
=
x
y
)y
2
= x
2
;
and substituting in the equation x
2
+ y
2
= 1 gives:
2x
2
= 1 )x = ±
2
p
2
:
We obtain 4 points:
2
p
2
;
2
p
2
;
¡ 2
p
2
;
2
p
2
;
2
p
2
;
¡ 2
p
2
;
¡ 2
p
2
;
¡ 2
p
2
The ma ximum value of f oc curs when λ=
1
2
, and in this case, f (x; y)=
1
2
. The minimum value of
f occurs when λ =
¡1
2
, and in this case, f (x; y)=
¡1
2
.
Example 66. Let's d etermine the max and min values of the function f(x; y; z) = x
2
+ 2 y
2
+ 3z
2
over the sphere x
2
+ y
2
+ z
2
= 1. Using the Lagrange multiplier method, we obtain the system
8
>
>
>
>
>
>
<
>
>
>
>
>
>
:
x = λx
2y = λy
3z = λz
x
2
+ y
2
+ z
2
= 1
:
Since λ =/ 0 (otherwise x = y = z = 0 which is impossible), we the possible values for λ are λ = 1; 2;
3. For λ = 1, we have y = z = 0 and then f = 1. For λ = 2, we obtain f = 2 and for λ = 3 we obtain
f = 3. The maximum of f over the unit sphere is f = 3 and its minimum value is 1.
90
The probl em can be solved by reducing the maximization problem to an free problem by substituting
z = 1 ¡x
2
¡ y
2
into f that change it to f = 3 ¡2x
2
¡ y
2
. The crit ical points are obtained using
the equation f
0
(x; y) = [
0 0
] that yields x = y = 0, and thus f = 3 which is the maximum value.
Substituting x
2
= 1 ¡y
2
¡z
2
, changes the function to f = 1 + y
2
+ 2z
2
and then the extremum value
is f = 1.
Example 67. Let's find the distance from the point (1; 1; 1) to the sphere x² + y² +z² =1. The
distance function between (1; 1; 1) and an arbitrary point on the sphere is:
d(x; y; z) = (x ¡1)
2
+ (y ¡1 )
2
+ (z ¡1)
2
q
:
To minimize this d istance, we can minimize d². The Lagrange multiplier equation rd² =λrg leads
to:
8
>
>
>
>
>
>
<
>
>
>
>
>
>
:
x ¡1 = λx
y ¡1 = λy
z ¡1 = λz
x
2
+ y
2
+ z
2
= 1
:
In fact, the equation rd² =2(x¡1; y ¡1; z ¡1) represents the line connecti ng two points (1; 1; 1) and
(x; y; z), and from geometrical point of view, this line must be perpendicular to the sphere at the
desired point p₀. Rewriting the system as:
8
>
>
>
>
>
>
<
>
>
>
>
>
>
:
(1 ¡λ)x = 1
(1 ¡λ)y = 1
(1 ¡λ)z = 1
x
2
+ y
2
+ z
2
= 1
;
we obtain x = y = z and then x = y = z = ±
3
p
3
. The distance is d = 3
p
¡1.
Example 68. Let's find the maximum volume of a box with dime nsions x; y; z that has given
surface area A. The mathematical formulation is
8
>
>
>
>
<
>
>
>
>
:
max xyz
subject to:
xy + yz + zx =
A
2
:
The Lagrange system is
8
>
>
<
>
>
:
yz = λ(y + z)
xz = λ(x + z)
xy = λ(x + y)
:
Multiplying the fist equation by x and the second one by y yields
λx(y + z) = λy(x + z) )λxz = λyz:
91
Since no dimension can be zero, we obtain x = y. Similarly, multiplying the third equation by z and
first one by x yields x = z. Therefore , 3x
2
=
A
2
and x = y = z =
A
6
q
. The maximum volume is
V =
A
6
A
6
r
:
35.1 Justification of the Lagrange multiplier method
To justify the theorem, let's consider the maximization (equivalently minimization) problem (7). If
C is the curve of the implicit function g(x; y) = 0, then we aim to determine maximum or minimum
of f(x; y) along C. If we parameterize C as r(t) = (x(t); y(t)), then the problem reduces to a single-
variable maximization problem of f(r(t)) i n the variable t. This is done by the ordinary derivative
equation:
df(r(t))
dt
= 0:
Let p
¯
= r(t
¯
) be a solution of the equation. By the chain rule, we can write
df(r(t))
dt
= rf (r(t)) ·r
0
(t) = rf(p¯) ·r
0
(t
¯
) = 0 :
Thus, rf (p¯) i s perpendicular to C since r
0
(t
¯
) is tangent on C at p¯. But, we know that rg(p¯) is
also perpendicular to C at p¯. Recall that the gradient of implicit functions are perp endicular to the
level curves. This implies that rf (p¯) is parallel to rg(p¯):
rf(p) = λrg(p);
where λ is a constant. The obtained formulation is called the Lagrange multiplier.
The generalization for higher dimensions is similar. For example, consider the following problem:
max f (x; y; z)
subject to: g(x; y; z) = 0
:
The geometry of g(x; y; z) = 0 is a surface in the space (the level surface of g with the va lue 0) and
we look for a po int on this surface that maximizes f. Thus, we can not write f
0
(x; y; z) = [
0 0 0
],
since the solutions of this system do not necessarily lie on the surface. The solution of the system
8
>
>
<
>
>
:
f
x
0
(x; y; z) = 0
f
y
0
(x; y; z) = 0
f
z
0
(x; y; z) = 0
;
are critical points of f regardless of wheth er they lie on the surface or not.
To solve the conditional problem, let's denote the surface g(x; y; z) = 0 by S, and parameterize this
surface as: r(t) = (x(t); y(t); z(t)). Therefore we have: g(r(t)) ≡0. In turn, this relation implies
rg(r(t)) ·r
0
(t) = 0;
92
and then rg(r(t)) is perpendicular to r
0
(t). On the other hand, r(t) is an arbitrary curve on S
and thus rg is perpendicular to S.
S: g(x; y; z) = 0
rg
Let p
¯
2S be the desired point of the problem, and let r(t) ⊂S be a curve passing through p
¯
. Then
df(r( t))
dt
= 0;
that implies rf(p¯) is perpendicular to r
0
(t) at p¯. Since r(t) is arbitrary, again we conclude that
rf (p¯) is parallel to rg(p¯) , and thus the equation
rf = λrg
gives the point p¯.
The parameter λ is commonly known as the Lagrange multiplier. This method allows us to incor-
porate the condition g(x; y)=0 into the maximization process by maximizing the new function:
F (x; y; λ) = f(x; y) ¡λg(x; y):
36 Equations with two restrictions
Consider the following problem: maximize f (x; y; z) such that (x; y; z) lies on the surfaces g
1
(x; y;
z) = 0 and g
2
(x; y; z) = 0. Evidently, if g
1
= 0 and g
2
= 0 are disjoint, the problem has no solution.
In the best case, the intersection of surface g
1
= 0 and g
2
= 0 is a curve in the space. Parametrizing
this curve as r(t), we end up with maximization of f (r(t)) which is a one-variable maximization:
df(r(t))
dt
= 0:
By the chain rule, we have
0 =
df(r(t))
dt
= rf (r(t)) ·r
0
(t) = 0:
On the other hand, rg
1
and rg
2
are perpendicular to r
0
(t). If r
0
(t) is non-zero, then rg
1
(r(t))
and rg
2
(r(t)) are linearly independent vectors. Therefore, rf must be in the set spanfrg
1
; rg
2
g,
that is,
rf = λ
1
rg
1
+ λ
2
rg
2
:
Let's solve an example.
93
Example 69. Let's find the maximum and minimum of function f (x; y; z)= xyz on the intersection
of the plane x + y + z = 0 and the sphere x
2
+ y
2
+ z
2
= 1. The Lagrange equatio n is
8
>
>
>
>
>
>
>
>
>
>
<
>
>
>
>
>
>
>
>
>
>
:
yz = λ
1
+ 2xλ
2
xz = λ
1
+ 2 yλ
2
xy = λ
1
+ 2zλ
2
x + y + z = 0;
x
2
+ y
2
+ z
2
= 1
:
Multiplying the first one by x, the second one by y, and the third one by z
8
>
>
<
>
>
:
λ
1
(x ¡ y) = 2λ
2
(y
2
¡x
2
)
λ
1
(x ¡z) = 2λ
2
(z
2
¡x
2
)
λ
1
(y ¡z) = 2λ
2
(z
2
¡y
2
)
:
If x =/ y and x =/ z then λ
1
= 2λ
2
(y + x) and λ
1
= 2λ
2
(z + x) that gives
λ
2
(y + x) = λ
2
(z + x):
We will show that λ
2
=/ 0, and then y = z. Substituting this into x + y + z = 0 give s x = ¡2y, and
the equation for sphere gives
y = z = ±
6
p
6
; x = ∓
6
p
3
:
Now, we show that λ
2
=/ 0. If λ
2
= 0, then xy = yz = zx, that gives x = y = z and thus x = y = z = 0
which does not satisfy the equation of the given sphere .By the symmetry, we obtain other solutions
x = y = ±
6
p
6
, z = ∓
6
p
3
and x = z = ±
6
p
6
, y = ∓
6
p
3
. The maximum is
¡
6
p
6
¡
6
p
6
6
p
3
=
6
p
18
,
and the minimum is
6
p
6
6
p
6
¡
6
p
3
= ¡
6
p
18
.
37 Exercises
Exercise 104. Find the dista nce of the plane x + y + z = 3 to the sphere x
2
+ y
2
+ z
2
= 1.
Exercise 105. Find the maximum of the functio n x
2
+ y
2
+ z
2
if x + y + z = 1.
Exercise 106. The distance between the parabola y = x
2
and the line y = x ¡1.
Exercise 107. Use the Lagran ge multiplier method and find the axis of the ellipse 5x
2
+ 8xy + 5 y
2
= 1.
Exercise 108. Use the Lagran ge multiplier method and find points on the ellipse
x
2
a
2
+
y
2
b
2
= 1;
that the tangent lines with the axes makes a triangle with minimum area.
Exercise 109. Consider two smooth implicit function s, g(x; y)=0 and h(x; y)=0, where rg and rh exist and
ar e never zero. Ass ume that the sets of points defined by these two functions are both bounded and disjoint. It
can be demo nstrated tha t there exists a line connecting the se two sets of points with the shortest possible length.
Prove that t his line is perpendicular to both sets.
94
Lecture
Global maximum and minimum
In this section, we will delve into the following fundamental concepts:
1. Global extrema of a function within a closed set.
2. Determining extremum values of a function on the smooth curves and surfaces.
3. Identifying extremum values of a function on non-smooth sets.
38 Single-variable functions
Recall that a continuous function f (x) defined on a closed bounded set I attains its maximum
and minimum in I, either insider I or on the boundary of I. If f is differentiable, and if I attains
its maximum or minimum in the interior of I, then f
0
(x) = 0 provides us with the maximum
or minimum point. Otherwise, since we are unable to define the regular derivative of f on the
boundary, we consider the value of f separately on t hese points.
For example, the maximum and minimum points of the function f(x) = x
2
in the closed interval
I = [¡1; 2] are determined as follows. First, we study f in the the interior of I which is (¡1; 2).
Since the derivative is defined in open intervals, we solve the equation f
0
(x) = 0 to determine local
min or max of the function. The equation reads 2x = 0 and thus x = 0 is a candidate for the global
min or max. Now we study f on the boundaries of I, which are x = ¡1; 2. In this manne r we derive
thre e candidates: x = 0; ¡1 and 2. Accordingly, we have f (0) = 0; f(¡1)= 1 and f(2) = 4. The global
maximum of f in the given closed interval is f = 4 at the point x = 2, and the global minimum is
f = 0 at the point x = 0.
39 Multivariable func tions
Assume that f(x
1
;: ::; x
n
) is a continuous function defined on a closed bounded set D ⊂R
n
, then f
attains its absolute maximum and minimum on D, either in the interior of D or on the boundary
of D.
For the definition of closedness and boundedness of set, refer to the appendix lecture of these notes.
In summary, a set D is bounded if there exist R > 0 such that D ⊂B
R
(0). A set D is closed if its
complement D
c
is open.
In particular, if f is continuously differentiable, that is, if partial deriva tive functions
@f
@x
j
are
continuous, then the strategy to determine the absolute max and min is as follows:
1. Determine local min and max in the interior of D. For this, we solve the system
f
0
(x
1
; : : : ; x
n
) = [
0 ··· 0
]:
95
2. We determine the maximum and minimum of f on the boundary of D. If the boundary of
D is expressed by a function g(x
1
; : : : ; x
n
) = 0 , then we reach the following conditional max
and minimization problem
8
<
:
max; min f(x
1
; : : : ; x
n
)
subject to:
g(x
1
; : : : ; x
n
) = 0
:
This problem can be solved by the Lagrange multiplier method.
Example 70. Let's determine the global minimum and maximum of the function f (x; y) = x
2
+ y
2
on the set
D
¯
=
(x; y);
x
2
4
+ y
2
≤1
:
First, we determine the local extreme point(s) inside D
¯
: rf =0, which leads to x=0, y=0. Therefore,
f has only one extremum point inside D: (0; 0). Now, we determine the maxima and minima of f
on the boundary:
x
2
4
+ y
2
= 1:
This problem is a conditional extremum problem and can be solved using the Lagrange multiplier
method:
8
<
:
(2x; 2y) = λ
¡
x
2
; 2y
x
2
4
+ y
2
= 1
:
This system is solved for (0; 1); ( 0; ¡1) and (2; 0); (¡2; 0). Thus, the maximu m on the boundary
is 4, and the minimum is 1. The extremum inside D is f =0. Finally, the global maximum of f is
f
M
=4, and the global minimum is f
m
=0.
Example 71. Let's determine the global maximum and minimum of the function f (x; y)=xy on
the rectangle in the xy-plane with vertices (0; 0); (1; 0), and (0 ; 1).
(1; 0)
(0; 1)
(0; 0)
x
y
There are no local minima and maxima inside the rectangle since rf =0 leads to (x; y)=(0; 0),
which is located on the boundary of the rectangle.
96
Now, we investigate only the minima and maxima of f on the boundary of the rectangle. Since the
boundary is not smooth at vertices (0; 0); (1; 0), and (0; 1), we consider these points separately:
f(0; 0) = f (1; 0) = f(0; 1) = 0:
Now, one side is determined by the equation y =0, and 0< x < 1. On this side, we have f =0.
Similarly, the value of f on the side x=0 and 0< y <1 is zero.
We investigate the values of f on the side x+ y =1 for 0<x<1 and 0< y <1. The fu nction f on
this side reads:
f(x; 1 ¡x) = x(1 ¡x); 0 < x < 1;
Taking the derivative with respect to x:
df(x; 1 ¡x)
dx
= 1 ¡2 x;
which gives x = y =
1
2
. Therefore, f =
1
4
on this side. The global maximum of f on this region is
f
M
=
1
4
, and the glo bal minimum is f
m
= 0.
Example 72. Let's determine the global minimum and ma ximum of the function f = x yz in
the region bounded by the coordinate planes xy, xz, yz, and the plane x+ y +z =1. The func-
tion does not h ave any local extrema inside the given domain. The vertices of the region are
(0; 0; 0); (1; 0; 0); (0; 1; 0), and (0; 0; 1), where f has the value f =0. Furthermore, the function f is
equal to zero on the coordina te planes xy, xz, and yz.
x
y
z
(0; 0; 1)
(0; 1; 0)
(1; 0; 0)
We determine the extremum values of f on the plane x+ y +z =1. Using the Lagra nge multiplier
method, we set up the following equations:
8
>
>
>
>
>
>
<
>
>
>
>
>
>
:
yz = λ
xz = λ
xy = λ
x + y + z = 1
This gives the solutionx = y = z =
1
3
, and then f =
1
27
. This value is the global maximum of f,
f
M
=
1
27
. The global minimum of f is f
M
=0.
97
40 Exercises
Exercise 110. Assume t hat the function u(x; y) is smooth in R
2
. Show that the only possible solution to the
eq uation
¡yu
x
+ xu
y
= u
is u ≡0.
Exercise 111. Fo r a ≥0; b ≥0 and c ≥0 prove the inequality
a + b + c
3
≥(abc)
1
3
:
98
Lecture
Integrals of multivariable function s
41 Single-variable functions
Let f (x) be a function defined on an interva l [a; b]. The function f can represents any physical
quantity or quality of point x in [a; b]. For example, let f r epresents the mass density o f a metal
rod running from x = a to x = b. In this case, dM the mass differential is defined as
dM = f(x) dx:
The total mass if this metal is denoted by the integral
M =
Z
a
b
dM =
Z
a
b
f(x) dx;
which can defined as the summation
Z
a
b
f(x) dx = lim
n!1
X
k=0
n
f(x
k
) ∆x;
where ∆x =
b ¡a
n
and x
k
= a + k∆x.
If f represents the height over the point x, then the integral gives the area under the curve y = f (x)
enclosed by the x-axis, and lines x = a; x = b. It is important we keep in mind that integral is a kind
“continuous summation”, the summation of differentials.
One fundamental result which is the h eart of Calculus is the fundamental theorem that relates the
derivative and integration as follows. The function F (x) defined as:
F (x) =
Z
a
x
f(t) dt;
The terminolo gy “antiderivative ” is justified if we note that F
0
(x) = f (x). To show t his, we do as
follows. According to the definition of derivative, we can write:
F (x + δx) ¡F (x)
δx
=
1
δx
Z
x
x+δx
f(t) dt:
Using the intermediate value theore m for integrals, we can rewrite the right-hand side of the equation
as
Z
x
x+δx
f(t) dt = f(c) δx;
99
where c is a value between x and x + δx. Thus, we obtain
lim
δx!0
F (x + δx) ¡F (x)
δx
= lim
δx!0
f(c) = f (x):
But the left-hand side is just F
0
(x), and then the claim is proved.
42 Integral of multivariable functions: introductio n
In the filed of physics and engineering, a multitude of problems can be effectively addressed throu gh
the application of multiple integrals. Here we give only few of them:
1. Determine the area of a region D ⊂R
2
. It is we ll-known how to define and determine the area
of a rectangle or a triangle. How can we determine the area of an arbitrar y subset of R
2
?
The notion of continuous summation enables us to approach this problem if we appropriately
define the area differential dA in R
2
.
x
y
∆A
ij
D
To do that, we initially, we approximate this area using small elements ∆A
ij
. The area of
D is approximated as:
A ≈
X
i;j
∆A
ij
:
To refine this approximation into an exact value, we make these area elements ∆A
ij
infinitely
small, thus transforming the double summation into a double integral:
A = lim
i;j!1
∆A
ij
=
ZZ
D
dA;
where dA is referred to as the area differential. In Cartesian coordinates, dA can be expressed
as: dA = dxdy. In this way, the area can be written as the integral
A =
ZZ
D
dA =
ZZ
D
dxdy:
2. Let D ⊂R
2
denote a metal p late with the density function ρ(x; y). How can we determine the
total mass of this plate? We can use again the notion of integral for this problem. Initially,
we approximate the mass ∆m
ij
within a small area ∆A
ij
as:
∆M
ij
≈ρ(x
i
; y
j
) ∆A
ij
;
100
where (x
i
; y
j
) represents an arbitrary point within the small area ∆A
ij
. The mass differential
at any arbitrary point (x; y) is then given by:
dM = ρ(x; y) dA:
Thus, the total mas can be represented as the integral
M =
ZZ
D
dM =
ZZ
D
ρ(x; y) dA:
3. F inding the volume of a region in R
3
. As we say in previous lectures, from a geometrical
perspective, a function z = f (x; y) defines a surface S within R³. Let D be a bounded
domain in the xy-plane. This d omain constitutes a cylindrical volume with base D and cap
z = f(x; y):
y
D
z
x
x
y
z
∆S
ij
∆A
ij
To determine the volume V , we approximate the volume element ∆V
ij
as:
∆V
ij
≈∆A
ij
f(x
i
; y
j
);
where (x
i
; y
j
) is an arbitrary point within the area element ∆A
ij
. In differential form, the
volume at any point (x; y) can be expressed as:
dV = f(x; y) dA;
and in Cartesian coordinates, it takes the form:
dV = f(x; y) dxdy:
Thus, the volume can be expressed by the double integral:
V =
ZZ
D
f(x; y) d A:
4. Let the scalar function u(x; y; z) given in a bounded volume E ⊂ R
3
, and suppose this
function represents the density of thermal energy in E. What is the total thermal energy U
in E? The answer can be expressed in terms of a triple integral as f ollows. Initially, we write
the thermal energy differential dU as:
dU = u(x; y; z) dV ;
101
where dV is the volume differential. Integrating dU over E gives then the t otal energy:
U =
ZZZ
E
dU =
ZZZ
E
u(x; y; z) dV :
This list can be expanded to encompass other problems. Among them, we will study the following
problems too:
• To determine the center of amass of an object in R
2
or R
3
. The center of mass of an object
is a p oint (inside or outside) of the object that the net amount of moment at that point is
zero , and thus the object at that point is in the equilib rium state.
• To determine the surface area of an object in R
3
. Recall that an implicit function g(x; y;z)= 0
defines a surface in R
3
. How can we calculate the area of this surface?
• Let a fluid of density ρ and with a given velocity v~ passes through a surface. What is the
net amount of the fluid passes through the surface in a unit time? This amount is called flux
and is important in different fields of physics and engineering.
y
z
x
We will study there problems in great detail in subsequent chapter.
Remark. It is essential t o recognize that a definite integral fundamentally constitutes a form of
continuous summationn, representing the continuous accumulation of infinitesimally small quan-
tities. The scope of problems solvable by double and triple integrals is vast, encompassing a wide
array of real-world applications across numerous disc iplines. These mathematical tools provide an
essential framework for modeling, analyzing, and solving complex problems in various fields of study.
43 Double integ rals over rectangu lar domains
We start off by introducing double integrals over rectangular domains which are the simplest domain
for integration of two-variable functions. Then we generalize the calculation to general domains.
Let D be the rectangle [a; b] ×[c; d] in R
2
as shown below:
a b
c
d
x
y
D
102
Assume that a function f(x; y) is defined on D, and we want to calculate
I =
ZZ
D
f(x; y)dA:
It is almost evident that if f is constant C, the result will be I = (b ¡a) (d ¡c ) C. We are interested
in the case that f is not a constant function. In order to calculate I, we introduce two ways for this
integral: 1) vertical elements, and 2) horizontal elements.
For the first method, we take vertical elements dx for y ranging in [c; d] as:
c
d
x
y
D
ba
x
y
Regarding this, the variable x ranges in the interval [a; b], and thus we can I as
I =
Z
a
b
Z
c
d
f(x; y) d y
dx:
Therefore, in this method, we first calculate the internal integral
I
1
=
Z
c
d
f(x; y) dy;
where we consider x fixed. Then we put the obtained result in the external integral
I =
Z
a
b
I
1
dx:
Anot her method, is to take horizontal elements dy where x ranges in [a; b] as shown below:
c
d
x
y
D
ba
x
y
The integral can be set up as follows
I =
Z
c
d
Z
a
b
f(x; y) d x
dy:
103
As we observe, in this method, we first calculate the integral over x while y is consi dered constant,
and then put the result into the external integral.
Example 73. Let D be a metal plate in the shape of a rectang le [0; 2] ×[0; 1] in meters. Assume
that the mass density of the me tal is given as ρ(x; y) = ( x + y) kg/m
2
.
We aim to find the total mass of the plate D. Taking vertical elements, we set up the double integral
as:
M =
Z
0
2
Z
0
1
(x + y)dy
dx:
Everything by now is straightforward to calculate first the internal integral:
Z
0
1
(x + y) dy =
xy +
1
2
y
2
0
1
= x +
1
2
:
Substituting this result into the external integral, we obtain:
M =
Z
0
2
x +
1
2
dx =
1
2
x
2
+
1
2
x
0
2
= 3 kg:
Remark. If we interpret f (x; y) = x + y as the height over the domain D: [0; 2] ×[0; 1], then the
integral is equal to the volume constructed on the base D and the height f(D). If f represents the
density of thermal energy, then the integral represents the total thermal energy in the plate D.
Example 74. Let D = [¡2; 2] ×[¡1; 1], and let f be given by e
¡x¡y
. The volume constructed on
the base D and the height f is equal to:
V =
Z
¡2
2
Z
¡1
1
e
¡x¡y
dy
dx:
Writing f as f = e
¡x
e
¡y
, we can rewrite the above integral as follows:
V =
Z
¡2
2
e
¡x
dx
Z
¡1
1
e
¡y
dy
:
This multiplicative single integrals are simply calculate d to give: V = 4 sinh(1) sinh(2).
104
Lecture
Double integ rals over gen eral domains
In the last lecture we learned how to calculate integrals over rectangular domains. For rectangular
domains, it is almost the same we take horizontal or vertical differential areas. This scenario is
changed if the domain D is not a rectangle. As we will see, a clever choosing of the differential area
significantly simplifies the double integrals.
44 Domain appropr iate for vertical elements
Consider the domain D of the integration as shown below:
y
2
= f(x)
b
x
D
a
y
y
1
= g(x)
As we observe, the do main D can be described as the area enclosed between two explicit curves
y
2
= f(x) and y
22
= g(x). Assume that a function f (x; y) is given over D. Then, the integral of f
over D can be calculated by taking vertical elements as follows:
ZZ
D
ρ(x; y) dA =
Z
a
b
Z
g(x)
f (x)
ρ(x; y) dy
dx:
Note that in this case x ranges in the interval [a; b] but y = y(x) ranges b etween two curves:
[g(x); f(x)], and thus the limit of the integration for the internal integral is a function of x.
Example 75. Let D be the area enclosed by the curve y = x and y =2x ¡x
2
in the xy-plane. Find
the total mass of D id its density is given by ρ(x; y) = xy.
Solution. Always, we try to draw the domain. The intersect ion of these two curves are x = 2x ¡x
2
, that gi ve s
x = 0; 1. The figure below shows the domain
Taki ng vert ical elements, gives the integr al as
ZZ
D
ρ(x; y) dA =
Z
0
1
Z
x
2x¡x
2
xydy
dx:
105
We firs t calculate the inner integral
Z
x
2x¡x
2
xydy =
1
2
xy
2
x
2x¡x
2
=
1
2
x
3
¡
1
2
x(2x ¡x
2
)
2
=
1
2
x
5
¡2x
4
+
3
2
x
3
:
Thus,
ZZ
D
ρ(x; y) dA =
Z
0
1
1
2
x
5
¡2x
4
+
3
2
x
3
dx =
1
12
x
6
¡
2
5
x
5
+
3
8
x
4
0
1
=
7
120
:
45 Domain appropr iate for horizontal elements
Consider the domain D of the integration as shown below:
x
x
1
= g(y)
c
d
y
x
2
= f(y)
D
As we observe, here the domain of integration is an area enclosed by two functions x
2
= f (y) and
x
1
= g(y). Assume that a function f(x; y) is given in this domain. The integral of f over D can be
expressed as the following double integral:
ZZ
D
f(x; y) dA =
Z
c
d
Z
g(y)
f(y)
ρ(x; y) dx
dy:
Note that in this case, y is ranging between tow constants c and d, and the variable x = x(y) is
ranging in the interval [g(y); f (y)].
Example 76. Let D be the area enclosed by the curves y = 1; y = ¡1, x = 1 ¡y
2
, x = 2¡y
2
. Assume
that height over this area is given by the function h(x; y) = x + y. Find the volume constructed on
D with height h.
Solution. We first draw the domain. This domai n shown below
As it is seen , its is more appropriat e we choose the horizontal elements. Taking this type of elements, the double
integral becomes
ZZ
D
h(x; y) dA =
Z
¡1
1
Z
1¡y
2
2¡y
2
(x + y) dx
dy:
106
We calculate first the inner integral
Z
1¡y
2
2¡y
2
(x + y) dx =
1
2
x
2
+ xy
1¡y
2
2¡y
2
=
¡y
2
+ y +
3
2
:
Substituting this into the above integr al, we reach
ZZ
D
h(x; y) dA =
Z
¡1
1
¡y
2
+ y +
3
2
dy = ¡
1
3
y
3
+
1
2
y
2
+
3
2
y
¡1
1
=
7
3
:
Example 77. Let D be the domain enclosed by the lines y = x; y = 2 x and x = 1 in the first quarter.
Find the area of D by taking both vertical and horizontal elements.
Solution. For the ar ea, we should take f = 1, and calculate the integral:
A =
ZZ
D
dA:
To calculate this inte gral, we first draw the domain as shown below:
Taki ng vert ical elements, the area becomes
A =
Z
0
1
Z
x
2x
dy
dx =
Z
0
1
fxgdx =
1
2
x
2
0
1
=
1
2
:
Fo r the horizontal elements, we have to take care about the limits of integral:
A =
Z
0
1
(
Z
y
2
y
dx
)
dy +
Z
1
2
(
Z
y
2
1
dx
)
dy
x =
y
2
x = y
x = 1
The first integr al is calculated as
Z
0
1
(
Z
y
2
y
dx
)
dy =
Z
0
1
n
y
2
o
dy =
1
4
;
107
and the second integral is calcul ated as
Z
1
2
(
Z
y
2
1
dx
)
dy =
Z
1
2
n
1 ¡
y
2
o
dy =
1
4
;
and thus t he area is equal A =
1
2
.
Notice that the result completely conforms our knowledge of the area of triangles . The domain D is a triangle
with base l = 1 and height h = 1 and thus t he area is
1
2
.
46 Change of order of the integration
In some case, a given double integral can not be solved directly, and we have to change the order
of integration. The example below serves the explaining this scenario.
Example 78. We are given the following inte gral to calculate
I =
Z
0
1
Z
x
1
1
1 + y
4
dydx:
Obviously, we can not calculate the anti-derivative of the function
1
1 + y
4
. Let us sketch the domain.
This domain is shown below
x
y
1
y = x
1
We know, that the integral is the same if we take horizontal elements. Let's do that. The integral
with horizontal elements becomes:
I =
Z
0
1
Z
0
y
1
1 + y
4
dx
dy:
This integral can be calculated simply as:
Z
0
1
Z
0
y
1
1 + y
4
dx
dy =
Z
0
1
1
1 + y
4
Z
0
y
dx
dy =
Z
0
1
y
1 + y
4
dy
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
y
2
=u
1
2
Z
0
1
du
1 + u
2
=
1
2
tan
¡1
(u)
0
1
=
π
8
:
Example 79. Change the order of integration in the following integral
Z
0
2
Z
x
πx
f(x; y)dydx:
Solution. The domain is D = f(x; y); 0 ≤x ≤2; x ≤y ≤πxg. This is shown below:
108
2
D
y
y = x
y = πx
Taki ng horizontal el ements results in
Z
0
2
Z
x
πx
f(x; y)dydx =
Z
0
2
(
Z
y
π
y
f(x; y) dx
)
dy +
Z
2
2π
(
Z
y
π
2
f(x; y) dx
)
dy:
47 Exercises
Exercise 112. Show the identity
Z
a
x
Z
a
s
f(s; t) dtds =
Z
a
x
Z
t
x
f(s; t) ds dt:
Exercise 113. Consider the following function
f(x; y) =
ZZ
R
2
f(x ¡t)
2
+ (y ¡s)
2
ge
¡t
2
¡s
2
dtds;
wher e x and y satisfies the equation
x
2
+
y
2
2
= 1:
Find the minimum an d ma ximu m of f .
109
Lecture
S ubstitution in double integra ls
48 Single-variable functions
Consider the integral of a single-variable function
I =
Z
a
b
f(x) dx:
If x is itself of a function of t as x = '(t), then the above integral can be rewritten in terms of t.
Assume that we have a = '(t
0
) and b = '(t
1
), and that '
0
(t) =/ 0 for t 2(a; b). In this way, we can
write dx = '
0
(t) dt, and the given integral becomes
I =
Z
t
0
t
1
f('(t)) '
0
(t) dt:
This formula is called substitution or transformation of domain. That '
0
(t) =/ 0 guarantees that the
transformation f rom [t
0
; t
1
] to [a; b] is one to one, and with '(t
0
) = a; '(t
1
) = b guarantees that the
transformation is one-to-one and onto. The figure below depicts the transformation schematically.
x = '(t)
t
x
dx = '
0
(t)dt
dt
49 Substitution in dou ble integ rals
Let D ⊂R
2
b e a domain represented by the Cartesian coordinate (x; y) where a continuous function
f(x; y) is defined. Consider the following integral:
I =
ZZ
D
f(x; y) dA:
Assume that D
0
is subset of the (t; s)-plane, where a one-to-one and onto transformation ': D
0
!D
is defined. The above integral in the (x; y)-domain can be rewritten as an integral in the (t; s)-plane
over the domain D
0
as follows. For the argument x = x(t; s); y = y(t; s), the function f(x; y) can be
written as
f(x(t; s); y(t; s)) = f('(t; s)):
110
In addition, we need to replace dA by dA
0
, the area differential in the (t; s)-plane. Thus, we should
estab lish a relationship between dA, the differential area in ( x; y)-plane a nd dA
0
, the area differential
in the (t; s)-plane.
The mapping ' = (x(t; s); y(t; s)) maps points in D
0
to points in D. We have:
dx = x
t
dt + x
s
ds; dy = y
t
dt + y
s
ds;
or in matrix form
dx
dy
=
x
t
x
s
y
t
y
s

dt
ds
:
The matrix
x
t
x
s
y
t
y
s
is called the Jacobi matrix and is denoted by J
f
. Note that J
'
1
0
=
x
t
y
t
and
J
'
0
1
=
x
s
y
s
. Therefore, the matrix J
'
maps any vect or in ts-plane to a vector to xy-plane . This
relation also can be explained geometrically a s follows: fix (t
0
; s
0
) 2D
0
. Consider the straight line
r(t) = (t; s
0
). This line is mapped by ' to the curve '(r(t)) in D. Thus the vector dt =
1
0
dt is
mapped by '
t
to
x
t
(t
0
; s
0
)
y
t
(t
0
; s
0
)
dt in the xy-plane at the point '( t
0
; s
0
). similarly, the vector
0
1
ds
is mapped to the vector
x
s
(t
0
; s
0
)
y
s
(t
0
; s
0
)
ds in the xy-plane.
D
D
0
r
1
(t)
r
2
(s)
'(r
1
(t))
'(r
2
(s))
Now, we use our knowledge of the linear algebra that det(J
'
(t
0
; s
0
)) yields the area of the parallel-
ogram constructed on the vectors
x
t
(t
0
; s
0
)
y
t
(t
0
; s
0
)
dt and
x
s
(t
0
; s
0
)
y
s
(t
0
; s
0
)
ds, that is
dA = jdet J
'
(t; s)jd tds = jdet J
'
(t; s)jd A
0
;
where jdet J
'
j is the absolute value of the determinant of the Jacobi matrix. The absolute value is
entered because t he dA is the geometric (positive) area in the xy-plane.
Putting all together, we obtain the following substitution f ormula for the change of domain:
ZZ
D
f(x; y) d A =
ZZ
D
0
f('(t; s)) jdet J
'
jdA
0
:
Example 80. We aim to evaluate the area of the ellipse:
x
2
a
2
+
y
2
b
2
= 1:
111
Let's define the transformation ': x = at; y = bs that transforms the unit disk t
2
+ s
2
≤1 onto the
given ellipse. Thus, the area which is described by the integral
A =
ZZ
x
2
a
2
+
y
2
b
2
≤1
dA;
can be rewritten as
ZZ
x
2
a
2
+
y
2
b
2
≤1
dA =
ZZ
t
2
+s
2
≤1
jdet J
'
jdA
0
:
Since
J
'
=
a 0
0 b
;
we obtain
ZZ
x
2
a
2
+
y
2
b
2
≤1
dA = ab
ZZ
t
2
+s
2
≤1
dA
0
= abπ:
Example 81. Let D be the triangle constructed on the vertices (0; 0); (1; 1 ) and
1
2
; 2
, and let
f(x; y) b e a give n smooth function. The figure below depicts the domain.
x
(1; 1)
D
y = x
y = 4x
y
y = ¡2x + 3
1
2
; 2
We aim to calculate the integral
I =
ZZ
D
f(x; y) dA:
Regardless of taking vertical or horizontal differential elements, we have to decompose the integral.
For example, for verti cal elements, the given integral can be written as:
ZZ
D
f(x; y) d A =
Z
0
1
2
Z
x
4x
f(x; y) dy
dx +
Z
1
2
1
Z
x
¡2x+3
f(x; y) dy
dx:
Similarly, if we take horizontal elements, the double integral becomes
ZZ
D
f(x; y) d A =
Z
0
1
(
Z
y
4
y
f(x; y) d x
)
dy +
Z
1
2
(
Z
y
4
3¡y
2
f(x; y) dx
)
dy:
112
However, we have another choice, to rotate the triangle to θ =
¡π
4
to change the domain to a more
convenient one:
x
y
5 2
p
4
;
3 2
p
4
D
0
( 2
p
; 0)
Thus, we can define a transformation ': D
0
!D as ' = R
π
4
where R
θ
is the θ-rotation matrix:
R
θ
=
cos(θ) ¡sin(θ)
sin(θ) cos(θ)
:
The desired change of domain is:
' =
2
6
6
4
2
p
2
¡ 2
p
2
2
p
2
2
p
2
3
7
7
5
:
Note that det J
'
= a, and thus the given integral can be expressed in the new domain as:
ZZ
D
f(x; y) d A =
ZZ
D
0
f
2
p
2
(t ¡s);
2
p
2
(t + s)
dA
0
:
Note that
x
y
= '
t
s
=
2
p
2
t ¡s
t + s
:
For the new domain, we do n ot split the integral into two sub-integr als if we take horizontal
differential elements.
Anot her change of domain that can be taken is as follows. Let's define t =
y
x
and s = y + 2x. For
this substitutions, the n ew domain is: 1 ≤t ≤4, 0 ≤s ≤3. The desired change of domain is derived
by solving the above transformations for x and y. We have:
x =
s
t + 2
; y =
ts
t + 2
:
For the transformation (x; y) = '(t; s) , we have
det J
'
=
¡s
(t + 2)
2
1
t + 2
2s
(t + 2)
2
t
t + 2
=
¡s
(t + 2)
2
;
113
and then jdet J
'
j=
s
(t + 2)
2
. Therefore, the given integral can be written as
ZZ
D
f(x; y) dA =
Z
1
4
Z
0
3
f
s
t + 2
;
st
t + 2
dsdt:
50 Pola r coordinate tra nsformati on
Calculating double integrals using the polar coordinates is an important application of the change
of domain in double integrals. First, let's review the polar coordinate system. A point p2R
2
can be
represented in different ways. The most familiar representation is the Cartesian coordinate system,
where, after setting a predefined origin O, a point is expressed as p= (x; y), with x representing the
value along the horizontal axis and y along the vertical axis, and thus O = (0; 0).
Anot her method to represent a point p2R
2
is the polar coordinate system. In this system, we
introduce a horizontal axis and a point as the origin, denoted as O:
θ
p
r
O
In the polar coordinate system, a point p can be represented by a pair (r; θ), where:
• r is the distance from the point to the origin O, and
• θ is the angle measured with respect to the horizo ntal axis in the positive direction (coun-
terclockwise in the trigonometric sense).
The relationship between Cartesian and p olar coordinates is deri ved as follows:
x = r cos(θ)
y = r sin(θ)
θ
p
r
O
x
p
y
p
It's imp ortant to note that the origin cannot b e uniquely represented in polar coordinates because,
for any angle θ, the polar coordinate (0; θ) represents the origin O.
114
Example 82. Consider an open disk D centered at the origin and the radius 1. In the Cartesian
coordinate, we can represents the points in D as follows
f(x; y); x
2
+ y
2
< 1g:
In polar coordinate, this disk is represented just by f(r; θ); r < 1g. Therefore, r < a represents a disk
centered at the origin of radius a. The system
x = r cos(θ)
y = r sin(θ)
;
can be considered as a transformation from (r; θ)-plane to (x; y)-plane as shown below:
x
y = tan(θ
0
)x
y
x
2
+ y
2
= r
0
2
0 a
r
θ = θ
0
r = r
0
2π
θ
Example 83. The equation of the disk centered at (x
0
; y
0
) of radius a in the Cartesian coordinate is
(x ¡x
0
)
2
+ (y ¡y
0
)
2
< a
2
:
One of the possible transformations is as follows:
x = x
0
+ r cos(θ)
y = y
0
+ r si n(θ)
;
where 0 ≤θ ≤2π and 0 ≤r < a. Note that
(x ¡x
0
)
2
+ (y ¡ y
0
)
2
= r
2
fcos
2
(θ) + sin
2
(θ)g= r
2
< a
2
:
51 Double integ rals usi ng polar coordin ates
We solve a few examples
Example 84. Let D be a d isk of radius 1 centered at (0; 0). We want to calculate the following
integral
ZZ
D
x
2
+ y
2
p
dA:
115
Here, we have f (x; y) = x
2
+ y
2
p
. In the Cartesian coordinate using the vertical elements, we can
rewrite the integral as follows:
Z
¡1
1
(
Z
¡ 1¡x
2
p
1¡x
2
p
x
2
+ y
2
p
dy
)
dx:
It seems that the integral is not simple to calculate. Let's use the polar coordinate. In the polar
coordinate, for x = r cos(θ) and y = r sin(θ), the function simplifies as f = r. What can we say about
dA? We will prove later that the area differential in the polar coordinate is dA = rdrdθ. For our
given domain, r ranges in [0; 1] and θ ranges in [0; 2π]. Therefore, we can write the integral as follows
ZZ
D
fdA =
Z
0
2π
Z
0
1
r rdrdθ
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{z
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
dA
=
Z
0
2π
dθ
Z
0
1
r
2
dr =
2π
3
:
Example 85. Let D be the region enclosed by the disk x
2
+ y
2
¡2x = 0 and y ≥0. The function
f(x; y) = xy is given in this domain. We aim to evaluate
I =
ZZ
D
f(x; y) dA:
The domain is depicted below:
We solve this integral in three different ways to show our possibilities for evaluating this integral.
In Ca rtesian coordinate, taking vertical elements, the integral reduces to
I =
Z
0
2
Z
0
2x¡x
2
p
xyd ydx =
1
2
Z
0
2
x(2x ¡x
2
) dx =
2
3
:
Using p olar coordinate, we have two cho ices. We can take x = 1 + r cos(θ); y = r sin(θ) for 0 ≤r ≤1
and 0 ≤θ ≤π as shown below:
θ
r
Thus, we obtain
I =
Z
0
π
Z
0
1
(1 + r cos(θ)) r sin(θ) rdrdθ =
2
3
:
116
Anot her cho ice is to use the relation x = r cos(θ); y = r sin(θ). Substituting this into the equation
x
2
+ y
2
¡2x= 0 gives r
2
+2r cos(θ) = 0, and then 0≤r ≤2cos(θ), where θ ranges in the limit 0≤θ ≤
π
2
.
r
θ
Therefor, we have
I =
Z
0
π
2
Z
0
2cos(θ)
r
3
sin(θ) cos(θ) drdθ = 4
Z
0
π
2
cos
5
(θ) sin(θ) dθ =
2
3
:
Example 86. Volume enclosed by the paraboloid z = x
2
+ y
2
and z = 1.
Example 87. The volume under the paraboloid z = x
2
+ y
2
above the xy-plane with the domain
x
2
+ y
2
≤1.
Example 88. The volume under the paraboloid z = x
2
+ y
2
above the xy-plane inside the cylinder
x
2
+ y
2
¡2x ≤0.
Example 89. Find the area enclosed by two curves r = 1 + cos(θ) and r = 1 ¡cos(θ).
Example 90. determine the value o f the following integral
ZZ
D
(x
2
+ y
2
) d A;
where D is the area enclosed by the ellipse
x
2
a
2
+
y
2
b
2
= 1:
Solution. The domain of the integration is an ellipse. It is sim ply seen that the transformation ': x = at; y = bs
is a transformation from the domain D
0
: t
2
+ s
2
≤1 onto the ellipse D:
x
2
a
2
+
y
2
b
2
≤1. Therefore, the original integral
can be rewritten as
ZZ
D
(x
2
+ y
2
) dA =
ZZ
D
0
(a
2
t
2
+ b
2
s
2
) jdet J
'
jdA
0
:
Note that jdet J
'
j= ab, and then
ZZ
D
0
(a
2
t
2
+ b
2
s
2
) jdet J
'
jdA
0
= ab
ZZ
D
0
(a
2
t
2
+ b
2
s
2
) dA
0
:
117
This integral can be solved using the pol ar coordinate:
ZZ
D
0
(a
2
t
2
+ b
2
s
2
) dA
0
=
Z
0
2π
Z
0
1
a
2
r
3
cos
2
(θ) + b
2
r
3
sin
2
(θ) drdθ =
π
4
(a
2
+ b
2
);
and finally
ZZ
D
(x
2
+ y
2
) dA =
πab
4
(a
2
+ b
2
):
52 Exercise
Exercise 114. Evaluate the integral
I =
ZZ
D
(4x + 8y) dA;
wher e D is the parallelogram with vertices:
(¡3; 1); (¡1; 3); (3; ¡1); (1; ¡3):
Exercise 115. Use an ap prop riate change of domain and evaluate the fo llowing integral
I =
ZZ
D
(x + y)
4
(x ¡y)
5
dA;
wher e D is the area e nclosed by ¡1 ≤x + y ≤1 and 1 ≤x ¡ y ≤3.
Exercise 116. Use an ap prop riate change of domain and evaluate the fo llowing integral
I =
ZZ
D
x
2
y
2
dA;
wher e D is the area e nclosed by y = x
2
; y = 4x
2
and xy = 1; xy = 2.
Hint : Take t =
x
2
y
and s = xy.
Exercise 117. Evaluate the following integral
ZZ
D
dA
1 + x
2
+ y
2
p ;
wher e D is the region
D = f(x; y); 1 < x
2
+ y
2
< 4g:
Exercise 118. Evaluate the a rea encl osed by t he disk x
2
+ y
2
¡2y ≤0 and y ≥x.
Exercise 119. The area enclosed between the disk x
2
+ y
2
≤4 and y ≥1 is given by the density ρ(x; y). Fi nd
the total mass on this regi on if ρ = 1 + y.
Exercise 120. Evaluate the following integral
ZZ
D
sin(9x
2
+ 4 y
2
) dA;
wher e D is the region encl osed by the ellips e 9x
2
+ 4y
2
= 36.
118
Lecture
Applicati ons of integrals
53 Single-variable functions
Several real-world problems in physics, geometry, engineering and other applied sciences reduces to
the notio n of integral. In previous lecture, we learned how t o determine the total mass of a metal
wire running from x = a to x = b given with the density function ρ(x). In fact, the mass differential
dM is defined through the relation dM = ρ(x) dx, and then the total mass is
M =
Z
a
b
dM =
Z
a
b
ρ(x) dx:
Now, assume a wire is given of the shape y = f(x), and the density of the point (x; y) on this wire
is given by ρ(x; y). What is the total mass of the wire? To answer this, we need again the mass
differential dM . The relationship between dM and ρ is
dM = ρ(x; y) d`;
where d` is the length differential.
δx
δyδ`
x
y
By the above figure, we have
δ` = (δx)
2
+ (δy)
2
q
= 1 +
δy
δx
2
s
δx:
In the limiting case, we have
d`
dx
= 1 + (f
0
(x))
2
q
;
and thus
dM = ρ(x; f (x)) 1 + (f
0
(x))
2
q
dx:
Now, the total mass can be defined by the integral:
M =
Z
a
b
ρ(x; f(x)) 1 + (f
0
(x))
2
q
dx:
119
The center of mass of a one dimensional obj ect can also be determined by the integral. For a straight
wire running from x = a to x = b with the mass density ρ(x), the center of mass x¯ is determined by
observation that the moment of the object around x¯ is zero. The moment at an arbitrary point x
0
is defined as:
M
x
0
=
Z
a
b
(x ¡x
0
) ρ(x) dx;
and for the center of mass x
¯
, the relation read s:
Z
a
b
(x ¡x¯) ρ(x) dx = 0:
Here, the expression (x ¡x¯) dm is the moment that the differential mass dm at the point x produces
at x¯
x
¯
(x ¡x¯) dm
dm
x
Simplifying the above integral gives
Z
a
b
xρ(x) dx = x
¯
Z
a
b
ρ(x) dx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{z
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
M
;
and then
x¯ =
1
M
Z
a
b
xρ(x) dx:
54 Volume and ma ss mass
Let D be a bounded domain in the xy-plane, and let z = f (x; y) is the height of eve ry point (x; y)2D.
The volume of the cylinder with base D and height z is given by the integral:
V =
ZZ
D
f(x; y) dA:
Example 91. Determine the volume inside the cylinder x
2
+ y
2
¡2x = 0 bounded by the sphere
x
2
+ y
2
+ z
2
= 4.
Solution 2. The domain of the integration is the disk D: (x ¡1)
2
+ y
2
= 1 with height rangi ng z = ¡ 4 ¡x
2
¡ y
2
p
to z = 4 ¡x
2
¡ y
2
p
. By the symmetry, the desired volume can be written as:
V = 4
ZZ
D
4 ¡x
2
¡ y
2
p
dA:
120
Here, to evalu ate the integral, we use the polar coordinate x = r cos(θ); y = r sin(θ). From the equation of the
disk, we obtain r 2[0; 2cos(θ)] and θ 2
0;
π
2
:
r
θ
Thus, the given integral can be rewritten as:
V = 4
Z
0
π
2
Z
0
2cos(θ)
4 ¡r
2
p
rdrdθ =
48π ¡64
9
:
The double integral can also gives the total mass of a two-dimensional object of the density of the
material is given at any point. First, let's remember the definition of the mass.
Definition 92. Mass density, often denoted by ρ (rho), is a measure of the mass of a substance
per unit length, area, or volume. It describes how much mass is concentrated within a given space
or region.
For a two-dimensional object filling out a region D in R
2
, the following relation holds:
dm = ρ(x; y) dA;
where dm is the mass differential, ρ the density f unction at the point (x; y), and dA is the area
differential.
x
dm
y
For a substance filling out the region D ⊂R
2
, the total mass is defined by the integral
M
D
=
ZZ
D
dm =
ZZ
D
ρ(x; y) dA:
Example 93. Let D be a portion of the unit disk centered at (0; 0), and
π
4
≤θ ≤
3π
4
:
121
The density function is given by ρ(x; y) = x
2
+ y
2
p
. The total mass in this region equals to
M =
ZZ
D
x
2
+ y
2
p
dA =
Z
π
4
3π
4
Z
0
1
r
2
drdθ =
π
3
:
55 Mom ents and the center of mass
Assume that a point mass m is located at the point (x; y). The moment that the mass generates
around the x-axis M
x
is defined as M
x
= ym. Similarly, the moment of the mas around the y-axis
is defined as: M
y
= xm.
x
mx
y
y
In general, any mass m outside a straight line ` has a tendency to rotate around that line. In physics
and engineering, this tendency is measured by the mome nt.
`
m
y
x
M
`
= mr
r
Now, consider an object D of density function ρ(x; y) in the xy-plane
x
y
dM
The total moment of the object arou nd x axis equals to
M
x
=
ZZ
D
ydM =
ZZ
D
yρ(x; y) dA:
Similarly, the total moment of the object around y-axis equa ls to
M
y
=
ZZ
D
xdM =
ZZ
D
xρ(x; y) dA:
122
Definition 94. The center of mass of an object D is a point (x¯; y¯) such that
ZZ
D
(x ¡x¯) ρ(x; y) dA = 0 ;
ZZ
D
(y ¡ y¯) ρ(x; y) dA = 0:
The equations means that the moments around the lines x = x
¯
and y = y
¯
are zero:
x
y
x
¯
x
y
y¯
The above definition for the center of mass can be rewritten as follows:
ZZ
D
(x ¡x¯) ρ(x; y) dA =
ZZ
D
xρ(x; y) dA ¡x¯
ZZ
D
ρ(x; y) dA = 0;
and this leads to x¯ M = M
y
, where M is the total mass in D
M =
ZZ
D
ρ(x; y) dA:
Thus x¯=
1
M
M
y
. Similarly, for the second integral, we have y¯=
1
M
M
x
, and thus the center of mass is:
(x
¯
; y
¯
) =
1
M
(M
y
; M
x
):
Example 95. Let D b e the rect angle with vertices (0;0), ( 1;0) and (0;1). The mass density function
defined in D is given by ρ(x; y) = xy. Let's find the center of mass of the object.
(0; 1)
(1; 0)
y = 1 ¡x
The total mass is
M =
Z
0
1
Z
0
1¡x
xyd ydx =
1
2
Z
0
1
x(1 ¡x)
2
dx =
1
24
:
Around x-axis:
M
x
=
ZZ
D
yxyd A =
Z
0
1
Z
0
1¡x
y
2
xd y
dx =
Z
0
1
x
1
3
(1 ¡x)
3
dx =
1
60
123
Around y-axis
M
y
=
ZZ
D
xxydA =
Z
0
1
Z
0
1¡x
x
2
ydy
dx =
Z
0
1
x
2
1
2
(1 ¡x)
2
dx =
1
60
:
Thus, the center of mass is (x¯; y¯) =
2
5
;
2
5
Example 96. The region: D: f(r; θ); 1 ≤r ≤2; 0 ≤θ ≤2πg is filled with a matter of density ρ = ρ(r).
Determine the center of mass of the object if ρ is continuous on D.
Solution. The total mass is M = 2πM
0
wher e
M
0
=
Z
1
2
rρ(r) dr > 0
The moments are
M
x
=
Z
0
2π
Z
1
2
r
2
ρ(r) sin(θ) dθ = 0;
M
y
=
Z
0
2π
Z
1
2
r
2
ρ(r) cos(θ) dθ = 0;
and thus the center of mass of the object is the origin (0; 0). Note that the center of mass is outside of the object
in this case. Also, note that the density ρ is symmetric with respect to θ and thus the moments are zero .
56 Mom ent of I nerti a
Let D ⊂R
2
b e a region filled with the mass density ρ(x; y). The moment of inertia of D about the
point (x
0
; y
0
) is defined by the integral:
I
(x
0
;y
0
)
=
ZZ
D
f(x ¡x
0
)
2
+ (y ¡ y
0
)
2
g ρ(x; y) dA:
Note that I
(x
0
;y
0
)
≥0 for all (x
0
; y
0
).
Definition 97. The integrals
I
x
=
ZZ
D
y
2
ρ(x; y) dA; I
y
=
ZZ
D
x
2
ρ(x; y) dA;
are called the moment of inertia about x and y-axis, and the integral
I
o
=
ZZ
D
(x
2
+ y
2
) ρ(x; y) dA;
is called the moment of inertia about the origin.
124
57 Probab ility
A random variable X, defined on an interval (a; b), is a real-valued function X: (a; b) !R. For any
c2(a; b), the value X(c) is considered as an outcome of the random variable X. These outcomes
are probabilistic, as we do not know in advance what the value of X may be.
A function f: (a; b) !R is called a probability density function if f (x) ≥0 and moreover:
Z
a
b
f(x) dx = 1:
Recall that the expected value of a random variable ( X ; f (x)) is defined as
E(X) =
Z
a
b
xf(x) dx;
and thus
Z
a
b
(x ¡E(X)) f(x) dx = 0:
This implies that E(X) is the center of probability of the variable X.
Let X: D ⊂R
2
!R be a random variables with the probability density function f (x; y). A function
f(x; y) is a joint probability density function over D ⊂R
2
if for all (x; y) 2D, we have f(x; y) ≥0
and if
ZZ
D
f(x; y) d A = 1:
In this case, the values
E
x
=
ZZ
D
xf(x; y) dA; E
y
=
ZZ
D
yf(x; y) dA;
are called the first and second expected values of X. The integral
ZZ
D
f(x ¡E
x
)
2
+ (y ¡E
y
)
2
gf(x; y) dA
is called the variance of f about the exp ected value (E
x
; E
y
).
58 Surface area
Let D ⊂R
2
b e a bounded domain in the xy-plane, and let z = f (x; y) be the function defined on
D . From the geometry point of view, this function defines a surface over D. We aim to evaluate
the area of this surfac e using the double integral.
125
D
dA
dS
Apparently, the area of the surface is defined as:
A(S) =
ZZ
S
dS;
where dS is the surface differential of S.
Recall that the graph of the function is (x; y; f(x; y)) and thus, the tangent vectors on t he surface
are:
T
1
= (1; 0; f
x
(x; y)); T
2
= (0; 1; f
y
(x; y)):
Geometrically, the vector
1
0
dx is mapped to the vector T
1
dx and the vector
0
1
dy is mapped
to the vector T
2
dy. Thus, the area dA = d xdy is mapped to the area dS = jT
1
×T
2
jdA. This fact is
an immediate results from the linear algebra. Recall that for any two vectors u~ ; v~, the area of the
parallelogram constructed on u~ ; v~ is A = ju~ ×v~ j.
u~ ×v~
u
~
v~
Since dS = jT
1
×T
2
jdA, we have dS = 1 + jrf j
2
q
dA, where rf =
f
x
f
y
!
, and jrf j= f
x
2
+ f
y
2
q
:
dx
dy
dA
dS
T
2
dy
T
1
dx
x
y
x
y
z
Finally, the surface area is obtained by the double integral over D as:
ZZ
S
dS =
ZZ
D
1 + jrf j
2
q
dA
126
Example 98. Find the surface of the sphere x
2
+ y
2
+ z
2
= a
2
for z ≥0 .
Solution. The domai n D in the xy-plane is the domain D := f(x; y); x
2
+ y
2
≤a
2
g. The relationship between
the area differential dA in the dom ain D and t he area differential dS on the surface S is
dS = 1 + j rf j
2
p
dA;
wher e f is the function f(x; y) = a
2
¡x
2
¡ y
2
p
. We have
jrf j
2
=
x
2
+ y
2
a
2
¡x
2
¡ y
2
;
and thus
dS =
a
a
2
¡x
2
¡ y
2
p dA:
The su rface area is
A(S) =
ZZ
S
dS =
ZZ
D
a
a
2
¡x
2
¡ y
2
p dA:
Using the polar coor dinate:
A(S) =
Z
0
2π
Z
0
a
a
a
2
¡r
2
p
rdrdθ = 2πa
Z
0
a
rdr
a
2
¡r
2
p
= 2πa
2
:
The obtained value is t he surface a rea of a hemisphere.
Example 99. Find the surface area of the paraboloid z = x
2
+ y
2
b ounded by the plane z = 1.
Solution 3. We first find the domain D, the projectio n of the surface z = f(x; y) in the xy-plane. We obtain:
D = f(x; y); x
2
+ y
2
≤1g:
The relationship between the differential s urface dS and the di fferential area dA is
dS = 1 + 4x
2
+ 4y
2
p
dA;
and thus
A(S) =
ZZ
D
1 + 4x
2
+ 4y
2
p
dA:
This integral is sim ply calculated if we use the polar coordinate system.
Example 100. Find the surface of the cap of the cylinder x
2
+ y
2
= 1 b ounded by the sphere
z = 4 ¡x
2
¡y
2
p
.
Solution 4. The domain D in the xy-plane is the disk D = f(x; y); x
2
+ y
2
≤1g. We have
dS = 1 +
x
2
4 ¡x
2
¡ y
2
+
y
2
4 ¡x
2
¡ y
2
r
dA =
2
4 ¡x
2
¡ y
2
p dA:
127
Ther efore, the area of the given surface is
A(S) =
ZZ
D
2
4 ¡x
2
¡ y
2
p
dA =
Z
0
2π
Z
0
1
2
4 ¡r
2
p
rdrdθ = 4π
Z
0
1
rdr
4 ¡r
2
p
= 4π(2 ¡ 3
p
):
Example 101. Find the area of the cap of the cylinder
x
2
+ y
2
¡2x ≤0;
given by z = 4 ¡x
2
¡y
2
p
.
Solution 5. The domain in the xy-pl ane is given, and
dS =
2
4 ¡x
2
¡ y
2
p
dA:
Ther efore, we have
A(S) =
ZZ
D
2
4 ¡x
2
¡ y
2
p dA:
The domain D is shown below
r = 2cos(θ)
Using the polar coor dinate, we h ave the following doma in: ¡
π
2
≤θ ≤
π
2
, 0 ≤r ≤2cos(θ).
Ther efore, the double integral reads
A(S) =
Z
¡
π
2
π
2
Z
0
2cos(θ)
2
4 ¡r
2
p
rdrdθ = 4(π ¡2):
59 Exercise
Exercise 121. The area enclosed between the disk x
2
+ y
2
≤4 and y ≥1 is given by the density ρ(x; y). Fi nd
the total mass on this regi on if ρ = 1 + y.
Exercise 122. Evaluate the volume enclosed by the paraboloid z = x
2
+ y
2
and z = 1.
Exercise 123. Evaluate the volume under the paraboloid z = x
2
+ y
2
above the xy-plane inside the cylinder
x
2
+ y
2
¡2x ≤0.
Exercise 124. E valuate the the volume under the paraboloid z = x
2
+ y
2
above the xy-plane with the domain
x
2
+ y
2
≤1.
Exercise 125. Let (x¯; y¯) be the center of mass of an object D. Suppose that D
0
is the new object generated by
ro tating D around the center of mass. S how that the center of mass of D
0
is (x¯; y¯).
128
Hint : t he rotation of θ around a point (x
0
; y
0
) is
x
0
y
0
+
cos(θ) ¡sin(θ)
sin(θ) cos(θ)

x ¡x
0
y ¡y
0
:
Exercise 126. Let (x¯; y¯) be t he center of mas s of an object D. Show that the moment around any line passing
through (x¯; y¯) is zero.
Exercise 127. In particu lar, if (x
0
; y
0
) is the center of mass (x¯; y¯), show the relation
I
(x¯;y¯)
=
ZZ
D
(x
2
+ y
2
) ρ(x; y) dA ¡(x¯
2
+ y¯
2
)M ≥0;
wher e M is the total mass in D. This integ ral can be interpreted as the meas ure of dispersion of mass about the
center of mass. If I
(x¯; y¯)
is too large, the mass are wider d ispersed and if I
(x¯; y¯)
is small, the mas sis concentrated
about the center of mass.
The density function ρ(x; y) =
π
γ
e
¡γ(x
2
+y
2
)
for constant γ > 0 is given in R
2
. Show that the total mass is
independent of γ, and determine it. Find the center of mass of R
2
with this mass density and conclu de th at this
mass density can also be considered as the probability density functio n. Calcula te the dispersion of the m ass
about the center of mass in terms of γ. In probabili ty the ory , this is calle d the variance of the probability d ensity
function. In the case γ !0, the total mass is concentrated at the origin. This c ase is called a singularity.
Exercise 128. Let D be an object in the xy-plane of density function ρ(x; y). Show that the moment of inertia
is minimum at the center of mass of D.
Exercise 129. Recall t hat the moment o f inertia of an object D of density function ρ(x; y) abo ut a point (x
0
; y
0
)
is defined as follows:
I
(x
0
;y
0
)
=
ZZ
D
f(x ¡x
0
)
2
+ (y ¡y
0
)
2
g ρ(x; y) dA:
Note that the moment of inertia is always non-negative.
a) Show that the moment of inertia about the center of mas s (x¯; y¯) is
I
(x¯; y¯)
=
ZZ
D
(x
2
+ y
2
) ρ(x; y) dA ¡(x¯
2
+ y¯
2
)M ;
wher e M is the total mass in D.
b) Evid ently, when the mass is entirely concentrated at the center o f mass, we have I
(x¯; y¯)
= 0. Based on
this fact, we can interpret I
(x¯;y¯)
as the dispersion of mass about the center of mass. Consider the density
function
ρ
t
(x; y) =
1
4πt
e
¡
x
2
+ y
2
4t
; (x; y) 2R
2
;
wher e t > 0 is a parameter. Determine the disper sion of mass about the center of mass i n terms of t.
Note: The improper integral in R
2
is defined by integrating over a disk of radius R when R !1.
Remark. The figures be low show the mass concentr ati on for t = 0.1 and t = 1. As we observe, the density spreads
out in time. When t !0, all mass is con centrated at the origin, the center of mass. This is called a singularity.
129
Lecture
Triple Integrals
60 Defin ition on simple domains
Let E ⊂R
3
b e a domain. Assume that a scalar function f(x; y; z) is defined on E. This function
can repre sents the mass density of some material, the density of thermal energy, the probability
density of some random variable or any other physical quantity. Our aim to to define and evaluate
the integrals of the form
I =
ZZZ
E
f(x; y; z) dV ; (8)
where dV is the volume differential in R
3
. In particular, if f represents the density of the point
(x; y; z) 2E, then the integral represents the total mass of the o bject E. Equivalently, if f ≡1,
the integral gives the volume o f t he object E. In general, from the engineering point of view, the
argument f(x; y; z) dV represents the physical quantityf included in the differential volume dV ,
and thu s the t riple integral is a type of “continuous summation” of these differential quantities to
obtain the total amount included in the volume E.
In this lecture, we consider simple domains, domains that can be projected on either xy-plane,
or alternatively on the planes yz or xz. The figure below depicts an object E such that it can be
properly projected on the xy-plane, wi th lower surface z = g(x; y) and higher surface z = h(x; y)
such that E enclosed between two surfaces.
z = h(x; y)
z = g(x; y)
x
z
y
D
xy
E
Sometimes, the object can not be project properly projected on the xy-plane, but can be project
on other planes.
130
x
z
y
D
xz
y = g(x; z)
y = h( x; z)
E
For these type of domains, the triple integral can be written with aid of a double integral over the
projected domain D as follows. For example, if D is the projection of E on the xy-plane, with lower
and upper surfaces z = g (x; y) and z = h(x; y) , the triple integral (8) can be written as:
ZZZ
E
f(x; y; z) dV =
ZZ
D
xy
Z
g(x;y)
h(x;y)
f(x; y; z) dz
dA:
Note that the inner integral become a pure function of x and y after integrating over z, that is,
Z
g(x;y)
h(x;y)
f(x; y; z) dz = F ( x; y);
and thus, the double integral
ZZ
D
x y
F (x; y) dA;
makes sense.
For the second type with projection on xz-plane, the integral can be written as:
ZZZ
E
f(x; y; z) dV =
ZZ
D
xz
Z
g(x;z)
h(x;z)
f(x; y; z)dy
dA:
Example 102. Evaluate
ZZZ
V
x
2
dV ;
where V is the solid that lies under the paraboloid z = 4 ¡x
2
¡y
2
and above the plane z = 2.
Solution. We first find the domain D in the xy -plane with the a id of the upper surface z = 4 ¡x
2
¡ y
2
and the
lower surf ace z = 2. The equating two equations results:
D = f(x; y); x
2
+ y
2
≤2g:
Ther efore, the volu me is
V =
ZZZ
E
dV =
ZZ
D
Z
2
4¡x
2
¡y
2
dz
dA =
ZZ
D
(2 ¡x
2
¡ y
2
) dA:
131
Using the polar coor dinate, we obtain
V =
Z
0
2π
Z
0
2
p
(2 ¡r
2
) rdr dθ = 2π
61 Engineering applications
Triple integrals usually comes into consideration in engineering studies when we are going to evaluate
a spatial distributed quantities, that are, quantities that re d istributed over a bounded domain of
the space or in an unbounded portion of it. Below, we solve a few examples to illustrate the idea.
Example 103. A solid lies within the cylinder x
2
+ y
2
= 1 below the plane z = 4 and a bove t he
paraboloid z = 1 ¡x
2
¡y
2
. The density is given by
ρ(x; y; z) = x
2
+ y
2
p
:
Find the total mass.
Solution. The domain D in the xy-plane is the unit disk D = f(x; y); x
2
+ y
2
≤1g. The total mass is
M =
ZZZ
E
dm =
ZZ
D
Z
1¡x
2
¡y
2
4
x
2
+ y
2
p
dz
dA:
We have
M =
ZZ
D
x
2
+ y
2
p
(3 + x
2
+ y
2
) dA:
Using the polar coor dinate system, we can write the integral as
M =
Z
0
2π
Z
0
1
r (3 + r
2
) rdrdθ =
12
5
π:
Example 104. Find the center of mass of a solid of constant density ρ
0
that is bounded by the
parabolic cylinder x = y
2
and the planes x = 1; z = 0 and z = x
Solution. We first find the domain D on the xy-plane. The domain i s shown below
x = 1
x = y
2
x
y
D
We firs t find the total mass:
M =
ZZZ
D
ρ
0
dV =
ZZ
D
Z
0
x
ρ
0
dz
dA =
ZZ
D
ρ
0
xdA:
132
The double integral at the right can be expressed as
ZZ
D
ρ
0
xdA =
Z
0
1
(
Z
¡ x
p
x
p
ρ
0
xdy
)
dx =
Z
0
1
2ρ
0
x
3
2
=
4 ρ
0
5
:
Now , t he center of mass c an be written as
x¯ =
1
M
ZZZ
E
xρdV =
5
4ρ
0
ZZ
D
Z
0
x
ρ
0
xdz
dA =
5
4
ZZ
D
x
2
dA =
5
4
Z
0
1
(
Z
¡ x
p
x
p
x
2
dy
)
dx =
5
2
Z
0
1
x
5
2
dx =
5
7
:
y¯ =
1
M
ZZZ
E
yρdV =
5
4ρ
0
ZZ
D
Z
0
x
ρ
0
ydz
dA =
5
4
ZZ
D
xydA =
5
4
Z
0
1
x
(
Z
¡ x
p
x
p
ydy
)
dx = 0:
z¯ =
1
M
ZZZ
E
zρdV =
5
4ρ
0
ZZ
D
Z
0
x
ρ
0
zdz
dA =
5
8
ZZ
D
x
2
dA =
5
8
Z
0
1
(
Z
¡ x
p
x
p
x
2
dy
)
dx =
5
4
Z
0
1
x
5
2
dx =
5
14
:
Example 105. Find the moment of inertia of the solid in the previous example about the center
of ma ss.
Solution. We use the formula
I
(x¯; y¯;z¯)
=
ZZZ
E
fx
2
+ y
2
+ z
2
g ρ(x; y; z) dV ¡(x¯
2
+ y¯
2
+ z¯
2
) M ;
wher e (x¯; y¯; z¯) is the center of mass M . We have
ZZZ
E
fx
2
+ y
2
+ z
2
g ρ(x; y; z) dV =
ZZ
D
Z
0
x
fx
2
+ y
2
+ z
2
g ρ
0
dz
dA = ρ
0
ZZ
D
4
3
x
3
+ xy
2
dA:
The double integral can be expressed as the repeat ed integral:
ρ
0
ZZ
D
4
3
x
3
+ xy
2
dA = ρ
0
Z
0
1
(
Z
¡ x
p
x
p
4
3
x
3
+ xy
2
dy
)
dx = ρ
0
Z
0
1
8
3
x
p
x
3
+
2
3
x
2
x
p
dx =
148
189
ρ
0
:
Ther efore, the moment of i nertia about the center of mass is
I
(x¯; y¯;z¯)
=
148
189
ρ
0
¡
100
196
ρ
0
≈0.27ρ
0
62 Exercises
Exercise 130. Let f be a continuous function. Show the foll owing relation:
Z
0
x
Z
0
y
Z
0
z
f(t) dtdzdy =
1
2
Z
0
x
(x ¡t)
2
f(t) dt:
Fo r the sake of simplicity, assume tha t x ≥0, y ≥0, and z ≥0.
133
Lecture
Change of domain and spherical coordina te
63 Change of domai n in triple integrals
Similar to double integral, a formula for the change of domain can be defined for triple integrals, As
we will see below, one of such transformations which is called the spherical coordinate transformation
is frequently used in evaluating triple integrals and integral over surfaces that we study in subsequent
lectures..
Consider the following integral
I =
ZZZ
E
f(x; y; z) dV ; (9)
and assume that x; y and z themselves are functions of other variables of other three variables q
1
;
q
2
; q
3
, that is,
': x = x(q
1
; q
2
; q
3
); y = y(q
1
; q
2
; q
3
); z = z(q
1
; q
2
; q
3
);
where (q
1
; q
2
; q
3
) ranges in another volume E
0
. In this way, ' is a mapping of ' : E
0
!E with the
given transformation or change of coordinate.
To rewrite the given triple integral (9) in the new domain and coordinate, we need to evaluate dV
in the new domain. The function f in the n ew coordinate is simply reads:
f = f(x(q
1
; q
2
; q
3
); y(q
1
; q
2
; q
3
); z(q
1
; q
2
; q
3
)):
To evaluate dV = dxdy dz in the coordinate (q
1
; q
2
; q
3
), we do as follows. We can write
dx =
@x
@q
1
dq
1
+
@x
@q
2
dq
2
+
@x
@q
3
dq
3
:
Similarly, we have
dy =
@y
@q
1
dq
1
+
@y
@q
2
dq
2
+
@y
@q
3
dq
3
;
dz =
@z
@q
1
dq
1
+
@z
@q
2
dq
2
+
@z
@q
3
dq
3
:
In the matrix form, we can write
0
@
dx
dy
dz
1
A
= J
'
0
@
dq
1
dq
2
dq
3
1
A
;
134
where J
'
is called the Jacobi matrix of ':
J
'
=
2
6
6
6
6
6
6
6
6
6
6
4
@x
@q
1
@x
@q
2
@x
@q
3
@y
@q
1
@y
@q
2
@y
@q
3
@z
@q
1
@z
@q
2
@z
@q
3
3
7
7
7
7
7
7
7
7
7
7
5
:
From the geometrical point of view, the vector (1; 0; 0) dq
1
is mapped by the transformation J
'
to the vector T
1
=
@x
@q
1
@x
@q
2
@x
@q
3
dq
1
, and similarly the vector (0; 1; 0) dq
2
to the vector T
2
=
@y
@q
1
@y
@q
2
@y
@q
3
dq
2
, and (0; 0 ; 1) dq
3
to T
3
=
@z
@q
1
@z
@q
2
@z
@q
3
dq
3
.
Now, we use our knowledge form linear alg ebra to write the volume constructed on the vectors T
1
;
T
2
ad T
3
:
dV = jT
3
·(T
1
×T
2
)j= jdet J
'
jdq
1
dq
2
dq
3
:
q
1
q
3
(0; 0; 1) dq
3
(1; 0; 0) dq
1
T
3
T
1
dV = jT
3
·(T
1
×T
2
)j
(0; 1; 0) dq
2
q
2
x
y
z
T
2
From the geometrical point of view, if we choose dV in the (x; y; z) coordinate as shown in the
above figure, then in the (q
1
; q
2
; q
3
)-coordinate, the volume is as simple as shown in the figure.
As we observe the obtained formula is completely the same for two-variable substitutions in double
integrals. Finally, the given integral (9) in E
0
reads
ZZZ
E
f(x; y; z) dV =
ZZZ
E
f(x(q); y(q); z(q)) jdet J
'
jdV
0
;
where q = (q
1
; q
2
; q
3
).
Example 106. Evaluate the volume of the ellipsoid
E:
x
2
a
2
+
y
2
b
2
+
z
2
c
2
= 1:
Solution. We should e valuate the triple integral
V =
ZZZ
E
dV :
135
Let's represent x = aq
1
; y = bq
2
and z = cq
3
. Thus the variables q
1
; q
2
; q
3
satisfies the re lat ion
E
0
: q
1
2
+ q
2
2
+ q
3
2
= 1;
which is a sphe re. Th erefore, the above transformation, tran sform a unit ball to the given ellipsoid. Therefore,
the above integral can be written on E
0
as
V =
ZZZ
E
0
abcdV
0
= abc
ZZZ
E
0
dV
0
;
wher e abc = jdet J
'
j. Since the volu me of a unit ball is
4
3
π, the volume of a ellipsoid is obtained V =
4
3
πabc.
64 Cylindrica l coordinate
A point (x; y; z) in R
3
can be characterized by the triple (r;θ; z) where (r; θ) are the polar coordinate
components i the xy-plane.
p
x
y
r
θ
z
This transformation leads to
dV = rdrdθdz
and thus the triple integral over a cylinder of radius a and height z = 0 to z = H can be written as
ZZZ
E
f(x; y; z) dV =
Z
0
H
Z
0
2π
Z
0
a
f(r cos(θ); r sin(θ); z) rdrdθdz:
Example 107. Let E be the cylinder with the base x
2
+ y
2
¡2x = 0 bounded between z = 0 and
the plane z + x = 2. This region is region, the mass density ρ = x
2
+ y
2
p
is given. Determine the
total mass of in E.
Solution. Using the cylindrical coordinate x = r cos(θ); y = r sin(θ); z = z, the integr al becomes
M =
Z
¡
π
2
π
2
Z
0
2cos(θ)
Z
0
2¡r cos(θ)
r
2
dzdrdθ:
136
A simple calculation gives
M =
128
45
65 Spheric al coordinate
In the spherical coordinate, a point p is represent ed by three components (ρ; φ; θ), where ρ is
the distance of p to the origin, φ is the angle of the line ρ to the z-axis, and θ is the angle of the
projection of ρ to the xy-plane with the x-axis:
p
z
x
y
φ
ρ
θ
The domain of coordinates are ρ ≥0, 0 ≤φ ≤π and 0 ≤θ ≤2π. The following transformations holds:
x = ρ sin(φ) cos(θ) ; y = ρ sin(φ) sin(θ); z = ρ cos(φ):
Notice that
x
2
+ y
2
+ z
2
= ρ
2
sin
2
(φ) cos
2
(θ) + ρ
2
sin
2
(φ) sin
2
(θ) + ρ
2
cos
2
(φ) = ρ
2
sin
2
φ + ρ
2
cos
2
(φ) = ρ
2
:
Therefore, ρ = a in spherical coordinate represents a sphere of radius a. For θ constant, and incre-
ment of dφ, the arc length on the sphere of radius ρ is equal ds = ρdφ. For φ constant and increment
of dθ, the arc length is equal ds = ρ sin(φ) dθ; see the following figures.
ρ
dθ
r
rdθ = ρ sin(φ) dθ
φ
φ
dφ
ρdφ
Therefore, the surface differential is equal
dS = ρdφρ sin(φ) dθ = ρ
2
sin(φ) dφdθ:
137
The volume differential is derived by the relation
dV = dρdS = ρ
2
sin(φ) dρdφdθ:
Te above formula also can be derived by calculating the determinant of the Jacobean of the trans-
formation. We have
J
'
=
2
6
6
4
sin(φ) cos(θ) ¡ρ sin(φ)sin(θ) ρ cos(φ) cos(θ)
sin(φ) sin(θ) ρ sin(φ) cos(θ) ρ cos(φ) sin(θ)
cos(φ) 0 ¡ρ sin(φ)
3
7
7
5
;
and then jdet J
'
j= ρ
2
sin(φ), and then we obtain dV = ρ
2
sin(φ) dρdφdθ.
Example 108. Find the volume and the surface area of a sphere of radius a > 0.
Solution. The volum e:
V =
Z
0
2π
Z
0
π
Z
0
a
ρ
2
sin(φ) dρdφdθ = 2π
Z
0
π
sin(φ) dφ
Z
0
a
ρ
2
dρ =
4
3
πa
3
:
The su rface area
S =
Z
0
2π
Z
0
a
a
2
sin(φ) dφdθ = 4πa
2
:
Example 109. Find the volume enclosed by the cone φ =
π
3
and the sphere x
2
+ y
2
+ z
2
= 1.
Solution. The volum e is
V =
Z
0
2π
Z
0
π
3
Z
0
1
ρ
2
sin(φ) dρdφdθ =
π
3
:
Example 110. Use spherical coordinate to find the volume of the solid lies above the cone z =
x
2
+ y
2
p
and below the sphere x
2
+ y
2
+ z
2
= z.
Solution. The equation z = x
2
+ y
2
p
in sp herical coo rdinate reduces to
ρ cos(φ) = ρ sin(φ) ) φ =
π
4
:
The equation x
2
+ y
2
+ z
2
= z becomes
ρ
2
= ρ cos(φ) ) ρ = cos(φ):
Ther efore, the volu me is
V =
Z
0
2π
Z
0
π
4
Z
0
cos(φ)
ρ
2
sin(φ) dρdφdθ = 2π
Z
0
π
4
sin(φ)
Z
0
cos(φ)
ρ
2
dρ
dφ =
2π
3
Z
0
π
4
sin(φ) cos
3
(φ) dφ =
π
8
:
138
Example 111. Consider the volume D enclosed by the cones φ = π /6 and φ = π/3 within the unit
ball ρ = 1, where φ represents the angle with respect to the z-axis in a clo ckwise direction. Given
the density function f(x; y; z)=x
2
+y
2
+z
2
in D, determine the moment of inertia about the center
of ma ss.
Solution. Here we u se the spherical coordinat e. We first find the total mass in D:
M =
Z
π
6
π
3
Z
0
2π
Z
0
1
ρ
2
ρ
2
sin(φ) dρdθdφ
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{z
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
dV
=
π( 3
p
¡1)
5
:
The center of mass
x¯ =
1
π( 3
p
¡ 1)
5
Z
π
6
π
3
Z
0
2π
Z
0
1
ρ sin(φ) cos(θ) ρ
4
sin(φ) dρdθdφ = 0
y¯ =
1
π( 3
p
¡ 1)
5
Z
π
6
π
3
Z
0
2π
Z
0
1
ρ sin(φ) sin(θ) ρ
4
sin(φ) dρdθdφ = 0
z¯=
1
π( 3
p
¡ 1)
5
Z
π
6
π
3
Z
0
2π
Z
0
1
ρ cos(φ) ρ
4
sin(φ) dρdθdφ =
5
12( 3
p
¡1)
:
The moment of inertia
I
(x¯;y¯;z¯)
=
ZZZ
D
fx
2
+ y
2
+ z
2
g ρ(x; y; z)dV ¡fx¯
2
+ y¯
2
+ z¯
2
gM:
We have
ZZZ
D
fx
2
+ y
2
+ z
2
g ρ(x; y; z)dV =
Z
π
6
π
3
Z
0
2π
Z
0
1
ρ
6
sin(φ) dρdθdφ =
π( 3
p
¡1)
7
;
and then
I
(x¯;y¯;z¯)
=
π( 3
p
¡1)
7
¡
5π
144( 3
p
¡1)
:
66 Exercises
Exercise 131. Find the center of mass of th e object E if the density is ρ = (x ¡1)
2
+ y
2
p
. Hint: you may wis h
to use the t ransformation x = 1 + r cos (θ); y = r s in (θ).
Exercise 132. From the above transformation, we can calcu lat e dS as foll ows. Fix a point (φ
0
; θ
0
) on the sphere
ρ = a. Consi der the curves
r
1
(φ) = (a sin(φ) cos(θ
0
); a sin(φ) sin(θ
0
); a cos(φ));
and
r
2
(θ) = (a sin(φ
0
) cos(θ); a sin(φ
0
) si n(θ); a cos(φ
0
)):
Calculate r
1
0
(φ
0
) and r
2
0
(θ
0
). The surface differential is
dS = jr
1
0
(φ
0
) ×r
2
0
(θ
0
)jdφdθ:
Show that this differential is
dS = a
2
sin(φ
0
) dφdθ:
Exercise 133. Show that the force exerted by an o bject in the s hape of a unit ball with homogeneous d ensity
function to a point outside of it remains unchanged if the object is concentrated to its center of mass.
139
Lecture
Curves, surfaces and tangent planes
67 Planar and spatial curves
67.1 Graph of an explicit function
Let y = f(x) be a continuously differe ntiable function. The graph of this function is the set of all
points (x; y) that satisfies the function:
G
f
= f(x; y); y = f(x)g:
This set of points represents a curve in the xy-plane.
(x; f(x))
x
y
The curve G
f
is smooth if f
0
(x) exists for all x in D
f
, the domain of f. For example, functions
f(x) = jxj or f(x) = x
2
3
are not smooth as their derivatives at x = 0 are not defined.
If G
f
is a smooth vector for an explicit function y = f(x), it posses a tangent line on each point on
the curve. The tangent line T
f
at a point (a; f (a)) is
T
f
(x) = f(a) + f
0
(a) (x ¡a):
The function T
f
satisfies an important property, that is,
lim
x!a
f(x) ¡T
f
(x)
x ¡a
= 0:
The above relation means that T
f
(x) approaches f (a) faster than approaching x to a, or equivalently,
the distance between f(x) and T
f
(x) is very small compare to the distance jx ¡aj for x nearby a.
67.2 Level curves of implicit functions
In physics and engineering, we often study curves that can not be represented by an explicit function.
ANother way to represent a planar curve is through an implicit function g(x; y) = 0. The set of all
points that satisfies an implicit function is called a level-curve:
G
g
= f(x; y); g(x; y) = 0g:
140
the set of points that satisfies an implicit function can be empty, one point of a c urve in the xy-
plane. For example, consider the function x
2
+ y
2
+ c = 0. Evidently, there is no point that satisfies
the function if c > 0, and it is only one if c = 0. For c < 0, the level-curve is a circle of radius ¡c
p
.
Example 112. Th con ic section curves are the quadratic polynomials of the form:
ax
2
+ by
2
+ 2cxy + dx + ey = C ;
where a; b; c; d; e and C are con stant. For example, the equation x
2
+ y
2
= C, for C > 0 is a circle,
the equation
x
2
a
2
+
y
2
b
2
= 1;
is an ellipse, and
x
2
a
2
¡
y
2
b
2
= 1;
is an hyperbola. A parabola is expressed if either a = 0 or b = 0, but not both o f them. Note that
const ants d and e translate the curve. In fact, we can rewrite the above equation by completing the
squares as:
a (x ¡x
0
)
2
+ b (y ¡ y
0
)
2
+ 2c (x ¡x
0
) (y ¡ y
0
) = K;
for some constants x
0
; y
0
and K. What is the role of the multiplicative term 2cxy in the equation?
To answer that, let's study the following equation:
ax
2
+ by
2
+ 2cxy = K:
Let left-hand side of the equation can be written as
ax
2
+ by
2
+ 2cxy = (
x y
)
a c
c b

x
y
:
We focus on the matrix
A :=
a c
c b
:
In linear algebra, we saw that the matrix of the form A are called symmetric, and they have two
orthogonal eigenvectors
v
2
v
1
λ
1
v
1
λ
2
v
2
A
X
Y
141
Thus, by rotating the coordinate (x; y) to (X ;Y ) where X is the direction of v
1
and Y is the direction
of v
2
, then the matrix A changes to the diagonal
λ
1
0
0 λ
2
, where λ
1
and λ
2
are the eigenvalues
associated to eigenvectors v
1
and v
2
respectively. In other word, we have
(
x y
)
a c
c b

x
y
= (
X Y
)
λ
1
0
0 λ
2

X
Y
= λ
1
X
2
+ λ
2
Y
2
:
Therefore, the conic section
ax
2
+ by
2
+ 2cxy = K ;
in the (x; y) coordinate is equivalent to the conic section
λ
1
X
2
+ λ
2
Y
2
= K;
in the rotated coordinate (X ; Y ). Therefore, if λ
1
λ
2
> 0, the section is an ellipse, if λ
1
λ
2
< 0 it is a
hyp erbola, and if λ
1
λ
2
= 0, it is a parabola. For example, the figures below depict the graphs of the
function x
2
+ y
2
+ xy = 1 and x
2
+ y
2
+ 4xy = 1:
Based on an important result in mathematics, an implicit function g(x; y) = 0 can be solved for y
as y = y(x) in an open set of a point x
0
if
i. there is y
0
such that g(x
0
; y
0
) = 0 , and
ii. g
y
0
(x
0
; y
0
) =/ 0,
where g
y
0
is the partial derivative of g with respect to y. For example, consider the function x
2
+ y
2
=
1. This implicit function can be solved for y inn open set around x
0
= 0. In fact, the point (0; 1) lie
son the circle and for x 2(¡1; 1), the function y(x) is y(x) = 1 ¡x
2
p
. If we change y
0
to ¡1, that
is, if the focal point changes to (0; ¡1), the function y changes t: y(x) = ¡ 1 ¡x
2
p
. Note that for
x
0
= 1, there is no interval around x
0
that y can be solved uniquely in terms of x.
Definition 113. A point (x
0
; y
0
) is called a critical or a singular point for an implicit function
g(x; y) = 0 if
g
x
0
(x
0
; y
0
) = 0 ; g
y
0
(x
0
; y
0
) = 0 :
A planar curve g(x; y) = 0 is called smooth if there is no singular point for the curve. There are
different types of singular point s for a curve. Consider, for example, the following implicit function
g(x; y) := αx
2
+ x
3
¡y
2
= 0 where α is a constant. The system
(
g
x
0
(x; y) = 0
g
y
0
(x; y) = 0
;
142
is solved for the p oints (0; 0),
¡2
3
; 0
. Evidently, the second po int is not on the curve and then the
curve has only one singular point (0; 0). The figure below depicts the graph for α = 0:
A point of this type is called a cusp. When α increases, the curve is deformed into a shape like the
one depicted below:
A point of this type is called a node. For α < 0, the point (0; 0) becomes isolated and the curve is
deformed into the following one:
A point of this type is called an isolated point. Th e justification of t he above behavior will be clear
if we consider the Taylor expansion of the function g(x; y) = 0 :
g(x
0
+ δx; y
0
+ δy) ≈g(x
0
; y
0
) + g
x
0
(x
0
; y
0
) δx + g
y
0
(x
0
; y
0
) +
1
2
(
δx δy
)
"
g
xx
00
g
xy
00
g
xy
00
g
yy
00
#
(x
0
;y
0
)
δx
δy
:
If (x
0
; y
0
) is a singular point , by choosing δx; δ
y
such that g(x
0
+ δx; y
0
+ δy) lies on the curve, we
obtain:
0 ≈
1
2
(
δx δy
)
"
g
x x
00
g
xy
00
g
xy
00
g
yy
00
#
(x
0
;y
0
)
δx
δy
:
For the give n function g, we have
0 ≈¡αδx
2
¡δy
2
:
When α >0, we obtain δx=δy =0, an isolated point. When α< 0, the equation looks like a hyperbola
δy = ± ¡α
p
δx.
143
The equation of the tangent line to a level curve at (x
0
; y
0
) on the curve can be derived as follows:
Using the total differential of g, we can write
dg = g
x
0
dx + g
y
0
dy = 0;
and thus the slope of tangent line at(x
0
; y
0
) is
dy
dx
= ¡
g
x
0
(x
0
; y
0
)
g
y
0
(x
0
; y
0
)
;
as long as g
y
0
(x
0
; y
0
) =/ 0. There for,e the equation of tangent line can be written as
T
g
(x) = y
0
¡
g
x
0
(x
0
; y
0
)
g
y
0
(x
0
; y
0
)
(x ¡x
0
):
67.3 Parametric curves
Anot her way to represent a curve in R
2
and even i n high er dimensional spaces is using parame-
trization. A curve C in R
2
can be parameterized using a parametric map: r: I ⊂R !R
2
, where I
is an interval, say [a; b]. This map can be represented as r (t) = (x(t); y(t)) for any t in I. A space
parametric curve is represente d as r(t) = (x(t); y(t); z(t)) for t ranging in an interval.
r(t)
r(t)
a b
t
From physics point of view, a parametric curve can be considered as the path or trajectory of a
particle in the plane or space, and the parameter t is interpreted as time. Thus x
j
(t) is interpreted
as the j
th
component of the position of the particle in the space. The derivative r
0
(t) is interpreted
as the velocity vector of the particle at time t. This physical interpretation is connected to the
geometry is we note that r
0
(t) is the tangent vector on the trajectory r at time t.
r
0
(t)
r(t)
The magnitude of the velocity which is defined as
jr
0
(t)j= jx
0
(t)j
2
+ jy
0
(t)j
2
+ jz
0
(t)j
2
q
;
144
is called the speed of particle at time t. Based on our knowledge from physics, the total length
traveled by a particle in an interval [0; T ]:
s(T ) =
Z
0
T
jγ
0
(t)jdt;
and thus the expression jr
0
(t)jdt is called the arc length differential.
Definition 114. A parametric curve r: [a; b] !R
n
is called smooth if r
0
(t) exists for any t 2(a; b)
and r
0
(t) =/ 0. This implies that the curve defined by r(t) has tangent vector on all its points.
Remark. Note that the graph of an explicit function y = f(x) can be considered as a parametric
curve with the natural parametrization r(x) = (x; f (x)) where x is the parameter.
Remark. It worth to note a difference between a geometrica l curve and its parametrization. For
example, the curve C: f(x; y); x
2
+ y
2
= a
2
g is a circle of radius a in the xy-plane that can be
parametrized in different ways, for instances, r
1
: (a cos(t); a sin(t)) or r
2
: (a cos(!t); a sin(!t)) for
any ! =/ 0. Even though both r
1
and r
2
are geometrically represent the same circle of radius a, they
refer to two different motions from the physics point of view. In fact, the speed of r
1
is j r
1
0
j= a and
thus travels t he whole circle in time T = 2π. The speed ofr
2
is jr
2
0
j= a j!j and thus rotate a round
the circle in time T =
2π
j!j
.
68 Surface s
A surfaces in R
3
as a two-dimensional geometrica l object can be represented as the graph of an
explicit function z = f (x; y), or the leve l points of a n implicit function g, say g(x; y; z) = 0, or by
a parametric map: Σ(t; s) = (x(t; s); y(t; s); z(t; s)).
x
y
z
t
s
D S
Σ
Σ(t; s) = (x(t; s); y(t; s); z(t; s))
Representing a surface by a parametric ma pping is most powerful method for surface representation.
That mean s that all explicit or implicit surfaces can be represent ed in a parametric form. However,
there are parametric surfaces that can not be explicitly represented as z = f(x; y). For example, a
sphere of the parametric form
Σ(θ; φ) = (a sin(φ) cos(θ); a sin(φ) sin(θ); a cos(θ) );
145
can not be expressed in the explicit form z = f (x; y). The above map for 0 ≤φ ≤π, 0 ≤θ ≤2π rep-
resents the surface of a sphere of radius a. The figure below depicts the geometrical interpretat ions
of φ and θ. The parameter φ is the angle o f a point p on the sphere that makes with the zaxis.
This angles ranges from the north pole (1; 0; 0) with φ = 0 to the south pole (¡1; 0; 0) with φ = π.
The parameter θ is the angle that the projection of 4pA on the xy-plane makes with the x-axis
and rotates a whole period 2π from θ = 0 to θ = 2π. As we observe, we need only two independent
parameters to represent a surface.
θ
φ
p
x
y
z
In the above parametrization, if we relate θ and φ to one parameter, say t, that is, if θ = θ(t) and
φ = φ(t), then we obtain a parametric curve located on the sphere:
r(t) = (a sin(φ(t)) cos(θ(t)); a sin(φ(t)) sin(θ(t)); a cos(φ(t))):
For example, the curve generated by the function φ(t) = 1 ¡t, θ(t) = 1 + t is shown below:
This figure is generated by the following code in Matlab:
sphere; axis equal; shading interp;
view([135 17])
hold on
t=linspace(0,2*pi,100);
fi=1-t; th=1+t;
xt=sin(fi).*cos(th);
yt=sin(fi).*sin(th);
zt=cos(fi);
h = animatedline;
h.Color='r';
for k = 1:length(t)
addpoints(h,xt(k),yt(k),zt(k));
146
drawnow
end
A parametric surface can represent complicated surfaces. A torus shown below has the parametric
representation as:
x(t; s) = (a + b cos(s)) cos(t); y(t; s) = (a + b cos(s)) sin(t); z(t; s) = b sin(s);
The following surface is generated by the parametrization:
x(t; s) = (a + b cos(s)) cos(t); y(t; s) = (a + b cos(s)) sin(t); z(t; s) = t + b sin(s):
Note that any explicit function z = f (x; y) can be naturally represented as the parametrization:
Σ(x; y) = (x; y; f (x; y)):
69 Norm al vector and surface diffe rential
69.1 Parametric surfaces
Consider a surface S parametrized as Σ(t; s)= (x(t; s); y(t; s); z(t; s)). For a fixed s =s
0
, the mapping
reduces to a parametric curve:
r(t) := Σ(t; s
0
) = (x(t; s
0
); y(t; s
0
); z(t; s
0
)):
147
This curve lies on the surface S, and a mapping of the horizontal line (t; s
0
) to S as r(t) ⊂S. This
is a grid line on the surface associated to s
0
. Similarly, for fixed t = t
0
, the parametrization reduces
to the curve δ(s) = Σ(t
0
; s). This curve is also lies on S and is the projection of the vertical line
(t
0
; s) to the surface S.
x
y
t
s
D
r
1
(t)
r
2
(s)
z
Σ
S
Now, consider the curve r
1
(t) ⊂S. As we know, the tangent vector to this parametric curve at t = t
0
is r
1
0
(t
0
) = Σ
t
(t
0
; s
0
). Since r
1
(t) lies on S, Σ
t
(t
0
; s
0
) is tangent on S. Similarly, for the curve r
2
(s),
the tangent vector at s
0
is r
2
0
(s
0
) = Σ
s
(t
0
; s
0
). This vector is tangent on S too, and thus we obtain
two tangent vectors on S as Σ
t
and Σ
s
.
x
y
z
t
s
Σ
D
S
r
2
0
(s)
r
1
0
(t)
r
1
0
(t) ×r
2
0
(s)
If these two tangent vectors are not parallel (and of course not zero), then the set of vectors
spanfΣ
t
(t
0
; s
0
); Σ
s
(t
0
; s
0
)g is tangent to S at Σ(t
0
; s
0
). This set constructs the tangent plane on S
at the given p o int Σ(t
0
; s
0
). Moreover, the vector Σ
t
×Σ
s
is perpendicular vec tor on S.
Σ
t
dt
Σ
t
Σ
s
dS = jΣ
t
×Σ
s
jdtds
Σ
t
×Σ
s
Σ
s
ds
Definition 115. Let Σ(t; s) be a parametric map with continuous partial derivat ives Σ
t
; Σ
s
. The
vector Σ
t
×Σ
s
is perpendicular to the surface (if Σ
t
×Σ
s
is non-zero). The unit normal vector is:
n^ =
Σ
t
×Σ
s
jΣ
t
×Σ
s
j
:
148
The magnitude of the vector Σ
t
×Σ
s
, i.e., jΣ
t
×Σ
s
jdtds is the surface differential
dS = jΣ
t
×Σ
s
jdtds:
Definition 116. A surface Σ (t; s) for (t; s) 2D ⊂R
2
is called smooth if partial derivatives Σ
t
and
Σ
t
are continuous and moreover Σ
t
×Σ
s
=/ 0 for all (t; s) in the interior of the domain D.
The condition Σ
t
×Σ
s
=/ 0 has an apparent geometrical justification. The vector Σ
t
×Σ
s
is zero if
either one of Σ
t
or Σ
s
is zero, or that Σ
t
and Σ
s
are parallel. If Σ
t
and Σ
s
are parallel, the surface
does not h ave a unique tangent plane.
Example 117. Consider the parametrization of the sphere
Σ(θ; φ): fx(θ; φ) = a sin(φ) cos(θ); y(θ; φ) = a sin(φ) sin(θ); z(θ; φ) = a cos(φ)g ;
where θ; φ ranges in the domain (θ; φ) 2[0; 2π] ×[0; π]. For φ = φ
0
a fixed value, the grid l ine or
curve on the surface S is:
r(θ) = (
a sin(φ
0
) cos(θ); a sin(φ
0
) sin(θ); a cos(φ
0
)
):
For θ = θ
0
, the grid line or curve on S is
δ(φ) = (
a sin(φ) cos(θ
0
); a sin(φ) sin(θ
0
); a cos(φ)
):
Two tangent vectors at (θ
0
; φ
0
) are:
Σ
θ
= (
¡a sin(φ
0
)sin(θ
0
); a sin(φ
0
) cos(θ
0
); 0
);
Σ
φ
= (
a cos(φ
0
) cos(θ
0
); a cos(φ
0
) sin(θ
0
); ¡a sin(φ
0
)
):
These two tangent vectors are linearly independent and tang ent to the sphere. as shown blow
Now, let's find the perpendicular vector on the sphere at an arbitrary point (θ
0
; φ
0
). Since Σ
θ
and
Σ
φ
are tangent on the sphere, the cross product vector Σ
φ
×Σ
θ
(or Σ
θ
×Σ
φ
) are perpendicular to
the sphere. We have:
Σ
φ
×Σ
θ
= a
2
sin(φ)(
sin(φ) cos(θ); sin(φ) sin(θ); cos(φ)
):
149
Note that the surface differential is
dS = ja
2
sin(φ)(
sin(φ) cos(θ); sin(φ) sin(θ); cos(φ)
)jdφdθ = a
2
sin(φ) dφdθ;
as we saw in previous lectures. The unit normal vector n^ is obtained by normalizing t his vector as:
n^ =
Σ
φ
×Σ
θ
jΣ
φ
×Σ
θ
j
= (
sin(φ) cos(θ); sin(φ) sin(θ); cos(φ)
):
Notice that for x = a sin(φ) cos(θ), y = a sin(φ) sin(θ) and z = a cos(φ), the unit normal vector can
be written as
n^ =
x
a
;
a
a
z
a
:
This result is completely conforms our knowledge from the geometry of a sphere that the radius is
perpendicular to the sphere.
Remark. Recall that the equation of tangent plane at a point (x
0
; y
0
; z
0
) on a surface S can be
written using the normal vector n^ on S at the given point as:
n^ ·(x ¡x
0
; y ¡ y
0
; z ¡z
0
) = 0 :
Example 118. Let's write the equation of the tangent plane on the surface
Σ(t; s) = (s cos(t); s sin(t); s
2
cos(2t));
and the point s =
1
2
; t = π. Recall that for the tangent plane we need the perpendicula r vector on
the surface. We have
Σ
t
= (¡s sin(t); s cos(t); ¡2s
2
sin(2t)); Σ
s
= (cos(t); sin(t); 2s cos(2t));
and then the normal vector at the given point is:
Σ
t
×Σ
s
j
s=
1
2
;t=π
=
i
^
j
^
k
^
¡s sin(t) s cos(t) ¡2s
2
sin(2t)
cos(t) sin(t) 2s cos(2t)
s=
1
2
;t=π
=
¡1
2
; 0 ;
¡1
2
:
The point is (x
0
; y
0
; z
0
) is
¡
1
2
; 0;
1
4
and then the equation of tang ent plane is:
¡
1
2
x +
1
2
¡
1
2
z ¡
1
4
= 0;
or equivalently x + z = ¡
1
4
.
150
69.2 Surfaces of explicit functions
A function z = f(x; y) can be geometrically considered as a surface in R
3
with the natural param-
etrization:
Σ(x; y) = (x; y; f (x; y)):
With this parametrization, the tangent vectors are:
Σ
x
= (1; 0; f
x
); Σ
y
= (0; 1; f
y
);
and then Σ
x
×Σ
y
= (¡f
x
; ¡f
y
; 1 ). The unit normal vector on the surface is then
n^ =
(¡f
x
; ¡f
y
; 1)
1 + jrf j
2
p
;
where 1 + jrf j
2
q
is the magnitude of (¡f
x
; ¡f
y
; 1 ).
Example 119. Consid er the function z = x
2
+ y
2
. This function as a surface is called a paraboliod
in R
3
. The perpendicular vector on on the surface at a n arbitrary point (x; y) is (¡2x; ¡2y; 1),
and thus the unit normal vector on the surface is
n^ =
(¡2x; ¡2y; 1)
1 + 4x
2
+ 4y
2
p
:
The equation of tangent plane on this surface a t (1; 1; 2) is
¡2(x ¡1) ¡2(y ¡1) + z ¡2 = 0;
or equivalently
¡2x ¡2y + z = ¡2:
It is simply seen that the surface can also parametrized as:
Σ(t; s) = (s cos(t); s sin(t); s
2
):
You can simply verify that z = s
2
= x
2
+ y
2
. The normal vector on this surface is
Σ
t
×Σ
s
=
i
^
j
^
k
^
¡s sin(t) s cos(t) 0
cos(t) sin(t) 2s
= ¡s(¡2s cos(t); ¡2s sin(t); 1):
The unit normal vector is
n^ =
Σ
t
×Σ
s
jΣ
t
×Σ
s
j
=
(¡2s cos(t); ¡2s sin(t); 1)
1 + 4s
2
p
:
151
You can verify that for the given parametrization x = s cos(t), and y = s sin(t), the following relation
holds:
(¡2s cos(t); ¡2s sin(t); 1)
1 + 4s
2
p
=
(¡2x; ¡2y; 1)
1 + 4x
2
+ 4y
2
p
:
69.3 Surfaces of implicit functions
An implicit function g(x; y; z) = 0 can be considered as a surface in R
3
. Note that every explicit
function z = f (x; y) can be interpreted as the implicit one as z ¡ f (x; y) = 0. What is the normal
vector to this implicit surface? Let r(t) = (x(t); y(t); z(t)) be an arbitrary curve on the surface, that
is,
g(x(t); y(t); z(t)) ≡0;
for an open interva l of t. According to the chain rule for the equation
dg
dt
= 0 we obtain
rg ·r
0
(t) = 0:
Since r
0
(t) is a tangent vector on the surface (recall that r(t) lies on the surface), then rg is
perpendicular to the surface. In fact, we saw this relation in our previous lectures that the gradient
of function g is perpendicular to its level surfaces. The surface g = 0 is a level surf ace of the function
g(x; y; z) with value 0, and thus rg is perpendicular to this surface.
Example 120. Consider the sphere
x
2
+ y
2
+ z
2
= a
2
:
The gradient of this function is
rg = (2x; 2y; 2z);
and then the unit normal vector is
n^ =
(2x; 2 y; 2z)
2 x
2
+ y
2
+ z
2
p
=
x
a
;
y
a
;
z
a
:
Remark. The implicit rep resenting of a an explicit one z = f(x; z), is denoted as
g(x; y; z) = z ¡f(x; y) = 0:
The gradient of g is rg =(¡f
x
;¡f
y
;1), a formula that we derived by another method in the previous
section.
70 Exercises
Exercise 134. Find the curve of the intersection of two surfaces
x
2
+ y
2
+ z
2
= 4; x
2
+ y
2
¡2x = 1;
152
for z > 0. Determine the do main of the parameter of the curve and use M atl ab a nd draw the curve.
Exercise 135. Find the curve of the intersection of two surfaces
x
2
+ y
2
+ z
2
¡2x = 1; x
2
+ y
2
= 1;
for z > 0. Determine the do main of the parameter of the curve and use M atl ab a nd draw the curve.
Exercise 136. Find the curve of the intersection of two surfaces
x
2
+ z
2
= 4; x
2
+ y
2
= 1;
for z > 0.
Exercise 137. For the above example, find an explicit representation for the su rface as z = f(x; y). Use this
representatio n and write the equation on the tangent line at the same point (x
0
; y
0
; z
0
) =
¡
¡
1
2
; 0;
1
4
.
Exercise 138. Consider the parametrization
Σ(t; s) = (s cos(t); s sin(t); s):
Find an explicit representation z = f (x; y) for the surface. Show that the unit normal vector n^ obtained from the
relation
n^ =
Σ
t
×Σ
s
jΣ
t
×Σ
s
j
is the same of the unit nor mal vector for the natural parametrization Σ(x; y) = (x; y; f (x; y)) that is
n^ =
(¡f
x
; ¡f
y
; 1)
1 + jrf j
2
p :
Exercise 139. Show that the tangent plane to the su rface x
p
+ y
p
+ z
p
= a
p
cut off, on the coordinate axes,
se gment whose sum is constant.
Exercise 140. Let y = f (x), a ≤x ≤b be a smooth curve. Show that the surfac e generated by revolving this
curve aroun d x-axis is:
x = x; y = f(x) cos(θ); z = f (x) sin(θ):
If r(t) = (x(t); y(t)) is a s mooth curve for t 2[t
0
; t
1
], find a para metric representation of the surface generated by
revolving r(t) around y-axis. In partic ular, if y = f (x) is revolved around the x-axis, then we can parameterize
in te rms of x and θ as:
x = x; y(x; θ) = f(x) cos(θ); z(x; θ) = f(x) sin(θ)
Exercise 141. Write down a parametrization for the surfac e of a cy linder of radius 2 and height H = 4 runni ng
from y = 0 to y = 4. Write down the equation of the tang ent p lane at the point
2
p
2
; 2;
2
p
2
.
Exercise 142. Consider the surface parametrized as
x = 3 cos(t) + cos(s) cos(t); y = 3 sin(t) + cos (s) sin(t); z = sin(s);
for s 2[0; 2π] and t 2[0; 2π]. The followi ng code in Mat lab draw this surface:
[t,s]=meshgrid(0:pi/10:2*pi+pi/10);
x=3*cos(t)+cos(s).*cos(t);
153
y=3*sin(t)+cos(s).*sin(t);
z=sin(s);
surf(x,y,z); axis equal
Run this code in Matlab and explain the curves s = const: and t = const: What is t he nor mal vector on the surface
at t = 2; s = π.
This surface is called a torus, Note for a fixed t, the grid line is t he unit circle w ith the ce nter on the circle:
x(t) = 3 c os(t); y(t) = 3 sin(t); z(t) = 0:
Exercise 143. The fol lowing surface is generated in Matla b:
Suggest a parametrizati on for this surface . Modify the previous code in Matl ab and draw your su rface. Use your
parametrization and find the tangent plane on t he surface a t t = s = π. For a fixed t, the grid line is the unit
circle with the center on the helix:
x(t) = 3 cos(t); y(t) = 3 sin(t); z(t) = t:
154
Lecture
Integral over lin es and surfaces
71 Integral of functi ons along a line
Assume that a function f (x; y) is given in R
2
, and let C be a curve in xy-plane. The restrict ion o f
f to C is an assignment (x; y) 7! f(x; y) for all (x; y) 2C. From geometry point of view, f can be
considered as the height over the curve C as shown below:
The integral of f along C is denoted by
I =
Z
C
f(x; y) ds;
where ds is the differential o f the arc length of curve C. To evaluate this integral, we choose a
parametrization of curve C. Let r(t) = (x(t); y(t)); t 2[a; b] be one possible parametrization of C,
then the integral I can be expressed as
Z
C
f(x; y) d s =
Z
a
b
f(r(t)) jr
0
(t)jdt:
Note that jr
0
(t)jdt is the differential length ds and f (r(t)) is t he restriction of f to C.
The above definition can be generalized for any dimension. In fact if f (x; y; z) is a scalar filed in
R
3
and r(t); t 2[a; b] is a smooth space parametric curve, the integral is defined exactly the same.
In particular, if f ≡1, the integral gives the arc length of the curve f .
Remark 121. Consider the smooth parametric curve r(t) = (sin(t); 0), t 2
¡
¡
π
2
;
π
2
. The image of
r(t) is the straight line ( ¡1; 1) and r
0
(t) =/ 0 for all t 2
¡
¡π
2
;
π
2
. The arc length is
s =
Z
¡
π
2
π
2
jr
0
(t)jdt =
Z
¡
π
2
π
2
cos
2
(t)
q
dt = 2;
155
which is evidently confirms our geometrical insight. Now, let the domain of r(t) changes to
¡
¡
π
2
; π
.
The geometrical image of r(t) is again the length (¡1; 1), however r
0
¡
π
2
= 0 and thus the curve is
not smooth. If we int erpret the given curve as the trajectory of a particle, this particle moves from
x = ¡1 and reaches x = 1 at time t =
π
2
, and then at this point its velocity b ecomes 0 as r
¡
π
2
= 0,
and then it moves backward and reach x = 0 at time t = π. We have
Z
¡
π
2
π
jcos(t)jdt = 3;
which is the total distance the particles traveled during its motion.
Example 122. Let C be a metal rod in the shape of the unit semi-circle in the region y > 0. The
density function of this rod is given by ρ(x; y) = e
¡x
2
¡y
2
. What is the total mass, and the center
of ma ss of this rod?
Solution. We need first determine a parametric curve for the shape of the rod. We can take the following one:
r(t) = (cos(t); sin(t)); t 2(0; π):
With this parametric curve, we can find the total mass by a si mple integration
M =
Z
0
π
f(r(t)) jr
0
(t)jdt:
Since r
0
(t) = (¡sin(t); cos(t)), and then
jr
0
(t)jdt = dt;
and thus
M =
Z
0
π
e
¡1
dt = πe
¡1
:
This is the correct value of the t otal mass. Before we calculate the center of mass, we may ask what happens if
we choose another parametrization for the shape of the rod.
Let's consider the following parametrization:
γ(t) = (cos(2t); sin(2t)); t 2
0;
π
2
:
We have
M =
Z
0
π
2
e
¡1
jγ
0
(t)jdt = 2e
¡1
Z
0
π
2
=πe
¡1
:
As be observe, t he integ ral is the s ame if we choose γ(t) instead o f r(t) for C. In sequel, we will give a theorem
in the gene ral case.
Now , let's turn to the center of mass. We have
x¯ =
1
M
Z
C
xρ(x; y) ds =
1
πe
¡1
Z
0
π
cos(t) e
¡1
dt = 0;
y¯=
1
M
Z
C
yρ(x; y) ds =
1
πe
¡1
Z
0
π
sin(t) e
¡1
dt =
2
π
:
156
Example 123. Along the parabola x = y
2
, the height function is given by
h(x; y) =
1
(1 + 4x)
3
2
:
Find the total area constructed on the parabola with the given height.
Solution. We can take the parametrization
r(t) = (t
2
; t); t 2(¡1; 1);
and thus
A =
Z
¡1
1
1 + 4t
2
p
(1 + 4t
2
)
3
2
dt =
Z
¡1
1
dt
1 + 4t
2
=
π
2
:
Example 124. Let r(t) = (cos(t); sin(t); t) for t = [0; 2π] be given in R
3
, and let f to be given by
f(x; y; z) = xyz. The integral of f alon g C is:
Z
C
f(x; y; z) ds =
Z
0
2π
t
2
sin(2t) 2
p
dt =
2
p
2
Z
0
2π
t sin(2t) dt = ¡
2
p
π
2
:
The following theorem indicates that the parametrization of a geometric curve does not affect the
line inte gral:
Theorem 125. Let C be a given curve and let r
1
(t); t 2[a; b] and r
2
(t); t 2[c; d] are two parame-
trization of C. If there exists a transformation h: (a; b) !(c; d) with h
0
(t) > 0, for t 2(a; b) then
Z
a
b
f(r
1
(t)) jr
1
0
(t)jdt =
Z
c
d
f(r
2
(τ)) jr
2
0
(τ)jdτ:
72 Integral of functi ons over a surface
Let S be a surface in R
3
, say a tiny metal surface. Assume that f(x; y; z) is a function over this
surface. This function can represents the density of this metal, the temperature over it or any other
physical quantity. If f = ρ(x; y; z) represents the mass density, then the mass differential dm is
defined as:
dM = ρ(x; y; z) dS ;
where dS is the surface differential of S. In this case, the total mass M is determined through the
integral:
M =
ZZ
S
dM =
ZZ
S
ρ(x; y; z) dS:
157
On the other hand, if f represents the density of thermal energy u(x; y; z) over S, then dU = udS
represents the thermal energy differential, and thus the total energy is calculat ed through the
integral:
U =
ZZ
S
u(x; y; z) dS:
If f = 1, then the double integral
jS j=
ZZ
S
dS;
represents the area of the surf ace .
By the parametrizing surface S as Σ(t; s), we can evaluate the surface integral of a scalar function
f(x; y; z) over the surface S as follows:
ZZ
S
f(x; y; z) dS =
ZZ
D
f(Σ(t; s)) jΣ
t
×Σ
s
jdA;
where D is the domai n of (t; s) in the (t; s)-plane.
Example 126. Find the surface area of the sphere
x
2
+ y
2
+ z
2
= a
2
:
Solution. We can choose the parametrization of the surface as
Σ(φ; θ) = (a sin(φ) cos(θ); a sin (φ) sin(θ); a cos(θ)):
The differentia l surface are dS is dS = jΣ
φ
×Σ
θ
jdθdφ where
Σ
φ
= (
a cos(φ) cos(θ); a cos(φ) sin (θ); ¡a sin(φ)
);
and
Σ
θ
= (
¡a sin(φ) sin(θ); a sin(φ) cos(θ); 0
):
We have
Σ
φ
×Σ
θ
= a
2
sin(φ) (
sin(φ) cos(θ) sin(φ) sin (θ) cos(φ)
);
and then jΣ
φ
×Σ
θ
j= a
2
sin(φ) and thus
dS = a
2
sin(φ) dθdφ:
Ther efor the surface area is
jSj=
ZZ
S
dS =
Z
0
π
Z
0
2π
a
2
sin(φ) dθdφ = 4πa
2
:
Another met hod is to use the natural parametrization for the upper surface z = a
2
¡x
2
¡ y
2
p
for x
2
+ y
2
≤a
2
as
the area of the sphere is twice of the area of it s upper sphere. For the natural parametrization, we have
dS = j(¡f
x
; ¡f
y
; 1)j= 1 + jrf j
2
p
:
158
We have
rf =
¡x
a
2
¡x
2
¡ y
2
p ;
¡y
a
2
¡x
2
¡ y
2
p
!
;
and then
dS =
a
a
2
¡x
2
¡ y
2
p ;
and then
jSj= 2
ZZ
D
a
a
2
¡x
2
¡ y
2
p dA;
wher e D is the disk x
2
+ y
2
≤a
2
. Using the polar coordinate, we obtain
jSj= 2
ZZ
D
a
a
2
¡x
2
¡ y
2
p dA = 2
Z
0
2π
Z
0
a
ardrdθ
a
2
¡r
2
p = 4πa
Z
0
a
rdr
a
2
¡r
2
p = 4πa
2
:
Example 127. The mass density function of the metal surface of a sphere of radius 1 in the
0 ≤ φ ≤
π
4
is given by
ρ(x; y; z) = z x
2
+ y
2
p
:
Find the total mass and the center of mass of this mass.
Solution. We can use the spher ical parametrization
Σ(θ; φ) = (sin(φ) cos(θ); sin(φ) sin(θ); co s(φ))
for 0 ≤ φ ≤
π
4
. Note that
dS = jΣ
t
×Σ
s
jdθdφ = sin(φ) dθdφ
The total mass is
M =
Z
0
p
4
Z
0
2π
cos(φ) sin
2
(φ) dθdφ =
2
p
π
6
:
The center of mass is derived by the integrals:
x¯ =
1
M
ZZ
S
xρ(x; y; z) dS =
6
2
p
π
Z
0
p
4
Z
0
2π
cos(θ)cos(φ) sin
3
(φ) dθdφ = 0;
y¯ =
1
M
ZZ
S
yρ(x; y; z) dS =
6
2
p
π
Z
0
p
4
Z
0
2π
sin(θ)cos(φ) sin
3
(φ) dθdφ = 0;
z¯=
1
M
ZZ
S
zρ(x; y; z) dS =
6
2
p
π
Z
0
p
4
Z
0
2π
cos
2
(φ) sin
2
(φ) dθdφ =
3 2
p
32
:
Example 128. Let u(x; y; z) = z be the given as the density o f thermal energy over the paraboloid
f(x; y) = x
2
+ y
2
in the domain D: x
2
+ y
2
≤1. Let's find the average thermal energ y of the surface.
The average thermal energy is equal to the integral
u¯ =
1
jSj
ZZ
S
u(x; y; z) dS;
159
where jS j is the surface area of the given paraboloid. With the natural parametrization of the
explicit surface, we have
jSj=
ZZ
x
2
+y
2
≤1
dS =
ZZ
x
2
+y
2
≤1
1 + jrf j
2
q
dA =
ZZ
x
2
+y
2
≤1
1 + 4x
2
+ 4y
2
p
dA
To evaluate the integral, we use the polar coordinate:
jS j=
Z
0
2π
Z
0
1
1 + 4r
2
p
rdrdθ =
5 5
p
¡1
6
π:
Thus, the average energy is
T
¯
=
6
(5 5
p
¡1)π
ZZ
x
2
+y
2
≤1
(x
2
+ y
2
) 1 + 4x
2
+ 4y
2
p
dA =
6
(5 5
p
¡1)π
Z
0
2π
Z
0
1
r
3
1 + 4r
2
p
drdθ:
A simple calculation gives
T
¯
=
2s 5
p
+ 1
5 5
p
¡1
1
10
≈0.57
It can be asked whether the surface integral dep ends on the parametrization or not. The following
theorem answers this question:
Theorem 129. Assume that a surface S is parametrized by two smooth parametrization Σ(t; s) on
D
1
and σ(u; v) on D
0
. Assume that f is a continuous function on S, then we have
ZZ
D
f(Σ(t; s)) jΣ
t
×Σ
s
jdA =
ZZ
D
0
f(σ(u; v)) jσ
u
×σ
v
jdA
0
:
73 Proofs
Proof. (theorem 125) Note that r
2
◦h = r
1
. Using substitution τ = h (t), we have:
Z
c
d
f(r
2
(τ)) jr
2
0
(τ)jdτ =
Z
a
b
f(r
2
◦h (t))
d
dτ
r
2
(τ)
h
0
(t) dt
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{z
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
dτ
:
Note that
dr
2
dτ
(τ) =
d
dt
(r
2
◦h) (t)
dt
dτ
=
d
dt
(r
2
◦h)(t)
1
h
0
(t)
;
and thus
Z
c
d
f(r
2
(τ)) jr
2
0
(τ)jdτ =
Z
a
b
f((r
2
◦h) (t))
d
dt
(r
2
◦h)(t)
dt =
Z
a
b
f(r
1
(t)) jr
1
0
(t)jdt;
and this completes the proof.
160
Proof. (theorem 129) Let ': D
0
!D be a mapping such that '(u; v) = (t; s), and then
Σ ◦'(u; s) = Σ (t; s):
Choosing ' appropriate such that Σ ◦' = σ, we obtain
ZZ
D
f(Σ(t; s)) jΣ
t
×Σ
s
jdA =
ZZ
D
0
f(Σ ◦'(u; v) ) jΣ
t
×Σ
s
jjdet J
'
jdA
0
;
where we used the relation dA = jdet J
'
jdA
0
for the transformation ': D
0
!D. It is shown that
jΣ
t
×Σ
s
jjdet J
'
j= jσ
u
×σ
v
j;
for σ = Σ ◦', and then
ZZ
D
f(Σ(t; s)) jΣ
t
×Σ
s
jdA =
ZZ
D
0
f(Σ ◦ '(u; v)) jσ
u
×σ
v
jdA
0
;
and this completes the proof.
74 Exercises
Exercise 144. Let C be a metal wire in the shape of a circle of radius a centered at the origin. Assume that
the mass density of C is given ρ(x; y).
a) Find a point on the xy-plane that the moment of inertia of C about that point is minimum. What is this
point?
b) Use t he Lagrange multiplier method an d find a point (x
0
; y
0
) lying on the line x + y = a that minimi zes
the mome nt of inertia of the object C.
Exercise 145. The density function on a unit sphere x
2
+ y
2
+ z
2
= 1 is given by ρ(x; y; z) = x
2
+ y
2
p
. A metal
wire C with the parametric equation
r
1
(t) = (sin(1 ¡t) cos(1 + t); sin(1 ¡t) cos(1 ¡t); co s(1 ¡t))
is given.
a) Show that the wire C lie s o n the sphere.
b) Evaluate the tot al ma ss and the center of mass of C.
Exercise 146. Let y = f(x) be a smooth curve f or a ≤x ≤b. This curve is revolved about x-axis. Show that the
surface area is
S = 2π
Z
a
b
jf (x)j 1 + jf
0
(x)j
2
p
dx:
Exercise 147. A surface S: z = x
2
+ y
2
for x
2
+ y
2
≤1 is given with the d ensity function ρ(x; y; z) = z x
2
+ y
2
p
.
Determine a point (x
0
; y
0
; z
0
) lying on the surface x + 2y + 3z = 1 that minimiz ed the moment of in ertial of the
object about tha t point.
161
Exercise 148. Consider a n elastic membr ane D fixed at its boundary bnd(D). The potential energy of the
stretched membrane is defined through the relation
dU /dS ¡dA;
wher e dU is the di fferential of the potential energy, dS is the su rface differential in the stretched state, and dA is
the area diff erential in the resting state. Recal l that a quantity A is proportional to another quantity B, denoted
as A/B, i f A=kB. Assume that the stretch functi on is given by z = u(x; y).
a) Show that for sufficient ly small u, the followi ng rela tio n holds
dU /
1
2
jruj
2
dA:
Hint : you may wish to use the lin ear approximation
1 + γ
p
≈1 +
1
2
γ;
when γ is small.
b) The total po tential energy of the membrane can be calculated as
U =
ZZ
S
dU:
Let D be a membrane in the shape of the unit d isk stretched a ccord ing to the function
u(x; y) = sin(π(1 ¡x
2
¡ y
2
)):
Find the total potential energy of t he membrane if dU =
k
2
jruj
2
dA for a positive constant k.
Exercise 149. Parametrization of surfaces:
a) Co nsider the parametrization
Σ(t; s): x = 3 cos (t) + cos(s) cos(t); y = 3 sin(t) + cos(s) sin(t); z = t + sin(s);
for t 2[0; 2π] and s 2[0; 2π]. The following code in Matlab draws t he surface
[t,s]=meshgrid(0:pi/10:2*pi+pi/10);
x=3*cos(t)+cos(s).*cos(t);
y=3*sin(t)+cos(s).*sin(t);
z=t+sin(s);
surf(x,y,z); axis equal
Run this code and attache the surface to your solution. Find the tangent pl ane on the surface at t =π; s =
π
2
.
For a fixed t, the grid line represents the unit circle in space, with the center at the helix
x = 3 cos(t); y = 3sin(t); z = t:
b) Conside r the surface parametrized as
Σ(t; s): x = 3 cos(t) + cos(s) cos(t); y = 3 sin(t) + cos (s) sin(t); z = sin(s);
for s 2[0; 2π] and t 2[0; 2π]. The surface is called a torus. The following code in Matlab dr aw this surface:
162
[t,s]=meshgrid(0:pi/10:2*pi+pi/10);
x=3*cos(t)+cos(s).*cos(t);
y=3*sin(t)+cos(s).*sin(t);
z=sin(s);
surf(x,y,z); axis equal
Run this code in Matlab, attache the figure to your solutio n. Find the “ex terior” nor mal vector on the
surface at t = s = 0 . Find the surface area o f the torus.
For a fixed t, the grid line represents the unit circle in space, with the center at the circle
x = 3 cos(t); y = 3sin(t); z = 0:
163
Lecture
Vector Calcu lus
75 Introduction '
So far, we have studied the properties o f functions like z = f (x; y), u= f (x; y; z), and, in general,
functions of the form:
f: Ω ⊂R
n
!R
where Ω is a region (bounded or unb ounded) of Rⁿ. From a n engineering or physics point of view,
these types of functions define a scalar field, with assignments like:
(x; y) 7! f (x; y);
where f can represent mass density, temperature, height, or any other quantity. In our study,
we have learned about concepts like the continuity of f (which relies on the notion of limits), the
idea of partial and directional derivatives, the concept of differentials and derivatives (df ; f
0
), the
gradient and its properties, linearization and linear approximation, the equation of tangent planes,
maximum and minimum values, and other related concepts.
We have also learned how to use integration of multivariable functions on simple domains to deter-
mine total mass, the center of mass, moment of inertia, surface area, volume of solids, and other
practical problems.
However, in the realm of engineering, we often encounter physical objects that can be mathemat-
ically modeled using vectors. For instance, if we assign a velocity vector to each particle in a fluid
flow, we obtain a field of vectors or a vector field. Mathematically, a vector field over a domain
D⊂R² is an assignment in the form:
(x; y) 7!F
~
(x; y) = (P (x; y); Q(x; y)):
More generally, a vector field over a domain Ω⊂Rⁿ is an assignment in the form:
(x
1
; : : : ; x
n
) 7!(f
1
(x
1
; : : : ; x
n
); : : : ; f
n
(x
1
; : : : ; x
n
)):
Vector calculus is a natural extension of multivariable calculus that focuses on the properties of
vector fields. It explo res concepts such as:
• the continuity of vector fields
• the existence of sources or sinks in vector fields
• the rotation of a vector field
164
• flux or flow through a surface
and other related ideas.
76 Examples of important vector fields
Like many other field s of mathematics, vector calculus has its roots in problems encountered in
physics and engineering. One of the earliest and well-known examples of a vector field is the grav-
itational force field. It's imp ortant to note that force is a vector, not a scalar. The gravitational
field at an arbitrary point (x; y; z) associated with a mass located at the origin is defined as:
F
~
(x; y; z) = ¡GM
x
jrj
3
;
y
jrj
3
;
z
jrj
3
;
where G is the gravitation al constant., r = (x; y; z), and jr j is the distance from r to the origin,
jrj= x
2
+ y
2
+ z
2
p
. For a mass at the point r
0
= (x
0
; y
0
; z
0
), the gravitation field is:
F
~
(x; y; z) = ¡GM
x ¡x
0
jr ¡r
0
j
3
;
y ¡ y
0
jr ¡r
0
j
3
;
z ¡z
0
jr ¡r
0
j
3
:
It is simply seen that this vector field is generated by a scalar functio n U(x; y; z) =
¡GM
jr ¡r
0
j
throu gh
the relation
F
~
= ¡rU:
The function U in physics and engineering is called a potential for the gravitation field.
The figure at the left represents the force field generated by a single mass loc ated at the origin in the
xy-plane. The blue arrows are the lines of the force while the red closed curves are the points with
the same potential or equi-potential curves. These curve are the level curves of the scalar function
U. The figure at the right illustrates the filed generated by two masses, M and m =
1
4
M. The first
one is located at the origi n and the second one is located at the point (¡1; 0; 0).
The following code in Matlab is used to generate the figure at the right
[x,y]=meshgrid(-2:0.1:1,-1:0.1:1);
u=-x./(x.^2+y.^2).^(3/2)-0.25*(x+1)./((x+1).^2+y.^2).^(3/2);
v=-y./(x.^2+y.^2).^(3/2)-0.25*y./((x+1).^2+y.^2).^(3/2);
165
streamslice(x,y,u,v,0.5)
axis tight equal
hold on
z=1./sqrt(x.^2+y.^2)+0.25./sqrt((x+1).^2+y.^2);
contour(x,y,z,[1.5 3],'color','r')
p1 = nsidedpoly(1000, 'Center', [0 0], 'Radius', 0.12);
p2 = nsidedpoly(1000, 'Center', [-1 0], 'Radius', 0.05);
plot(p1, 'FaceColor', 'k')
plot(p2, 'FaceColor', 'k')
Exercise 150. Assume that three masses M ;
1
2
M and
1
2
M are located at (0; 0; 0); (¡1; 0; 0) and (1; 0; 0) respec-
tively. Use the super position principle (vector addition) and draw the force and the potential filed of the system
in the xy-plane .
Anot her phenomena which has been extensively studied in physics and engineering is the vector field
associated to an electric charge. Let an electric charge q to be located at the origin. This charge
generates the following electric field which is a vector field:
E
~
(x; y; z) =
q
4π"
0
x
jrj
3
;
y
jrj
3
;
z
jrj
3
;
where "
0
is a constant, the permittivity of the space. As it is observed, the electric field is very
similar to the gravitational field and it is generated by the potential
U(x; y; z) =
q
4π"
0
1
jrj
;
through the relation E
~
= ¡rU . The figure below shows the vector field generated by two electric
charges +q at (1; 0; 0) and ¡q at (¡1; 0; 0).
As it is observed, the point (1; 0; 0) acts like a source of the field, and the point (¡1; 0; 0) acts like
a sink for the field. The red curves are the potential curves of the filed.
The two examples mentioned above share a common feature: they exhibit singularities in the field, in
the form of a mass or an electric charge. These singularities serve as sources or sinks for the induced
vector fields. However, not all vector fields have such sources or sinks. One not able example is the
magnetic field. Consider an electric current flowing along the z-axis. This electric current generates
a vector field that circulates around the z-axis, known as the magnetic field B.
166
As observed, this vector field rotate s around the axis that carries the electric current without any
source or sink. We will explore the relationship between the magnetic field and electric field in later
lectures.
Anot her example of a vector field is the flow of fluids and gasses. Assume that a current of fluid
of density ρ(x; y; z)
kg
m
3
is moving with the ve locity V
~
= (V
x
; V
y
; V
z
)
m
sec
. The vector field F
~
= ρ V
~
is
measured in
kg
m
2
sec
. This vector field is usually used to determine how much fluid passes through a
window or surface per unit time. We will study these fields later on these lectures.
77 Continuity of vector fields
Definition 130. A vector field (x; y) 7!(P (x; y); Q(x; y)) is continuous in a region D ⊂R if both
functions P and Q are continuous at all point of D.
For example, the vector fields
(x; y) 7!(x
2
¡y
2
; 2 xy)
is a continuous vector field everywhere in R
2
. The figure below shows the flow lines of this vector
field.
The vector field
(x; y) 7!
x
1 ¡x
2
¡y
2
;
y
1 ¡x
2
¡y
2
;
167
is continuous everywhere expect on the circle x
2
+ y
2
= 1 as shown below:
Observe that how the direction of arrows change suddenly on the unit circle.
78 Conserva tive vect or fie lds
Definition 131. A continuous vector field F
~
is called conservative if there is a scalar function f
such that F
~
= rf. In this case, the function U = ¡f is a potential function for F
~
.
In the above examples, we observed that the gravitational and electric fields are conservative. We
will later delve into the terminology and provide justification for labeling these fields as conservative.
In fact, we will demonstrate that these fields conserve the energy of a particle moving within them.
Example 132. Let T (x; y)= xye
¡x
2
¡y
2
b e given as the temperature distribution over the xy-pla ne.
This distribution is uneven as shown below
As we know, temperature flows from hot spots to cold spots. According to the Fourier low, the line
of heat flow follows the rule:
F (x; y) = ¡rT ;
that for the given T i s:
F (x; y) =
¡y(1 ¡2x
2
) e
¡x
2
¡y
2
¡x(1 ¡2y
2
) e
¡x
2
¡y
2
!
:
The flow lines are shown below:
168
The red curves represent the level curves of the temp erature functions, and as we observes, the
gradient flow lines ¡rT are perpendicular to the level curves.
Note that this flow of heat alters the temperature distribution over time. Consequently, T (x; y )
cannot remain constant and will change in time. The study of this evolving pattern will be covered
in other field of mathematics , a field that is dedicated to different ial equations. In this course, our
focus will be solely on stationary or time-independent vector fields.
169
Lecture
Line int egral of vecto r fi elds
79 Line integral of vector fiel ds
Assume that a continuous vector field F
~
= (P (x; y); Q(x; y)) is given over D ⊂R
2
, and let C be a
directed curve in D. A directed curve is a curve with a direction as shown below:
C
The line integral of F
~
along C is defined as:
I =
Z
C
F
~
·dr; (10)
where dr is the directed differential length: dr = (dx; dy). Therefore, the above line integral can be
written as
Z
C
F
~
·dr =
Z
C
P ( x; y) dx + Q(x; y) dy:
To evaluate the line integral (10), we can use the parametrization of the directed curve C, a
parametrization that keeps the direction of C. Let r(t) = (x(t); y(t)); t 2(a; b) be a parametrization
of C with the prescribed direction. We have
Z
C
P (x; y) dx + Q(x; y) dy =
Z
a
b
P ( r(t)) x
0
(t) dt + Q(r(t)) y
0
(t) dt:
The above integral can be expressed in the compact form as
Z
C
F
~
·dr =
Z
a
b
F
~
(r(t)) ·r
0
(t) dt:
Note that the directed differential length d r is expressed as: dr =r
0
(t) dt. (from the point of physics,
r
0
(t) is the velocity vector and thus
dr
dt
= r
0
(t)).
Example 133. Let F
~
= (x
2
¡ y
2
; 2xy) b e given in R
2
and let r(t) b e given by (cos(t); sin(t)) for
t 2(0; π). Find the integral of F
~
along C.
170
Solution. We have
F
~
(r(t)) = (cos(2t); sin(2t));
and
r
0
(t) = (¡sin(t); cos(t)):
Ther efore,
Z
γ
F
~
·dr =
Z
0
π
(cos(2t); sin(2t)) ·(¡sin(t); cos(t)) dt =
Z
0
π
f¡cos(2t) sin(t) + sin(2t) co s(t)gdt =
Z
0
π
sin(t) dt = 2:
Remark 134. If we reverse the direction of the curve C, we denote the new curve by ¡C. We have
the following fact:
Z
C
F
~
·dr = ¡
Z
¡C
F
~
·dr:
To prove this result, we use the parametrization of C a s r(t); t 2(a; b), and for ¡C, the parame-
trization becomes
¡C: r(t); t 2(b; a):
Therefore,
Z
¡C
F
~
·dr =
Z
b
a
F
~
(r(t)) ·r
0
(t) dt = ¡
Z
a
b
F
~
(r(t)) ·r
0
(t) dt = ¡
Z
C
F
~
·dr:
For instance, the path in the above example connect the point (1; 0) to (¡1; 0) with the counter-
clockwise direction. The same path with the reverse direction is parameterized as
r(t) = (cos(t); sin(t)); t 2[π; 0];
and then the line integral a long r(t) is multiplied by ¡1.
Remark 135. In one of previous lectures on the line integral of scalar fields, we proved that the
line i ntegral is independent of the parametrization as long as the parametrization is smooth. Same
resul t holds for line integral of vector fields, the proof is the same as before.
80 Geometric interpretation
Note that d r is the directed differential length and can be expressed equivalently as dr = (dx; dy)
or as:
dr = T
^
ds;
where T
^
is the unit tangent vector along C, and ds is the arc length differential. Thus, F
~
·dr can
be represented as F
~
·T
^
ds. Note that F
~
·T
^
repre sent the scalar value obtained by the projecting F
~
on T
^
as shown below:
171
F
~
T
^
F
~
·T
^
Now, the line integral of a vector field F
~
along a curve C can be represented schematically as follows.
F
~
F
~
F
~
T
^
C
T
^
T
^
Note that if F
~
is perpendicular to C at all points, then the associated line integral is zero.
Remark 136. If the direction of C reversed, the tangent vector T
^
is multiplied by ¡1, and thus
the value o f the integral is multiplied by ¡1.
81 Engineering inter pret ation
81.1 Line integral as work
If a vector field F
~
repre sents a force field, then the line integral of F
~
along a curve C that connects
points (x
0
; y
0
) to (x
1
; y
1
) is interpreted, from the physics point of view, as the work done by the
field to move a mass m from (x
0
; y
0
) to (x
1
; y
1
) along C. In particular, if F
~
= (P (x; y); Q(x; y)) is
a force field, the differential work is expressed as
dW = P (x; y) dx + Q(x; y) dy;
which in parametrization form in term of time t is
dW = P (x(t); y(t)) x
0
(t) dt + Q(x(t); y(t)) y
0
(t) dt = F
~
(r(t)) ·r
0
(t) dt:
The total work to move a mass from (x
0
; y
0
) to (x
1
; y
1
) along a curve C is
W =
Z
C
dW =
Z
C
P (x; y) dx + Q(x; y) dy =
Z
t
0
t
1
F
~
(r(t)) ·r
0
(t) dt:
172
Example 137. The force field F
~
= (x
2
¡y
2
; 2xy) is given. Calculate the work done by the field to
move a mass m from (¡1; 0) to (1; 0 ) on the following paths:
r
1
(t) = (2t ¡1; 0); t 2[0; 1];
r
2
(t) = (¡cos(t); sin(t)); t 2[0; π]:
Solution. The work done along r
1
is
W
r
1
=
Z
0
1
((2t ¡1)
2
; 0) ·(2; 0) dt = 2
Z
0
2
(2t ¡1)
2
dt =
2
3
:
The work d one along r
2
is
W
r
2
=
Z
0
π
(cos(2t); ¡sin(2t)) ·(sin(t); cos(t)) dt = ¡
Z
0
π
sin(t) dt = ¡2:
As we observe, the wo rk done by F
~
depends on the path of integration. Al ong r
1
, the direction of the field and
the path are the same, and thus the work is positive. The direction of r
2
is opposite of the direction of the force
field and thus the work is negative.
Example 138. Now, consider the following force field
F
~
= (y
2
¡x
2
; 2xy):
This is very similar the previous one. Let's find the work done by the new force field along the same
paths of the previous example, r
1
and r
2
.
173
Along r
1
:
W
r
1
=
Z
0
1
(¡(2t ¡1)
2
; 0 ) ·(2; 0) dt = ¡
2
3
;
and along γ
2
:
W
r
2
=
Z
0
π
(¡cos(2t); ¡sin(2 t)) ·(sin(t); cos(t)) dt = ¡
Z
0
π
sin(3t) dt = ¡
2
3
:
As it is observed that the works done by G
~
along r
1
is equal to the work done along r
2
. In fact, for
any other smooth path connecting point (¡1; 0) to (1; 0), the work is the same. For example, let
r
3
(t) be as follows
r
3
(t) = (¡cos(t); ¡sin(t)); t 2[0; π]:
We have
W
r
3
=
Z
0
π
(¡cos(2t); sin(2t)) ·(sin(t); ¡cos(t)) dt = ¡
Z
0
π
sin(3t) dt = ¡
2
3
:
You are encouraged to find the work done by G
~
along the following path
r
4
(t) = (t
2
¡1; 0); t 2[0; 2
p
]:
In sequel, we discuss the reason of this phenomena.
81.2 Conservative force fields
Definition 139. A force field F
~
defined on an open domain D is called conservative if there exists
a smooth scalar function f: D !R such that F
~
= rf. In this respect, the scalar function f is called
a potential for F
~
. Note that if f is a po tential for F
~
, then f + C for any constant C is a potential
function for F
~
.
Example 140. The force field F
~
= (y
2
¡x
2
; 2xy) is conservative in R
2
. In fact, for the function
f(x; y) = xy
2
¡
1
3
x
3
;
we have rf = F
~
. The force field F
~
= (x
2
¡ y
2
; 2xy) is not a con servative field. The reason is as
follows: Assume that F
~
is a conservative filed. Then there exists a smooth function f such that
F
~
= rf, or equivalently
f
x
0
= x
2
¡y
2
; f
y
0
= 2xy:
Since f is smooth, then f
xy
00
= f
yx
00
. However, we have:
f
yx
00
=
@
@y
f
x
0
=
@
@y
(x
2
¡y
2
) = ¡2y;
174
and
f
xy
00
=
@
@x
f
y
0
=
@
@x
(2xy) = 2y;
and thus f
xy
00
=/ f
yx
00
, a contradiction.
Example 141. Let an electric charge q is located at the origin. This electric charge produces a
force field E
~
at any point (x; y; z) =/ (0; 0; 0) as:
E
~
(x; y; z) =
q
4π"
0
x
jrj
3
;
y
jrj
3
;
z
jrj
3
;
where jr j is the distance of the point (x; y; z) to the origin. As we have seen before, this field is
produced by a potential function f( x; y; z):
f(x; y; z) =
q
4π"
0
¡1
jrj
;
for all (x; y; z) =/ (0; 0; 0). In fact, we have
f
x
=
q
4π"
0
@
@x
¡1
jrj
=
q
4π"
0
@
@x
(x
2
+ y
2
+ z
2
)
¡1
2
=
q
4π"
0
x
(x
2
+ y
2
+ z
2
)
3
2
=
q
4π"
0
x
jrj
3
:
Similarly, we have
f
y
=
q
4π"
0
y
jrj
3
; f
z
=
q
4π"
0
z
jrj
3
;
and thus E
~
= rf . The potential energy associated with this field is usually defined as
U(x; y; z) =
q
4π"
0
1
jrj
:
Note that the potential energy decays at 1.
Example 142. Consider the field
F
~
=
¡y
x
2
+ y
2
;
x
x
2
+ y
2
:
This filed is not defined at the origin but smooth everywhere else. For the domains y > 0 or y < 0,
the smooth function f = ¡tan
¡1
x
y
is a potential for F
~
. For domains x > 0 or x < 0, the function
f = tan
¡1
¡
y
x
is a potential for F
~
.
175
f = ¡tan
¡1
x
y
f = tan
¡1
¡
y
x
f = tan
¡1
¡
y
x
f = ¡tan
¡1
x
y
Now, we state one important properties of the conservative force fields: Assume that F
~
is a conser-
vative force field with the smooth potential f defined on an open domain D. Assume that p; q are
two points in D and C is an arbitrary path that connects p to q and C ⊂D. Let r(t); t 2[t
0
; t
1
] be
a smooth parametrization of this curve. The work of F
~
along C is:
W =
Z
C
F
~
·dr =
Z
t
0
t
1
F
~
(r(t)) ·r
0
(t) dt =
Z
t
0
t
1
rf(r(t)) ·r
0
(t) dt =
Z
t
0
t
1
df(r( t)) = f (r(t
1
)) ¡f(r(t
0
)):
Since r(t
1
) = q and r(t
0
) = p, we obtain
W = f (q) ¡ f (p):
Thus, the work is independent of path C that connects p to q as long as C lies on D.
Example 143. The field F
~
= (y
2
¡x
2
; 2 xy) is conservative with t he potential f(x; y) = xy
2
¡
1
3
x
3
defined on R
2
. In the previous section we observed that the work done by the field along two paths:
r
1
(t) = (2t ¡1; 0); t 2[0; 1]; and r
2
(t) = (¡cos(t); sin(t)); t 2[0; π] is the same. The field F
~
= (x
2
¡y
2
;
2xy) is not conservative and the work done by this field along these two path are different.
Example 144. Let's find the work done by the force field E
~
produced by a n electric charge q at
the origin to move an electric particle from the point (1; 0; 0) to (1; 0; 2π). Let's first consider the
path: r
1
(t) = (cos(t); sin(t); t) for t 2[0; 2π]. We have
W =
q
4π"
0
Z
0
2π
0
@
cos(t)
(1 + t
2
)
3
2
;
sin(t)
(1 + t
2
)
3
2
;
t
(1 + t
2
)
3
2
1
A
·(¡sin(t); cos(t); 1) dt =
q
4π"
0
Z
0
2π
tdt
(1 + t
2
)
3
2
:
The calculation of the integral gives the work:
W =
q
4π"
0
1 + 4π
2
p
¡1
:
Now, let's change the path to r
2
(t) = (1; 0; t) for t 2[0; 2π] that connects the same two points. The
line inte gral along this path is
q
4π"
0
Z
0
2π
1
(1 + t
2
)
3
2
; 0;
t
(1 + t
2
)
3
2
!
·(0; 0; 1) dt =
q
4π"
0
Z
0
2π
tdt
(1 + t
2
)
3
2
=
q
4π"
0
1 + 4π
2
p
¡1
:
176
The reason is that the field is conservative and work done by the field is independent of path and
only depends on the starting and end points.
Example 145. Let's find the work done by the filed F
~
=
¡y
x
2
+ y
2
;
x
x
2
+ y
2
to move a mass m from
the point (0; ¡1) to (0; 1) along the curve r(t) = (cos(t); sin(t)); t 2
¡
π
2
;
π
2
. We have
W =
Z
¡
π
2
π
2
(¡sin(t); cos(t)) ·(¡sin(t); cos(t)) dt = π:
However, if we use the potential f (x; y) = ¡tan
¡1
x
y
for y =/ 0, we reach:
W = f (0; 1) ¡f(0; ¡1) = ¡tan
¡1
(0) + tan
¡1
(0) = 0:
In fact, we are not allowed to use the potential f = ¡tan
¡1
x
y
as the curve r(t) cro sses the x-axis
at t = 0.
x
y
You can also check the work along the curve r(t) =(¡cos(t); sin(t)); t 2
¡
π
2
;
π
2
that connects (0; ¡1)
to (0 ; 1). Along this curve, we have:
W =
Z
¡
π
2
π
2
(¡sin(t); ¡cos(t)) ·(sin(t); cos(t)) dt = ¡π:
Therefore, in this case, the line integral is different from the integral along other path.
x
y
81.3 Conservative fields and line integral along a closed curve
In the above section we observed that the line integral of a conserva tive vector field is independent
of path and only depends on initial and end points of the path as long as the path remains in the
domain of potential function of the vector field. This fact results an important consequence: The
line integral of a conservative force field along a closed curve is zero as long as the curve remains
in the domain of the potential function.
177
Assume that F
~
is a conservative force field in a connected domain D . Then for any directed closed
curve C in D, we have
I
C
F
~
·dr = 0:
The proof is straightforward. Consider the following figure:
C
2
C = C
1
+ C
2
C
1
Since F
~
is conservative, we have
Z
C
1
F
~
·dr =
Z
¡C
2
F
~
·dr:
Using the relation
Z
¡C
2
F
~
·dr = ¡
Z
C
2
F
~
·dr;
we obtain
Z
C
1
F
~
·dr = ¡
Z
C
2
F
~
·dr;
and in turn
Z
C
1
F
~
·dr +
Z
C
2
F
~
·dr = 0;
or equivalently
I
C
F
~
·dr = 0:
Example 146. Consider the vector field
F
~
=
¡y
x
2
+ y
2
;
x
x
2
+ y
2
:
Consider the closed curve C: x
2
+ (y ¡2)
2
= 1 counter-clockwise. This path can be parametrized as
x(t) = c os(t); y(t) = 2 + sin(t);
and thus
I
C
F
~
·dr =
Z
0
2π
¡2 ¡sin(t)
5 + 4 sin(t)
;
cos(t)
5 + 4 sin(t)
·(¡sin(t); cos(t)) dt =
Z
0
2π
2 sin(t) + 1
5 + 4 sin(t)
dt = 0:
178
If we change the closed curve to C: x
2
+ y
2
= 1. With parametrization x(t) = cos(t); y(t) = sin(t), we
have:
I
C
F
~
·dr =
Z
0
2π
dt = 2π =/ 0:
The reason is the the latter closed curve does not lie completely in the domain of the potential
function f(x; y).
81.4 Justification of the terminology of conservative
the terminology of the conservative force field is justified as follows. As we observed above, the work
done by a conservative force field is f(x
1
; y
1
) ¡ f(x
0
; y
0
) or equivalently: U (x
0
; y
0
) ¡U(x
1
; y
1
) for
the potential energy U = ¡f . But what does this difference refer to? We show that a conservative
force field preserves the total energy of a particle along its path of motion. Recall that the total
energy of a particle is defined as:
E = K(x; y) + U(x; y);
where K is the kinetic energy of the particle and U is the potential energy. The kinetic energy K
is defined as
K(x; y) =
1
2
m jvj
2
;
and if the trajectory of a particle is r (t), for v = r
0
(t), we have
K(r(t)) =
1
2
m jr
0
(t)j
2
;
and thus
E(r(t)) =
1
2
m jr
0
(t)j
2
+ U(r(t)):
Here E(r(t)) represent s the total energy of the particle along its path from r( t
0
) to r(t
1
). Now, the
derivative of E(r(t)) is:
d
dt
E(r(t)) =
d
dt
K(r(t)) +
d
dt
U(r(t)) = mr
0
(t) ·r
00
(t) ¡F
~
·r
0
(t):
On the other hand, by the Newton's second law, the total f orce exerting on the particle can be
expressed as
F
~
= ma = mr
00
(t);
and thus
d
dt
E(r(t)) = mr
0
(t) ·r
00
(t) ¡mr
00
(t) ·r
0
(t) = 0:
In other word, if the force field is conservative, the total energy of a particle is conserved along its
path of motion in the force field.
179
Anot her result is as follows: by the conservation of energy we have
K(r(t
0
)) + U (r(t
0
)) = K(r(t
1
)) + U (r(t
1
));
and thus
U(r( t
0
)) ¡U(r(t
1
)) = K(r(t
1
)) ¡K(r(t
0
)):
In other word, the work done by the force field F
~
to move a particle from r(t
0
) to r(t
1
) is equal to
the change in its kinetic energy from r(t
0
) to r(t
1
). For example, if U (r(t
1
)) < U(r(t
0
)) then the
speed of the particle at r(t
1
) is bigger than the speed of particle at r(t
0
).
82 Exercises
Exercise 151. Fo r the force field G
~
= (y
2
¡x
2
; 2xy), show the relation
@
@y
(y
2
¡x
2
) =
@
@x
(2xy):
Exercise 152. Find the work done by the force field E
~
to move a unit electri c charg e along the path
r(t) = (1 ¡cos(t); sin(t); 2π + t); t 2[0; 2π]:
Exercise 153. If a vec tor field F
~
= (P ; Q)) is conservative in an open domain D ⊂R
2
, meaning there ex ists a
smooth scalar function f(x; y) such th at F
~
= rf (in this case, the potential energy U is ¡f ), then the potentia l
function can be derived by a line integral. This is a f undamental theorem in mul tivariable calculus.
a) Choose a fixed point (x
0
; y
0
) 2D and define f(x; y) for any arbitrary (x; y)2D as follows:
f(x; y) =
Z
(x
0
;y
0
)
(x; y)
F
~
·dr:
As we know, t he inte gral is independ ent of the p ath of integration. Demonstrate th e relations: f
x
(x;
y) = P (x; y) and f
y
(x; y) = Q(x; y).
Hint : Take the integration path γ from (x
0
; y
0
) to (x; y) as γ
1
+ γ
2
wher e
γ
1
: (t; y
0
); t 2[x
0
; x]; γ
2
(t) = (x; t); t 2[y
0
; y]
b) Ut ilize the theore m from part (a) and determine a potential for t he conservative field
F
~
= (y
2
¡x
2
; 2xy + y
2
):
Calculate the work done by F
~
to move a mass from (¡1; 0) to (1; 0) along the pat h
γ(t) = (t; t
3
¡t); t 2[¡1; 1]
180
Lecture
Green Theorem
83 Statement of the th eorem
The Green's theorem, after the British mathematician George Green, connects the line integral
along a closed curve C of a vector field to a double integral over the domain enclosed by C.
Theorem 147. Let C be a simple closed curve in the xy-plane with positive orientation, and let D
be the domain enclosed by C. Assume that a smooth vector field F
~
= (P (x; y); Q(x; y)) is defined
on D. Then, the following relation which is called the Green's theorem holds:
I
C
F
~
·dr =
ZZ
D
(Q
x
(x; y) ¡P
y
(x; y)) dA:
ZZ
D
(Q
x
¡P
y
) dA
D
C
I
C
Pdx + Qdy
Remark 148. We need to explain a fe w terms here. By a smooth vector field F
~
= (P (x; y); Q(x; y))
we mean that P ; Q are continuous functions with continuous partial derivatives. A closed curve is
simple it it does not intersect itself:
simple closed
non-simple closed
The positive direction by definition is the direction that when you walk along, the enclosed domain
to be in your left hand:
positively oriented
D
positively oriented
negatively oriented
D
D
181
Proof. (of the theorem) We give a proof for simple domains of the following form
a
b
y = h(x)
y = g(x)
Let's calculate the integral:
I
1
=
ZZ
D
P
y
dA:
This integral can be written as:
ZZ
D
P
y
dA =
Z
a
b
Z
g(x)
h(x)
P
y
dy
dx =
Z
a
b
[P (x; h(x) ) ¡P (x; g(x))] dx:
Note that the integral
¡
Z
a
b
P (x; g(x)) dx
is the integral over lower curve y = g(x), and if we denote this curve by C
1
, we can write
¡
Z
a
b
P ( x; g(x)) dx = ¡
Z
C
1
P ( x; y) dx:
Similarly, the integral
Z
a
b
P (x; h(x)) dx;
is the integral over the upper curve y = h(x) and if we denote this curve (counter clockwise) by C
2
,
we can write
Z
a
b
P (x; h(x)) dx = ¡
Z
b
a
P (x; h(x)) dx = ¡
Z
C
2
P (x; y) dx;
and then
Z
a
b
[P (x; h(x) ) ¡P (x; g(x))] dx = ¡
I
C
P ( x; y) dx;
where C is C
1
+ C
2
.
Now, consider the given curve as follows:
182
c
d
x = h(y)
x = g (y)
Now, for the integral:
I
2
=
ZZ
D
Q
x
dA;
we can write
ZZ
D
Q
x
dA =
Z
c
d
Z
g(y)
h(y)
Q
x
dx
dy =
Z
c
d
[Q(h(y); y) ¡ Q(g(y); y)] dy:
By a similar argument, we can write
Z
c
d
[Q(h(y); y) ¡ Q(g(y); y)] dy =
I
C
Q(x; y) dy;
and then
I
2
¡I
1
=
I
C
P ( x; y) dx + Q(x; y) dy;
and this completes the proof for the simple domain shown above. For complic ated domain, the proof
is based on splitting the domain to simple domains. We omit the proof here and can be found any
any serious book on multivariable calculus.
The Green theorem sometimes provides a significant simplification in the calculation of line integrals:
Example 149. Let C be the curve γ(t) = (cos(t); sin(t)) for t 2[0; 2π] and the vector field F
~
is
given by
F
~
= (e
sin(x)
¡y; e
sin(y)
+ x):
Let's find the line integral of F
~
along γ(t). Direct calculation is extremely difficult, however , using
Green theorem makes the calculation so easy:
I
C
(e
sin(x)
¡y) dx + (e
sin(y)
+ x) dy =
ZZ
D
2dA = 2π:
Example 150. Let C be the triangle that connects vertices (0; 0); (1; 0) and (0; 1)
183
x
y
(1; 0)
(0; 1)
Let's evaluate the line integral of the vector fi eld F
~
= (x
2
¡y
2
; 2xy) by 1) direct calculation, 2) using
the Green theorem.
By direct method, we can parametrize the curve as r = r
1
+ r
2
+ r
3
where r
1
(t) = (t; 0); t 2[0; 1],
r
2
(t) = (1 ¡t; t); t 2[0; 1] and r
3
= (0; 1 ¡t) for t 2[0; 1]. We have
Z
r
1
F
~
·dr =
Z
0
1
(t
2
; 0) ·(1; 0) dt =
1
3
;
Z
r
2
F
~
·dr =
Z
0
1
((1 ¡t)
2
¡t
2
; 2t (1 ¡t)) ·(¡1; 1) dt =
1
3
Z
r
3
F
~
·dr =
Z
0
1
(¡(1 ¡t)
2
; 0 ) ·(0; ¡1) dt = 0;
and then the line integral is equal to
2
3
. Using the Green's theorem, we have Q
x
¡P
y
= 4y and then
ZZ
D
4yd A =
Z
0
1
Z
0
1¡x
4ydy
dx =
Z
0
1
2(1 ¡x)
2
dx =
2
3
:
84 Non- simply connected domains and Green's theorem
An open domain D ⊂ R
2
is called connected or path connected if any two points in D can be
connected by a curve C that c ompletely lies on D. A connected open domain D is called simply
connected if the region of every closed curve in D belongs to D , that is, D does not have any
“hole” in itself. For example, the set D = f(x; y); x
2
+ y
2
< 1g is a simply connected domain while
D
0
= f(x; y); 0 < x
2
+ y
2
< 1g is not a simply connected domain.
D
D
0
184
As we stated in the above section, the Green's theorem holds if D is simp ly connected. For example,
the vector field
F
~
=
¡y
x
2
+ y
2
;
x
x
2
+ y
2
;
is not defined at the origin, and we can not state that
I
C
F
~
·dr =
ZZ
D
@
@x
x
x
2
+ y
2
¡
@
@y
¡y
x
2
+ y
2
dA =
ZZ
D
0dA = 0:
In fact, as we saw before, for C: x
2
+ y
2
= 1, we have
I
C
F
~
·dr = 2π:
To use the Green's theorem correctly in these situations, we have to do “surgery” and cut-off t he
hole from the domain as shown in the following example.
Example 151. Consider the following vector field
F
~
=
¡y
x
2
+ y
2
;
x
x
2
+ y
2
:
We aim to calculate the line integral of the given field along the ellipse C
e
:
x
2
4
+
y
2
9
= 1 with the
positive direction. Since the given vector field is not continuous at the origin, we can not use the
Green theorem on the domain D enclosed by the ellipse. However, we can do a surgery here as
shown below:
The inside curve is a circle of radius a, and as we see, the final value is independent of a. In the
domain enclosed by the ellipse and the circle C
a
, we can use the Green theorem as the vector field
is smooth everywhere except the origin. But we have
Q
x
¡P
y
=
@
@x
x
x
2
+ y
2
¡
@
@y
¡y
x
2
+ y
2
= 0;
and therefor
I
C
e
F
~
·dr +
I
C
a
F
~
·dr = 0:
185
The line integrals over the black lines cancel out each other if we take these line very close to each
other. Therefore:
I
C
e
F
~
·dr = ¡
I
C
a
F
~
·dr =
I
¡C
a
F
~
·dr;
where ¡C
a
has the standard orientation (counte r clockwise). With parametrization:
¡C
a
: (a cos(t); a sin(t)); t 2[0; 2π];
we have:
I
¡C
a
F
~
·dr =
Z
0
2π
¡sin(t)
a
;
cos(t)
a
·(¡a sin(t); a cos(t)) dt = 2π:
85 Green theorem and area
The Green theorem can be used for calculation of areas as well. Consider the vector field:
F
~
= (¡y; x):
This is a smooth field on R
2
. Let C be any closed curve with positive direction. Then, the Green
theorem gives
I
C
¡ydx + xdy =
ZZ
D
2dA = 2A(D);
and then the area A(D) is
A(D) =
1
2
I
C
¡ydx + xdy
Example 152. In this example, we use the Green theorem in opposite direction. We aim to find
the area enclosed by the ellipse
x
2
a
2
+
y
2
b
2
= 1:
The direct calculation is not easy at all. Utilizing the above formula, we can write
A(D) =
1
2
I
C
¡ydx + xdy:
The ellipse can be parameterized as:
γ(t) = (a cos(t); b sin(t)); t 2[0; 2π]:
and then
A(D) =
1
2
Z
0
2π
(¡b sin(t); a cos(t)) ·(¡a sin(t); b cos(t)) dt = πab:
186
86 Exercises
Exercise 154. Consider the following field
F
~
=
¡y
(x + 1)
2
+ y
2
¡
y
(x ¡1)
2
+ y
2
;
x + 1
(x + 1)
2
+ y
2
+
x ¡1
(x ¡1)
2
+ y
2
:
Find the line integral of F
~
along the circle x
2
+ y
2
= 4 directed positively.
Exercise 155. Let C be a smooth closed curve in R
2
. Show the relation
I
C
cos(θ) ds = 0;
wher e ds is the differential length and θ is the angle of the unit normal vec tor n^ on C with the x-axis.
Exercise 156. Let C be a smooth closed curve in R
2
. Calculate the following integral
I =
I
C
[x cos(θ) + y si n(θ)] ds;
wher e ds is the differential length and θ is the angle between the unit normal vector n^ and the x-axis.
187
Lecture
Curl and Divergence
87 Curl
87.1 Algebraic statement
Definition 153. The curl of a smooth vector field F
~
=(P (x; y;z); Q(x; y; z); R(x; y; z)), at a certain
point x
0
= (x
0
; y
0
; z
0
) is measured by the operation r× which is defined as the vector:
r×F
~
(x
0
) = (R
y
(x
0
) ¡Q
z
(x
0
))i
^
+ (P
z
(x
0
) ¡R
x
(x
0
))j
^
+ (Q
x
(x
0
) ¡P
y
(x
0
)) k
^
:
Note that for the curl of is the cross product of the nabla operatorr:=
0
B
B
@
@
x
@
y
@z
1
C
C
A
and the vector F
~
and
thus can be written as:
curl F
~
=
0
B
B
@
@
x
@
y
@z
1
C
C
A
×
0
@
P
Q
R
1
A
=
i
^
j
^
k
^
@
x
@
y
@
z
P Q R
:
Example 154. Let's evaluate the curl of the following vector field at (1; 1; 1):
F
~
= (¡y
2
; x
2
; z
2
):
We have:
curl F
~
(1; 1; 1) =
@
@y
z
2
¡
@
@z
x
2
;
@
@z
(¡y
2
) ¡
@
@x
(z
2
);
@
@x
(x
2
) ¡
@
@y
(¡y
2
)
(1;1;1)
= (0; 0; 4);
and thus
curl F
~
(1; 1; 1) = 4 k
^
:
Example 155. Let's evaluate the curl of the field F
~
= (yz; xz; xy) at an arbitrary point (x; y; z).
We have
curl F
~
=
@
@y
(xy) ¡
@
@z
(xz);
@
@z
(yz) ¡
@
@x
(xy);
@
@x
(xz) ¡
@
@y
(yz)
= (0; 0; 0);
and thus the circulation of F
~
at all points are zero.
188
Note that a two-variable vector field F
~
= (P (x; y); Q(x; y)) can b e embedded in R
3
as
F
~
= (P (x; y); Q(x; y); 0);
and thus its curl can b e evaluated as
curl F
~
= (Q
x
¡P
y
) k
^
:
87.2 Geometric inte rpretation
The curl operation measure how a given vector field causes the circulation at a point. To understand
this concept, consider the filed F
~
= (y; 0; 0) on R
3
which is shown below in the xy-plane:
As it is observed, this field causes a rotation if for example we put a wheel at any point on this
plane. The direction of the caused rota tion in c lockwise. Note that the axis of this circulation is
the z-axis. The curl of this field is r×F
~
= (¡1)k
^
that confirms our observation. The negative sign
enters because it rotates in the opposite direction of the standard one.
The curl of a vector field has three components: the circulation around x-axis that is: (R
y
¡ Q
z
),
the circulation around y-axis that is (P
z
¡R
x
), and the circulation around z-axis that is (Q
x
¡P
y
).
Thus, r×F
~
is an assignment of the form
r×F
~
: (x; y; z) 7!(R
y
¡Q
z
; P
z
¡R
x
; Q
x
¡y
y
):
r×F
~
For example, for the filed F
~
= (¡y
2
; x
2
; z
2
), the curl is:
curl F
~
= (0; 0; 2x + 2y);
and thus the vector (0; 0; 2x + 2y) is assigned to each point (x; y; z). This implies that the circulation
of F
~
is only about the z-axis.
189
87.3 Curl of gradient fie lds
Let F
~
b e a gradient or conservative field, that is, there exists a scalar function f such that rf = F
~
.
Then, we have
r×F
~
= r×(rf ) = det
2
6
6
4
i
^
j
^
k
^
@
x
@
y
@
z
f
x
f
y
f
z
3
7
7
5
= (0; 0; 0):
The fact that the curl is zero indicates that the circulation of the field is zero around all x; y and
z axes. In turn, we can show that the circulation of the filed along any closed curve is also zero.
Recall t hat the circulation of a vector field F
~
along a close d curve C is defined through the integral:
R
C
=
I
C
F
~
·dr:
Thus, if F
~
= (f
x
; f
y
; f
z
), then for a parametrization r(t) of C, we can write:
I
C
F
~
·dr =
Z
t
0
t
1
rf(r(t)) ·r
0
(t) dt =
Z
t
0
t
1
df(r( t)) = f (r(t
1
)) ¡f(r(t
0
));
and for closed curve with r(t
0
) = r(t
1
), we obtain
I
C
F
~
·dr = 0:
In general, we have the following theorem.
Theorem 156. Let F
~
be a smooth vector field. If F
~
is conservative fields than r×F
~
=0. Conversely,
if r×F
~
=0, then F
~
is conservative field. Therefore, r×F
~
=0 if and only if F
~
is a conservative field.
Example 157. The vector field F
~
= (¡y; x; z ) is not conservative as r×F
~
= 2k
^
is nonzero. The
vector field G
~
= (yz; zx; xy) is conservative as r×G
~
= 0. What is the scalar function g for G
~
? To
determine a scalar function g(x; y; z) such that G
~
= rg we should have g
x
= yz and thus
g(x; y; z) =
Z
g
x
dx = xyz + h(y; z);
where h is an arbitrary smooth function in terms of y and z. Additionally, g must satisfy g
y
= zx
that leads h
y
(y; z) = 0 which implies: h = h(z). The condition g
z
= xy implies that h
0
= 0 and then
the function h can be a constant. Thus, we can write the scalar function g as g(x; y; z) = xyz
assuming the constant is zero. In physics, we learned that the potentials different up to a constant
generates the same force field.
190
88 Divergence
88.1 Algebraic statement
Anot her impo rtant operation on a vector field is the divergence of a vector field. The divergence of
a vector field measure how a vector field converges or diverges at a point. First the definition.
Definition 158. The divergence of a smooth vector field F
~
= (P (x; y; z); Q(x; y; z); R(x; y; z)) at
a point (x
0
; y
0
; z
0
) is defined as
div (F
~
)(x
0
; y
0
; z
0
) := P
x
(x
0
; y
0
; z
0
) + Q
y
(x
0
; y
0
; z
0
) + R
z
(x
0
; y
0
; z
0
):
Note that for r=
0
B
B
@
@
x
@
y
@
z
1
C
C
A
, we can write the divergence as:
div (F
~
) := r·
0
@
P
Q
R
1
A
=
0
B
B
@
@
x
@
y
@
z
1
C
C
A
·
0
@
P
Q
R
1
A
= P
x
+ Q
y
+ R
z
:
Example 159. Let's eva luate the divergence of the fields F
~
= (yz; zx; xy), and G
~
= (xy; yz; zx)
at an arbitrary point (x; y; z).We have
r·F
~
= (yz)
x
+ (zx)
y
+ (xy )
z
= 0;
and
r·G
~
= (xy )
x
+ (yz)
y
+ (zx)
x
= y + z + x:
Theorem 160. The divergence of a curl field is zero everywhere, that is, r·(r×F
~
) = 0 .
Proof. We have
r·(r×F
~
) = (R
y
¡Q
z
)
x
+ (P
z
¡R
x
)
y
+ (Q
x
¡P
y
)
z
:
Calculating terms by term, we have
(R
y
¡Q
z
)
x
= R
x y
¡Q
x z
; (P
z
¡R
x
)
y
= P
yz
¡R
xy
; (Q
x
¡P
y
)
z
= Q
x z
¡P
yz
;
and adding up all of them gives 0. Note that we can write r·(r×F
~
) as the following determinant
r·(r×F
~
) =
@
x
@
y
@
z
@
x
@
y
@
z
P Q R
;
and doing a si mple algebra gives zero.
191
89 Geometric interpretation
Consider the fields shown in the following figure:
In the figure at the left, we observe that the vector field converg es to a point since the net amount
of flux entering the boundary shown by the red closed circle to reach the focal point is positive. In
this case, we call this point a sink for the vector field. Since the vector field tends to converge at
this point, its divergence is negative. The figure at the middle, shows a filed that diverges at the
focal point since the net amo unt of flux leaving the area enclosed by the red closed circle is positive.
This point is called a source for the vector field. The divergence in this case is positive. The third
figure, the figure at the right shows a rotational field. The net amount of flux passing through the
boundary to reach the point is zero and thus the divergence of the point in this case is zero.
In general, the divergence depends on the net amount of the flux passing through a point. For
example, in the following figure, we observe that the flux ent ering the region about the focal point
is stronger than the flux leaving that region and thus the filed tends to converge at t his point, or
equivalently, the divergence of the field is negative.
Not e. From the above observations, we can say that the divergence of a field F
~
at a point (x
0
; y
0
; z
0
)
measures the tendency of the vector field to converge at this point, to diverge or just to be neutral.
90 Summary
We have seen three important operations on scalar and vector fields:
• Gradient operation of scalar fields that result to a vector field. These fields are called gradient
or conservative fields.
192
• Dive rgence that acts on a vector field and results a scala r fields. This scalar fields determines
the points where the source or sink exist or solenoid regions.
• Curl that acts on a vector field and results a vector field. This vector field measures the
circulation of the original vector field along x; y and z axis.
For example, consider the following scalar filed which is the distribution of temperature:
T (x; y) = xye
¡x
2
¡y
2
:
This is show below:
The regions with yellow colors are hotter tha t blue spo ts. The stream lines of the gradient of this
field is shown below:
As we observe, the gradient field always point t oward the maximum and thus the curves stretches
from blue spots to yellow spots (money flows from poor people to rich people!) however, the nature
is more just and heat flows from hot places to cold places, that is, the heat flow in the negative
direction of the gradient: F
~
= ¡rT , which is shown below:
What is the dive rgence of this vector field: div (¡rT )? the figure blow shows the divergence:
193
As we observe, the divergenc e d etects the source and sink spots very well, the points that corresponds
to the maximum and minimum points of T (x; y). S ince ¡rT is a conservative field, it does not
causes any circulation and then r×(¡rT ) = 0.
91 Exercises
Exercise 157. Use the above res ult and prove that the fil ed F
~
= (x; y; z) can not be the cu rl o f another vecto r
field G
~
.
194
Lecture
S urface inte gral of ve ctor fields
92 Flux through a surfac e
Let F
~
(x; y; z) be a smooth vector field in R
3
passing through a surface S
x
y
z
S
F
~
The net amount of F
~
that passes through S is called flux of F
~
. To understand the meaning behind
this notion, let's consider F
~
as the flow of some fluid.
Suppose that a fluid of density ρ(x; y; z)
kg
m
3
moves with the velocity V
~
(x; y; z)
m
sec
. This generate
a flow or vector field F
~
= ρ V
~
with the unit
kg
m
2
sec
. Assume that this flow of fluid passes through
a surface S (like a windows or an outlet). The net amount of the fluid per unit time that passes
through S is called the flux of this flow. Fix a point (x; y; z)2S and let dS be the differential surface
at this point. Let us rewrite F
~
as:
F
~
= F
~
·n^ + F
~
·T
^
;
where n^ is the unit normal vector on S a t (x; y; z), and T
^
is the unit tangent vector on S such that
n^; F
~
(x; y; z) and T
^
lies on one plane.
T
^
n^
ρ V
~
x
y
z
S
Evidently, the vector F
~
·T
^
does not passes through S and only the component F
~
·n^ contributes
here. The amount passing through dS is defined by the e xpression F
~
·n^dS, the thus the total flux is:
F =
ZZ
S
F
~
·n^ dS
kg
sec
:
195
This integral measures how much material in unit of kilogram passes through the surface S. For a
general vector field F
~
and a smooth (or piece-wise smo oth) surface S, the surface integral of F
~
on
S is defined by the following integral:
F :=
ZZ
S
F
~
·n^ dS: (11)
93 Eval uating the integral
To calculate t he integral, we use again the parametrization of S. If Σ(t; s) is a parametrization of
the surface, then
n^ =
Σ
t
×Σ
s
jΣ
t
×Σ
s
j
;
and dS is equal dS = jΣ
t
×Σ
s
jdA. where A is the domain of (t; s). All these relations have been
derived in previous lectures. Therefore, the surface integral (11) can be evaluated as follows
ZZ
S
F
~
·n^ dS: =
ZZ
D
F
~
(Σ(t; s)) ·(Σ
t
×Σ
s
) dA:
Remark. As we know both vectors
Σ
t
×Σ
s
jΣ
t
×Σ
s
j
and ¡
Σ
t
×Σ
s
jΣ
t
×Σ
s
j
are unit normal on S, one is exterior and
another one is interior. By exterior we mean that if we make a positively oriented closed curve C
on S (the inside of C lie on the left side), the normal vector n^ follows the right-hand system.
Remark. If S is generated by an explici t function z = f (x; y), the unit normal ve ctor is
n^ =
(¡f
x
; ¡f
y
; 1)
1 + jrf j
2
p
;
and then the surface integral reads:
ZZ
S
F
~
·n^ dS =
ZZ
D
F
~
(x; y; f(x; y)) ·(¡f
x
; ¡f
y
; 1) dA:
Example 161. Let's find the flux associated to the vector field F
~
= (¡y; x; z) passing through the
surface S of the unit sphere for 0 ≤ φ ≤
π
4
. To evaluate the integral, we use the parametrization
Σ(θ; φ) = (sin(φ) cos(θ); sin(φ) sin(θ); cos(φ)):
It is seen that the exterior perpendicular vector is Σ
φ
×Σ
θ
(see the associated figure in the previous
lecture). We have
Σ
φ
×Σ
θ
= (sin
2
(φ) cos(θ); sin
2
(φ) sin(θ); sin(φ) cos(φ));
196
and thus
F =
Z
0
π
4
Z
0
2π
(¡sin(φ) sin(θ); sin(φ) cos(θ); cos(φ)) ·(sin
2
(φ) cos(θ) ; sin
2
(φ)sin(θ); sin(φ)cos(φ)) dθdφ:
A simple calculation give
F =
Z
0
π
4
Z
0
2π
sin(φ) cos
2
(φ) dθdφ =
2π
3
1 ¡
2
p
4
:
Example 162. Let's find the flux associated to the field F
~
= (x; y; z) passing through the surface
z = 4 ¡x
2
¡y
2
for z > 0. The natural parametrization is (x; y; 4 ¡x
2
¡y
2
) and then
n^ dS = (2x; 2y; 1);
and then
ZZ
S
F
~
·n^ dS =
ZZ
D
(x; y; z) ·(2x; 2y; 1) dA =
ZZ
D
(2x
2
+ 2y
2
+ z) dA;
where D is the domai n x
2
+ y
2
≤4. Fo r z = 4 ¡x
2
¡y
2
, and using the polar coordinat e, we obtain
F =
Z
0
2π
Z
0
2
(4 + r
2
) rdr = 24π:
Example 163. Let S be the surface of the plane y = 1 inside the ball x
2
+ y
2
+ z
2
≤2. Find the
flux of the vector field F
~
= (z
2
; x
2
; y
2
) passin g through S in the exterior directio n.
Solution. The surface S is the disk x
2
+ z
2
≤1. The normal vector on this s urface is n^ = (0; 1; 0), and thus
F
~
·n^ dS = x
2
dS:
Using the polar coor dinate, we obtain
F =
ZZ
S
F
~
·n^ dS =
Z
0
2π
Z
0
1
r
2
cos
2
θrdrdθ =
π
4
:
Example 164. An electric ch arge q is located at the origin. Find the flux passing through the
surface of a sphere of radius a.
Solution. The electric filed in the space is
E
~
(x; y; z) =
q
4π"
0
x
r
3
;
y
r
3
;
z
r
3
;
wher e r = x
2
+ y
2
+ z
2
p
. This problem can be solved directly without a parametrization. Notice that the unit
normal ve ctor on the sphere of radius a is n^ =
¡
x
a
;
y
a
;
z
a
. Thus, the direct calculatio n gives
F =
q
4π"
0
ZZ
S
x
a
3
;
y
a
3
;
z
a
3
·
x
a
;
y
a
;
z
a
ds =
q
4π"
0
a
4
ZZ
S
(x
2
+ y
2
+ z
2
) dS =
q
4π"
0
a
2
ZZ
S
dS =
q
"
0
;
as the surface area of the spher e is 4πa
2
. As we observe, the flux is independent of the radiu s of the sphere. This
is a special case of the Gauss theorem that we will introduce in subsequent lectures.
197
Lecture
Divergence Theorems
94 Divergence an d Gr een's theorem
We can simply verify that two vect or fields F
~
= (P ; Q) and G
~
= (¡Q; P ) are orthogonal as their
dot pro d uct is zero. Let C be a closed curve. The line inte gral of G
~
is:
I
C
G
~
·dr =
I
C
(¡Q; P ) ·(dx; dy) =
I
C
Pdy ¡ Qdx:
The Green's theorem for the last integral yields:
I
C
Pdy ¡ Qdx =
ZZ
D
(P
x
+ Q
y
) dA =
ZZ
D
div (F
~
) dA:
On the other hand, the line integral of G
~
can be written as
I
C
G
~
·dr =
I
C
(¡Q; P ) ·(dx; dy) =
I
C
(P ; Q) ·(dy; ¡dx):
Note that (dy; ¡dx) is equal to n^ ds, where n^ is the normal to the closed curve C, and ds is the arc
length differential: ds = dx
2
+ dy
2
p
. Thus, we can write
I
C
G
~
·dr =
I
C
F
~
·n^ ds:
Combining two above facts, we can write
I
C
F
~
·n^ ds =
ZZ
D
div (F
~
) dA: (12)
Note that the left integral measure the flux of F
~
passing through a closed curve C. The above
equality is the 2D version of an important theorem called the divergence theorem.
C
n^
n^
n^
n^
n
^
n^
n
^
F
~
F
~
F
~
F
~
F
~
F
~
F
~
198
Example 165. Let C be the unit circle. Consider the vector fields F
~
1
= (¡y; x) and F
~
2
= (¡x; ¡y).
Let's evaluate the flux o f F
~
1
and F
~
2
passing through C in the exterior direction using the line integral
and the above version of the divergence theo rem.
Recall that the normal vector on the unit circl e is just the direction of radial: n^ = (x; y) , and then
I
C
F
1
·n^ ds =
I
C
(¡xy + xy) ds = 0:
This result is confirmed by the divergence theorem as div (F
~
1
) = 0. For F
~
2
, we have
I
C
F
2
·n^ ds = ¡
I
C
(x
2
+ y
2
) ds = ¡
I
C
ds = ¡2π:
Using the equality (12), we obtain
I
C
F
2
·n^ ds =
ZZ
D
(¡2) dA = ¡2π:
The figure below depicts the vector fields. As we observe, the vector field F
~
1
is rotational and thus
the flux passing the unit circle is zero. The vector fi eld F
~
2
is convergence and thus its divergence is
negative.
Let's investigate more in the relation (12 ). Using a theorem called the intermediate value theorem
for integral, we can r ewrite the right-hand side of the relation (12) as
ZZ
D
div (F
~
) dA =div (F
~
)(x
c
; y
c
) jDj;
where (x
c
; y
c
) is a point (unknown) in the domain D and jDj is the area of the domain D. Therefore,
we can write
1
jDj
I
C
F
~
·n^ ds =div (F
~
) (x
c
; y
c
):
199
Now, fix a point (x
0
; y
0
) inside C. We write jC j!0 when the closed curve C shrinks to (x
0
; y
0
). In
this case, the domain D also shrinks to (x
0
; y
0
). Shrinking D to (x
0
; y
0
) causes that (x
c
; y
c
)!(x
0
; y
0
)
and then
lim
jC j!0
1
jDj
I
C
F
~
·n^ ds =div (F
~
) (x
0
; y
0
):
In other words, the divergence of a vector field F
~
at a point (x
0
; y
0
) is equal to the flux passing
any closed c urve around the p oint divided by the area pf the domain D as the domain D shrinks
to (x
0
; y
0
):
div (F
~
) ( x
0
; y
0
) = lim
jC j!0
F
C
jDj
:
This calculation confirm our previous statement that the divergence of a vector field at a point
measures the flux passing passing through that point.
The figure below shows the result (12) schematically using the approximation of integrals by finite
sums:
ZZ
D
div (F
~
) dA ≈
X
i
div (F
~
)(x
i
; y
i
) ∆A
i
=
X
i
[P (x
i
; y
i
) + Q(x
i
; y
i
)] ∆A
i
≈
X
i
I
C
i
F
~
·n^ ds:
I
C
F
~
·n^ ds ≈
X
i
I
C
i
F
~
·n^ ds
I
C
i
F
~
·n^ ds ≈fP
x
(x
i
; y
i
) + Q
y
(x
i
; y
i
)gdA
C
C
2
C
1
C
3
95 Statement of the th eorem
The divergence theorem is the generalization of the previous result for vector fields in R
3
.
Theorem 166. Assume that S is a closed smooth surface, and let F
~
be a given smooth vector field
in E, the domain enclosed by the closed surface S. The following equality holds:
ZZ
S
F
~
·n^ dS =
ZZZ
E
div (F
~
) dV ;
200
where n^ is the exterior normal vector on S(sometimes S is called the boundary of E and is denoted
by S = bnd(E)).
Example 167. Determi ne the flux associated to the vector field F
~
= (x; y; z) passing through the
unit sphere x
2
+ y
2
+ z
2
= a
2
.
Solution. For the sphere, the direct calculation is straightforward. Not e th at the unit normal vecto r on the unit
spher e is n^ =
¡
x
a
;
y
a
;
z
a
(the radia l vec tor). The factor
1
a
is for normalizi ng this vector.
r~ = (x; y; z)
Ther efore, we have
ZZ
S
(x; y; z) ·
x
a
;
y
a
;
z
a
dS =
ZZ
S
x
2
a
+
y
2
a
+
z
2
a
dS = a
ZZ
S
dS = 4πa
3
:
This calculation can be done using the divergence theorem as follows:
ZZ
S
F
~
·n^ dS =
ZZZ
E
div (F
~
) dV =
ZZZ
E
3dV ;
wher e E i s the ball x
2
+ y
2
+ z
2
≤a
2
. Thus,
ZZZ
E
3dV = 3V (E) = 4πa
3
:
Example 168. Determine the fl ux of F
~
given in the above example now passing through the
ellipsoid
x
2
a
2
+
y
2
b
2
+
z
2
c
2
= 1.
Solution. To calculate the flux passi ng thr ough the surface of the ellipsoid, the di rect calculation is not easy.
Here, we use the divergence theorem:
ZZ
ellip:
F
~
·n^ dS =
ZZZ
E
3dV ;
wher e E here is the inside volume of t he ellipsoid. SInce the volume of ellipsoid is 4πabc, we conclude:
ZZ
ellip:
F
~
·n^ dS =
ZZZ
E
3dV = 4πab c:
Example 169. Find the flux of the vector field F
~
=(x; y; z) passing through the whole surface of the
cylinder of radius a running from z =¡H to z = H, by 1) direct method, 2) using divergence theorem.
201
Solution. The direct calculation is as follow s:
ZZ
S
F
~
·n^ dS =
ZZ
S
a
F
~
·n^ dS +
ZZ
S
t
F
~
·n^ dS +
ZZ
S
b
F
~
·n^ dS;
wher e S
a
; S
t
and S
b
are respectively the side, top and bottom surfa ces o f the cylinder. We have
ZZ
S
a
F
~
·n^ dS =
ZZ
S
a
(x; y; z) ·
x
a
;
y
a
; 0
dS =
1
a
ZZ
S
a
(x
2
+ y
2
) dS = a
ZZ
S
a
dS = 4πa
2
H:
Notice that the normal vector on the side surface is
¡
x
a
;
y
a
; 0
. On top, we have
ZZ
S
t
F
~
·n^ dS =
ZZ
S
t
(x; y ; z) ·(0; 0; 1) dS =
ZZ
S
t
zdS ;
and since z = H on top, we obtain
ZZ
S
t
F
~
·n^ dS = πa
2
H:
Similarly, on bottom, we have
ZZ
S
b
F
~
·n^ dS =
ZZ
S
b
(x; y; z) ·(0; 0; ¡1) dS =
ZZ
S
b
¡zdS = πa
2
H:
Ther efore, the total flux passing through the closed surface of the cylinder is F = 6πa
2
H.
To use t he divergence theorem, we have
ZZ
S
F
~
·n^ dS =
ZZZ
E
div (F
~
) dV =
ZZZ
E
3dV = 3(2πa
2
H) = 6πa
2
H:
Example 170. Find the flux asso ciated to the vector field F
~
=
¡
e
¡yz
; e
¡xz
; x
2
y
2
passing through
the surface S
1
: z = 4 ¡x
2
¡y
2
for z ≥0.
Solution. The direct calculation is not easy at all. The surface is not closed also that allows us we use the
divergence theore m. However, we can us e a trick here. We can make S
1
a closed surface if we add the bo ttom
S
2
: x
2
+ y
2
≤4 to S
1
and obtain the closed surface S.
S
1
: z = 4 ¡x
2
¡ y
2
n^
n^
S
2
: x
2
+ y
2
≤4
We have
ZZ
S
F
~
·n^ dS =
ZZZ
E
div (F
~
) dV :
202
On the other hand, we have div (F
~
) = 0 an d thus
ZZ
S
F
~
·n^ dS = 0;
that implies sin turn
ZZ
S
1
F
~
·n
^
dS = ¡
ZZ
S
2
F
~
·n
^
dS =
ZZ
¡S
2
F
~
·n
^
dS;
wher e ¡S
2
is the su rface S
2
with normal vector (0; 0; 1). Therefore, the desired flux through S
1
is equal to:
ZZ
S
F
~
·n^ dS =
ZZ
¡S
2
¡
e
¡yz
; e
¡xz
; x
2
y
2
·(0; 0; 1) dS =
ZZ
¡S
2
x
2
y
2
dS:
Using the polar coor dinate:
ZZ
¡S
2
x
2
y
2
dS =
1
4
Z
0
2π
Z
0
2
r
5
sin
2
(2θ) drdθ =
8π
3
:
Remark. In the above example we saw that
ZZ
S
1
F
~
·n^ dS =
ZZ
S
2
F
~
·n^ dS:
The physical meaning of this equality is obvious if we note that the divergence of F
~
is zero inside the
region. Recall that divergence measure if there exists a sink or source of a vector field, and if there
is not source or sink for a vector field, the flux passing through S
2
must be equal to the flux passing
through S
1
: F
S
2
= F
S
1
If this equality does not hold then some amount of this flux must be absorbed
or produced in the region between S
1
and S
2
which is impossible by the relation div (F
~
) = 0 .
Example 171. Let an electric charge is placed at the origin in R
3
. Find the flux passing through
the surface of the sphere
S
a
: x
2
+ y
2
+ z
2
= a
2
;
where a > 0 is an arbitrary value.
Solution. We know that the electric field generated by the ele ctric charge at a point (x; y; z) 2R
3
is:
E
~
(x; y; z) =
q
4π"
0
x
r
3
;
y
r
3
;
z
r
3
;
wher e r = x
2
+ y
2
+ z
2
p
. The normal vector on the sphere S
a
is
n^ =
x
a
;
y
a
;
z
a
:
Ther efore, the lux c an be calculated as
F =
ZZ
S
a
E
~
·n^ dS =
q
4π"
0
ZZ
S
a
x
a
3
;
y
a
3
;
z
a
3
·
x
a
;
y
a
;
z
a
dS =
q
4π"
0
a
4
ZZ
S
a
(x
2
+ y
2
+ z
2
) dS:
203
Since x
2
+ y
2
+ z
2
is equal a
2
on the sphere S
a
, we obtain:
q
4π"
0
a
2
ZZ
S
a
dS =
q
"
0
:
As we o bserve the flux is independ ent of the radius. Why the flux is ind ependent of the radius? The reason is
that the divergence of the electric field is zero everywhere except at the origin:
div (E
~
) =
q
4π"
0
@
@x
x
jrj
3
+
@
@y
y
jrj
3
+
@
@z
z
jrj
3
= 0:
S
2
div (E
~
) = 0
S
1
Since the divergence of E
~
is zero between two spheres S
1
and S
2
, then the flux passing through S
1
never vanishes
in a sink or is produced by a source, and thus remai n the same. This flux has to pass t hrou gh S
2
because there
is no sink or source in the region between S
1
and S
2
.
Example 172. Assume that an electric charge q is placed at the origin in R
3
. Find the flux passing
through the ellipsoid
x
2
a
2
+
y
2
b
2
+
z
2
c
2
= 1.
Solution. Since the surface is an elli psoid, the direct calculation is not easy. On the other hand, we can not
use divergence theorem since the fi eld i s not smooth at the origin. He re, we use the following trick:
Let's de compose the regio n E as E
1
+ E
2
, where E
1
is a small ball c entered at the origin, and E
2
= E ¡E
1
, is t he
remaining region, the reg ion outside the ball and inside the ellipsoid as shown below:
The rea son for this decomposition is that div (E
~
) = 0 on E
2
that implies:
ZZ
S
F
~
·n^ dS =
ZZ
S
1
F
~
·n^ dS:
In the previous examp le, we have calculated the integral at the right hand side and obtain ed
q
"
0
. Therefore, the
flux passing the ellipsoid is
q
"
0
.
Example 173. In the previous lecture, we calculated the flux passing the surface of the plane
y = 1 inside the sphere x
2
+ y
2
+ z
2
= 2 of the vector field F
~
= (z
2
; x
2
; y
2
). The flux is F =
π
4
. Let's
determine the flux passing through the surface of the sphere with the boundary x
2
+ z
2
= 1.
204
The direct calculation of the flux is not easy, however since div (F
~
) = 0, we conclude that the flux
passing through the new surface is the same as the flux passing through the disk x
2
+ z
2
≤1, and
thus F =
π
4
.
Remark. The smoothness of the vector field inside the closed surface S is crucial and can not be
relaxed. The following example illustrate this point.
Example 174. Consider the vector field
F
~
=
x
x
2
+ y
2
;
y
x
2
+ y
2
; z
;
and let S be the closed surface of a cylinder of radius a running from z = H to z = 2H. The flux
passing through S is
ZZ
S
F
~
·n^ dS =
ZZ
S
a
F
~
·n^ dS +
ZZ
S
t
F
~
·n^ dS +
ZZ
S
b
F
~
·n^ dS ;
where S
a
is the surface area of the cylinder (without bo ttom and top caps), S
t
is the surface of the
top and S
b
is the surface of bottom of the cylinder. We have
ZZ
S
a
F
~
·n^ dS =
ZZ
S
a
x
x
2
+ y
2
;
y
x
2
+ y
2
; z
·
x
a
;
y
a
; 0
dS =
1
a
ZZ
S
a
dS = 2πH:
Similarly, we have
ZZ
S
t
F
~
·n^ dS =
ZZ
S
a
x
x
2
+ y
2
;
y
x
2
+ y
2
; z
·(0; 0; 1) dS = 2πa
2
H ;
and
ZZ
S
t
F
~
·n
^
dS =
ZZ
S
a
x
x
2
+ y
2
;
y
x
2
+ y
2
; z
·(0; 0; ¡1) dS = ¡πa
2
H:
Therefore, the total flux is
F = πa
2
H + 2πH:
205
On the other hand , one may by mistake calculate div (F
~
) = 0 (of course the divergence can not be
calculated on the z-axis!) and use the divergence theorem to get:
ZZ
S
F
~
·n^ dS =
ZZZ
E
div (F
~
) dV =
ZZZ
E
dV = πa
2
H ;
which is not the true flux p assing through the surface of the cylinder. The reason is that the filed
is not smooth inside the cylinder along the z axis.
Example 175. In this problem, we aim to connect chain rule and the divergence theorem through a
problem in physics. Assume that ρ(t; x; y; z) denote the density of a fluid at the point (x; y; z) 2R
3
at time t. Assume that this fluid moves with the velocity V
~
= (V
x
; V
y
; V
z
). We would like to explore
the change of density along its flow line which is induced by the velocity field V
~
. Let's consider a
control volume E. As we know from our previous lectures, the total mass in E at time t is derived
by the integral :
M(t) =
ZZZ
E
ρ(t; x; y; z) dV :
a) The rate of change of M(t) is
d
dt
M(t) =
d
dt
ZZZ
E
ρ(t; x; y; z) dV =
ZZZ
E
ρ
t
(t; x; y; z) dV :
The conservation of mass indicates that this change is equal to the net amount of mass
passing through the boundary bnd(E), that is,
d
dt
M(t) = ¡
ZZ
bnd(E)
ρ(t; x; y; z) V
~
·n
^
dS;
where n^ is the exterior unit vector on the boundary bnd(E). For example, the rate of change
of the students in a class is equal to the rate of students that enter the class minus the number
who leave the class. Use the divergence the orem and obtain the equation
ZZZ
E
fρ
t
+div (ρ V
~
)gdV = 0:
It turns out that the equality holds for the following expression :
ρ
t
+div (ρ V
~
) = 0 :
Conclude the following equation
d
dt
ρ(t; x(t); y(t); z(t)) = ¡ρ div (V
~
);
206
where γ(t) = (x(t); y(t); z(t)) is the trajectory of the control volume E induced by the velocity
field V
~
. The left hand side is the change of mass in E along the trajectory γ(t).
b) Conclude:
•) if div (V
~
) = 0 , then ρ(t; x(t); y(t); z(t)) = ρ( 0; x(0); y(0); z(0))
•) if div (V
~
) > 0 , then ρ(t; x(t); y(t); z(t)) < ρ(0; x(0); y(0) ; z(0))
•) if div (V
~
) < 0 , then ρ(t; x(t); y(t); z(t)) > ρ(0; x(0); y(0) ; z(0)).
Thus the rate of change of ρ along the flow lines depends on the divergence of the velocity.
Consider the following 2D velocity filed
V
~
= (¡y ¡0.1x; x ¡0.1y):
The filed is shown below:
Run the following code in Matlab and explain your observation. In particular, explain the
change of density, and explain any type of circulation or rotation you observe.
a=0.1;
[r,th]=meshgrid(0:0.01:0.1,0:pi/10:2*pi);
x=0.5+r.*cos(th);y=0.5+r.*sin(th);
t=0:pi/4:4*pi;
phi=@(t) exp(-a*t)*[cos(t), -sin(t);sin(t),cos(t)];
for i=1:length(t)
S=phi(t(i)); xt=S(1,1)*x+S(1,2)*y;yt=S(2,1)*x+S(2,2)*y;
ut=exp(2*a*t(i)).*exp(-x.^2-y.^2);
surf(xt,yt,ut);view(2), colormap(flipud(hot)); axis equal tight;
shading interp,axis([-1 1 -1 1]); clim([0 2.5]);
grid off;
hold on
pause(0.2);
207
end
Solution.
a) Usin g divergence theorem, we have
ZZ
bnd(E)
ρ(t; x; y; z) V
~
·n^ dS =
ZZZ
E
div (ρ V
~
) dV :
Ther efore,
ZZZ
E
ρ
t
(t; x; y; z) dV = ¡
ZZZ
E
div (ρ V
~
) dV ;
or equivalently
ZZZ
E
fρ
t
(t; x; y; z) +div (ρ V
~
)gdV = 0:
Since E is arbitrary, and the integrand is continuous, we conclude
ρ
t
+div (ρ V
~
) = 0:
Expanding the second term:
div (ρ V
~
) = rρ ·V
~
+ ρ div (V
~
);
we obtain the equation:
ρ
t
+ rρ ·V
~
= ¡ρ div (V
~
):
On the other hand, by chain rule for x = x(t); y = y(t) and z = z(t), we have
d
dt
ρ(t; x(t); y(t); z(t)) = ρ
t
+ ρ
x
dx
dt
+ ρ
y
dy
dt
+ ρ
z
dz
dt
= ρ
t
+ rρ ·V
~
;
for V
~
=
¡
d x
dt
;
dy
dt
;
dz
dt
.
b) If div (V
~
) = 0, then
d ρ
dt
= 0, that is ρ(t; γ(t)) rema ins constant for γ(t) = (x(t); y(t); z(t)) and thus ρ(t;
γ(t)) = ρ(0; γ(0)). If div (V
~
)> 0, then
dρ
dt
< 0 and the ρ decreases along it s traj ectory, that is ρ(t; γ(t)) < ρ(0;
γ(0)). If div (V
~
) < 0, then
dρ
dt
> 0 and thus ρ(t; γ(t)) > ρ(0; γ(0)). The diagr am is as follows:
As we observe, the control vol ume shrinks along its traject ory and this causes the increa ses of the density.
Note that div (V
~
) = ¡0.2 < 0 and thus ρ increases alon g its trajectory. T he trajectory is a spiral as the
figure of V
~
indicates. Moreover, the control volume rotat es along itself due to the curl curl(V
~
) = 2.
208
96 Proof of the Divergence theor em
Here we present the p roof for simple domains, domains that can be projected on the xy, xz and yz-
planes. Let n^ on S to be denoted by the vector n^ = (n
1
; n
2
; n
3
), then f or F
~
= (P ; Q; R) we can write:
ZZ
S
F
~
·n
^
dS =
ZZ
S
Pn
1
dS +
ZZ
S
Qn
2
dS +
ZZ
S
Rn
3
dS:
We calculate the third inte gral. Consider the following figure:
n^
n^
D
x y
S
2
: z = g(x; y)
S
1
: z = h(x; y)
We can write
ZZ
S
Rn
3
dS =
ZZ
S
1
Rn
3
dS +
ZZ
S
2
Rn
3
dS:
We have n
3
dS = dxdy on S
1
and n
3
dS = ¡dxd y on S
2
. This is evident by the natural parametriza-
tion. For example, on S
1
with the representation z = h(x; y), we have
n
^
=
1
1 + jrhj
2
p
(¡h
x
; ¡h
y
; 1);
and thus n
3
=
1
1 + jrhj
2
p
. On the other hand, dS = 1 + jrhj
2
q
dxdy and then n
3
dS = dxdy. On S
2
the normal vector is n^ =
1
1 + jrhj
2
p
(h
x
; h
y
; ¡1) and thus n
3
dS = ¡dxdy. Now, we can write
ZZ
S
1
Rn
3
dS =
ZZ
D
xy
R(x; y; h(x; y)) dA;
and
ZZ
S
2
Rn
3
dS = ¡
ZZ
D
xy
R(x; y; g(x; y) ) dA;
and then
ZZ
S
Rn
3
dS =
ZZ
D
x y
fR(x; y; h(x; y)) ¡R(x; y; g(x; y))gdA =
ZZ
D
xy
Z
g(x;y)
h(x;y)
R
z
(x; y; z)dz
dA;
209
or equivalently,
ZZ
S
Rn
3
dS =
ZZZ
E
R
z
(x; y; z) dV :
A similar result holds for other integrals:
ZZ
S
Pn
1
dS =
ZZZ
E
P
x
(x; y; z) dV ;
ZZ
S
Qn
2
dS =
ZZZ
E
Q
y
(x; y; z) dV ;
and this completes the proof. The proof for general domains is based on splitting the domain to
simpler domains with the projections on xy;xz and yz-planes and carrying out a similar calculation.
97 Exercises
Exercise 158. Here we aim to evaluate the fl ux passing through the ellipsoid given in the previous example by
dir ect calculation.The parametrization is:
Σ(φ; θ): fx = a sin(φ) cos(θ); y = b s in(φ) sin(θ); z = c cos(φ)g:
Calculate Σ
φ
×Σ
θ
, and obtain
Σ
φ
×Σ
θ
= (bc sin
2
(φ) cos(θ); ac sin
2
(φ) sin(θ); ab sin(φ) cos(φ)):
and thus
n^ dS =
bc
a
x;
ac
b
y;
ab
c
z
sin(φ):
Continue the direct calc ulation and obtain the flux by the integral
ZZ
ellip:
F
~
·n^ dS =
Z
0
π
Z
0
2π
(a sin(φ) cos (θ); b sin(φ) s in(θ); c cos(φ)) ·(Σ
φ
×Σ
θ
) dθdφ:
Exercise 159. Let S be a closed smooth surface, and let E denotes the region inside S. Show the following
relation:
V (E) =
1
3
ZZ
S
(x; y ; z) ·n^ dS:
Exercise 160. Two ele ctric charges q and ¡q are locate d at (1; 0; 0) and (¡1; 0; 0). Show that the flux passing
any surface enclo sing these two points is zero.
Exercise 161. As we studied in lectures, one of important vector fields i n engineering is the electric field E
~
. In
the s imple st case, if a n electric charge q is located at the origin, it generat es a filed at the point r = (x; y; z) as:
E
~
(x; y ; z) =
q
4π"
0
x
jrj
3
;
y
jrj
3
;
z
jrj
3
;
210
wher e jrj= x
2
+ y
2
+ z
2
p
.
a) Show that the total flux passing through the surface x
2
+ y
2
+ z
2
= a
2
for arbitrary a > 0 is
F =
q
"
0
:
Evidently, the total flux is independent of the radius a of the sphere.
b) The results in p art a confirms that the to tal flux passing t hrough the surface x
2
+ y
2
+ z
2
= 1 and x
2
+
y
2
+ z
2
= 4 is the same. Now, assume tha t S is a closed smooth surface between these two spheres.
y
S
z
x
What i s the total flux passing through S? Justify your a nswer.
Exercise 162. Divergence and volume:
a) Let S be a closed smooth s urface, and let E denotes the region inside S. S how the relation:
Vol(E) =
1
3
ZZ
S
(x; y; z) ·n^ dS ;
wher e Vol(E) denote the volume of E.
b) Use the above result and find t he volume of the ellipsoid:
x
2
a
2
+
y
2
b
2
+
z
2
c
2
= 1:
Note that the natural pa rametrization of an ellipsoid is: x = a sin(φ)cos(θ), y = b sin(φ) sin(θ) and z =
c cos(φ).
211
Lecture
S tokes Theorem
98 Stokes theo rem and Green's theorem
To begin with the Stokes theorem, we review the Green's theorem from a new p erspective. Recall
that t he Green's theorem states the relationship between the line integral of a smooth 2D vector
field F
~
= (P ; Q) along a simple closed curve C with positive direction, which is interpreted as the
circulation of this field along C, with a double integral over the region enclosed by C as follows:
I
C
F
~
·dr =
ZZ
D
(Q
x
¡P
y
) dA;
where D is the region enclosed by C. Now, if we consider F
~
as (P ; Q; 0), then curl F
~
·k
^
= Q
x
¡P
y
,
and then we can write
I
C
F
~
·dr =
ZZ
D
(curl F
~
·k
^
) dA:
The above relation is a special case of the Stokes theorem, a theorem that states the circulation of
a vector field in R
3
around a simple closed curve, and the surface integral of the curl of the vector
field. The figure below shows the geometrical meaning of the Green's theorem in the xy-plane:
C
3
C
C
1
C
2
I
C
i
F
~
·dr ≈fQ
x
(x
i
; y
i
) ¡P
y
(x
i
; y
i
)gdA
I
C
F
~
·dr ≈
X
i
I
C
i
F
~
·dr
As it is observed, the circulation over C is equal to the circulation of every point in D.
99 Stokes theo rem and divergence theor em
Let C be a simple closed curve in R
3
, and let S
1
and S
2
b e two smooth surfaces with the intersection
C as shown below
212
n^
n
^
S
1
S
2
C
Assume that F
~
is a smooth vector field in R
3
. Using divergence theo rem, it is simply seen that
ZZ
S
1
r×F
~
·n
^
dS =
ZZ
S
2
r×F
~
·n
^
dS;
where the normal vector on both surfaces make a right-hand system with the orientation of C which
is assume is positive. In fact, the divergence theorem states
ZZ
S
1
¡S
2
r×F
~
·n^ dS =
ZZZ
E
div (r×F
~
) dV = 0;
due to the relation div (r×F
~
) = 0 . Therefore
ZZ
S
1
r×F
~
·n
^
dS ¡
ZZ
S
2
r×F
~
·n
^
dS = 0:
Example 176. Let F
~
= (¡y; x; z).
a) Find the flux associated to r×F
~
passing through 1) the surface S
1
: x
2
+ y
2
≤1 in the plane
z = 0, and 2) through the hemisphere S
2
: z = 1 ¡x
2
¡y
2
p
.
b) Find the circulation of F
~
around the curve x
2
+ y
2
= 1 in the xy-plane oriented positively.
Solution.
a) Note that r×F
~
= (0; 0; 2). Through the first surface, we have
ZZ
S
1
r×F
~
·n^ dS =
ZZ
S
1
(0; 0; 2) ·(0; 0; 1) dS = 2
ZZ
S
1
dS = 2π:
The flux through S
2
is
ZZ
S
2
r×F
~
·n^ dS =
ZZ
S
1
(0; 0; 2) ·(x; y; z) dS = 2
ZZ
S
2
zdS = 2
ZZ
S
2
1 ¡x
2
¡ y
2
p
dS:
213
Note that
dS = 1 + jrf j
2
p
dxdy =
1
1 ¡x
2
¡ y
2
p dxdy;
and then
2
ZZ
S
2
1 ¡x
2
¡ y
2
p
dS=2
ZZ
D
dA;
wher e D is the disk x
2
+ y
2
≤1. The above integral gives the value 2π aga in, and thus the flux associate d
to r×F
~
passing through S
1
is equal to the flux passing throug h S
2
, as we expected in advance due to
the fact that div (r×F
~
) = 0.
b) Let's choose the parametrization γ(t) = (cos(t); sin(t); 0), and then
C =
I
C
F
~
·dr =
Z
0
2π
(¡sin(t); co s(t); 0) ·(¡sin(t); cos(t); 0) dt = 2π:
Example 177. Let S be the surface z = 4 ¡x
2
¡y
2
for z ≥0. The vector field F
~
=
¡
¡y
3
; x
3
; e
xyz
is given.
a) Find the flux of r×F
~
passing through S.
b) Find the circulation of F
~
around the curve x
2
+ y
2
= 4 in the xy-plane oriented positively.
Solution.
a) We have
r×F
~
=
¡
xze
xyz
; ¡y ze
xyz
; 3x
2
+ 3 y
2
:
It seems that the surface integr al of r× F
~
is no t easy. However, the proposition states the flux is the
same as the flux passing through the surface S
0
: x
2
+ y
2
= 4 in the plane z = 0. We have
ZZ
S
0
r×F
~
·n^ dS =
ZZ
S
0
¡
xze
xyz
; ¡yze
x yz
; 3x
2
+ 3 y
2
·(
0 0 1
)dS = 3
ZZ
S
0
(x
2
+ y
2
) dS:
Using the polar coor dinate, we have
3
ZZ
S
0
(x
2
+ y
2
) dS = 3
Z
0
2π
Z
0
2
r
3
drdθ = 24π:
b) With the parametrization x(t) = 2 cos (t); y(t) = 2 sin(t) and z(t) = 0, we have
F
~
(x(t); y(t); z(t)) = (¡8 sin
3
t; 8 cos
3
t; 1);
and then
C =
I
C
F
~
·dr =
Z
0
2π
(¡8 sin
3
t; 8 cos
3
t; 1) ·(¡2 sin(t); 2 cos(t); 0) dt = 1 6
Z
0
2π
(sin
4
t + cos
4
t) dt:
A simple calculation gives C = 24π:
If flux of r×F
~
passing through any surfa ce with the boundary C is the same, then we naturally
ask the question: what is the this value of flux. The Stokes theorem answers this question.
214
100 Statement of th e theorem
Theorem 178. Assume that C is a simple closed space curve with positive d irection in R
3
, and let
S be any smooth surface so that C is its boundary, that is, bnd(S) = C . Assume that F
~
is a smooth
vector field in R
3
, then
I
C
F
~
·dr =
ZZ
S
(r×F
~
) ·n^ dS;
where n^ is the unit normal vector on S such that the direction of C and n^ make a right-hand system.
Example 179. Let C be the curve of the intersection of the plane z = 1 and the sphere x
2
+ y
2
+z
2
=
4. Assume F
~
= (¡y; x; z) is given in R
3
. Find the circulation of F
~
around C by:
a) direct calculation and,
b) using the Stokes theorem.
Solution.
a) We need first to find a parametrization of C. The intersection of two planes i s
x
2
+ y
2
= 3;
which can be parametrized a s
γ(t) = ( 3
p
cos(t); 3
p
sin(t); 1); t 2[0; 2π]
We have
I
C
F
~
·dr =
Z
0
2π
¡ 3
p
sin(t)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{z
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
¡y
; 3
p
cos(t)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{z
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
x
; z
!
·(¡ 3
p
sin(t); 3
p
cos(t); 0) dt = 3
Z
0
2π
dt = 6π:
b) Now, we use the Stokes theorem. Fo r this,we need to choose an arbitrary smooth plane with boundary C.
The simplest one is z = 1 wit h the domain D: x
2
+ y
2
≤3, or equi valently, with the natural pa rametrization
Σ(x; y) = (x; y; 1);
for (x; y) 2fx
2
+ y
2
≤3g. We have
ZZ
S
r×F
~
·n^ dS =
ZZ
D
(0; 0; 2) ·(0; 0; 1) dA = 2
ZZ
D
dA = 6π:
It is inte resting to verify that we can choos e any o ther surfaces with bo undary C. For example, the portion
of the sphere x
2
+ y
2
+ z
2
= 4 which is above the plane z = 1. One possible parametrization of this surface
is the natural one:
¡
x; y; 4 ¡x
2
¡ y
2
p
; (x; y) 2fx
2
+ y
2
≤3g; :
For this par ametrization, we have
ZZ
S
r×F
~
·n^ dS =
ZZ
S
(0; 0; 2) ·
x
2
;
y
2
;
z
2
dS =
ZZ
S
zdS:
To calculate this integral over S, we can use the spherical coordinate. The range of θ is [0; 2π] and the
ra nge of φ is
0;
π
3
as is evident from the following figure:
215
0 ≤sin(φ) ≤
3
p
2
2
3
p
φ
Ther efor
ZZ
S
zdS =
Z
0
π
3
Z
0
2π
2 co s(φ)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{z
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
z
4 sin(φ) dφdθ
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{z
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
dS
:
Henc e, we obtain
ZZ
S
zdS = 6π:
Note that another pos sible parametrization is:
(2 sin(φ) cos(θ); 2 sin(φ) sin(θ); 2 c os(φ)); 0 ≤ φ ≤
π
3
; 0 ≤θ ≤2π:
ZZ
S
r×F
~
·n^ dS =
Z
0
π
3
Z
0
2π
(0; 0; 2) ·( sin(φ) cos(θ); sin(φ) sin(θ); cos(φ)) 4 sinφdθdφ = 6π:
Example 180. Consider the following vector field:
F
~
= (yz; ¡zx; xy);
and let γ(t) be the simple closed curve:
γ(t) = (cos(t); sin(t); cos(2t)); t 2[0; 2π]:
Find the circulation of F
~
along C by
1) direct calculation and,
2) using the Stokes theorem for the surface
Σ(t; s) = (s cos(t); s sin(t); s
2
cos(2t));
for (s; t) 2[0; 1] ×[0; 2π].
Solution. The circulation of F
~
alon g C is
I
C
F
~
·dr =
Z
0
2π
sin(t) cos(2t); ¡cos(t) cos(2t);
1
2
sin(2t)
·(¡sin(t); cos(t); ¡2sin(2t)) dt;
which gives after a simple calcula tio n
I
C
F
~
·dr = ¡π:
Now , we use the Stokes theorem for the sur face. Note that γ(t) is the boundary of the surface for s = 1. The
surface and its boundary is depicted below:
216
We have
ZZ
Σ
(r×F
~
) ·n^ dS =
Z
0
1
Z
0
2π
(2s cos(t); 0; ¡2s
2
cos(2t)) ·(Σ
s
×Σ
t
) dtds:
Since,
Σ
s
×Σ
t
= (¡2s
2
cos(t); 2s
2
sin(t); s);
we obtain
ZZ
Σ
(r×F
~
) ·n^ dS =
Z
0
1
Z
0
2π
f¡4s
3
cos
2
(t) ¡2s
3
cos(2t)gdtds = ¡π:
Example 181. Let F
~
b e given as F
~
= (¡y; x; z). Consider the sphere x
2
+ z
2
= 2 along the y-axis.
The curve x
2
+ y
2
= 1 is projected on this surface. The figure is shown b elow.
Find the circulation of F
~
along C in the positive direction by
a) direct calculation,
b) using the Stokes theorem.
Solution.
a) The parametrization of the unit circle x
2
+ y
2
= 1 can be taken as (cos(t); sin(t)). The projection of this
curve on the cylinder will be of the form
γ(t) = (cos(t); sin(t); z(t));
wher e cos
2
(t) + (z(t))
2
= 2, or z = 2 ¡cos
2
(t)
p
for z > 0. The vector field F
~
alon g this curve reads
F
~
=
¡
¡sin(t); cos(t); 2 ¡cos
2
(t)
p
;
217
and then the circulation C is
C =
I
C
F
~
·dr =
Z
0
2π
¡
¡sin(t); co s(t); 2 ¡cos
2
(t)
p
·
¡sin(t); cos(t);
sin(2t)
2 ¡cos
2
(t)
p
!
dt:
A simple calculation gives C = 2π.
b) Now, we use the Stokes theorem. We have r×F
~
= (0; 0; 2), and then
C =
ZZ
S
r×F
~
·n^ dS =
ZZ
S
(0; 0; 2) ·
x
2
p ; 0;
z
2
p
dS = 2
p
ZZ
S
zdS:
For z = 2 ¡x
2
p
, we have
dS =
2
p
2 ¡x
2
p dxdy;
and then
C = 2
p
ZZ
S
zdS = 2
ZZ
D
dA;
wher e D is the projection of the surface inside C to the xy-plane which is x
2
+ y
2
≤1, and t hen C = 2π.
101 Proof of the Stokes theore m
Let Σ(t; s) = (x(t; s); y(t; s); z(t; s)) for (t; s) 2D ⊂R
2
be a parametrization for S. Then, we rewrite
the double integral ove r S as a double integral over D. We have
ZZ
S
(r×F
~
) ·n^ dS =
ZZ
D
(r×F (Σ(t; s) )) ·(Σ
t
×Σ
s
) dA:
Let's simplify the argument of the integra l at the right hand side:
(r×F (Σ(t; s) )) ·(Σ
t
×Σ
s
) = (R
y
¡Q
z
; P
z
¡R
x
; Q
x
¡P
y
) ·(y
t
z
s
¡z
t
y
s
; z
t
x
s
¡x
t
z
s
; x
t
y
s
¡x
s
y
t
):
A simple calculation for P yields
(P
z
z
t
+ P
y
y
t
) x
s
¡(P
y
y
s
+ P
z
z
s
) x
t
= P
t
x
s
¡P
s
x
t
= (Px
s
)
t
¡(Px
t
)
s
:
Similarly, for Q and R we obtain: (Qy
s
)
t
¡(Qy
t
)
s
and (Rz
s
)
t
¡(Rz
t
)
s
and then
(r×F (Σ(t; s) )) ·( Σ
t
×Σ
s
) = (Px
s
+ Qy
s
+ Rz
s
)
t
¡(Px
t
+ Qy
t
+ Rz
t
)
s
=
@
@t
(F
~
·Σ
s
) ¡
@
@s
(F
~
·Σ
t
);
or equivalently
ZZ
S
(r×F
~
) ·n^ dS =
ZZ
D
@
@t
(F
~
·Σ
s
) ¡
@
@s
(F
~
·Σ
t
)
dA:
Now, we can use the Green theorem and write
ZZ
S
(r×F
~
) ·n
^
dS =
ZZ
D
@
@t
(F
~
·Σ
s
) ¡
@
@s
(F
~
·Σ
t
)
dA =
I
bnd(D)
(F
~
·Σ
s
; F
~
·Σ
t
) ·dr:
218
FOr dr = (dt; ds), we have
I
bnd(D)
(F
~
·Σ
s
; F
~
·Σ
t
) ·dr =
I
bnd(D)
P ( x
t
dt + x
s
ds) + Q(y
t
dt + y
s
ds) + R(z
t
dt + z
s
ds);
and since dx = x
t
dt + x
s
ds, dy = y
t
dt + y
s
ds and dz = z
t
dt + z
s
ds, we obtain
I
bnd(D)
(F
~
·Σ
s
; F
~
·Σ
t
) ·dr =
I
C
Pdx + Qdy + Rdz;
that completes the proof.
102 Exercises
Exercise 163. Prove the f ollowing identities:
a) For any s mooth scalar function f: R
3
!R and any smooth vector field F
~
in R
3
:
r·(f F
~
) = rf ·F
~
+ f r·F
~
:
Conclu de if F
~
= rg for a smooth f unc tio n g, then
r·(f rg) = rf ·rg + f ∆g:
Use this relation an d prove:
ZZZ
E
f ∆gdV =
ZZ
bnd(E)
f rg ·n^ dS ¡
ZZZ
E
rf ·rgdV :
This is the integration by parts formula for triple integrals. In 1D, every students know t he re lat ion
Z
a
b
f(x) g
00
(x) = f(x) g
0
(x) j
a
b
¡
Z
a
b
f
0
(x) g
0
(x):
b) For any smoot h scalar function f: R
3
!R and any smooth vector field F
~
in R
3
:
curl(f F
~
) = f curl(F
~
) + rf ×F
~
:
Conclu de that if F
~
= rg for a smooth f unc tio n g then
I
C
f rg ·dr =
ZZ
S
(rf ×rg) ·n^ dS ;
for any sim ple closed curve wit h positive direction, and S any surface wit h the boundary C.
Exercise 164. Stokes and divergence theorems:
a) Let C be a closed curve with positive orientation, and assume f (x; y; z) is a smooth scalar function. Show
the following relation for any n ≥0:
I
C
(1 + f
n
) rf ·dr = 0:
b) Assume that S
1
and S
2
ar e surfaces with the same boundary C. Let F
~
be a smooth vector field. Without
using the Stokes theo rem show the follow in g relation:
ZZ
S
1
(r×F
~
) ·n^ dS =
ZZ
S
2
(r×F
~
) ·n^ dS:
219
Lecture
Intr in sic coordinates over su rfaces
103 Introduction
In this lecture, we derive a formula for the differential operator r over a surface S. Recall that r
in R
2
is defined as
r:= i
^
@
@x
+j
^
@
@j
;
where i
^
; j
^
are the unit coordinate vectors of R
2
. The advantage of R
2
(and in general R
n
) is that
these coordinate vectors are independent of the points of R
2
. That statement means that the
coordinate vectors remain unchanged as if one moves along any curve in R
2
. This property does not
hold necessarily for general surfaces. To explain this fact, we have to defined pointewise coordinate
system over a surface as we do in this lecture.
One of the consequences of the above fact, is the new form of the differential operator r over a
surface. Assume that a function f(x; y; z) is defined on a surface S. Evidently, we can not clim
that the gradient of f over S is:
rf :=
@f
@x
i
^
+
@f
@j
j
^
+
@f
@z
k
^
:
The above expression is the gradient of f if f is defined on R
3
or an open set of R
3
. Thus, we
need to define an operation that holds for fu nctions defined on a surface. For example, assume that
f(x; y; z) denotes a temperature function on S as shown below:
The given temperature generate a heat flow along the opposite gradient flow lines from hot places to
cold places. This flow line, are curves lying on the surface and are not curve freely in R
3
as sh own
below. Thus, we need determine the gradient vectors on a surface.
220
104 curves on sur faces
Consider a surface S, and let's cho ose a parametrization of S in terms of independent variables p; q:
Σ(p; q) = (x(p; q); y(p; q); z(p; q)):
Fix (p; q), and then Σ(p; q) 2S is a fixed point . The tangent plane on S at Σ(p; q) is the set of
all vectors in the span of two tangent vectors: Σ
p
0
(p; q) and Σ
q
0
(p; q). These two vectors defines the
standard unit vectors on S at Σ(p; q). Let's denote the unit coordinate ve ctors by e^
p
; e^
q
, and then
e^
p
=
Σ
p
0
jΣ
p
0
j
; e^
q
=
Σ
q
0
jΣ
q
j
:
dΣ
i
^
j
^
jΣ
q
0
je^
q
S
jΣ
p
0
je^
p
p
q
The unit vector e
^
p
and e
^
q
are changes based on the points on S. Let γ(τ) be a curve in the pq-
plane. This curve is mapped on S by Σ, and thus σ(τ ) = Σ(γ(τ )) is the corresponding map on S.
The coordinate system will change with respect to τ as shown below
i
^
j
^
τ
γ
dΣ
S
γ(τ)
σ(τ ) = Σ(γ(τ))
x
z
y
p
q
The differential of σ(τ ) is
σ
0
(τ) dτ = d (Σ(γ(τ))) = dΣ (γ(τ)) ·γ
0
(τ) dτ = Σ
p
0
(γ(τ )) d p + Σ
q
0
(γ(τ)) dq;
and in terms of the unit vectors e^
p
; e^
q
, we can write
σ
0
(τ) dτ = jΣ
p
0
jdp e^
p
+ jΣ
q
0
jdq e^
q
:
221
Σ(γ(τ ))
e^
p
e^
q
dΣ(γ(τ )) · γ
0
(τ)
If e^
p
; e^
q
are orthogonal, i.e., e^
p
·e^
q
= 0, then the arc length different ial is
jσ
0
(τ)jdτ = jΣ
p
0
j
2
dp
2
+ jΣ
q
0
j
2
dq
2
q
:
104.1 Curves on spheres
Let S be a sphere of radius a. The parametrization in S in coordinate (φ; θ)is
Σ(φ; θ) := (a sin(φ) cos(θ) ; a sin(φ) sin(θ); a cos(φ)):
We have
Σ
φ
0
= (a cos(φ) cos(θ); a cos(φ) sin(θ ); ¡a sin(φ));
Σ
θ
0
= (¡a sin(φ)(φ) sin(θ); a sin(φ) cos(θ); 0);
and thus the unit c oordinate vectors e
^
φ
and e
^
θ
in the system i
^
; j
^
; k
^
are:
e^
φ
= cos(φ) cos(θ)i
^
+ cos(φ) sin(θ)j
^
¡sin(φ) k
^
:
e^
θ
= ¡sin(θ)i
^
+ cos(θ)j
^
:
The figure below depicts the values jΣ
φ
0
j and jΣ
θ
0
j. In fact, the differential dφ generates adφ curve
on the sphere of radius a, and dθ generates a curve of a sin(φ) dθ on the sphere.
adφ
x
y
z
a sin(φ) dθ
φ
a
θ
The arc length differential ds is:
ds = a dφ
2
+ sin
2
(φ) dθ
2
q
:
Example 182. Let σ(τ) be the curve on the unit sphere a = 1, with φ =
π
6
and 0 ≤θ ≤2π. The
differential arc length of this curve is ds =
1
2
dθ, and t hen the arc length of this curve is
s =
Z
0
2π
1
2
dθ = π:
222
In fact, from a simple geometrical argument, we can verify this results as shown below.
r =
1
2
Example 183. The curve C: φ(τ) = 1 + τ and θ(τ) = 1 ¡τ is given for τ 2[0; 2π] on the unit sphere
S. Consider the function f (φ; θ) = 1 + sin
2
(φ)
q
on S. We aim to calculate the integral
I =
Z
C
fds;
where ds is the diffe rential arc length of the curve. To calculate the integral, we first find ds in terms
of the parameter τ :
ds = a
dφ
dτ
2
+ sin
2
(φ)
dθ
dτ
2
s
dτ = 1 + sin
2
(1 + τ)
q
dτ:
Therefore, the given integral is equal to
Z
C
fds =
Z
0
2π
f1 + sin
2
(1 + τ)gdτ = 3π:
A vector field F
~
over a surface S is an assignment of the form: p 7!F
~
for each point p 2S where F
~
is defined at each point p in terms of the unit coordin ate vectors e^
p
; e^
q
. Thus, a vector field over a
surface S is a filed of vectors over tan gent plane on S at each point on the surface S.
For example, the filed F
~
= ¡sin(θ) e^
φ
+ cos(φ) e^
θ
over a unit surface defines a vect or field. The flow
lines of this files has b e depicted below:
223
The integral of a vector field F
~
= f
1
(p; q) e^
p
+ f
2
(p; q) e^
q
over a curve C: σ(τ ); τ 2[τ
0
; τ
1
] is defined
as follows:
I =
Z
C
F
~
·dσ =
Z
τ
0
τ
1
(f
1
(p; q) e
^
p
+ f
2
(p; q) e
^
q
) ·( jΣ
p
0
jdp e
^
p
+ jΣ
q
0
jdq e
^
q
);
and if e
^
p
; e
^
q
are orthogonal, then
Z
C
F
~
·dσ =
Z
τ
0
τ
1
[jΣ
p
0
jf
1
(p; q) p
0
(τ) + jΣ
q
0
jf
2
(p; q) q
0
(τ)] dτ:
Here, the curve σ(τ ) is defined in terms of the coordinates p; q as p = p(τ ) and q = q(τ ).
Example 184. Let's eva luate the integral of F
~
= ¡sin(θ) e^
φ
+ cos(φ) e^
θ
along the curve C: φ =
π
6
and θ(τ ) = τ in τ 2[0; 2π]. The integral is equal:
Z
C
F
~
·dσ =
Z
0
2π
h
cos
π
6
sin
π
6
i
dτ =
3
p
2
π:
105 Gradient field over a surface
Assume that the smooth function f (x; y; z) is given on a smooth surface S. If S is parameterized
as Σ(p; q), then we can define the functio n h(p; q) as:
h(p; q) : = f(Σ(p; q) ):
In the previous sections we derived the unit co ordinate vectors e^
p
and e^
q
on S. through the relation:
dΣ [ i
^
] = jΣ
p
0
je^
p
; dΣ [j
^
] = jΣ
q
0
je^
q
;
where dΣ is the differential of Σ:
dΣ :=
0
B
B
@
x
p
0
x
q
0
y
p
0
y
q
0
z
p
0
z
q
0
1
C
C
A
:
Assume that γ(τ) is a curve in pq-plane. This curve is mapped on S as σ(τ) = Σ (γ(τ )). The
restriction of h to γ(τ) is:
h = h(p(τ ); q(τ ));
and then
dh
dτ
= h
p
0
dp
dτ
+ h
q
0
dq
dτ
: (13)
224
We rewrite this expression as the dot product between two vectors in terms of e^
p
and e^
q
. Recall that
dΣ(γ
0
(τ)) = jΣ
p
0
j
dp
dτ
e^
p
+ jΣ
q
0
j
dq
dτ
e^
q
;
and thus we write (13) as
h
p
0
dp
dτ
+ h
q
0
dq
dτ
=
1
jΣ
p
0
j
h
p
0
e^
p
+
1
jΣ
q
0
j
h
q
0
e^
q
!
·
jΣ
p
0
j
dp
dτ
e^
p
+ jΣ
q
0
j
dq
dτ
e^
q
= rf (Σ(p(τ ); q(τ ))) ·σ
0
(τ):
The first vector at the right-hand side of the above dot product is called the gradient of f on S,
that is,
rf (Σ(p; q)) =
1
jΣ
p
0
j
h
p
0
e^
p
+
1
jΣ
q
0
j
h
q
0
e^
q
:
Remark. If function f (x; y; z) define don R
3
, then there is a more straight method to derive rf
on a surface S. Writing rf as
rf = f
1
(p; q) e^
p
+ f
2
(p; q) e^
q
;
we obtain
f
1
(p; q) = rf ·e^
p
; f
2
(p; q) = rf ·e^
q
:
On the other hand, for rf = f
x
0
i
^
+ f
y
0
j
^
+ f
z
0
k
^
, we obtain
rf ·e^
p
=
1
jΣ
p
0
j
(f
x
0
x
p
0
+ f
y
0
y
p
0
+ f
z
0
z
p
0
) =
1
jΣ
p
0
j
@
@p
f(Σ(p; q)):
Similarly, we obtain
rf ·e^
q
=
1
jΣ
q
0
j
@
@q
f(Σ(p; q));
and then
rf =
h
p
0
jΣ
p
0
j
e
^
p
+
h
q
0
jΣ
q
0
j
e
^
q
:
Note that if e^
p
and e^
q
are not orthogonal, the components of the gradient are changed to the
following expre ssions:
f
1
=
h
p
0
(1 ¡α
2
) jΣ
p
0
j
¡
αh
q
0
(1 ¡α
2
) jΣ
q
0
j
; f
1
=
h
q
0
(1 ¡α
2
) jΣ
q
0
j
¡
αh
p
0
(1 ¡α
2
) jΣ
p
0
j
;
where α = e^
p
·e^
q
.
225
Example 185. If h(φ; θ) is a function define don the sphere of radius a, its gradient is equal to
rh =
1
a
h
φ
0
e
^
φ
+
1
a sin(φ)
h
θ
0
e
^
θ
:
For example, the function h(φ; θ) = sin(φ) sin(θ) generates a gradient vector field o n the unit sphere
as:
rh = cos(φ) sin(θ) e^
φ
+ cos(θ) e^
θ
:
Note that the function h (φ; θ) = sin (φ) sin(θ) is just the function f(x; y; z) = y in the Carte sian
coordinate. The figure below depicts t he flow lines of this field on the unit sphere:
106 Diverg ence over a surface
We aim to find the divergence of a vector field F
~
= f
1
(p; q) e^
p
+ f
2
(p; q) e^
q
over a surface S with
coordinate lines (p; q). In previous lectures, we say that the divergence of vector field P (x; y) i
^
+
Q(x; y)j
^
can be defined as follows:
div (F
~
)(x
0
; y
0
) = lim
jC j!0
1
jAj
I
C
F
~
·dr;
where C is any closed curve around (x
0
; y
0
) and jAj is the area of the enclosed region in C. Let's
apply this formula for a rectangle around (x
0
; y
0
):
x
0
+ δxx
0
¡δx
(x
0
; y
0
)
The area is jAj= 4δxδy, and
I
C
F
~
·dr ≈[P (x
0
+ δx; y
0
) ¡P (x
0
¡δx)] 2δy + [Q(x
0
; y + δy) ¡Q(x
0
; y
0
+ δy)] 2δx:
226
We have
P ( x
0
+ δx; y
0
) ¡P (x
0
¡δx) ≈2δxP
x
(x
0
; y
0
);
Q(x
0
; y + δy) ¡ Q(x
0
; y
0
+ δy) ≈2δyQ
y
(x
0
; y
0
);
and then
1
jAj
I
C
F
~
·dr ≈P
x
(x
0
; y
0
) + Q
y
(x
0
; y
0
):
This approximation becomes exact if δx; δy approach zero.
We carry the same argument on a surface. Consider the following figure
jΣ
q
0
(p
0
¡δp; q
0
)j2δq
jΣ
q
0
(p
0
+ δp; q
0
)j2δq
jΣ
p
0
(p
0
; q
0
¡δq)j2δp
jΣ
p
0
(p
0
; q
0
+ δq)j2δp
A similar argument to the Cartesian coordinate shows jAj= 4δpδqjΣ
p
0
jjΣ
q
0
j, and furthermore:
1
jAj
I
C
F
~
·dr = 4δpδq
@
@p
(jΣ
q
0
jf
1
) + 4δpδq
@
@q
(jΣ
p
0
jf
2
);
and then
div (F
~
) =
1
jΣ
p
0
jjΣ
q
0
j
@
@p
(jΣ
q
0
jf
1
) +
1
jΣ
p
0
jjΣ
q
0
j
@
@q
(jΣ
p
0
jf
2
):
Example 186. In spherical coordinate (φ; θ), we have
jΣ
φ
0
j= a; jΣ
θ
0
j= a sin(φ);
and then
div (F
~
) =
1
a sin(φ)
@
@φ
( sin(φ) f
1
) +
1
a sin(φ)
@
@θ
(f
2
):
For example, if F
~
= rh for h = sin(φ) sin(θ), then we have:
F
~
= rh =
1
a
cos(φ) sin(θ) e^
φ
+
1
a
cos(θ) e^
θ
;
and then:
div (rh) =
¡2
a
2
sin(φ) sin(θ) =
¡2
a
2
h:
Recall that div (r) is denoted by the Laplacian ∆. For the given function h, we have the following
important property:
∆h =
¡2
a
2
h:
227