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

NOTES ON MULTIVARIATE CALCULUS

STEPHAN BAIER, RKMVERI

Contents
1. What is multivariate calculus? 2
2. Differentiability 2
2.1. Review of single-variable differentiation 2
2.2. Extension to real-valued functions in two variables 3
2.3. Extension to real-valued functions in several variables 4
2.4. Extension to functions in several variables and values in
Rm 4
3. Directional derivatives, partial derivatives, gradient,
Jacobian and differentiability 5
3.1. Directional derivative 5
3.2. Partial derivatives and gradient 6
3.3. Jacobian matrix 7
3.4. Criterion for differentiability 8
3.5. Proof of Theorem 2 20
4. Minima, maxima and saddle points 22
5. Implicit function theorem 22
6. Curves 22
6.1. Definition of curves 23
6.2. Examples 24
6.3. Length of a curve 29
6.4. Curvature 31
7. Line integrals 38
7.1. Line integrals of vector fields 38
7.2. Conservative vector fields 46
7.3. A criterion for conservative vector fields 51
7.4. Curl and divergence 52
7.5. Line integrals of scalar fields 56
8. Surface integrals 58
8.1. Parametrized surfaces 59
8.2. Definition of surface integrals 69
8.3. The surface area 77
8.4. Stokes’ theorem 78
9. Volume integrals and Gauss’ theorem 85
References 94
Date: September 7, 2021.
1
2 STEPHAN BAIER, RKMVERI

1. What is multivariate calculus?


Single-variable calculus deals with differentiation and integration of
functions f : I → R, where I is an interval in R. However, in real-world
problems, we often face functions in several variables whose values lie
in a multi-dimensional space. It is therefore desirable to extend the
theory of differentiation and integration to the class of functions f :
U → Rm , where U is a suitable subset of Rn . This is the aim of
multivariate (or “multivariable”) calculus. One question immediately
springs to mind: What is the meaning of “suitable subset” above? It
depends on the context. To define differentiability of a function at a
point in U , we need that this point has an open neighborhood in U .
So it makes sense to assume that U ⊂ Rn is open. When we turn to
integration, we will develop notions of integrals over curves, surfaces
and volumes. In general, we shall integrate over submanifolds of Rn .
Highlights of this theory are the theorems of Stokes and Gauss. You will
remember the Fundamental Theorem of Calculus which tells us that
the integral of a function over an interval is captured by the values of
its antiderivative at the boundary points of this interval. The theorems
of Stokes and Gauss generalize this phenomenon to higher dimensions:
An integral of a function over a surface/volume equals another integral
of a related function over its boundary curve/surface. We shall see that
these theorems have natural interpretations in fluid dynamics.
The basis for these notes is the book [1]. However, we present the
material in our own style.

2. Differentiability
2.1. Review of single-variable differentiation. Let I be an open
interval in R and x0 ∈ I. Let f : I → R be a continuous function. We
say that f is differentiable at x0 if the limit

f (x) − f (x0 )
lim
x→x0 x − x0

exists, in which case we set f 0 (x0 ) to be this limit. This can be inter-
preted as saying that f has a good approximation by a linear function
near x0 : Assume f is differentiable at x0 with derivative f 0 (x0 ). Con-
sider the linear function

T (x) = f (x0 ) + f 0 (x0 )(x − x0 ),

the tangent line to the function at x0 . Then for x near x0 , the difference
between f (x) and T (x) is small compared to the difference x − x0 .
NOTES ON MULTIVARIATE CALCULUS 3

Indeed,
f (x) − T (x) f (x) − (f (x0 ) + f 0 (x0 )(x − x0 ))
lim = lim
x→x0 x − x0 x→x0 x − x0
f (x) − f (x0 )
= lim − f 0 (x0 ) = 0.
x→x0 x − x0
Using the o-notation, this means nothing else than
f (x0 + h) = T (x0 + h) + o(|h|) as h → 0.

2.2. Extension to real-valued functions in two variables. In the


single-variable case, we have seen above that the tangent line at x0
is a good approximation of the function f (x) near x0 , provided f is
differentiable at x0 . Now let U ⊂ R2 be open and assume that f :
U → R is continuous. You can visualize f by looking at its graph
which forms a surface in R3 . Pick a point (x0 , y0 ) ∈ U . If f is suitably
smooth, we may hope that we can approximate f by a tangent plane
T (x, y) near (x0 , y0 ). It will pass trough the point (x0 , y0 , f (x0 , y0 )) and
its equation will therefore be of the form
(2.1) T (x, y) = f (x0 , y0 ) + b(x − x0 ) + c(y − y0 ).
Now we use this viewpoint to introduce differentiability in this setting:
We say that f is differentiable at (x0 , y0 ) if there exist reals b and c
such that the difference between T (x, y) defined in (2.1) and f (x, y) is
small compared to the distance between (x, y) and (x0 , y0 ) whenever
(x, y) is near (x0 , y0 ). To make this precise, we demand that
T (x, y) − f (x, y)
(2.2) lim = 0.
(x,y)→(x0 ,y0 ) distance ((x, y), (x0 , y0 ))

Here we need to explain what “distance(u,v)” means for two points


u and v in R2 . We take the usual Euclidean distance. The Euclidean
norm on R2 is defined as
p
||(x, y)|| = x2 + y 2 ,
and the metric induced by it is given by
distance ((x1 , y1 ), (x0 , y0 )) =||(x1 , y1 ) − (x0 , y0 )||
(2.3) p
= (x1 − x0 )2 + (y1 − y0 )2 .
As in the case of single-variable differentiability, we may reformulate
condition (2.2) using the o-notation as
T (u + h) = f (u + h) + o(||h||) as h → 0,
where we set u := (x0 , y0 ), and it is understood that h ∈ R2 .
4 STEPHAN BAIER, RKMVERI

2.3. Extension to real-valued functions in several variables.


Now it is easy to generalize the above to functions f : U → R,
where U ⊆ Rn is open. Let u= (u1 , ..., un ) be a point in U and write
x = (x1 , ..., xn ) for x ∈ Rn . Then we say that f is differentiable at
u if there exists an n-tuple (c1 , ..., cn ) ∈ Rn such that the function
T : Rn → R defined by
(2.4) T (x) := f (u) + c1 (x1 − u1 ) + ... + cn (x2 − un )
satisfies
f (x) − T (x)
(2.5) lim = 0,
x→u ||x − u||
where ||.|| is again the Euclidean norm, defined by
q
||(x1 , ..., xn )|| := x21 + ... + x2n .
This function, if existent, is the tangent space to the function f at u.
Again, in o-notation, the above takes the form
(2.6) T (u + h) = f (u + h) + o(||h||) as h → 0.
We may simplify the notation in (2.4) using the standard inner prod-
uct on Rn , given by
(c1 , ..., cn ) · (y1 , ..., yn ) := c1 y1 + ... + cn yn ,
which allows us to write (2.4) in the shorter form
(2.7) T (x) := f (u) + c · (x − u).
Note that, if you use the above notation, then the inner product of
c and y is nothing else than the matrix product of c and yt , where
yt means the transpose of y. Moreover, the Euclidean norm can be
expressed in terms of the standard inner product as

||x|| := x · x.
2.4. Extension to functions in several variables and values in
Rm . We now want to take the final step and allow f to be vector-
valued. The function f will again be defined on an open subset U of
Rn but takes the more general form
f1 (x)
 

f (x) =  ...  .
fm (x)
By what equation do we need to replace (2.4)? Now the values of T (x)
will be vectors in Rm as well. So T (x) will be a linear function from
Rn to Rm and therefore takes the form
f1 (u) + c1,1 (x1 − u1 ) + ... + c1,n (xn − un )
 

T (x) =  .. .
.
fm (u) + cm,1 (x1 − u1 ) + ... + cm,n (xn − un )
NOTES ON MULTIVARIATE CALCULUS 5

In short,
T (x) = f (u) + C(x − u)t ,
where C is an m × n-matrix with real entries ci,j . The condition (2.5)
(respectively, (2.6)) remains the same with the only difference that now
0 is replaced by the zero vector 0 in Rm . We are now ready to give a
general definition for differentiability.
Definition 1. Assume U is an open subset of Rn and
f : U → Rm
is a function. We say that f is differentiable at u if there exists an
m × n matrix C with real entries depending on u such that
lim ||x − u||−1 f (x) − f (u) − C(x − u)t = 0,

x→u
where 0 is the zero vector in Rm .

Comment 0: It is immediately clear that if f is not continuous at u,


then it is not differentiable there because the above limit does not exist
in this case. So continuity is a necessary condition for differentiability.

3. Directional derivatives, partial derivatives, gradient,


Jacobian and differentiability
Now the question arises how we can actually check a function for
differentiability and calculate the matrix C in Definition 1. To this
end, we need the notion of the gradient. We begin with directional
derivatives. Throughout this section, we always assume U to be an
open subset of Rn . We shall first look at real-valued functions on U ,
i.e. functions f : U → R.
3.1. Directional derivative. In order to be able to imagine things,
look at the case n = 2. Then the graph of f forms a surface in R3 .
Now if f is differentiable at (x0 , y0 ) ∈ U , then there is a tangent plane
to f at (x0 , y0 ) whose equation is of the form
T (x, y) = f (x0 , y0 ) + c(x − x0 ) + d(y − y0 ).
Now given a vector v in R2 , there is a tangent line to f at (x0 , y0 ),
contained in the tangent plane, pointing in the direction of this vector
v. The slope of this line is called “directional derivative”. We make the
following general definition.
Definition 2. Let U ∈ Rn be open and f : U → R be a function. Let
u ∈ U and v be a unit vector in Rn , i.e. ||v|| = 1. We define the
directional derivative of f at u in the direction of the vector v as
f (u + hv) − f (u)
Dv f (u) := lim
h→0 h
if the limit on the right-hand side exists.
6 STEPHAN BAIER, RKMVERI

Comment 1: It is important to assume in the definition above that v


is a unit vector. Otherwise, the limit above would not correctly yield
the slope of the tangent line in question: If you replace v by 2v, for
example, this limit doubles. So the correct scaling is of significance
here.

Now assuming f is differentiable at u, all directional derivatives at


u will exist. How can we compute them given that the tangent space
is of the form
T (x) = f (u) + c · (x − u)?
Since the tangent line in the direction of v is contained in the tangent
space, its slope will be exactly equal to
T (u + v) − T (u)
= T (u + v) − T (u) = (f (u) + c · v) − f (u) = c · v.
||v||
So we have the following little lemma.
Lemma 1. Assume that f : U → R is differentiable at u ∈ U . Let
T (x) = f (u) + c · (x − u)
with c ∈ Rn be the tangent space to f at u. Then, for any unit vector
v we have
Dv f (u) = c · v.
3.2. Partial derivatives and gradient. Among the directional deriva-
tives, there are n special ones: those in the directions of the standard
vectors ei = (0, ..., 0, 1, 0, ...0) with 1 at i-th position. These derivatives
are called partial derivatives.
Definition 3. Assume that f : U → R is a function and u ∈ U . The
partial derivative of f (x1 , ..., xn ) at u = (u1 , ..., un ) with respect to the
∂f
variable xi , denoted by ∂x i
(u), is the particular directional derivative
∂f f (u1 , ..., ui−1 , ui + h, ui+1 , ..., un ) − f (u1 , ..., un )
(u) = Dei f (u) = lim ,
∂xi h→0 h
if it exists.
Now by Lemma 1, we immediately have a simple relation between ‘
c = (c1 , ..., cn )
∂f
and ∂xi
(u), namely
∂f
(u) = c · ei = (c1 , ..., cn ) · (0, ..., 0, 1, 0, ..., 0) = ci .
∂xi
This allows us to compute c easily when f is differentiable at u and
the partial derivatives are given! To put things in an elegant form, we
define the gradient as the vector in Rn whose entries are the partial
derivatives.
NOTES ON MULTIVARIATE CALCULUS 7

Definition 4. Assume f : U → R is differentiable at u ∈ U . We


define the gradient of f at u to be the vector
 
∂f ∂f
(3.1) ∇f (u) := (u), ..., (u) .
∂x1 ∂xn

Comment 2: The vector on the right-hand side of (3.1) exists even


under the weaker condition that f possesses all partial derivatives at
u. But in accordance with general custom, we assume differentiability
of f at u (which is stronger, as we will see below!). If f is not differ-
entiable at u, we therefore say that the gradient of f does not exist at u.

The above calculation shows that c coincides with the gradient of f


at u. Thus we have the following.
Lemma 2. Assume that f : U → R is differentiable at u ∈ U . Then
all partial derivatives of f at u exist and
T (x) = f (u) + ∇f (u) · (x − u)
is the tangent space to f at u. Moreover, the directional derivative of
f at u in the direction of any unit vector v equals
Dv f (u) = ∇f (u) · v.

Comment 3: There is a nice geometric interpretation of the gradient


vector, namely that it points in the direction of steepest ascent of the
function f . Look at the unit vectors v. For which of them is the
directional derivative
Dv f (u) = ∇f (u) · v
maximized? To answer this question, we use the cosine formula for the
standard inner product:
∇f (u) · v = ||∇f (u)|| · ||v|| · cos θ = ||∇f (u)|| · cos θ,
where θ is the angle between the two vectors ∇f (u) and v. Indeed,
this becomes maximal if θ = 0, which is the case when both vectors
point in the same direction!
3.3. Jacobian matrix. It is clear how to extend Lemma 2 to vector-
valued functions f : U → Rm : We need to replace the gradient vector
above by a matrix whose rows are the gradient vectors of the component
functions f1 , ..., fm . This matrix is called Jacobian.
Definition 5. Let f : U → Rm be a function whose component func-
tions are f1 , ..., fm , i.e.,
f1 (x)
 

f (x) =  ...  .
fm (x)
8 STEPHAN BAIER, RKMVERI

If f1 , ..., fm possess all partial derivatives, then the Jacobian matrix for
f is the matrix  ∂f1 ∂f1

∂x1
· · · ∂xn
Jf :=  ... .
 
∂fm ∂fm
∂x1
··· ∂xn

Generalizing Lemma 2, we have the following.


Theorem 1. Assume that f : U → Rm is differentiable at u ∈ U .
Then Jf (u) agrees with the matrix C in Definition 1.
3.4. Criterion for differentiability. Above we found an easy way
to calculate the matrix C in Definition 1 given that f is differentiable.
This matrix is, by Theorem 1, made up by the partial derivatives of the
component functions. But one question remains open: How to check
in an easy way that f is differentiable at u? Is it true in general that,
conversely, if the partial derivatives all exist, then f is differentiable?
The answer is “no” (see Exercise 2 below). We need more than that,
namely the continuity of the partial derivatives. But this is all! We
formulate the following criterion which we will prove after stating four
exercises on the material up to this point.
Theorem 2. Assume f : U → Rm possesses all partial derivatives in
some neighborhood of a point u ∈ U and they are all continuous in this
neighborhood. Then f is differentiable at u.

Comment 4: The above Theorem 2 gives a sufficient condition for


differentiability. However, it is not a necessary condition. There are
examples of pathological functions which are differentiable but whose
partial derivatives are not continuous (see Exercise 4 below).

Exercises

Exercise 1: Let
U := {(x, y) ∈ R2 : x2 + y 2 < 1}.
Let f : U → R be given by
p
f (x, y) = 1 − (x2 + y 2 ).
(The graph of f is obviously a semisphere.)
Given any point (x0 , y0 ) ∈ U ,
(i) calculate the partial derivatives of f at (x0 , y0 ) and write down the
gradient vector,
(ii) calculate the
√ directional
√ derivative at (x0 , y0 ) in the direction of the
vector v = (1/ 2, 1/ 2),
NOTES ON MULTIVARIATE CALCULUS 9

(iii) show that f is differentiable at (x0 , y0 ),


(iv) give the equation of the tangent plane at (x0 , y0 ).
(v) Use a graphing calculator to depict the graph of f along with the
tangent plane at a point of your choice.

Exercise 2: Let f : R2 → R be given by


 xy
x2 +y 2
if (x, y) 6= (0, 0)
f (x, y) :=
0 if (x, y) = (0, 0).
(i) Show that f possesses partial derivatives at all points in R2 , includ-
ing (0,0).
(ii) Find the partial derivatives of f at (0, 0).
(iii) Does f possess directional derivatives in all directions at (0, 0)?
(iv) Show that f is not differentiable at (0, 0).
(v) So taking Theorem 2 into consideration and the obvious continuity
of the partial derivatives outside (0, 0), it must be the case the partial
derivatives are not continuous at (0, 0). Show this directly.
(vi) Use a graphing calculator to depict the graph of the function f in
some neighborhood of (0, 0).

Exercise 3: Let f : R2 → R be given by


 x3
x2 +y 2
if (x, y) 6= (0, 0)
f (x, y) :=
0 if (x, y) = (0, 0).
(i) Show that f possesses directional derivatives in all directions at all
points in R2 , including (0,0).
(ii) Show that f is not differentiable at (0, 0).
(iii) So taking Theorem 2 into consideration and the obvious continu-
ity of the partial derivatives outside (0, 0), it must be the case that the
partial derivatives are not continuous at (0, 0). Show this directly.
(iv) Use a graphing calculator to depict the graph of the function f in
some neighborhood of (0, 0).

Exercise 4: In Comment 4 we claimed that there are functions which


are differentiable but whose partial derivatives are not continuous. It
suffices to just look at a suitable function f : R → R. Then the partial
derivative with respect to the variable x1 is nothing else than the or-
dinary derivative of f . So finding a differentiable function f : R → R
10 STEPHAN BAIER, RKMVERI

whose derivative is not continuous everywhere constitutes an example


of a function as mentioned in Comment 4. Consider
(
x2 sin x1 if x 6= 0
f (x) :=
0 if x = 0.
Prove that f is differentiable everywhere but its derivative is not con-
tinuous at 0.

Solutions

Exercise 1: (i) The partial derivatives are


∂f x0
(x0 , y0 ) = − p
∂x 1 − x20 − y02
and
∂f y0
(x0 , y0 ) = − p .
∂x 1 − x20 − y02
The gradient vector is therefore
1
−p · (x0 , y0 ).
1 − x20 − y02
√ √
(ii) The directional derivative in the direction of v = (1/ 2, 1/ 2) is
1 x0 + y0
Dv (x0 , y0 ) = − √ · p .
2 1 − x20 − y02
(iii) The partial derivatives are both continuous at any point in U , so
by Theorem 2, the function f is differentiable everywhere in U .
(iv) The equation of the tangent plane at (x0 , y0 ) is
x0 y0
q
T (x, y) = 1 − x20 − y02 − p ·(x−x 0 )− p ·(y−x0 ).
1 − x20 − y02 1 − x20 − y02
Exercise 2: (i) This is obvious for (x0 , y0 ) 6= 0. For (x0 , y0 ) = (0, 0),
we use the definition of the partial derivatives to calculate that
 
∂f 1 h·0
(0, 0) = lim · −0 =0
∂x h→0 h h2 + 02
and  
∂f 1 0·h
(0, 0) = lim · − 0 = 0.
∂y h→0 h 02 + h2
(ii) The question is answered above.
(iii) Let v = (v1 , v2 ) be a unit vector. The directional derivative in the
direction of v exists at (0, 0) iff the limit
 
1 (hv1 ) · (hv2 )
lim · −0
h→0 h (hv1 )2 + (hv2 )2
NOTES ON MULTIVARIATE CALCULUS 11

exists, which is obviously not the case unless v1 = 0 or v2 = 0. (Rather,


the above diverges to ±∞, depending on the direction, if (v1 , v2 ) 6=
(0, 0).) So the answer is “no”.
(iv) Solution 1: If f were differentiable at 0, all directional derivatives
would exist there. Since this is not the case, f is not differentiable at
0.
Solution 2: The function f is not even continuous at 0. Take, for
example, the limit of f (x, y) as (x, y) tends to 0 along the vector (1, 1).
This limits equals
x·x 1
lim 2 2
= .
x→0 x + x 2
However, the value of the function at (0, 0) is 0 by definition. So f is
not continuous at 0 and therefore not differentiable there.
(v) The partial derivatives of f at (x0 , y0 ) 6= (0, 0) are
∂f y 2 − x20
(x0 , y0 ) = y0 · 20 2
∂x (x0 + y02 )
and
∂f x2 − y02
(x0 , y0 ) = x0 · 20 2.
∂x (x0 + y02 )
Take the limit of the partial derivative with respect to x as (x0 , y0 )
tends to (0,0) along the vector (1, 2) in left-down direction. It equals
∂f (2h)2 − h2
lim+ (h, 2h) = 2h · = ∞.
h→0 ∂x (h2 + (2h)2 )2
So the partial derivative with respect to x is not continuous at (0, 0).
A similar calculation shows the same for the partial derivative with
respect to y.

Exercise 3: (i) Let v = (v1 , v2 ) be a unit vector. Then the direc-


tional derivative at (0, 0) in the direction of v equals
(hv1 )3 v13
 
1
(3.2) Dv (0, 0) = lim · − 0 = = v13 .
h→0 h (hv1 )2 + (hv2 )2 v12 + v22
(ii) In particular, the partial derivatives at (0, 0) are
∂f ∂f
(0, 0) = 1 and (0, 0) = 0.
∂x ∂y
Assume f were differentiable at (0, 0). Then, using Lemma 1, it would
follow that the directional derivative in the direction of any unit vector
v = (v1 , v2 ) equals
Dv (0, 0) = v1 .
But this contradicts (3.2) if v1 6= −1, 0, 1.
12 STEPHAN BAIER, RKMVERI

(iii) The partial derivatives of f at (x0 , y0 ) 6= (0, 0) are


∂f x4 + 3x20 y02
(x0 , y0 ) = 0 2 2
∂x (x0 + y02 )
and
∂f 2x3 y0
(x0 , y0 ) = − 2 0 2 2 .
∂y (x0 + y0 )
They are both not continuous at (0, 0) because the limits of them,
as (x0 , y0 ) tends to (0, 0), depend on the direction in which (0, 0) is
approached. Indeed, if (v1 , v2 ) is any non-zero vector, then these limits
in the direction of (v1 , v2 ) are
∂f (hv1 )4 + 3(hv1 )2 (hv2 )2 v14 + 3v12 v22
lim (hv1 , hv2 ) = =
h→0 ∂x ((hv1 )2 + (hv2 )2 )2 (v12 + v22 )
2

and
∂f 2(hv1 )3 (hv2 ) 2v13 v2
lim (hv1 , hv2 ) = − = − 2.
h→0 ∂y ((hv1 )2 + (hv2 )2 )2 (v12 + v22 )
Both limits depend obviously on v1 and v2 .
Exercise 4: If x 6= 0, then the derivative exists and equals
1 1
f 0 (x) = 2x sin − cos .
x x
If x = 0, we get just by the definition of the derivative,
 
0 1 2 1 1
f (0) = lim · h sin − 0 = lim h sin = 0.
h→0 h h h→0 h
But  
1 1
lim 2x sin − cos
x→0 x x
does not exist. So f is differentiable everywhere, but the derivative is
not continuous.

The following pages show, in this order, the graphs of the functions
in Exercises 1-4, the partial derivatives with respect to x in Exercises 2
and 3, and the derivative of the function in Exercise 4. They are pro-
duced by free online calculators, as shown on top of the pages.
4/27/2020 CalcPlot3D

ex1function
Mon Apr 27 2020 17:39:56 GMT+0530 (India Standard Time)

z
2

-2
-2 -1
-1
1
1 2 y
x 2
-1

-2

z = (1-x^2-y^2)^(1/2) x

-2
-2
≤x≤ 2
≤y≤ 2

Number of Gridlines: 30

https://www.monroecc.edu/faculty/paulseeburger/calcnsf/CalcPlot3D/ 1/1
4/27/2020 CalcPlot3D

ex2function
Mon Apr 27 2020 17:39:56 GMT+0530 (India Standard Time)

z
2

-2
-2 -1
-1
1
1 2 y
x 2
-1

-2

z = xy/(x^2+y^2) x

-2
-2
≤x≤ 2
≤y≤ 2

Number of Gridlines: 30

https://www.monroecc.edu/faculty/paulseeburger/calcnsf/CalcPlot3D/ 1/1
4/27/2020 CalcPlot3D

ex3function
Mon Apr 27 2020 17:39:56 GMT+0530 (India Standard Time)

z
2

-2
-2 -1
-1
1
1 2 y
x 2
-1

-2

z = x^3/(x^2+y^2) x

-2
-2
≤x≤ 2
≤y≤ 2

Number of Gridlines: 30

https://www.monroecc.edu/faculty/paulseeburger/calcnsf/CalcPlot3D/ 1/1
4/27/2020 Desmos | Graphing Calculator

 f x = x · x · sin x
1

https://www.desmos.com/calculator 1/2
4/27/2020 CalcPlot3D

ex2partialx
Mon Apr 27 2020 17:39:56 GMT+0530 (India Standard Time)

z
2

-2
-2 -1
-1
1
1 2 y
x 2
-1

-2

z = y(y^2-x^2)/(x^2+y^2)^2 x

-2
-2
≤x≤ 2
≤y≤ 2

Number of Gridlines: 30

https://www.monroecc.edu/faculty/paulseeburger/calcnsf/CalcPlot3D/ 1/1
4/27/2020 CalcPlot3D

ex3partialx
Mon Apr 27 2020 17:39:56 GMT+0530 (India Standard Time)

z
2

-2
-2 -1
-1
1
1 2 y
x 2
-1

-2

z = (x^4+3x^2y^2)/(x^2+y^2)^2 x

-2
-2
≤x≤ 2
≤y≤ 2

Number of Gridlines: 30

https://www.monroecc.edu/faculty/paulseeburger/calcnsf/CalcPlot3D/ 1/1
4/27/2020 Desmos | Graphing Calculator

 1
f x = 2x · sin x −cos x
1

https://www.desmos.com/calculator 1/2
20 STEPHAN BAIER, RKMVERI

3.5. Proof of Theorem 2. If suffices to prove Theorem 2 for m = 1


since the general case then follows. So we assume m = 1. Then the
case n = 1 is trivial, so we may further assume n > 1. For the sake of
clarity, we confine ourselves to the case n = 2. General n > 1 can be
treated analogously - the writeup just becomes longer.
Let u = (x0 , y0 ). What we need to show is that

lim ||(x − x0 , y − y0 )||−1 f (x, y) − f (x0 , y0 )−


(x,y)→(x0 ,y0 )
!!
∂f ∂f
(x0 , y0 ) · (x − x0 ) + (x0 , y0 ) · (y − y0 ) = 0.
∂x ∂y
In other words, we need to show that

lim ||(h, k)||−1 f (x0 + h, y0 + k) − f (x0 , y0 )−


(h,k)→(0,0)
(3.3) !!
∂f ∂f
(x0 , y0 ) · h + (x0 , y0 ) · k = 0.
∂x ∂y

To this end, we telescope the difference f (x0 + h, y0 + k) − f (x0 , y0 )


above, writing it in the form
f (x0 + h, y0 + k) − f (x0 , y0 )
= (f (x0 + h, y0 + k) − f (x0 , y0 + k)) + (f (x0 , y0 + k) − f (x0 , y0 )) .
(This telescoping process works for general n as well - we then have a
sum of n differences on the right-hand side.) Now, re-arranging sum-
mands, we write
(3.4)
 
∂f ∂f
f (x0 + h, y0 + k) − f (x0 , y0 ) − (x0 , y0 ) · h + (x0 , y0 ) · k
∂x ∂y
 
∂f
= f (x0 + h, y0 + k) − f (x0 , y0 + k) − (x0 , y0 ) · h +
∂x
 
∂f
f (x0 , y0 + k) − f (x0 , y0 ) − (x0 , y0 ) · k .
∂y
Now we are in the convenient situation that
∂f
lim ||(h, k)||−1 · f (x0 , y0 + k) − f (x0 , y0 ) − (x0 , y0 ) · k
(h,k)→(0,0) ∂y
∂f
6 lim k −1 · f (x0 , y0 + k) − f (x0 , y0 ) − (x0 , y0 ) · k = 0,
k→0 ∂y
just using |k| 6 ||(h, k)|| and the definition of the partial derivative
with respect to y. In view of (3.4), to prove (3.3), it therefore remains
NOTES ON MULTIVARIATE CALCULUS 21

to establish that
(3.5)
∂f
lim ||(h, k)||−1 · f (x0 + h, y0 + k) − f (x0 , y0 + k) − (x0 , y0 ) · h = 0,
(h,k)→(0,0) ∂x
which does not follow immediately from the definition of the partial
derivative with respect to x because of the appearance of the term k in
f (x0 + h, y0 + k) − f (x0 , y0 + k). What we would rather like to have is
∂f
(x0 , y0 + k)
∂x
in place of
∂f
(x0 , y0 ).
∂x
We force this situation by writing the limit in (3.5) in the form
 
−1 ∂f
lim ||(h, k)|| · f (x0 + h, y0 + k) − f (x0 , y0 + k) − (x0 , y0 + k) · h
(h,k)→(0,0) ∂x
 
∂f ∂f
+ (x0 , y0 + k) − (x0 , y0 ) · h .
∂x ∂x
Now we make use of the continuity of ∂f /∂x at (x0 , y0 ), which implies
that
 
−1 ∂f ∂f
lim ||(h, k)|| · (x0 , y0 + k) − (x0 , y0 ) · h
(h,k)→(0,0) ∂x ∂x
∂f ∂f
 lim (x0 , y0 + k) − (x0 , y0 ) = 0
k→0 ∂x ∂x
since |h| 6 ||(h, k)||. The remaining task is to establish that
(3.6)
∂f
lim ||(h, k)||−1 · f (x0 + h, y0 + k) − f (x0 , y0 + k) − (x0 , y0 + k) · h = 0.
(h,k)→(0,0) ∂x
Here we note that
∂f
f (x0 + h, y0 + k) − f (x0 , y0 + k) = (x0 + ∆(k, h), y0 + k) · h
∂x
for a suitable ∆(k, h) ∈ [0, h] by the mean value theorem for the func-
tion Fk (x) = f (x, y0 + k). Hence,
∂f
lim ||(h, k)||−1 · f (x0 + h, y0 + k) − f (x0 , y0 + k) − (x0 , y0 + k) · h
(h,k)→(0,0) ∂x
∂f ∂f
= lim ||(h, k)||−1 |h| · (x0 + ∆(k, h), y0 + k) − (x0 , y0 + k)
(h,k)→(0,0) ∂x ∂x
∂f ∂f
6 lim (x0 + ∆(k, h), y0 + k) − (x0 , y0 + k) = 0
(h,k)→(0,0) ∂x ∂x
22 STEPHAN BAIER, RKMVERI

using |h| 6 ||(h, k)||,


lim ∆(h, k) = 0
(h,k)→(0,0)

and the continuity of the partial derivative with respect to x in a neigh-


borhood of u = (x0 , y0 ). This completes the proof of Theorem 2. 

Comment 5: Examining the proof above, we see that we have used


only the continuity of the partial derivative ∂f /∂x. Hence, in the case
n = 2, the theorem holds under the weaker condition that one of the
two partial derivatives is continuous in a neighborhood of u. Similarly,
for general n, we require just the continuity of n − 1 of the partial
derivatives.

Exercises

Exercise 5: Carry out the proof of Theorem 2 for general n > 1.

Exercise 6: What is wrong with the following simpler argument in


the last step of the above proof of Theorem 2:
∂f
lim ||(h, k)||−1 · f (x0 + h, y0 + k) − f (x0 , y0 + k) − (x0 , y0 + k) · h
(h,k)→(0,0) ∂x
 
−1 ∂f
6 lim lim |h| · f (x0 + h, y0 + k) − f (x0 , y0 + k) − (x0 , y0 + k) · h = 0
k→0 h→0 ∂x
since |h| 6 ||(h, k)|| and
∂f
lim |h|−1 · f (x0 + h, y0 + k) − f (x0 , y0 + k) − (x0 , y0 + k) · h = 0
h→0 ∂x
by the definition of the partial derivative with respect to x. (In this
last step, we used more: the mean value theorem and the continuity of
∂f /∂x in a neighborhood of (x0 , y0 ).)

4. Minima, maxima and saddle points


To be filled in.

5. Implicit function theorem


To be filled in.

6. Curves
After having worked out differentiability, we now turn to integration.
We mainly focus on integration on submanifolds of R3 . We develop in-
tegration theory in 3 steps: integration on curves, surfaces and volumes.
Then we will prove the theorems of Gauss and Stokes which connect
these integrations. The first step is integration over curves. For this,
NOTES ON MULTIVARIATE CALCULUS 23

we need a notion of curves which allows for a meaningful definition of


integrals over curves.
6.1. Definition of curves. Wikipedia gives a good intuitive descrip-
tion of a curve as “the trace left by moving a point”. A precise math-
ematical description of directed curves will vary with the context, but
all desriptions have some features in common: there is an initial and
a terminal point and a 1-dimensional manifold connecting them, and
there is an initial direction. This initial direction is clear if the curve
is not closed. We also want to allow closed curves, i.e. curves whose
initial and terminal points agree, in which case we need to decide in
which of the possible two directions we want to travers the curve. So a
curve in Rn (think of n = 2, 3) will be a quadruple (Γ, A, B, v), where
A ∈ Rn is the initial point, B ∈ Rn is the terminal point, Γ is a 1-
dimensional manifold conntecting A and B, and v is a vector which
gives the initial direction. Without loss of generality, we may assume
v to be a unit vector. What do we mean by “1-dimensional manifold
connecting A and B”? In this context, we mean in first instance that Γ
is the image of an interval [a, b] under a continuous map P : (c, d) → Rn
such that [a, b] is contained in (c, d), and P (a) = A and P (b) = B. We
require continuity to ensure that Γ is connected. But continuity will
not be the only requirement on P . We want to define and calculate
later the length, curvature and torsion of a curve, for which we need
the first, second and third derivatives, respectively. Even the fourth de-
rivative will come into play at some point. So for convenience, we shall
assume P to be infinitely differentiable (in each component). For the
first derivative, there is a direct geometric interpretation: P 0 (t), viewed
as a vector, gives the direction of the tangent to the curve at the point
P (t) ∈ Γ. We also want to avoid that Γ has cusps or self-intersections.
For avoiding cusps, it is not sufficient to assume just infinite differ-
entiability. Look at the example (c, d) = (−2, 2), [a, b] = [−1, 1]
P (t) = (t2 , t3 ).
Then, from the picture given in a few pages, P (t) has a cusp at P (0) =
(0, 0). How can this happen? The function P is twice differentiable
and hence P 0 , which gives the direction of the tangent, is continuous,
and therefore sudden changes of the tangent direction are not possible,
which means there are no cusps. Do we overlook something? Yes, the
issue is that there is no well-defined direction of the tangent if P 0 (t)
is the zero vector. So cusps can also occur at points t where P 0 (t) is
the zero vector 0 = (0, 0, ..., 0) ∈ Rn . This is the case in the example
above: Here P 0 (t) = (2t, 3t2 ), and both components vanish at t = 0.
So we want to exclude the possibility that P 0 (t) = 0 to avoid cusps.
For avoiding self-intersections (or “nodes”) we may just assume that
P is injective. Then no point can be taken twice as an image of P .
However, since we want to allow closed curves, we need to be a bit
24 STEPHAN BAIER, RKMVERI

careful. If P is closed, then the initial point P (a) = A and the terminal
point P (b) = B are equal, and so P is not injective. So we want a
condition which is essentially injectivity of P except at a and b. The
precise way to put this is to assume that P in injective on both the
half-open intervals (a, b] and [a, b).
It remains to clarify which conditions we set on the initial direction
vector v. It gives the direction of the tangent to the curve at A and
thus has to agree, up to a scalar, with P 0 (a). We want to assume that
v is those unit vector which satisfies P 0 (a) = αv with α > 0. This
way, v always points in the direction in which the curve is traversed,
starting from the initial point A (in particular, if the curve is closed).
We may express v in terms of P 0 (a) as
P 0 (a)
v=
||P 0 (a)||
and α as
α = ||P 0 (a)||.
Now we are ready to give a complete definition of curves which is
most suitable in the context of integration theory. Our definition is
identical with [1, Definition 5.1], except we call B the “terminal point”
instead of “final point”.
Definition 6. A directed (or “oriented”) curve in Rn is a quadruple
(Γ, A, B, v), where Γ is a set of points in Rn ; A and B are points in
Γ, called respectively the initial and terminal points of Γ; v is a
unit vector in Rn called the initial direction, for which there exists a
mapping P : [a, b] → Rn , called parametrization of Γ, such that the
following conditions hold:
(a) There exists an open interval I, containing [a, b], and a mapping
from I to Rn which has derivatives of all orders and which coindices
with P on [a, b]
(b) P ([a, b]) = Γ, P (a) = A, P (b) = B and P 0 (a) = αv for some α > 0
(c) P 0 (t) 6= 0 for all t ∈ [a, b]
(d) P is injective on [a, b) and (a, b].
6.2. Examples.

Example 1: The straight line connecting (0, 0) and (1, 1) is parametrized


by
P : [0, 1] → R2
defined as
P (t) = (t, t).
Formally, this is the directed curve (Γ, A, B, v) with
√ √
Γ = {(t, t) ∈ R2 : t ∈ [0, 1]}, A = (0, 0), B = (1, 1), v = (1/ 2, 1/ 2).
NOTES ON MULTIVARIATE CALCULUS 25

It is straight-forward to check that all conditions (a)-(d) in Definition


6 are satisfied. (Exercise 7: Do this.) But the above function P is
not the only parametrization of this curve. In fact, there are infinitely
many. Other examples are
 
2 1 2 3 1 2 3
P : [0, 1] → R , P (t) = − · t + · t, − · t + · t ,
2 2 2 2
P : [0, 1/2] → R2 , P (t) = (2t, 2t),
2
P : [1, 2] → R , P (t) = (t − 1, t − 1).
Again, it is straight-forward to check the validity of all conditions (a)-
(d) in Definition 6 for these parametrizations. (Exercise 8: Do this.)
Not admissible in the sense of Definition 6 is the parametrization
P : [0, 1] → R2 , P (t) = (t2 , t2 )
although P ([0, 1]) = Γ, P (0) = A and P (1) = B: We have P 0 (t) =
(2t, 2t) for this parametrization and hence P (0) = (0, 0), which vio-
lates condition (c). Another example of a parametrization that is not
admissible is
 
2 1 1 1 1
P : [0, 1] → R , P (t) = − · cos(3πt), − · cos(3πt) .
2 2 2 2
Again, it is true that P ([0, 1]) = Γ, P (0) = A and P (1) = B. (Exer-
cise 9: Check this.) However, there are two issues: P 0 vanishes at the
points t = 0, 1/3, 2/3, 1, violating (c), and P is not injective on (0, 1]
(for example, P (1/3) = (1, 1) = P (1)).
But it is not a problem that there exist non-admissible parametriza-
tions (they will always exist). What counts is only that there exists
one admissible P which satisfies all 4 conditions (a)-(d) in Definition
6.

Example 2: The circle with radius 1 and center (0, 0) in the plane,
traversed anticlockwise. This is an example of a closed curve. We want
to pick (1, 0) as initial and terminal point. Formally, this is the directed
curve (Γ, A, B, v) with
Γ = {(x, y) ∈ R2 : x2 + y 2 = 1}, A = (1, 0) = B, v = (0, 1).
A possible parametrization is
P : [0, 2π] → R2 , P (t) = (cos t, sin t) .
Again, it is straight-forward to check that all conditions (a)-(d) in Def-
inition 6 are satisfied. (Exercise 10: Do this.)
Not admissible is the parametrization
P : [0, 4π] → R2 , P (t) = (cos t, sin t)
although P ([0, 4π]) = Γ, P (0) = A = P (4π). The problem here is that
the circle is traversed twice, so we do not have injectivity on (0, 4π].
26 STEPHAN BAIER, RKMVERI

It is easy to produce loads of other admissible and non-admissible


parametrizations. (Exercise 11: Practice this.)

Example 3: In Examples 1 and 2 above we considered plane curves.


Let us look at a space curve now. We want to describe a helix (shape of
a spring). So with respect to the x − y−plane, this curve behaves like a
circle (meaning that the projection on the x − y−plane is a circle), but
in the z−direction, it winds up. It is easy to give a parametrization of
a suitable helix. Take, for example,
P : [0, 6π] → R3 , P (t) = (cos t, sin t, t).
Formally, this helix is the directed curve (Γ, A, B, v) with
√ √
Γ = P [0, 6π], A = (1, 0, 0), B = (1, 0, 6π), v = (0, 1/ 2, 1/ 2).
Again, it is easy to check that all conditions (a)-(d) in Definition 6 are
satisfied. (Exercise 12: Do this. In particular, work out that the
vector v given above is correct.)
NOTES ON MULTIVARIATE CALCULUS 29

6.3. Length of a curve. Before we turn to integration over curves,


we study some geometric properties of curves, namely length and cur-
vature. At a later point, we shall also talk about the torsion of a space
curve. To express the length of a curve, we will need integration as
well, but only the familiar Riemann integration over intervals.
Given the parametrization P (t) of a curve, how to calculate its
length? Again, some intuition first before we make things precise. From
physics, we know the basic formula
distance traveled = speed × time
for an object that moves from A to B at a constant speed. If the
speed is not constant and hence a function speed(t) of time t, then this
formula needs to be replaced by
Z
distance traveled = speed(t)dt.
time interval

We may use this model to express the length of a curve as an integral.


We imagine P (t) as the position of an object moving from A to B.
Its velocity at time t is the vector P 0 (t). Its speed at time t is the
magnitude ||P 0 (t)|| of this vector. Thus, what we get is the formula
Zb
(6.1) length of the curve = ||P 0 (t)||dt.
a

Of course, this is not a mathematical proof, but we can make it rigorous.


First we need to define clearly what we mean by “length of a curve”.
We imagine the curve being replaced by a sequence of many tiny
straight lines. For them, we have a clear notion of length. Now the
length of the curve will be approximated by the sum of the lengths of
these tiny straight lengths. This is made precise in the following.
Definition 7. Let Γ, A, B, v be a curve with parametrization P : [a, b] →
Rn . Then we define the length l(Γ) of this curve as
N
X −1
(6.2) l(Γ) := sup ||P (ti+1 ) − P (ti )||,
P
i=0

where the supremum on the right-hand side is taken over all partitions
P given by a = t0 < t1 < ... < tN −1 < tN = b of the interval [a, b].

Comment 6: It is important to note that l(Γ) is independent of the


parametrization, i.e., for all parametrizations P , the right-hand side of
(6.2) will be the same. (Exercise 13: Explain why this is the case.)
30 STEPHAN BAIER, RKMVERI

Now we want to derive formula (6.1) in a precise way. We first


observe that for each partial interval [ti , ti+1 ] of a partition as above,
we have
P (ti+1 ) − P (ti )
= P 0 (ξi )
ti+1 − ti
for some ξi ∈ [ti , ti+1 ] by the mean value theorem of calculus, and hence
||P (ti+1 ) − P (ti )|| = ||P 0 (ξi )||(ti+1 − ti ).
Now we can directly apply the definition of the Riemann integral using
refinements of partitions: Noting that
N −1 N 0 −1
X X
||P (ti+1 ) − P (ti )|| 6 ||P (t0i+1 ) − P (t0i )||
i=0 i=0

if a = t00 < t01 < ... < t0N 0 = b is any refinement of the partition
a = t0 < t1 < ... < tN = b, the supremum on the right-hand side of
(6.2) is nothing else than the Riemann integral of the function ||P 0 (t)||.
Hence, we have the following.
Theorem 3. Let P : [a, b] → Rn be any parametrization of the directed
curve (Γ, A, B, v). Then
Zb
l(Γ) = ||P 0 (t)||dt.
a

Comment 7: We convince ourselves that the integral above is indeed


invariant under re-parametrizations: Let f : [a, b] → [c, d] be any injec-
tive, infinitely differentiable function satisfying f (a) = c, f (b) = d and
f 0 (t) 6= 0 for all t ∈ [a, b]. If P : [c, d] → Rn is a parametrization of the
curve (Γ, A, B, v), then so is the function Q : [a, b] → Rn given by
Q(t) = P (f (t)) = P ◦ f (t).
Now using substitution rule and f 0 (t) > 0 for all t ∈ [a, b], we indeed
have
Zb Zb Zb
||Q0 (t)||dt = ||(P ◦ f )0 (t)||dt = ||f 0 (t)P 0 (f (t))||dt
a a a
Zb Zd
= f 0 (t)||P 0 (f (t))||dt = ||P 0 (u)||du.
a c

Exercise 14: Calculate the lengths of the curves in Examples 1,2,3


above using Theorem 3, with two different parametrizations of the same
curve, respectively.
NOTES ON MULTIVARIATE CALCULUS 31

6.4. Curvature. To introduce the curvature, we use a most direct


approach. The tangent gives a best possible linear approximation to
a curve near a point. Now we want to approximate by circles instead
of lines. The reciprocal of the radius of the circle which gives the best
possible approximation near a point is the absolute curvature of the
curve at this point - the smaller the approximating circle the larger the
absolute curvature.
The tangent can be obtained as the limit of secants: If P (t), P (t1 ) ∈
Γ with t 6= t1 , then an equation for the line passing through both points
is
λ
S(λ) = P (t) + (P (t1 ) − P (t)).
t1 − t
Taking the limit as t1 → t gives an equation of the tangent line at P (t),
namely,
T (λ) = P (t) + λP 0 (t).

If we want to imitate this limiting process for circles, we need 3 points.


It makes sense to choose points P (t − ∆), P (t) and P (t + ∆) for some
positive ∆. We then let ∆ tend to 0. If the said points are not collinear
(i.e., they do not lie on the same straight line), then there exists a
unique plane passing through them, no matter what the dimension n
of the space is in which the curve lies. In this plane, there is then
a unique circle passing through all 3 points. We focus on dimension
n = 2, i.e., we consider plane curves. In this setting, we will determine
the radius of the said circle and its limit as ∆ tends to 0.
If we have 3 points x0 , x1 and x2 in the plane which are not collinear,
what is the centre of the circle passing through all 3 of them? An easy
way to find it is to determine the perpendicular bisectors of the line
segments x0 x1 and x1 x2 and intersect them. The perpendicular bisector
of x0 x1 is the set
   
2 1
b1 ∈ R : b1 − (x0 + x1 ) · (x1 − x0 ) = 0 ,
2

where 00 .00 is the standard inner product. Similarly, the perpendicular


bisector of x1 x2 is the set
   
2 1
b2 ∈ R : b2 − (x1 + x2 ) · (x2 − x1 ) = 0 .
2

The intersection of these two sets is the singleton {c}, where c is the
centre of the circle and satisfies
   
1 1
(6.3) c − (x0 + x1 ) ·(x1 −x0 ) = 0 = c − (x1 + x2 ) ·(x2 −x1 ).
2 2
32 STEPHAN BAIER, RKMVERI

If we denote the coordinates of xi by xi,1 and xi,2 and the coordinates


of c by c1 and c2 , then we get a system of linear equations of the form
   
1 1
c1 − (x0,1 + x1,1 ) (x1,1 − x0,1 ) + c2 − (x0,2 + x1,2 ) (x1,2 − x0,2 ) =0
2 2
   
1 1
c1 − (x1,1 + x2,1 ) (x2,1 − x1,1 ) + c2 − (x1,2 + x2,2 ) (x2,2 − x1,2 ) =0,
2 2
which may be simplified into
1 2
x1,1 + x21,2 − x20,1 − x20,2

c1 (x1,1 − x0,1 ) + c2 (x1,2 − x0,2 ) =
2
1 2
c1 (x2,1 − x1,1 ) + c2 (x2,2 − x1,2 ) = x2,1 + x22,2 − x21,1 − x21,2 .

2
Now we can easily solve for c1 and c2 and then calculate the radius of
the circle. We don’t carry this out but rather look at what happens if
we take the points x0 = P (t − ∆), x1 = P (t) and x2 = P (t + ∆) and
let ∆ tend to 0. To this end, we return to 6.3.
This pair of equations can now be written in the form
 
1 1
c − (P (t − ∆) + P (t)) · (P (t) − P (t − ∆)) = 0
2 ∆
(6.4)  
1 1
= c − (P (t) + P (t + ∆)) · (P (t + ∆) − P (t)),
2 ∆
where we have divided both equations by the scalar ∆. Note that the
centre c depends on ∆. If we take the limit as ∆ tends to 0, both
equations turn into
(6.5) (c − P (t)) · P 0 (t) = 0
with c the center of the limit circle. This says nothing else than that c
lies on the line which passes through P (t) and is perpendicular to the
tangent at P (t), called normal line to the curve at P (t). Of course,
this is as expected. But from this alone, we cannot determine c. We
need a second equation. This can be obtained by taking the difference
of both equations in (6.4) and dividing again by ∆, getting
 
1 1
c − (P (t) + P (t + ∆)) · 2 (P (t + ∆) − P (t))
2 ∆
 
1 1
− c − (P (t − ∆) + P (t)) · 2 (P (t) − P (t − ∆)) = 0
2 ∆
and hence
(6.6)
1
c · 2 (P (t + ∆) − 2P (t) + P (t − ∆))

1
= 2 (P (t + ∆) · P (t + ∆) − 2P (t) · P (t) + P (t − ∆) · P (t − ∆)) .
2∆
NOTES ON MULTIVARIATE CALCULUS 33

Here the point is that if a function f is three times continuously differ-


entiable in an interval (t − δ, t + δ), then Taylor’s theorem yields
1
lim 2 (f (t + ∆) − 2f (t) + f (t − ∆)) = f 00 (t).
∆→0 ∆
Indeed, plugging in the second order Taylor approximations, we get
1
(f (t + ∆) − 2f (t) + f (t − ∆))
∆2  
1 0 1 2 00 3
= 2 f (t) + ∆f (t) + ∆ f (t) + O(∆ )
∆ 2
 
0 1 2 00 3
−2f (t) + f (t) − ∆f (t) + ∆ f (t) + O(∆ )
2
00
=f (t) + O(∆),
which tends to f 00 (t) as ∆ tends to 0.
Hence, letting ∆ tend to 0, (6.6) gives
1
(6.7) c · P 00 (t) = F 00 (t),
2
where c is the center of our limit circle, and
F (t) := P (t) · P (t).
We just need to calculate F 00 (t). It can be verified easily that the pro-
duct rule for inner products takes the same shape as the usual product
rule, i.e.
(g · h)0 = g 0 · h + g · h0
for differentiable functions g, h : R → R2 . Hence,
F 0 (t) = 2P 0 (t) · P (t),
and
F 00 (t) = 2P 00 (t) · P (t) + 2P 0 (t) · P 0 (t).
Now (6.7) takes the form
(6.8) c · P 00 (t) = P 00 (t) · P (t) + P 0 (t) · P 0 (t).
The two equations (6.5) and (6.8) together give a system of equations
which can be uniquely solved for c. Let’s do this. We may write this
system in matrix form as
 0
P0 · P
 
P
c= ,
P 00 P 00 · P + P 0 · P 0
which yields
−1 
P0 P0 · P
 
c= .
P 00 P 00 · P + P 0 · P 0
In this case, we mean by c the vector
 
c
c= 1 .
c2
34 STEPHAN BAIER, RKMVERI

Let us now write P (t) = (P1 (t), P2 (t)) and calculate what we get in
terms of the coordinate functions P1 (t) and P2 (t). We have
 0 −1  0 −1
P1 P20
 00
P2 −P20

P 1
= = 0 00 ·
P 00 P100 P200 P1 P2 − P20 P100 −P100 P10
and
P0 · P P10 P1 + P20 P2
   
= .
P 00 · P + P 0 · P 0 P100 P1 + P200 P2 + (P10 )2 + (P20 )2
Taking product gives
(P10 )2 + (P20 )2 −P20 ||P 0 ||2 −P20
     
P1
c= + 0 00 = P + 0 00 .
P2 P1 P2 − P20 P100 P10 P1 P2 − P20 P100 P10
Hence, the radius r of the limit circle satisfies
2
||P 0 ||2

2
r = ||c − P || = 2
0 00 0 00
||P 0 ||2
P1 P 2 − P 2 P1
and hence
||P 0 ||3
r = 0 00 .
|P1 P2 − P20 P100 |
There is a geometric interpretation for the denominator. A vector
perpendicular to the tangent vector T (t) = P 0 (t) = (P10 (t), P20 (t)) is the
so-called normal vector
N (t) = (−P20 (t), P10 (t)).
We observe that
T 0 · N = P10 P200 − P20 P100 .
Hence, r can be written in simpler form as
||T ||3 ||N ||3
r= = .
|T 0 · N | |T 0 · N |
The reciprocal
1 |T 0 · N |
=
r ||N ||3
of the radius r this is called absolute curvature, and
T0 · N
κ= .
||N ||3
is called curvature.
In our derivation of the above formula, we have assumed that if ∆
is small enough, then the points P (t − ∆), P (t) and P (t + ∆) are not
collinear. This is the case if T 0 (t) 6= 0, which means that the tangent
vector changes direction in a neighborhood of t. If T 0 (t) = 0, the above
formula for κ(t) is still meaningful: It just says that the curvature is 0
at the point P (t).
Let us summarize what we got.
NOTES ON MULTIVARIATE CALCULUS 35

Summary. Let P be any parametrization of a plane curve (Γ, A, B, v).


Write
T (t) := P 0 (t) = (P10 (t), P20 (t)) and N (t) := (−P20 (t), P10 (t)).
The vector T (t) is a tangent vector, the vector N (t) a normal vector to
the curve at the point P (t). The curvature at the point t is given by
T 0 (t) · N (t)
κ(t) = ,
||N (t)||3
and |κ(t)| is called absolute curvature.

Example 4: Let us calculate the curvature at a point on the graph of


a function f : [a, b] → R. This graph constitutes a plane curve with
parametrization P : [a, b] → R of the form
P (t) = (t, f (t)).
We calculate that
T (t) = P 0 (t) = (1, f 0 (t)), N (t) = (−f 0 (t), 1), T 0 (t) = (0, f 00 (t)).
Hence, we get
(0, f 00 (t)) · (−f 0 (t), 1) f 00 (t)
κ(t) = = ,
(1 + f 0 (t)2 )3/2 (1 + f 0 (t)2 )3/2
which is a famous formula.

Let us stop at this point. We shall later return to the curvature


and see which form it takes when we take special parametrizations like
unit speed parametrizations and replace the normal vector by the unit
normal. Our formula then has a geometric interpretation as the rate
of change of the unit normal. We shall also talk about the direction
of the normal vector and the sign of the curvature. Moreover, we will
generalize the notion of curvature to space curves. Next, we proceed
straightaway to the topic of integration over curves.

Exercise 15: Consider an ellipse with parametrization


P : [0, 2π] → R2 , P (t) = (a cos t, b sin t),
where a, b > 0. Calculate the curvature at any point. At which points
does it have maximal/minimal curvature?
38 STEPHAN BAIER, RKMVERI

7. Line integrals
7.1. Line integrals of vector fields. We shall consider two types of
integrals over curves: integrals of vector fields and scalar fields. First
we define vector fields below and explain their integration over curves.
Definition 8. Let U be a subset of Rn . A function F : U → Rn is
called vector field on U . We say that F is a continuous vector field if
F is continuous on U . If U is open, we call F a smooth vector field if
it possesses partial derivatives of all orders.

Examples 5: (i) We have already seen important examples of vector


fields, namely gradients. Let U ⊆ Rn be open and f : U → R be dif-
ferentiable. Then the gradient ∇f , defined in Definition 4, is a vector
field on U .
(ii) The tangent vector P 0 (t) is an example of a vector field along a
curve Γ parametrized by P (t).
(iii) There are countless examples of vector fields appearing in physics.
(So the mathematics which we develop here is of highest relevance for
the solution of real-life problems.) Take, for example, the velocity of a
fluid at a given point (velocity field), or the electrostatic force acting
on a test particle placed at a point in a neighborhood of an electrically
charged particle (electric field).

The intuition behind the integral of a vector field along a curve (we
call it line integral) is similar to that behind the Riemann integral. As-
sume F is a continuous vector field along a curve Γ parametrized by P :
[a, b] → Rn . To approximate
 this integral, we first replace the curve  by
a polygonal chain P (t0 ), P (t1 ), P (t1 ), P (t2 ), ..., P (tn−1 ), P (tn ) , where
P (ti ), P (ti+1 ) is the line segment connecting P (ti ) and P (ti+1 ), and
a 6 t0 < t1 < ... < tn = b is a partition of [a, b]. Now our Riemann
sums approximating the line integral in question are of the form
n−1
X
F (P (t0i )) · (P (ti+1 ) − P (ti )) ,
i=0

where “·” is the standard inner product and t0i is any point in the interval
[ti , ti+1 ]. (We thus have a tagged partition.) In analogy to the Riemann
integral over an interval, we may now define the line integral
Z
F
Γ

as the limit of these Riemann sums, taken over a sequence of successive


refinements of partitions of the interval [a, b] whose mesh tends to zero.
NOTES ON MULTIVARIATE CALCULUS 39

(Recall that the mesh of a partition as above is the maximum of all


differences ti+1 − ti .) Since we may write the Riemann sum above as
n−1  
X
0 P (ti+1 ) − P (ti )
F (P (ti )) · (ti+1 − ti )
i=0
ti+1 − ti
and approximate the difference quotient on the right-hand side by the
derivative of P at t0i in the form
P (ti+1 ) − P (ti )
= P 0 (t0i ) + o(ti+1 − ti )
ti+1 − ti
(no matter where precisely t0i is located in the interval [ti , ti+1 ]), we may
replace the said Riemann sum by
n−1
X
(F (P (t0i )) · P 0 (t0i )) (ti+1 − ti )
i=0

and still get the same limit. But this limit of Riemann sums is, by the
definition of the Riemann integral, nothing else than
Zb
F (P (t)) · P 0 (t)dt.
a

This gives rise to the following definition.


Definition 9. Let Γ ⊂ Rn be a curve parametrized by P , and let F :
Γ → Rn be a continuous vector field along Γ. Then we define the
integral of F over Γ as
Z Zb
(7.1) F := F (P (t)) · P 0 (t)dt.
Γ a

An integral as above is called line integral of a vector field.

Comment 8: Note that, similarly as the integral expressing the length


of a curve, the integral on the right-hand side of (7.1) is invariant un-
der re-parametrizations as a consequence of the substitution rule. (See
Comment 7 which explains this for the integral expressing the length
of a curve.) Hence, this integral depends only on the curve Γ and not
on the concrete parametrization P .

We illustrate the curve integral defined above by means of an illu-


minating example from physics. Suppose you place an electric charge
q0 at a point x0 in space (imagine a single electron). This will induce
an electric field. By Coulomb’s law, the electric field strength is pro-
portional to the reciprocal of the square of the distance to the charge.
40 STEPHAN BAIER, RKMVERI

More precisely, in scalar form, Coulomb’s law says that in a vacuum,


1 |q0 |
|E| = · 2 ,
4πε0 r
where |E| is the magnitude of the electric field, ε0 is the vacuum electric
permittivity, |q0 | is the magnitude of the electric charge at x0 and r is
the distance to the charge. In vector form, Coulomb’s law is described
as
1 q0
(7.2) E(x) = · v(x0 , x),
4πε0 ||x − x0 ||2
where v(x0 , x) is the unit vector in the direction from point x0 to point
x. Note that if we place a test charge at x, then the force exerted on
it will point in the direction of the charge at x0 if both charges have
different sign and point in the opposite direction of they have the same
sign. In the first case, the charges attract each other, in the second
case, they repel each other. If x0 = 0 = (0, 0, 0), the above formula
(7.2) simplifies into
1 q0
E(x) = · x
4πε0 ||x||3
upon noting that v(0, x) = x/||x||. The function E : R3 \ {0} → R3 is
a vector field on R3 \ {0}. Now assume a charged particle moves along
a curve Γ in space from a point A to a point B. We ask the following
question: What is the work done by this particle? Suppose the particle
has an electric charge of q. Then the force acting on it when placed at
x is
1 q0 q
F (x) = · x.
4πε0 ||x||3
This is a vector field on R3 \ {0} as well. The work done is precisely
the curve integral
Z Zb
F = F (P (t)) · P 0 (t)dt.
Γ
a

If, for example, our particle moves along a circular path with centre
0, then the tangent vector P 0 (t) is always perpendicular to the force
vector F (P (t)). Hence, the inner product F (P (t)) · P 0 (t) vanishes for
every t, and hence there is no work done. Thus, there is no change of
energy if the particle moves on a circular path around the charge at the
centre. (An analogous situation is that of a satellite orbiting earth on a
circular path.) The other extreme is when the particle moves on a line
segment in direction of the center. Then the tangent vector is in the
direction of this line segment, and the inner product F (P (t)) · P 0 (t) is
of magnitude as large as possible. The work done is exactly the change
of potential energy along this line segment. Below we make this precise
by some calculations for these cases.
NOTES ON MULTIVARIATE CALCULUS 41

Examples 6: (i) Let Γ1 be the circular curve in the x − y−plane with


initial point (1, 0, 0) and terminal point (0, 1, 0). We may parametrize
it by
P : [0, π/2] → R3 , P (t) = (cos t, sin t, 0).
Then
1
F (P (t)) = · q0 q(cos t, sin t, 0)
4πε0
and
P 0 (t) = (− sin t, cos t, 0).
Taking the inner product, we get
1
F (P (t)) · P 0 (t) = · q0 q · (−(cos t) · (sin t) + (sin t) · (cos t) + 0 · 0) = 0.
4πε0
Hence, we get
Z
F = 0.
Γ1

(ii) Let Γ2 be the line segment with initial point x = (x, y, z) and
terminal point x/2 = (x/2, y/2, z/2). We may parametrize it by
P : [0, 1/2] → R3 , P (t) = (1 − t)x.
Then
1 q0 q
F (P (t)) = · (1 − t)x
4πε0 (1 − t)3 ||x||3
1 q0 q
= · x
4πε0 (1 − t)2 ||x||3
and
P 0 (t) = −x.
Taking the inner product, we get
1 q0 q
F (P (t)) · P 0 (t) = − · (1 − t)x
4πε0 (1 − t)3 ||x||3
1 q0 q
(7.3) = · x·x
4πε0 (1 − t)2 ||x||3
q0 q
=− .
4πε0 (1 − t)2 ||x||
Hence,
Z Z1/2
q0 q dt q0 q
F =− · 2
=− .
4πε0 ||x|| (1 − t) 4πε0 ||x||
Γ2 0
42 STEPHAN BAIER, RKMVERI

(iii) Now let us take the same initial and end points as in Example 6(i)
but connect them by a different curve. For simplicity, we take the line
segment Γ3 connecting them. It can be parametrized in the form
P : [0, 1] → R, P (t) = (1 − t, t, 0).
Then
1 q0 q
F (P (t)) = · (1 − t, t, 0)
4πε0 ((1 − t)2 + t2 )3/2
and
P 0 (t) = (−1, 1, 0).
Taking the inner product, we get
1 q0 q
F (P (t)) · P 0 (t) = · (1 − t, t, 0) · (−1, 1, 0)
4πε0 ((1 − t)2 + t2 )3/2
q0 q 2t − 1
= ·
4πε0 ((1 − t)2 + t2 )3/2
Hence, we get
Z1
2t − 1
Z
q0 q
F = · dt.
4πε0 ((1 − t)2 + t2 )3/2
Γ3 0

We observe the following symmetry of the integrand


2t − 1
g(t) = :
((1 − t)2 + t2 )3/2
For any δ ∈ [0, 1/2] we have
g(1/2 + δ) = −g(1/2 − δ).
In other words, the function h : [−1/2, 1/2] → R defined by
h(t) := g(t + 1/2)
is odd. It follows that
Z1
2t − 1
dt = 0
((1 − t)2 + t2 )3/2
0

and so Z
F = 0.
Γ3

The result in Example 6(iii) is the same as in Example 6(i). Thinking


in terms of physics, this is to be expected. The work done in the electric
field should only depend on the endpoints of the curve and equal the
difference of the potential energies at them. Since in this example,
they have the same distance to the charge placed at 0, this difference is
NOTES ON MULTIVARIATE CALCULUS 43

indeed 0. In the next subsection, we abstract from this example, sing-


ling out the vector fields with path-independent integrals, i.e. vector
fields whose integrals over curves depend only on their endpoints.
The following picture, generated by the free online graphic calculator
desmos.com, visualizes the vector field F on R2 given by F (x, y) =
(−y, x).
46 STEPHAN BAIER, RKMVERI

7.2. Conservative vector fields. In this subsection, we will see that


vector fields with path-independent integrals arise naturally as gradi-
ents ∇f of scalar fields f : Rn → R. We first make the following
definition.
Definition 10. Let U ⊆ Rn open. Suppose that F : U → Rn is a
continuous vector field such that there exists a differentiable scalar field
f : U → R with ∇f = F . Then F is said to be a conservative vector
field and f is a potential of F .
In the following, we will see that an analog of the the Fundamental
Theorem of Calculus holds for line integrals of conservative vector fields.
Theorem 4. Let U ⊆ Rn be open and F a conservative vector field
with potential f on U . Let Γ ⊂ U be a curve with initial point A and
terminal point B. Then
Z
F = f (B) − f (A).
Γ

In particular, line integrals of F are path-independent.


Proof. Let P : [a, b] → U be a parametrization of Γ. By the definition
of line integrals and ∇f = F , we have
Z Zb Zb
0
(7.4) F = F (P (t)) · P (t)dt = ∇f (P (t)) · P 0 (t)dt.
Γ a a

Using chain rule from differentiation, we have


d
∇f (P (t)) · P 0 (t) =
(F ◦ P )(t).
dt
Plugging this into the integral on the right-hand side of (7.4) and using
the Fundamental Theorem of Calculus, we obtain
Zb Zb
0 d
∇f (P (t)) · P (t)dt = (F ◦ P )(t)dt
dt
a a
=(F ◦ P )(b) − (F ◦ P )(a)
=F (B) − F (A),
which completes the proof. 
Now we may ask ourselves if the converse of the above Theorem 4
holds, i.e. whether F is conservative if all line integrals of F are path-
independent. To give an affirmative answer to this question, we need
to slightly extend the notion of line integrals and also introduce the
notion of path-connectedness.
NOTES ON MULTIVARIATE CALCULUS 47

Definition 11. Let Γ1 , ..., Γk be directed curves (in the sense of Defi-
nition 6) such that for i = 1, ..., k − 1 the terminal point of Γi equals
the initial point of Γi+1 . Let Γ be the union of Γ1 , ..., Γk . Then Γ is
called a piecewise smooth directed curve with initial point equal to the
initial point of Γ1 and terminal point equal to the terminal point of Γk .
If, furthermore, F is a continuous vector field along Γ, then we define
its integral over Γ as
Z Xk Z
F := F.
Γ i=1 Γ
i

Definition 12. Let U ⊆ Rn be open. We say that U is path-connected


if any two points A and B in U can be joint by a piecewise smooth
directed curve Γ ⊆ U .

Comment 9: (i) The general definition of path-connectedness of topo-


logical spaces is slightly different, namely, it is only required that Γ
has a continuous parametrization (no kind of smoothness is assumed).
However, in the case of open subsets of Rn it is not hard to show that
both definitions coincide.

(ii) For general topological spaces, path-connectedness implies connected-


ness, but the converse is not true in general. (There is a famous coun-
terexample, the topological sine curve.) However, for open subsets U
of Rn the two notions are actually the same. (In general, a topolo-
gical space X is called connected if it is not the union of two disjoint
non-empty open subsets. A subset A of a topological space X is called
connected if it is connected as a topological space when endowed with
the induced subspace topology.)

Now we are ready to formulate a theorem whose first part is a ge-


neralization of Theorem 4 and whose second part is the converse for
path-connected open sets U .

Theorem 5. (i) Let U ⊆ Rn be open and F a conservative vector field


on U with potential f . Let Γ ⊂ U be a piecewise smooth directed curve
with initial point A and terminal point B. Then
Z
F = f (B) − f (A).
Γ

In particular, line integrals of F are path-independent.

(ii) Let F be a continuous vector field on an path-connected open subset


U of Rn . If for any two points A, B ∈ U and any two piecewise smooth
48 STEPHAN BAIER, RKMVERI

directed curves Γ1 , Γ2 ⊂ U joining A and B we have


Z Z
F = F,
Γ1 Γ2

then F is conservative.
Proof. (i) Using Definition 11 and Theorem 4, we have
Z X k Z Xk
(7.5) F = F = (f (Ai+1 ) − f (Ai ))
Γ i=1 Γ i=1
i

where Ai is the initial and Ai+1 the terminal point of Γi for i = 1, ..., k.
But in the sum on the right-hand side of (7.5), the contributions of
f (A2 ), ..., f (Ak ) cancel out so that
Z
F = f (Ak+1 ) − f (A1 ).
Γ

Since A = A1 is the initial point and B = Ak+1 is the terminal point


of Γ, the result follows.
(ii) The idea is to fix a point x0 ∈ U and define a function f : U → R
by Z
f (x) := F
Γ
for any x ∈ U , where Γ is any piecewise smooth directed curve joining
x0 and x. By the condition of path-independence in part (ii), f is well-
defined. Now it remains to show that f is differentiable and satisfies
∇f = F . To this end, by Theorem 2, it suffices to show that the partial
derivatives of f all exist and are continuous on U , and

(7.6) f (x) = Fi (x)
∂xi
for i = 1, ..., n, where Fi is the i-th component of F . Existence and
continuity follow if we can show (7.6) since F is assumed to be conti-
nuous.
By the definition of partial derivatives, we have
∂ f (x + hei ) − f (x)
f (x) = lim ,
∂xi h→0 h
where ei is the i-th standard unit vector. Since U is open, if h is small
enough, the line segment L joining x and x + hei is contained in U .
Let Γ be any piecewise smooth directed curve joining x0 and x. Then
by definition of f ,
Z Z
f (x) = F and f (x + hei ) = F
Γ Γ∪L
NOTES ON MULTIVARIATE CALCULUS 49

so that Z
f (x + hei ) − f (x) = F.
L
To calculate the integral over L, we parametrize L by
P : [0, h] → Rn , P (t) := x + tei .
Then P 0 (t) = ei and so
Z Zh Zh
F = F (x + tei ) · ei dt = Fi (x + tei )dt,
L 0 0
where Fi is the i-th component of F . Let
gi (t) := Fi (x + tei ).
Using continuity of gi , we have
Zh
1
lim gi (t)dt = gi (0) = Fi (x).
h→0 h
0
Combining everything above, we obtain (7.6), which completes the
proof. 

Example 7: Returning to Example 6, we may conjecture that the


Coulomb field is conservative. Indeed, this is easy to confirm. Consider
the scalar field
1 q0 q
f (x) = − · .
4πε0 ||x||
Writing
x = (x, y, z),
the above turns into
1 q0 q
f (x, y, z) = − · .
4πε0 (x2 + y 2 + z 2 )1/2
Calculating the partial derivatives with respect to x, y and z shows
that
1 q0 q 1 q0 q
∇f (x, y, z) = · 3/2
(x, y, z) = · x = F (x),
4πε0 (x2 + y 2 + z 2 ) 4πε0 ||x||3
the Coulomb field. Hence, f is a potential of the Coulomb field.

We would like to have a handy criterion to decide whether a general


given vector field on an open set is conservative. This will be the
content of the next subsection.
NOTES ON MULTIVARIATE CALCULUS 51

7.3. A criterion for conservative vector fields. Suppose F is a


continuously differentiable conservative vector field and f a potential
for F on U ⊆ Rn open. For i = 1, ..., n let
∂f
Fi =
∂xi
be the i-th component of F . We observe that for any i, j ∈ {1, ..., n},
we have
∂Fi ∂ 2f ∂ 2f ∂Fj
= = =
∂xj ∂xj ∂xi ∂xi ∂xj ∂xi
since F is continuously differentiable. In words, the j-th partial deriva-
tive of the i-th component equals the i-th partial derivative of the j-th
component of F . We may ask ourselves if this property of continuously
differentiable conservative vector fields can be made into a criterion.
This is indeed possible for open sets U that are simply connected, which
means that U is path-conntected and every loop in U can be contracted
to a point in U . By “contraction”, we mean a continuous deformation
inside U . In the case n = 2, simple connectedness of an open set U is
equivalent to connectedness of both U and its complement in R2 ∪ {∞}
(intuitively speaking, U has no “holes”). We skip a formal definition
and state the desired criterion for conservative vector fields without
proof (for a proof, we need Green’s theorem, which is not yet at our
disposal). Nice graphics explaining the concept of simple connectedness
are found on https://mathinsight.org/definition/simply connected.
Theorem 6. Let U be a simply connected open subset of Rn and F =
(F1 , ..., Fn ) a continuously differentiable vector field on U . Then F is
conservative iff
∂Fi ∂Fj
(7.7) = for all i, j ∈ {1, ..., n}.
∂xj ∂xi

Example 8: The above criterion is indeed applicable to the Coulomb


field on R3 \ {0} because this set is open and simply-connected. (In
contrast, R2 \ {0} is not simply connected since the unit circle cannot
be contracted to a point inside this set.) Writing
x = (x, y, z)
again, we have
1 q0 q
F1 (x, y, z) = · · x,
4πε0 (x2 + y 2 + z 2 )3/2
1 q0 q
(7.8) F2 (x, y, z) = · · y,
4πε0 (x2 + y 2 + z 2 )3/2
1 q0 q
F3 (x, y, z) = · · z.
4πε0 (x2 + y 2 + z 2 )3/2
52 STEPHAN BAIER, RKMVERI

Let us just check that the partial derivative of F1 with respect to y


equals the partial derivative of F2 with respect to x. Indeed, we calcu-
late that
∂F1 3 q0 qxy ∂F2
(x, y, z) = − · 5/2
= (x, y, z).
∂y 4πε0 (x2 + y 2 + z 2 ) ∂x
All other required equations hold in a similar fashion.

Example 9: Let us return to the vector field F (x, y) = (−y, x) on


R2 which was depicted on page 42. This is continuously differentiable
but not conservative since
∂F1 ∂F2
(x, y) = −1 6= 1 = (x, y).
∂y ∂x
Example 10: Consider the vector field
 
−y x
F (x, y) = ,
x2 + y 2 x2 + y 2
on R2 \ {0}. This vector field satisfies the condition in (7.7) since
∂F1 y 2 − x2 ∂F2
= 2 = .
∂y 2
(x + y )2 ∂x
However, it is not conservative: Take its integral over the unit circle,
parametrized by
P : [0, 2π] → R2 , P (t) = (cos t, sin t).
Then
Z Z2π Z2π
0
F = F (P (t)) · P (t)dt = (− sin t, cos t) · (− sin t, cos t) dt
Γ 0 0
Z2π
= 1dt = 2π.
0
This example shows the importance of the condition of simple connected-
ness. We point out again that R2 \ {0} is not simply connected.
7.4. Curl and divergence. If we restrict ourselves to dimension n =
3, then there is an elegant way to summarize the equations in (7.7) in
one formula. To this end, we define the curl. We recall the notion of
the vector product of two vectors x1 = (x1 , y1 , z1 ) and x2 = (x2 , y2 , z2 )
in R3 . Let i, j, k be the three standard unit vectors (1, 0, 0), (0, 1, 0)
and (0, 0, 1). Then the vector product of x1 and x2 is defined as the
determinant
i j k
x1 × x2 = 1 y1 z1 = (y1 z2 − y2 z1 )i − (x1 z2 − x2 z1 )j + (x1 y2 − x2 y1 )k.
x
x2 y2 z2
NOTES ON MULTIVARIATE CALCULUS 53

It is well-known that x1 × x2 is perpendicular to x1 and x2 and equals


the zero vector iff x1 and x2 are collinear. Moreover, its magnitude
|x1 × x2 | equals the area of the parallelogram spanned by the two
vectors x1 and x2 .
Now given a continuously differentiable vector field F = (F1 , F2 , F3 )
on U ⊆ R3 open, we introduce the curl of F formally as the vector
product
(7.9)
i j k
∂ ∂ ∂
curl(F ) =∇ × F = ∂x ∂y ∂z
F1 F2 F3
     
∂F3 ∂F2 ∂F3 ∂F1 ∂F2 ∂F1
= − i− − j+ − k.
∂y ∂z ∂x ∂z ∂x ∂y
With this notation, we may formulate Theorem 6 above in the following
form for the case n = 3.
Corollary 1. Let U be a simply connected open subset of R3 and F =
(F1 , F2 , F3 ) a continuously differentiable vector field on U . Then F is
conservative iff curl(F ) = 0.
The physical interpretation of the curl is that it measures the rota-
tion. The vector curl(F ) points in the direction of the rotation axis and
|curl(F )| measures the angular speed of the rotation. By Theorem 1,
conservative vector fields are rotation-free. For example, the Coulomb
field doesn’t have any rotations. But if you consider the velocity field
of a fluid, for example, then you may find vortexes (think of your coffee
cup after stiring), and there is then rotation.

Example 11: Let us make example 8 three-dimensional by defining


F : R3 → R3 as
F (x, y, z) = (−y, x, 0).
The curl then takes the form
curl(F ) = 0i + 0j + 2k = 2k
at any point in R3 . Hence, the angular speed of the rotation is the
same at any point in R3 , and the axis of rotation is the z-axis.

The curl is a vector field again. When we replace the cross product
∇ × F by a dot product ∇ · F , we get a scalar field which is of im-
portance as well. This scalar field is called divergence and denoted as
div(F ). So we have
(7.10)  
∂ ∂ ∂ ∂F1 ∂F2 ∂F3
div(F ) = ∇ · F = , , · (F1 , F2 , F3 ) = + + .
∂x ∂y ∂z ∂x ∂y ∂z
54 STEPHAN BAIER, RKMVERI

The divergence has a physical interpretation as well: It measures the


outward flux from a given point. There is divergence if the vector field
has sinks or sources.

Example 12: For the vector field in example 11, we see that div(F ) =
0 (at any point). We hence have no sinks nor sources and therefore no
divergence but only rotation.

Example 13: Let us look at the Coulomb field again. Recalling (7.8),
we obtain
1 q0 q
· −2x2 + y 2 + z 2 +

div(F ) = · 5/2
4πε0 (x2 + y 2 + z 2 )
1 q0 q 2 2 2

· · x − 2y + z +
4πε0 (x2 + y 2 + z 2 )5/2
1 q0 q
· x2 + y 2 − 2z 2

· 5/2
4πε0 (x2 + y 2 + z 2 )
=0
at any point (x, y, z) 6= (0, 0, 0). So if we exclude the origin, the
Coulomb field diverges nowhere, meaning that it has no sources or
sinks outside the origin.

Example 14: The vector field F (x, y, z) = (x, y, z) has divergence


div(F ) = 3 at any given point. That means that we have equal out-
ward flux from any point in space.

To practice calculating line integrals, curl and divergence, our text-


book is a good source.

Exercise 16: Solve problems 6.1 to 6.9 on pages 66 and 67 in [1].

The following graph, made with the free online plotter GeoGebra,
shows the vector field in Example 11.
56 STEPHAN BAIER, RKMVERI

7.5. Line integrals of scalar fields. We conclude this section by


introducing line integrals of scalar fields. The following definition is
analog to Definition 8.
Definition 13. Let U be a subset of Rn . A function f : U → R is
called scalar field on U . We say that f is a continuous scalar field if f
is continuous on U . If U is open, we call f a smooth scalar field if it
possesses partial derivatives of all orders.
In analogy to Definition 9, we define line integrals of scalar fields as
follows.
Definition 14. Let Γ ⊂ Rn be a curve parametrized by P , and let
f : Γ → Rn be a continuous scalar field along Γ. Then we define the
integral of f over Γ as
Z Zb
(7.11) f := f (P (t))||P 0 (t)||dt.
Γ a
An integral as above is called line integral of a scalar field.

R
Comment 10: If f ≡ 1, we would expect f to measure exactly the
Γ
length of the curve Γ. Indeed, recalling Theorem 3, this is the case.

Comment 11: Again, similarly as the integral expressing the length


of a curve, the integral on the right-hand side of (7.11) is invariant un-
der re-parametrizations as a consequence of the substitution rule (see
Comment 7). Hence, this integral depends only on the curve Γ and not
on the concrete parametrization P .

Similarly as in the case of vector fields, we may define, more generally,


line integrals of scalar fields along piecewise smooth directed curves.
Replicating Definition 11, we introduce them as follows.
Definition 15. Let Γ be a piecewise smooth directed curve which is
the union of directed curves Γ1 , Γ2 , ..., Γk , in the sense of Definition 11.
Let f be a continuous scalar field along Γ. Then we define its integral
over Γ as
Z X k Z
f := f.
Γ i=1 Γ
i

Comment 12: Contrary to the case of vector fields, integrals of non-


zero continuous scalar fields on open sets U are never path-independent.
To illustrate this, take f ≡ 1, as in Comment 10. Then the integral of
f over Γ equals the length of Γ, which of course depends on whole of
Γ and not just its endpoints.
NOTES ON MULTIVARIATE CALCULUS 57

Example 16: From basic physics, we know that if an object moves


at constant speed v along a straight line from a point A to a point B,
then the time it takes to reach B equals the distance between A and
B divided by its speed v, i.e.,
s
t= .
v
Now we want to generalize this formula to objects moving along arbi-
trary paths with possibly changing speed. Imagine, for example, a train
travels from a railway station at point A to another railway station at
point B along a track which forms a curve Γ in R2 . (For simplicity, we
assume here that the Earth is flat.) The most natural way to parame-
trize this curve is to take
a := 0, b := distance between A and B along the track
and
(7.12)
P (s) = point on the track which is in distance s to A along the track.
Now the time elapsed between departing from A and arriving at B will
obey the formula
Zb
ds
t= ,
v(P (s))
a

where v(P (s)) is its speed at the point P (s). (To avoid infinities, we
also assume that the train doesn’t stop between A and B.) What if
we consider any other parametrization of the curve Γ? We shall show
below that the above special parametrization satisfies
||P 0 (s)|| ≡ 1.
Then we may write the above integral as
Zb
1
t= ||P 0 (s)||ds,
v(P (s))
a

and since we know from Comment 11 that this integral is invariant


under re-parametrizations, the above will remain a valid formula for
the time elapsed, no matter which parametrization P for the curve Γ
we take. This gives an example of a line integral of a scalar field along
a curve, where the scalar function is
1
f (x) = .
v(x)
Now let’s verify our claim that ||P 0 (s)|| is constant 1 for the parametriza-
tion in (7.12). Take any parametrization Q : [c, d] → R2 of Γ. We define
58 STEPHAN BAIER, RKMVERI

the arc length function L(u) as


Zu
(7.13) L(u) := ||Q0 (t)||dt
c

so that L(u) is the distance of the point Q(u) to the initial point A
along Γ. This is a function with range [0, l], where l = l(Γ) is the length
of Γ. It is strictly increasing since ||Q0 (t)|| > 0 for all t. Now consider
Q ◦ L−1 , where L−1 is the inverse of the function L. Clearly, Q ◦ L−1 (s)
is precisely the point on Γ which is in distance s to the initial point A
along Γ and hence,
P (s) = Q ◦ L−1 (s).
By the differentiation rules, it follows that

Q0 (L−1 (s)) ||Q0 (L−1 (s))||


||P 0 (s)|| = =
L0 (L−1 (s)) L0 (L−1 (s))

since L0 is positive. Recalling the definition of L(u) in (7.13) and using


the Fundamental Theorem of Calculus, we have

L0 (u) = ||Q0 (u)||.

Hence,
||Q0 (L−1 (s))||
||P 0 (s)|| = = 1,
||Q0 (L−1 (s))||
as claimed.
The special parametrization P of Γ above is an example of a unit
speed parametrization. In general, a unit speed parametrization P (t)
of a curve Γ is one which satisfies ||P 0 (t)|| ≡ 1. There is a unique
unit speed parametrization on the interval [0, l], where l is the length
of Γ, and this can be constructed as above. The name “unit speed
parametrization” makes sense remembering that ||P 0 (t)|| measures the
speed at which P (t) traverses Γ. We will make use of such parametriza-
tions later on.

8. Surface integrals
In measure theory, we covered integrals over subsets U of R2 . Basic
knowledge about this will be assumed in the following. In practice,
these integrals are calculated by slicing into intervals and double inte-
gration using Fubini’s theorem. Our aim in this section is to define,
more generally, integrals over surfaces in R3 . To this end, we first need
to parametrize them in a way similar to parametrizations of curves.
NOTES ON MULTIVARIATE CALCULUS 59

8.1. Parametrized surfaces. Let us recall our definition of curves


from section 6.1.

Definition. A directed (or “oriented”) curve in Rn is a quadruple


(Γ, A, B, v), where Γ is a set of points in Rn ; A and B are points in
Γ, called respectively the initial and terminal points of Γ; v is a
unit vector in Rn called the initial direction, for which there exists a
mapping P : [a, b] → Rn , called parametrization of Γ, such that the
following conditions hold:
(a) There exists an open interval I, containing [a, b], and a mapping
from I to Rn which has derivatives of all orders and which coincides
with P on [a, b]
(b) P ([a, b]) = Γ, P (a) = A, P (b) = B and P 0 (a) = αv for some α > 0
(c) P 0 (t) 6= 0 for all t ∈ [a, b]
(d) P is injective on [a, b) and (a, b].

We want a two-dimensional analog of the above. In view of this,


it is natural to parametrize a surface S ⊂ R3 by a bijective function
φ : U → R3 , where U is an open subset of R2 . Here we don’t have an
initial or terminal point, which makes parts (b) and (d) of the above
definition insignificant for our purpose. Similarly as in part (a), we
shall assume that φ possesses partial derivatives of all orders. We also
need an analog of part (c) to avoid cusps or other singularities. It turns
out that a suitable analog is to assume the non-vanishing of the cross
product of the vectors
   
∂φ1 ∂φ2 ∂φ3 ∂φ1 ∂φ2 ∂φ3
, , and , , ,
∂x ∂x ∂x ∂y ∂y ∂y
where φ1 , φ2 and φ3 are the three components of φ. In other words, we
demand that these vectors are linearly independent. We shall later ex-
plain the relevance of this condition. So our definition of parametrized
curves is as follows.
Definition 16. A parametrized surface in R3 consists of a pair (S, φ),
where S is a subset of R3 and φ is a bijective mapping from an open
subset of R2 onto S such that the following conditions hold:
(i) φ has derivatives of all orders
  ∂φ1 ∂φ2 ∂φ3 
(ii) ∂φ
∂x
1 ∂φ2 ∂φ3
, ∂x
, ∂x
× ∂y , ∂y , ∂y 6= 0 at all points.

This is literally the same as [1, Definition 10.1].

Example 17: Let U be the open unit disk, i.e., the set
U := {x ∈ R2 : ||x|| < 1} = {(x, y) ∈ R2 : x2 + y 2 < 1}.
60 STEPHAN BAIER, RKMVERI

Then the function φ : U → R3 defined by


 p 
2
φ(x, y) = x, y, 1 − x − y 2

parametrizes the unit upper semi sphere, depicted on page 12 of these


notes. Of course, condition (i) in Definition 16 is satisfied in this ex-
ample. To verify condition (ii), we return to Exercise 1. Making use of
its solution on page 9 of these notes, we have
  !
∂φ1 ∂φ2 ∂φ3 x
(x, y), (x, y), (x, y) = 1, 0, − p
∂x ∂x ∂x 1 − x2 − y 2
and
  !
∂φ1 ∂φ2 ∂φ3 y
(x, y), (x, y), (x, y) = 0, 1, − p .
∂y ∂y ∂y 1 − x2 − y 2
Now we calculate the cross product of these vectors as
(8.1)
i j p k
!
x y
1 0 −x/p1 − x2 − y 2 = p ,p ,1 ,
1 − x 2 − y2 1 − x 2 − y2
0 1 −y/ 1 − x − y2 2

which never vanishes, implying that condition (ii) in Definition 16 holds


indeed.

We may generalize the above example in which φ1 and φ2 take the


simple equations
φ1 (x, y) = x and φ2 (x, y) = y.
If this is the case, then S is simply the graph of the function φ3 (x, y).
For these parametrizations of surfaces, the condition (ii) in Definition
16 holds automatically if (i) holds because
       
∂φ1 ∂φ2 ∂φ3 ∂φ1 ∂φ2 ∂φ3 ∂φ3 ∂φ3
, , × , , = 1, 0, × 0, 1,
∂x ∂x ∂x ∂y ∂y ∂y ∂x ∂y
 
∂φ3 ∂φ3
= − ,− ,1
∂x ∂y
6=0,
generalizing the calculation in (8.1). But not all surfaces S can be
parametrized in this form.
As for curves, there is an abundance of parametrizations for the same
surface. The next example contains a different parametrization for the
semi sphere in terms of polar coordinates.

Example 18: The affine coordinates x and y of points (x, y) in the


unit open disk may be written in polar coordinates as
x = r cos θ, y = r sin θ, where 0 6 r < 1 and − π 6 θ < π.
NOTES ON MULTIVARIATE CALCULUS 61

Hence, we get a parametrization of the semi sphere by the function


φ : [0, 1) × [−π, π) → R3
defined as

(8.2) φ(r, θ) = (r cos θ, r sin θ, 1 − r2 ).
However, the pair (S, φ) is not a parametrized surface in the strict
sense of Definition 16: Firstly, the set [0, 1) × [−π, π) ⊂ R2 is not
open. Secondly, φ is not a bijective map since φ(0, θ) = (0, 0, 1) for any
θ ∈ [−π, π). We can resolve this issue by cutting out a small portion
of the semi sphere S, namely the quarter circle

Γ := {(−r, 0, 1 − r2 ) : 0 6 r < 1}.
Let U be the open rectangle
U := (0, 1) × (−π, π).
Then the map
φ:U →S\Γ
defined by the equation (8.4) is bijective and U is an open subset of R2 .
Clearly, condition (i) in Definition 16 holds as well. We check condition
(ii) in the following: Indeed, we have
   
∂φ1 ∂φ2 ∂φ3 ∂φ1 ∂φ2 ∂φ3
, , × , ,
∂r ∂r ∂r ∂θ ∂θ ∂θ
 
r
= cos θ, sin θ, − √ × (−r sin θ, r cos θ, 0)
1 − r2
i j √k
= cos θ sin θ −r/ 1 − r2
−r sin θ r cos θ 0
 2 2

r cos θ r sin θ
= √ ,√ ,r
1 − r2 1 − r2
6=0
because r > 0. Hence, (S \ Γ, φ) is a parametrized surface.

Example 19: In a similar way, we can parametrized cones, with a


small portion cut out. As in Example 18, we take U to be the open
rectangle
U := (0, 1) × (−π, π).
Here we slightly modify the definition of φ, namely, we set
φ(r, θ) = (r cos θ, r sin θ, 1 − r).
This parametrizes a cone C with base the unit disk and height 1,
where the unit circle in the x-y-plane and the line L joining the points
62 STEPHAN BAIER, RKMVERI

(−1, 0, 0) and (0, 01) are cut out. Indeed,


φ:U →C \L
is a bijection, possesses partial derivatives of all orders and satisfies
   
∂φ1 ∂φ2 ∂φ3 ∂φ1 ∂φ2 ∂φ3
, , × , ,
∂r ∂r ∂r ∂θ ∂θ ∂θ
= (cos θ, sin θ, −1) × (−r sin θ, r cos θ, 0)
i j k
= cos θ sin θ −1
−r sin θ r cos θ 0
= (r cos θ, r sin θ, r)
6=0
because r > 0. Hence, (C \ L, φ) is a parametrized surface.

Exercise 17: Parametrize the cone C from Example 18 with only


the cusp at (0, 0, 1) cut out using affine coordinates, similarly as the
semi sphere was parametrized as graph of a function in Example 17.
Indicate why your parametrization would fail to satisfy the conditions
in Definition 16 if the point (0, 0, 1) were included.

Exercise 18: Parametrize a cylinder and a torus.

Now we want to examine condition (ii) in Definition 16. To this end,


we first need to understand the geometric meanings of the vectors
   
∂φ1 ∂φ2 ∂φ3 ∂φ1 ∂φ2 ∂φ3
, , and , ,
∂x ∂x ∂x ∂y ∂y ∂y
and their cross product.
Fix (x0 , y0 ) ∈ U and define
Φy0 : {x ∈ R : (x, y0 ) ∈ U } → R
by
Φy0 (x) := φ(x, y0 ).
Since U is open, there exists δ > 0 such that
[x0 − δ, x0 + δ] ⊂ {x ∈ R : (x, y0 ) ∈ U }.
Let
Γx0 ,y0 (δ) := Φy0 ([x0 − δ, x0 + δ]),
A := Φy0 (x0 − δ) and B := Φy0 (x0 + δ)
and
Φ0y0 (x0 − δ)
v := .
||Φ0y0 (x0 − δ)||
NOTES ON MULTIVARIATE CALCULUS 63

Then (Γx0 ,y0 (δ), A, B, v) is a directed curve in R3 , parametrized by


Φy0 : [x0 − δ, x0 + δ] → R3 .
Moreover,
 
∂φ1 ∂φ2 ∂φ3
(x0 , y0 ), (x0 , y0 ), (x0 , y0 ) = Φ0y0 (x0 ),
∂x ∂x ∂x
which is the tangent vector to Γx0 ,y0 (δ) at Φy0 (x0 ) = φ(x0 , y0 ).
Similarly, define
Φx0 : {y ∈ R : (x0 , y) ∈ U } → R
by
Φx0 (y) := φ(x0 , y).
Since U is open, there exists δ > 0 such that
[y0 − δ, y0 + δ] ⊂ {y ∈ R : (x0 , y) ∈ U }.
Let
Γx0 ,y0 (δ) := Φx0 ([y0 − δ, y0 + δ]),
A := Φx0 (y0 − δ) and B := Φx0 (y0 + δ)
and
(Φx0 )0 (y0 − δ)
v := .
|| (Φx0 )0 (y0 − δ)||
Then (Γx0 ,y0 (δ), A, B, v) is a directed curve in R3 , parametrized by
Φx0 : [y0 − δ, y0 + δ] → R3 .
Moreover,
 
∂φ1 ∂φ2 ∂φ3
(x0 , y0 ), (x0 , y0 ), (x0 , y0 ) = Φ0x0 (y0 ),
∂y ∂y ∂y
which is the tangent vector to Γx0 ,y0 (δ) at Φx0 (y0 ) = φ(x0 , y0 ).
The two curves Γx0 ,y0 (δ) and Γx0 ,y0 (δ) are contained in the surface S
and meet at φ(x0 , y0 ). If the tangent vectors
 
∂φ1 ∂φ2 ∂φ3
Tx (x0 , y0 ) := (x0 , y0 ), (x0 , y0 ), (x0 , y0 )
∂x ∂x ∂x
and  
∂φ1 ∂φ2 ∂φ3
Ty (x0 , y0 ) := (x0 , y0 ), (x0 , y0 ), (x0 , y0 )
∂y ∂y ∂y
are not collinear, i.e., their cross product is non-zero, then the plane
φ(x0 , y0 ) + cTx (x0 , y0 ) + dTy (x0 , y0 ) : (c, d) ∈ R2


is the tangent plane to S at the point φ(x0 , y0 ). In particular, S is


smooth there (has no cusps or other singularities). The said cross
product is a vector perpendicular to the tangent plane, i.e., it is a
normal vector for S at the point φ(x0 , y0 ). In the contrary case if
Tx (x0 , y0 ) × Ty (x0 , y0 ) = 0,
64 STEPHAN BAIER, RKMVERI

i.e. part (ii) of Definition 16 is violated, we cannot rule out the possi-
bility of a singularity at φ(x0 , y0 ) (i.e., the surface may not be smooth
there).

Example 20: We want to explain this by means of a two-dimensional


analog to the “curve” given by the parametrization P (t) = (t2 , t3 )
which has a cusp at 0 (see page 22). To this end, take the surface
S parametrized by
φ : R2 → R3 ,
where φ is defined as
φ(x, y) = (x2 , y, x3 ).
Then
Tx (0, y0 ) = (0, 0, 0)
for all y0 ∈ R. Hence,
Tx (0, y0 ) × Ty (0, y0 ) = 0
for all y0 ∈ R. Indeed, from the shape of S, we see that S has cusps at
precisely the points
φ(0, y0 ) = (0, y0 , 0),
i.e., all points on the y-axis. Therefore, in the sense of Definition
16, (S, φ) is not a parametrized surface. A picture of S is found
on page 67. It was created using the free online surface plotter at
christopherchudzicki.github.io/MathBox-Demos/parametric surfaces 3D.html.

We still introduce the following notion which allows us to get rid of


a particular parametrization.
Definition 17. A simple surface in R3 is a subset of R3 for which there
exists a mapping φ such that (S, φ) is a parametrized surface. We call
φ a parametrization of S.
Definition 17 is identical with [1, Definition 10.2].
NOTES ON MULTIVARIATE CALCULUS 69

8.2. Definition of surface integrals. Before we define surface inte-


grals, we have to overcome some difficulties. In the last section, we in-
troduced simple surfaces. However, there are natural surfaces which are
not simple, which means that there is no parametrization which covers
the whole surface. For example, one can show that full spheres (or,
more generally, ellipsoids) are not simple (see [1, section 10]). Though,
we can cover them by simple surfaces. These simple surfaces can be
imagined as patches that are deformed open subsets of the Euclidean
plane R2 . This gives rise to the following definition.
Definition 18. A subset of R3 is a surface if it is the union of finitely
many simple surfaces.
The simple surfaces in the above union are allowed to be overlapping.
In other words, we don’t demand this union to be disjoint.
In the definition of curve integrals, the tangent vectors show up.
It will not be surprising that something similar happens in the case
of surface integrals. However, if we have a surface, then, in contrast
to curves, there exists an infinitude of tangent vectors at each point.
What is nearly unique, however, is the direction in which the normal
vector points. (We met normal vectors to a surface in the last section,
where we identified them as vector products φx × φy , where φ is a
parametrization of the surface.) I say “nearly unique” because there
are two possible directions. We will need to fix one of them, which
gives the surface an orientation. In the case of directed curves, there
is no issue like that because a “natural” direction of the tangent and
normal vector can be determined from the direction in which the curve
is traversed. Since we have an initial point A, a terminal point B
and an initial direction vector v, the said direction of traversing is
uniquely given. These features are not present in the case of surfaces.
So there is no way around fixing the orientation prior to defining surface
integrals. To keep things simple, we may, in addition, demand the said
normal vectors to be unit vectors, which makes them unique. What is
important is that the unit normal does not change direction suddenly
as we travel over the surface. Hence we set up the following definition.
Definition 19. An oriented surface in R3 is a pair (S, n), where S is
a surface and n : S → R3 is a continuous map which maps every point
x of S to a unit normal vector n(x) at x.
The sphere, for example, has an inward and and an outward. Corre-
spondingly, there are two orientations; one for which the normal vectors
all point outward, the other one for which they point inward. However,
there are surfaces which are not orientable. Famous examples are the
Mobius strip and the Klein bottle: You pick your unit normal vector at
one point, travel with it around the surface and find that it has changed
direction if you return to the starting point. Luckily, all simple surfaces
are orientable.
70 STEPHAN BAIER, RKMVERI

We will initially give a definition of surface integrals for simple ori-


ented surfaces. If φ is a parametrization of the simple surface S, then,
following the considerations in the last subsection, it has precisely the
two orientations
φx × φy
n=
||φx × φy ||
and
φx × φy
n=− .
||φx × φy ||
We say that the first one is consistent with the parametrization φ.
Now we are ready to introduce surface integrals of vector fields over
simple surfaces. What they measure is the flux of a vector field F
through a surface. Take, for example, a moving liquid or gas. This
defines a velocity vector field. If the liquid or gas flows along a surface
(imagine the wing of an airplane), there is no flux through that surface,
and hence the surface integral is 0. If the current is perpendicular to
the surface, then the flux and hence the surface integral is maximized.
This is precisely the case if F and n point in the same direction, i.e.
the dot product of F and n is as large as possible. In the contrary, if
the fluid moves along the surface, then F and n are perpendicular, in
which case the dot product of F and n vanishes. This suggests that the
quantity which we need to integrate is F·n. We just need to understand
against which measure we need to integrate. To this end, we argue using
Riemann sums. It will be convenient to denote the points of U ⊆ R as
(u, v) and the points to which they are mapped via the mapping φ as
(x, y, z). We divide U into small rectangles with side lengths ∆u and
∆v. These are mapped via φ to small quadrangles which are nearly
parallelepipeds, with side lengths ||φu ||∆u and ||φv ||∆v, where φu and
φv are taken at the centers of the said rectangles. (Recall from last
subsection that φu and φv are the directional derivatives of φ with
respect to u and v, respectively.) The areas of the aforementioned
small rectangles are ∆u · ∆v, and thus the areas of the corresponding
parallelepipeds are ||(∆u)φu × (∆v )φv || = ||φu × φv ||∆u∆v. Hence, the
Riemann sums in question are sums of terms of the form
(F · n)||φu × φv ||∆u∆v.
If we apply the usual limiting process, making the rectangles infinites-
imal, we are led to the integral
ZZ
(F · n)||φu × φv ||dudv.
U
We put this in the form a formal definition.
Definition 20. Let (S, n) be a simple oriented surface with parametriza-
tion φ : U → S (with U ⊆ R2 open) which is consistent with the orien-
tation n. Let F be a continuous vector field on S. Then we define the
NOTES ON MULTIVARIATE CALCULUS 71

surface integral of F over S as


ZZ ZZ ZZ
F := (F · n)||φu × φv ||dudv = (F · φu × φv )dudv.
S U U

Comment 13: Written up more in detail, the integral above is


ZZ ZZ
F= (F(φ(u, v)) · n(φ(u, v)))||φu (u, v) × φv (u, v)||dudv
S
ZUZ
= (F(φ(u, v)) · φu (u, v) × φv (u, v))dudv.
U
As in the case of curve integrals, surface integrals are independent
of the parametrization. To prove this, one may use the generalized
substitution rule for double integrals. Exercise 19: Carry this out!
Hence, the integral ZZ
F
S
is well-defined.

Comment 14: If (S, n) is a simple oriented surface with parametriza-


tion φ : U → S which is not consistent with the orientation n, then
it is easy to find another parametrization which is consistent with the
orientation, as follows. In this case we have, as seen above,
φu × φv
n=− .
||φu × φv ||
Now we define
Ũ := {(u, v) ∈ R2 : (v, u) ∈ U }
and
φ̃ : Ũ → S
as
φ̃(u, v) := φ(v, u),
i.e., we just switch coordinates. Then
φ̃u × φ̃v φv × φu φu × φv
= =− = n,
||φ̃u × φ̃v || ||φv × φu || ||φu × φv ||
as desired.
NOTES ON MULTIVARIATE CALCULUS 75

It remains to extend the definition of surface integrals to general


oriented surfaces. This task is more of a combinatorial than analytic
flavor. Assume S is covered by simple surfaces Si , i = 1, ..., n with
parametrizations φi : Ui → Si . (By “covered” we simply mean that S
is the union of S1 , ..., Sn .) Assume further without loss of generality
that these parametrizations are consistent with the orientation. (Oth-
erwise produce them by switching coordinates, as in Comment 14.) If
S1 , ..., Sn were disjoint, then we would define the surface integral over
S simply by
ZZ Xn ZZ
F := F,
S i=1 S
i

which is consistent with the additivity property which integrals have to


satisfy. But in general, S1 , ..., Sn are not disjoint. What to do? Let’s
first look at n = 2. Then S1 and S2 both contain S1 ∩ S2 and hence
the sum ZZ ZZ
F+ F
S1 S2
counts the integral taken over S1 ∩ S2 twice. We therefore have to
subtract ZZ
F,
S1 ∩S2
and thus the correct formula is
ZZ ZZ ZZ ZZ ZZ
F= F= F+ F− F,
S S1 ∪S2 S1 S2 S1 ∩S2

which we write in the form


 
ZZ ZZ ZZ ZZ ZZ
F= F= + −  F.
S S1 ∪S2 S1 S2 S1 ∩S2
RR
Here we need to make sense of the integral because S1 ∩ S2 is not
S1 ∩S2
2
necessarily a simple surface. Look at U1,2 ⊆ R , defined by
U1,2 := φ−1
1 (S1 ∩ S2 ).

This is not necessarily open, but still the map


φ1 : U1,2 → S1 ∩ S2
is bijective, parametrizes S1 ∩ S2 and is consistent with the orientation
n, and the surface integral over S1 ∩ S2 can be defined as before as
ZZ ZZ
F := (F · n)||(φ1 )u × (φ1 )v ||dudv.
S1 ∩S2 U1,2
76 STEPHAN BAIER, RKMVERI

Next we consider the case n = 3. Here, following the above consid-


erations, we deduce that
 
ZZ ZZ ZZ ZZ ZZ
F= F = + − F
 

S S1 ∪S2 ∪S3 S1 S2 ∪S3 S1 ∩(S2 ∪S3 )


 
ZZ ZZ ZZ
= + − F
 

S1 S2 ∪S3 (S1 ∩S2 )∪(S1 ∩S3 )


 
ZZ ZZ ZZ ZZ ZZ ZZ ZZ
= + + − − − +  F,
S1 S2 S3 S1 ∩S2 S1 ∩S3 S2 ∩S3 S1 ∩S2 ∩S3

defining the integrals over the intersections S1 ∩ S2 , S1 ∩ S3 , S2 ∩ S3


and S1 ∩ S2 ∩ S3 similarly as above.
Iterating the above procedure, we obtain the formula
ZZ ZZ Xn X ZZ
k−1
F= F= (−1) F
S S1 ∪···∪Sn k=1 (i1 ,...,ik )∈Nk Si ∩···∩Si
16i1 <...<ik 6n 1 k

for general n, in the spirit of the inclusion-exclusion principle. Thus we


may formulate the following definition.

Definition 21. Let (S, n) be an oriented surface, covered by simple


oriented surfaces (S1 , n), ..., (Sn , n), i.e.,

S = S1 ∪ · · · ∪ Sn .

Let F be a continuous vector field on S. Then we define the surface


integral of F over S by
ZZ n
X X ZZ
k−1
(8.3) F := (−1) F.
S k=1 (i1 ,...,ik ) S ∩···∩Sik
16i1 <...<ik 6n i1

One issue still remains. Every (non-empty) surface has an infinitude


of different coverings by simple surfaces. For
ZZ
F
S

to be well-defined, it remains to be seen that the value on the right-


hand side of (8.3) is the same for every such covering. We set this as
Exercise 20 to the reader.
NOTES ON MULTIVARIATE CALCULUS 77

8.3. The surface area. In subsection 5.3, we calculated the length of


a curve Γ, parametrized by P : [a, b] → Rn , to be
Zb
l(Γ) = ||P 0 (t)||dt.
a

Before we proved this, we gave a clean definition of l(Γ) (see Definition


7). We could introduce the area of a surface in a similarly clean way but
want, somewhat sloppy, restrict ourselves to describing how to calculate
it. This will be similar to our description of surface integrals of vector
fields above. In fact, we will see that we can write the surface area as
a special surface integral.
Assume first that S is a simple surface with parametrization φ : U →
2
R . As we did when we introduced surface integrals, we divide U into
small rectangles with side lengths ∆u and ∆v. We recall that these
rectangles are mapped via φ to small quadrangles which are nearly
parallelepipeds whose areas are ||φu × φv ||∆u∆v. The surface area of S
is approximated by the (Riemann) sum of these areas. Now we apply
the usual limiting process to get this surface area exactly as an integral.
Making the rectangles infinitesimal, this integral is
ZZ
Area(S) = ||φu × φv ||dudv.
U

Now we remember how we defined surface integrals over simple surfaces


S. If F is a vector field, we set
ZZ ZZ
F= (F · n)||φu × φv ||dudv.
S U

Hence, to write the surface area as a surface integral, we need to find


a vector field F such that F · n ≡ 1. This is very easy, namely, we just
take F := n. This works because n is a unit vector. Now we obtain
the elegant formula ZZ
Area(S) = n,
S
which will also work for general (not necessarily simple) oriented sur-
faces (S, n).

Example 21: We calculate the surface area of the semi sphere. To this
end, we return to Example 18 and take the parametrization therein,
which is
φ : (0, 1) × (−π, π) → R3 ,
defined as

(8.4) φ(r, θ) = (r cos θ, r sin θ, 1 − r2 ).
78 STEPHAN BAIER, RKMVERI

As we have seen in Example 18, the image of U = (0, 1)×(−π, π) under


the map φ is the semi sphere S minus the quarter circle

Γ := {(−r, 0, 1 − r2 ) : 0 6 r < 1}.
The area will not change if we cut out this quarter circle, so we get,
using the calculations from Example 18,
Z1 Zπ  2
r cos θ r2 sin θ

Area(S) = Area(S \ Γ) = √ ,√ ,r dθdr
1 − r2 1 − r2
0 −π
Z1 Zπ
s
r4 cos2 θ r4 sin2 θ
= + + r2 dθdr
1 − r2 1 − r2
0 −π
Z1 Zπ
r
= √ dθdr
1 − r2
0 −π

=2π[− 1 − r2 ]10 = 2π.

Exercise 21: Take your favorite parametrizations of a cone and a


cylinder and calculate the surface areas.
8.4. Stokes’ theorem. Stokes theorem can be viewed as a extension
of the Fundamental Theorem of Calculus to surfaces. We shall see that
a certain line integral over the boundary of an oriented surface equals
another integral over whole of this surface. Rather than giving a full
proof, we want to interpret this theorem by means of physics. Before
stating the theorem, we need to make sense of the term “boundary”.
Let (S, n) be an oriented surface. By the boundary of the surface S
we mean the set
δS := S \ S,
where S is the closure of S. We note that, in the topological sense, this
is not the boundary of S as a subset of R3 because this boundary is the
set S \ S ◦ , where S ◦ is the interior of S, which is generally empty when
viewed as a subset of R3 . However, if S is simple with parametrization
φ : U → R3 , where U ⊂ R2 is open, then δS = φ(δU ), where δU is the
topological boundary of U as a subset of R2 .
We are interested in the situation when δS forms a closed space
curve Γ. This is not necessarily the case, of course. The boundary δS
may be empty (example: take a full sphere), or it may be a straight
line (without initial and terminal points), or it may also be of very
irregular shape (like a fractal). So assume δS = Γ is indeed a closed
curve in R3 , i.e., there is some initial point A ∈ Γ which agrees with
the terminal point B ∈ Γ and an initial vector v such that (Γ, A, B, v)
is a directed curve in the sense of Definition 6. Recall that v defines
the direction in which Γ is traversed. We want to assume that Γ is
NOTES ON MULTIVARIATE CALCULUS 79

traversed in counterclockwise direction with respect to the orientation


n, i.e., the vectors n point upward when we traverse the curve Γ is this
direction.
Having set up this terminology, we are ready to formulate Stokes’
theorem.
Theorem 7 (Stokes). Let (S, n) be an oriented surface with closed
boundary curve δS. Suppose that F is a smooth vector field on S, the
closure of S in R3 . Then
Z ZZ
(8.5) F= curl(F).
δS S

Here we recall from Definition 8 that F is said to be smooth if this


vector field possesses partial derivatives of all orders. The curl was
defined in equation (7.9) and interpreted as a measure of rotation in
the same subsection. We remind the reader that conservative vector
fields have zero curl (see Corollary 1).
To explain what Stokes’ theorem means in physical terms, look at
a flowing liquid in a vessel. Imagine, for example, a coffee cup. This
flowing liquid defines a velocity field F. Now the integral on the right-
hand side of (8.5) measures the average of the local rotations, taken
over the whole surface S, and the left-hand side measures the tendency
of the liquid to move along the boundary δS of the surface. It is
illuminating to look at a discrete model of this situation using a square
grid (see the following figure). To keep things simple, we imagine S as
a plane surface, but the argument extends to general surfaces in space.
In this settings, the local rotations can be modeled as flows along the
boundaries of the squares in this grid. Now if an edge of such a square
lies inside the surface, then it is the intersection of two squares inside
S. The resulting two flows along this edge are in opposite directions
and of nearly the same magnitudes if the squares are small because
the curl changes only marginally if we move from one such square to a
neighboring square (note that the curl is a continuous function since F
is smooth). Hence, these two flows nearly cancel out. What remains is
the motion along the boundary, where we have no such cancellations.
NOTES ON MULTIVARIATE CALCULUS 81

As said already, we will not give a full proof of Stokes theorem but
indicate how it can be proved using Green’s theorem, which is, in fact,
a special case of Stoke’s theorem. Assume S is contained in the x-y-
plane, i.e. z = 0 whenever (x, y, z) ∈ S and F is a smooth vector field
on S, consisting of vectors lying in the x-y-plane as well. Then the
curl, defined in (7.9), collapses into
 
∂Q ∂P
curl(F ) = − k
∂x ∂y
if
F(x, y, z) = P (x, y)i + Q(x, y)j = (P (x, y), Q(x, y), 0).
The surface S can be parametrized by (essentially) the identity map:
Since S is necessarily an open subset of R2 (Exercise 22: Check
this!), we may simply take
U := {(x, y) ∈ R2 : (x, y, 0) ∈ S}
and the parametrization as
φ(x, y) := (x, y, 0),
which makes (S, k) a simple oriented surface. Now by Definition 20 of
surface integrals over simple oriented surfaces, the right-hand side of
(8.5) equals
ZZ ZZ  
∂Q ∂P
curl(F) = − dxdy.
∂x ∂y
S U
Assume S has a boundary curve Γ = δS with parametrization π :
[a, b] → R3 (I need to take a letter different from P here because I used
P already above) given by
π(t) = (x(t), y(t), 0).
Then the left-hand side of (8.5) equals
Z Zb
F= F(x(t), y(t), 0) · (x0 (t), y 0 (t), z 0 (t))dt
δS a
Zb
= (P (x(t), y(t))x0 (t) + Q(x(t), y(t))y 0 (t)) dt
a
by Definition 9 of line integrals. We formally write
x0 (t)dt = dx, y 0 (t)dt = dy, P (x(t), y(t)) = P, Q(x(t), y(t)) = Q
and the above integral therefore as
Zb Z
0 0
(P (x(t), y(t))x (t) + Q(x(t), y(t))y (t)) dt = P dx + Qdy.
a Γ
82 STEPHAN BAIER, RKMVERI

Now we are ready to state Green’s theorem as a special case of Stokes’


theorem, where we may relax the condition of F being smooth to having
continuous partial derivatives.

Theorem 8 (Green). Let U ⊂ R2 be an open set with closed boundary


curve Γ = δU . Let P, Q : U → R be two functions whose partial
derivatives with respect to x and y are continuous. Then
Z ZZ  
∂Q ∂P
P dx + Qdy = − dxdy,
∂x ∂y
Γ U

provided Γ is traversed in anticlockwise direction.

Although this arises as special case of Stokes’ theorem, we may,


conversely, first prove Green’s theorem independently and then derive
Stokes’ theorem. The interested reader is advised to look up a proof
of Green’s theorem in [1, pages 95-95]. Indeed, it is then not hard to
deduce Stokes’ theorem if S is parametrized as a graph of a function
in the form

φ : U → R3 , φ(x, y) = (x, y, f (x, y)) (U ⊂ R2 open)

by reducing the problem to Green’s theorem. The basic idea is to turn


the left-hand side of (8.5) into a line integral over the boundary δU of
U (which is the projection of δS on the x-y-plane) and the right-hand
side of (8.5) into a double integral over U (which is the projection
of S on the x-y-plane). If the surface cannot be parametrized as a
graph of a function, then we cover it by smaller surfaces which can be
parametrized in this way and sum up their contributions. Details can
be found in the following online notes, for example.

https://ocw.mit.edu/courses/mathematics/18-02sc-multivariable-calculus-
fall-2010/4.-triple-integrals-and-surface-integrals-in-3-space/part-c-line-
integrals-and-stokes-theorem/session-92-proof-of-stokes-theorem/
MIT18 02SC MNotes v13.3.pdf

Let us calculate an example.

Example 22: Take the surface S given by the unit semi-sphere,


parametrized as in 2 17, and the vector field

F(x, y, z) = (−y, x, 0)

from Example 11. There we calculated the curl to be

curl(F ) = 2k
NOTES ON MULTIVARIATE CALCULUS 83

at any point in R3 . The right-hand side of (8.5) equals, by the definition


of surface integrals,
ZZ ZZ ZZ
curl(F) = (curl(F) · φx × φy )dxdy = 2 (k · φx × φy )dxdy,
S U U
where U is the open unit sphere. In Example 17, we calculated that
!
x y
φx × φy = p ,p ,1 .
1 − x2 − y 2 1 − x2 − y 2
It follows that
!
x y
k · φx × φy = (0, 0, 1) · p ,p ,1 = 1.
1 − x2 − y 2 1 − x2 − y 2
Hence, ZZ ZZ
(k · φx × φy )dxdy = 1dxdy = π.
U U
Thus we get ZZ
curl(F) = 2π.
S
To calculate the left-hand side of (8.5), we note that δS is the unit
circle in the x-y-plane, which may be parametrized by
P : [0, 2π] → R3 , P (t) = (cos t, sin t, 0).
Hence,
Z Z2π Z2π Z2π
F = F(P (t))·P 0 (t)dt = (− sin t, cos t, 0)·(− sin t, cos t, 0)dt = 1dt = 2π.
δS 0 0 0
We thus have verified Stokes’ theorem for this example.
NOTES ON MULTIVARIATE CALCULUS 85

9. Volume integrals and Gauss’ theorem


Integrals of real-valued functions over measurable subsets of Rn were
defined and calculated in measure theory which we assume the reader
to be familiar with. Now we present a three-dimensional analog of
the fundamental theorem of calculus, Gauss’ theorem, also called the
divergence theorem. In Stokes’ theorem, we integrated a vector field
along a closed curve which bounds a surface in R3 and found that
this integral equals the integral of the curl over this surface. Here we
integrate a vector field over a surface which bounds an open subset of
R3 . We will find that this integral equals the volume integral of the
divergence over this open subset. Recall that the surface integral of a
vector field measures the flux through this surface, and the divergence
of a vector field at a point measures the flux from this point, i.e.,
the tendency of the vector field to diverge (spread) from this point.
Hence, the volume integral of the divergence averages the sources in a
space region (where sinks are regarded as negative sources), and the
result is the net flux out of the region. Let us illustrate the situation
again by means of liquids and gases. Consider, as in the last section,
a liquid moving in a vessel. Fix some region in this vessel (an open
subset of R3 ). Since liquids are incompressible, there are no sources or
sinks inside the region, and therefore the divergence at each point is
zero. Gauss’ theorem then implies that the flux through the boundary
surface is also zero. Indeed, the amount of liquid flowing out of the
region equals the amount of liquid coming in. Now take a gas instead
of a liquid. In contrast to liquids, gases are compressible. So assume
we start with a gas in a compressed state which is then released. It will
expand, and hence there will be a positive flux through the boundary
surface of our region. Inside the region, it will diverge (spread) from
every given point. Now Gauss’ theorem says that the average of all
micro-expansions from points in the region equals the total expansion
outside the region.
Before we can state Gauss’ theorem in mathematical form, we need
to endow our surface with a suitable orientation. We shall assume that
V is an open bounded subset of R3 and δV is its topological boundary.
Note that this boundary is not necessarily a surface in R3 in the strict
sense of our definition as it may be shaped very irregularly (like a
fractal, for example). Therefore, we need to add the assumption that
δV forms a surface S in R3 . In this setting, our surface will bound
a volume V , and hence, at each point there is a unit normal vector
pointing outward V and a unit normal vector pointing inward V . We
will assume that S is oriented in such a way that the unit normal n
always points outward V .
Being clear about which orientation to take, we are ready to formu-
late Gauss’ theorem. Recall the definition of the divergence in (7.10).
86 STEPHAN BAIER, RKMVERI

Theorem 9 (Gauss’ theorem). Let V be an open bounded subset of


R3 and assume that its topological boundary δV is a surface S in R3 .
Endow S with the unique orientation n which points outward V . Let
F be a smooth vector field on V , the closure of V . Then
ZZ ZZZ
(9.1) F= div(F).
S V

To get a better intuition for Gauss’ theorem, we may again consider a


discrete model, as in the previous section, where we used a square grid
to explain Stokes’ theorem. Here we use a three-dimensional analog of
this model and imagine V to be composed of small cubic bricks. We will
see below that the situation is similar to that in the previous section.
If a brick is sufficiently small, then the divergence on this brick will
be nearly constant and measure the expansion (micro-flux) outward
the brick. If the expansion is positive, then the brick is a source, if
it is negative, then it is a sink. Since the divergence is continuous,
the divergence on a brick will be nearly the same as the divergence on
every neighboring brick. Two neighboring bricks share one common
face. Now consider the two fluxes through such a common face, one
from each of these bricks. Their magnitudes are nearly the same, but
they point in opposite directions and thus cancel each other. All faces
inside V are shared by two neighboring bricks. The only faces which
are not shared by two neighboring bricks are those at the boundary of
V . Here we do not have cancellation. Hence, if we sum up the micro-
fluxes through the faces of our bricks, they will all cancel out except
for those through the faces at the boundary of V . Hence, what remains
if we add them up is the total flux through the boundary of V .
We shall give a proof of Gauss’ theorem for a special case, namely
that of a cube. Its boundary is not a surface in our strict sense because
it has cusps, but still, the statement of Gauss’ theorem holds in this
setting if we understand the integral over the boundary surface to be
the sum of the integrals over the six faces of our cube. To keep things
simple, we take the cube of side length ∆ and corners (a, b, c) where
a, b and c equal 0 or ∆. Let’s first calculate the integral of our vector
field F over the face A with corners (0, 0, 0), (∆, 0, 0), (0, ∆, 0) and
(∆, ∆, 0) lying in the x-y-plane. The unit normal to this face is the
vector (0, 0, −1), pointing outward the cube. We need a parametriza-
tion of our face which is consistent with the orientation. Here we may
take U ⊂ R2 to be
U := (0, ∆) × (0, ∆)
and define our parametrization φ : U → R3 as
φ(x, y) = (y, x, 0).
Then φx = (0, 1, 0) and φy = (1, 0, 0) and hence
φx × φy = (0, 0, −1) = n.
NOTES ON MULTIVARIATE CALCULUS 87

So this parametrization is consistent with the orientation. Let Fx , Fy


and Fz be the three components of our vector field, i.e.

F = (Fx , Fy , Fz ).

Then by the definition of surface integrals, we have

ZZ ZZ Z∆ Z∆
F= (F · n)||φx × φy ||dydx = (Fx , Fy , Fz ) · (0, 0, −1)dydx
A U 0 0
Z∆ Z∆
=− Fz (y, x, 0)dydx.
0 0

We may replace x by y and y by x and hence get

ZZ Z∆ Z∆
F=− Fz (x, y, 0)dxdy.
A 0 0

The integrals over the 5 other faces can be calculated similarly and are

Z∆ Z∆ Z∆ Z∆ Z∆ Z∆
Fz (x, y, ∆)dxdy, − Fy (x, 0, z)dxdz, Fy (x, ∆, z)dxdz,
0 0 0 0 0 0

Z∆ Z∆ Z∆ Z∆
− Fx (0, y, z)dydz, Fx (∆, y, z)dydz.
0 0 0 0

Summing these contributions, we obtain

ZZ Z∆ Z∆
F= (Fz (x, y, ∆) − Fz (x, y, 0)) dxdy+
S 0 0
Z∆ Z∆
(9.2) (Fy (x, ∆, z) − Fy (x, 0, z)) dxdz+
0 0
Z∆ Z∆
(Fx (∆, y, z) − Fx (0, y, z)) dydz.
0 0
88 STEPHAN BAIER, RKMVERI

Using the Fundamental Theorem of Calculus, we may write the differ-


ences in the integrands as
Z∆
∂Fz
Fz (x, y, ∆) − Fz (x, y, 0) = (x, y, z)dz
∂z
0
Z∆
∂Fy
Fy (x, ∆, z) − Fy (x, 0, z) = (x, y, z)dz
∂y
0
Z∆
∂Fx
Fx (∆, y, z) − Fx (0, y, z) = (x, y, z)dz.
∂x
0

Hence, we may write the sum of surface integrals on the right-hand


side of (9.2) as a single volume integral in the form
Z∆ Z∆ Z∆   ZZZ
∂Fx ∂Fy ∂Fz
+ + dxdydz = div(F).
∂x ∂y ∂z
0 0 0 V

This completes the proof of Gauss’ theorem for this special case.
Now we indicate how to establish the general version of Gauss’ theo-
rem using this result. First, we approximate a general open bounded
subset V of R3 by the almost disjoint union W of small cubes, as in
our model above. Then we apply Gauss’ theorem for all of these small
cubes and sum up the surface integrals on the left-hand sides and the
volume integrals on the right-hand sides. The two surface integrals
over faces shared by neighboring cubes always cancel out because the
respective unit normals n point in opposite directions. So what remains
when summing the surface integrals is the sum over the faces at the
boundary of W . On the other hand, summing up the volume integrals
of the divergence over the cubes gives the volume integral over W . Now
we apply the usual limiting process and make the cubes infinitesimally
small, obtaining the claimed equation 9.1. There are other ways to
prove Gauss’ theorem but this one is most straight-forward.

Example 23: We consider another important example from physics.


Look at the Coulomb field, which we already investigated earlier. We
realized that this field is conservative, i.e. the curl is zero and therefore
there are no rotations. Hence, by Stokes’ theorem, there will be no
electric flux along closed space curves. In Example 13, we saw that
the divergence is also zero outside the origin. Hence, Gauss’ theorem
implies that there is no electric flux through the surface of a closed
region which does not contain the origin. What happens if we consider
a region which does contain the origin? The volume integral on the
right-hand side of (9.1) is then not defined and hence Gauss’ theorem
NOTES ON MULTIVARIATE CALCULUS 89

is not applicable since the vector field has a singularity at the origin.
Still, we are able to make sense of it, as we will see below. Consider
the case of the unit sphere
S := {(x, y, z) : x2 + y 2 + z 2 = 1}.
The outward orientation n is then given by the normal
n(x, y, z) = (x, y, z)
at any point (x, y, z) ∈ S. To calculate the surface integral, we may
divide S into the upper semi sphere
Su := {(x, y, z) ∈ S : z > 0}
and the lower semi sphere
Sv := {(x, y, z) ∈ S : z < 0}
and add their contributions. There is a piece left, namely the unit circle
in the x-y-plane,
C = {(x, y, z) ∈ S : z = 0}.
This will, however, not contribute to the integral since C is a zero set in
R3 , and we can therefore ignore it. We parametrize Su as in Example
17 by
φ : {(x, y) ∈ R2 : x2 + y 2 < 1} → R3
defined as  p 
φ(x, y) = x, y, 1 − x2 − y 2 .
In the same Example 17, we found that
!
x y
φx × φy = p ,p ,1 .
1 − x2 − y 2 1 − x2 − y 2
We calculate that
1
||φx × φy || = p .
1 − x2 − y 2
We recall from Example 8 that the Coulomb field has components
1 q0 q
F1 (x, y, z) = · · x,
4πε0 (x2 + y 2 + z 2 )3/2
1 q0 q
F2 (x, y, z) = · · y,
4πε0 (x2 + y 2 + z 2 )3/2
1 q0 q
F3 (x, y, z) = · · z.
4πε0 (x2 + y 2 + z 2 )3/2
Hence, at points (x, y, z) ∈ Su , we have
q0 q q0 q q0 q
F1 (x, y, z) = · x, F2 (x, y, z) = · y, F3 (x, y, z) = · z,
4πε0 4πε0 4πε0
90 STEPHAN BAIER, RKMVERI

and therefore the surface integral in question becomes


ZZ ZZ ZZ
q0 q 1
F= (F · n)||φx × φy ||dxdy = ·p dxdy.
4πε0 1 − x2 − y 2
Su U U

Changing into polar coordinates, we find that


ZZ Z1
1 2πr
p dxdy = √ dr = 2π
1 − x2 − y 2 1 − r2
U 0

and hence ZZ
q0 q
F= .
2ε0
Su

A similar calculation for the lower semi sphere gives the same result
ZZ
q0 q
F= .
2ε0
Su

Adding up, we get a positive surface integral


ZZ
q0 q
F= .
ε0
S

This can be interpreted as follows: The field has a source of infinite


divergence at the origin. In a loose sense, we may think of the “volume
integral” over the unit ball as having 0 in the integrand at points outside
the origin and infinity at the origin. Although the divergence vanishes
outside the origin, this “volume integral” has a positive value because
of the infinitude of the divergence at the origin. It is possible to make
precise sense of this volume integral. For this, one needs the concept
of the Dirac delta-function, though, which lies outside the scope of this
course.

Example 24: We conclude this section by considering the simple vec-


tor field
F(x, y, z) = (x, y, z)
from Example 14 on the unit ball V . The divergence is constant 3,
as we figured out in Example 14. Hence, the volume integral on the
right-hand side of (9.1) turns out to be
ZZZ
div(F) = 3Volume(V ) = 4π.
V

For the calculation of the surface integral on the right-hand side, we


divide the unit sphere again into its upper part Su and lower part Sv , as
in Example 23. Now the calculations are parallel to those in Example
NOTES ON MULTIVARIATE CALCULUS 91

23, with the only difference that the factor q0 q/(4πε0 ) is replaced by 1.
We thus get ZZ ZZ
F = 2π = F.
Su Su
Adding up gives ZZ
F = 4π.
S
We have thus verified Gauss’ theorem for this example.
94 STEPHAN BAIER, RKMVERI

References
[1] S. Dineen, Multivariate calculus and geometry. 3rd ed., Springer Undergraduate
Mathematics Series. London: Springer (2014).

You might also like