You are on page 1of 44

# MSE 201: Mathematics 1

Vector calculus
Prof. Peter Haynes
1 Motivation
This course combines two topics that were covered in year 1, namely vectors (dealing with quantities that
possess magnitude and direction) and calculus (differentiation and integration). So vector calculus includes
the differentiation and integration of vectors e.g. the velocity of a body is the time derivative of its position
vector: v = r.
However it is a much richer and more powerful topic than that. In year 1 an introduction was also given to
functions of more than one variable, such as functions of three coordinates in space e.g. f (x, y, z) or f (r).
Such functions of position are known as elds and they can themselves be scalar or vector in nature. Some
examples are listed in Table 1.
Scalar elds Vector elds
Carrier concentration at a p-n junction Velocity elds in uid dynamics
Electrostatic potentials Electric elds
Temperature distribution in this room Magnetic elds
Table 1: Examples of scalar and vector elds.
The topic of vector calculus concerns itself with differentiating and integrating scalar and vector elds with
respect to position (or another vector argument). The mathematical framework that will be developed
provides a universal way of describing physical laws very elegantly. In particular it is essential for the study
of uid dynamics and electromagnetism.
2 Vector algebra
This course assumes knowledge and understanding of the following:
rules for vector addition, subtraction and multiplication by a scalar
magnitude of a vector and unit vectors
basis vectors and Cartesian coordinates
scalar (dot) and vector (cross) products and their geometric interpretation
Unfamiliarity with any of the above should be addressed as a matter of priority by reading the notes from
the year 1 Vectors course. However a few topics are reviewed below in order to clarify the notation used
in this course.
Department of Materials, Imperial College London
2 Vector calculus
2.1 Cartesian coordinates
Vectors may be specied by their components with respect to an underlying set of basis vectors, which also
dene a coordinate system. The most convenient basis sets consist of orthonormal vectors i.e. vectors that
are both orthogonal (they intersect at right angles) and normalised (they are unit vectors).
In three dimensions, the Cartesian system is dened by three orthonormal vectors i, j and k which dene
the x-, y- and z-axes respectively. (Note that the hat that is sometimes used to denote unit vectors, e.g.
n, is omitted here since the properties of the Cartesian basis are well known). A general vector a may then
be denoted
a =
_
_
_
a
x
a
y
a
z
_
_
_ = a
x
i + a
y
j + a
z
k
z
y
x
a
x
i
a
y
j
a
z
k
a
Figure 1: Cartesian coordinates and components of a vector.
2.2 Scalar product
The scalar or dot product of two vectors a and b is dened as:
a b = a b cos
where a and b denote the magnitudes of the vectors a and b respectively and is the angle between them.
a
b

## Figure 2: Denition of the scalar product.

Department of Materials, Imperial College London
MSE 201: Mathematics 3
In particular:
a and b are orthogonal a b = 0
a a = a
2
, the squared length of a
a b = b a
and hence
i j = j k = k i = 0
i i = j j = k k = 1
From these results it is straightforward to prove that in terms of Cartesian components:
a b = a
x
b
x
+ a
y
b
y
+ a
z
b
z
which may also be written using matrix notation as:
a b = a
T
b =
(a
x
a
y
a
z
)
_
_
_
b
x
b
y
b
z
_
_
_ = a
x
b
x
+ a
y
b
y
+ a
z
b
z
2.3 Vector product
The vector or cross product of two vectors a and b is dened as:
a b = a b sin n
where a and b denote the magnitudes of the vectors a and b respectively, is the angle between them and
n is a unit vector orthogonal to both a and b, whose direction is determined in a right-hand sense.
a
b

n
Figure 3: Denition of the vector product.
Department of Materials, Imperial College London
4 Vector calculus
In particular:
a and b are parallel or antiparallel a b = 0
a a = 0
a b = b a
i j = k , j k = i and k i = j
i i = j j = k k = 0
From these results it is straightforward to prove that in terms of Cartesian components:
a b = (a
y
b
z
a
z
b
y
) i + (a
z
b
x
a
x
b
z
) j + (a
x
b
y
a
y
b
x
) k =
_
_
_
a
y
b
z
a
z
b
y
a
z
b
x
a
x
b
z
a
x
b
y
a
y
b
x
_
_
_
which may also be written as a determinant :
a b =

i j k
a
x
a
y
a
z
b
x
b
y
b
z

## 2.4 Vector area

Consider the parallelogram shown in Fig. 4, bounded by the vectors a and b. The area of such a parallel-
ogram is a scalar equal to the magnitude of the vector product of a and b, |a b|. The orientation of the
plane may be specied by a unit normal vector i.e. the direction of the vector product of a and b. These two
properties of the area may be combined into a single vector whose magnitude gives the scalar area and
whose direction gives the orientation. Such a vector area S is given conveniently by
S = a b
a
b
S
Figure 4: Denition of vector area.
Note that the sense of the direction is ambiguous since a plane has two faces i.e. in Fig. 4 S could point up
or down this uncertainty is usually claried by the context in which the vector area is used or otherwise
has to be specied explicitly. A formal resolution is given in Sec. 11.5.
Department of Materials, Imperial College London
MSE 201: Mathematics 5
The concept of vector area is not restricted to plane parallelograms. For example, the unit circle in the
xy-plane has vector area k. In this case the magnitude and direction of the vector area are calculated
separately. The direction is given by a normalised cross product of any two vectors in the plane of the area
e.g. i j = k.
Vector area permits easy calculation of the projection of the area of a surface onto another plane. This is
simply achieved using the scalar product i.e. the area of the projection of the vector area S onto a plane
with unit normal n is S n.
Example
On holiday in the tropics I set up my parasol (circular and of 1 m radius) in the morning so it points
straight at the sun, at that time 45

above the horizon. By noon when the sun is straight overhead, how
Set up a Cartesian coordinate system such that the ground lies in the xy-plane and the sun moves in the
zx-plane. The parasol has vector area S = (i + k)/

2 m
2
(it will be shown later that this is correct even
if the parasol is curved). The unit normal to the ground is simply n = k so the area of the shadow at noon
is S n = /

2 i.e. about 70% of the maximum shadow it could cast at that time.
Since it is a vector quantity, vector area is additive, and this allows the vector area of a surface that is not
conned to a single plane to be calculated. Consider the three unit squares in the xy-, yz- and zx-planes,
with vector areas k, i and j respectively (all pointing into the octant x > 0, y > 0, z > 0 as shown on the
left of Fig. 5). The total vector area of the surface is i + j + k which has magnitude

## 3 and direction along

the line x = y = z.
x
y
z
i
j
k
x y
z
Figure 5: Left: three unit squares and associated vector areas; right: the projection of the sum of these vector areas
onto the plane x + y + z = 0.
Note that the magnitude of the vector area does not equal the scalar sum of the individual areas (which
is 3). The interpretation of the magnitude of such a vector area is that it equals the (scalar) area of the
projection of the surfaces onto a plane perpendicular to its direction, as shown on the right of Fig. 5. In this
case the projection is a regular hexagon with sides

2/3 and area

3.
Conversely, the vector area of a general (i.e. non-planar) surface may be found by considering its projection
onto planes perpendicular to i, j and k (ensuring that the senses of the vector areas making up the surface
are taken into account some parts may contribute positively, others negatively).
Department of Materials, Imperial College London
6 Vector calculus
Examples
Show that the total vector area of the faces of a cube (with vector areas all chosen to point out of
the cube) is zero. Does this result apply to all closed surfaces?
Find the vector area of a hemisphere of radius r whose base is the xy-plane.
3 Coordinate systems
The most convenient and hence commonly used coordinate systems are those that are orthogonal i.e. all
the coordinate axes intersect at right angles. The Cartesian coordinate system is the simplest because
the unit vectors i, j and k that dene it are constant in space i.e. at every position they point in the same
direction. However, symmetry sometimes dictates that other coordinate systems are more convenient, in
which the unit vectors that point along the coordinate axes vary in direction throughout space. There are
more than ten orthogonal coordinate systems in three dimensions that are used for physical problems:
here attention is restricted to the most commonly-used for cylindrical and spherical symmetries. By way of
orientation, the familiar example of plane polar coordinates in two dimensions is considered rst.
3.1 Plane polar coordinates
A point in the xy-plane with Cartesian coordinates (x, y) may also be dened by plane-polar coordinates
and dened by:
=

x
2
+ y
2
tan = y/x
_ _
x = cos
y = sin
where is the distance of the point from the origin and is the angle the vector x i + y j makes with the
x-axis (conventionally chosen to lie in the interval 0 < 2).
x
y

i
j
e

(x, y)
Figure 6: Plane-polar coordinates in two dimensions.
The plane-polar coordinate system may also be dened in terms of unit vectors e

and e

## that point in the

directions of increasing and respectively. In terms of i and j these vectors are dened by:
e

= cos i + sin j
e

= sini + cos j
_ _
i = cos e

sin e

j = sin e

+ cos e

## Department of Materials, Imperial College London

MSE 201: Mathematics 7
i.e. { e

, e

} are obtained by rotating {i, j} anticlockwise by an angle . Conversely, {i, j} are obtained by
rotating { e

, e

} clockwise by . Transformations of this form were covered in the year 1 Matrices course.
It is often helpful to visualize coordinate systems in terms of the locus of points generated by holding one
coordinate constant and varying all the others. In two dimensions, these loci form lines, whereas in three
dimensions they form surfaces. The loci for plane polar coordinates are shown in Fig. 7: = constant
(where the constant is greater than zero) traces out a circle centred on the origin, = constant traces
out a straight line from the origin. Note that the origin itself is a singularity in this coordinate system: it
corresponds to = 0 and is undened there.
x
y
= constant
= /4
Figure 7: Examples of lines of constant (dashed) and lines of constant (dotted).
A couple of features are worth remarking on: these lines always intersect at right angles. Also at any given
point, e

## is perpendicular to the line of

constant . These are general features of orthogonal coordinate systems.
Example
The point P has Cartesian coordinates x = 4 and y = 3.
Find the plane polar coordiates of P.
Express e

and e

at P in terms of i and j.
The vector u has Cartesian components u
x
= u
y
= 5. Find its components in terms of the basis
{ e

, e

## } at P. [Hint: use the scalar product.]

In Cartesian coordinates, both x and y have the same dimensions e.g. length. Thus if a small change is
made in these coordinates e.g. x x + dx and y y + dy then the position vector
1
s = x i + y j changes
by ds = dx i + dy j and
ds
2
= ds ds = dx
2
+ dy
2
.
However the physical dimensions of and are not the same: is a length whereas is an angle and
hence dimensionless. Consider the position of a point P given by plane polar coordinates ( =
0
, =
0
),
as shown in Fig. 8. If is increased from its initial value
0
whilst is held constant, then the point moves
radially outwards along the straight line =
0
. If changes from
0
to
0
+ then the point moves by a
distance . However, if is increased from its initial value
0
whilst is held constant, then the point moves
1
In these notes s is used to denote a position vector and S to denote vector area.
Department of Materials, Imperial College London
8 Vector calculus
along the arc of the circle =
0
. If changes from
0
to
0
+ then the point moves an arc distance

0
. In the limit that 0 the arc becomes indistinguishable from a straight line. Thus innitesimal
changes in the coordinates and of s result in a change ds = d e

+ d e

## . This denes scale factors

h

= 1 and h

= for and respectively: these scale factors are the quantities by which the coordinate
changes should be multiplied to convert them into distances. This is quite intuitive: the larger , the greater
the distance caused by a small change in since the lines of constant diverge with radius. Note that the
directions in which P moves in response to changes in and are orthogonal, hence the distance moved
by a general change + d and + d is
ds
2
= d
2
+
2
d
2
.
x
y
=
0
=
0
+
=
0
=
0
+
P
Figure 8: The effect of small changes in plane polar coordinates (, ) on position.
Small changes in two-dimensional coordinates also map out an area of the y-plane. For Cartesians, varying
x and y in the intervals x
0
x x
0
+ dx and y
0
y y
0
+ dy sweeps out a rectangle of area dA = dx dy.
As shown in Fig. 8, varying and in the intervals
0

0
+ and
0

0
+ maps out a
shape outlined in bold. However, in the limit of innitesimal changes, this shape tends to a rectangle with
sides d and
0
d. In general then dA = d d: note the role again played by the scale factor for .
3.2 Cylindrical polar coordinates
The cylindrical polar coordinate system is essentially a three-dimensional extension of plane polar coor-
dinates, with the addition of the z-coordinate from Cartesians. For a point P, z gives its height above
the xy-plane, and its projection onto the xy-plane is described by plane polar coordinates and . For
completeness the relationship between Cartesians and cylindrical polars is:
=

x
2
+ y
2
tan = y/x
z = z
_

_
_

_
x = cos
y = sin
z = z
The unit vectors are related by:
e

= cos i + sin j
e

= sini + cos j
e
z
= k
_

_
_

_
i = cos e

sin e

j = sin e

+ cos e

k = e
z
Department of Materials, Imperial College London
MSE 201: Mathematics 9
x
y
z
P
z

s
Figure 9: Cylindrical polar coordinates.
and the scale factors are h

= 1, h

= and h
z
= 1.
It is clear from its description that cylindrical polars form an orthogonal coordinate system: the position
vector of P, denoted s in Fig. 9, is s = e

+ z e
z
with magnitude s =

2
+ z
2
. Innitesimal changes in
coordinates results in ds = d e

+ d e

+ dz e
z
and thus
ds
2
= d
2
+
2
d
2
+ dz
2
In three dimensions, the locus of points mapped out when one coordinate is held constant forms a surface.
In this case, the surfaces of constant are cylinders (hence the name) centred on the z-axis. Surfaces of
constant are half-planes that contain the z-axis and make an angle with the zx-plane, and surfaces of
constant z are planes parallel to the xy-plane.
Consider an innitesimal change in and made while z is held constant. As in plane polar coordinates,
this sweeps out an area dA
z
= d d. However in three dimensions this may now be represented by
the vector area dS
z
= d d e
z
. Similarly if is held constant while and z vary, a vector area dS

=
ddz e

is obtained. Likewise dS

= d dz e

.
Example
Consider a cylindrical surface with its axis parallel to the z-axis.
Write down the equation for a surface of radius a in cylindrical polar coordinates and hence nd an
equation for d satised by the innitesimal change of coordinates that remain on this surface.
Write down an expression for dS

## for this surface and mark it on a sketch.

The ends of the cylinder lie in the planes z = h/2. Write down expressions for the vector areas
dS
z
of the ends of the cylinder.
What is the total vector area of the surface of the cylinder?
Finally consider an innitesimal change in all three coordinates. This maps out an innitesimal volume, or
volume element. For innitesimal changes the shape of this volume tends to a cuboid, with sides of length
d, d and dz (the scale factors come into play again). Thus
dV = d ddz.
Department of Materials, Imperial College London
10 Vector calculus
3.3 Spherical polar coordinates
Figure 10 is identical to Fig. 9 except that the polar angle has been marked. Spherical polar coordinates
consist of r = |s|, and . is the same azimuthal angle as in cylindrical polar coordinates. A very
important distinction between the two angles is that whereas ranges from 0 to 2, is restricted to the
range 0 to .
x
y
z
P
z

s
r

## Figure 10: Spherical polar coordinates.

From the diagram it is clear that z = r cos and = r sin. From these results the relationship between
spherical polars and Cartesians may be derived:
r =

x
2
+ y
2
+ z
2
cos = z/

x
2
+ y
2
+ z
2
tan = y/x
_

_
_

_
x = r sin cos
y = r sin sin
z = r cos
and the unit vectors are given by:
e
r
= sin cos i + sin sinj + cos k
e

## = cos cos i + cos sinj sin k

e

= sini + cos j
_

_
_

_
i = sin cos e
r
+ cos cos e

sin e

j = sin sin e
r
+ cos sin e

+ cos e

k = cos e
r
sin e

Surfaces of constant r are obviously spherical (hence the name) and as before, surfaces of constant
are half-planes containing the z-axis and make an angle with the zx-plane. Surfaces of constant
are cones swept out when a line along s is rotated around the z-axis. The curves obtained when the
surfaces of constant and intersect a sphere resemble a map of the world: constant corresponds
to constant latitude (although latitude is measured from the equator whereas = 0 at the North Pole;
constant corresponds to constant longitude (although the customary range of longitude corresponds to
< .)
From the previous examples it has been seen that the scale factors are the key quantities. r has dimensions
of length, and a small change r moves P a distance r , so h
r
= 1. A small change sweeps out a small
arc of length r and so h

## = r . From cylindrical polar coordinates it is already known that h

= = r sin.
Knowledge of the scale factors enables the expressions for the line, surface and volume elements to be
written down:
ds = h
r
dr e
r
+ h

d e

+ h

d e

= dr e
r
+ r d e

+ r sin d e

## Department of Materials, Imperial College London

MSE 201: Mathematics 11
ds
2
= h
2
r
dr
2
+ h
2

d
2
+ h
2

d
2
= dr
2
+ r
2
d
2
+ r
2
sin
2
d
2
dS
r
= h

d d e
r
= r
2
sin d d e
r
dS

= h

h
r
ddr e

= r sin ddr e

dS

= h
r
h

dr d e

= r dr d e

dV = h
r
h

dr d d = r
2
sin dr d d
These expressions can be generalized to all orthogonal coordinate systems once the scale factors are
known.
A word of warning: in these notes cylindrical polar coordinates have been denoted {, , z} and spherical
polar coordinates {r , , }. However it is also fairly common to refer to the cylindrical polar coordinates as
{r , , z} i.e. to use r instead of and instead of . This is obviously a potential source of great confusion!
Examples
The point P has Cartesian coordinates (3, 4, 12). Specify its position in terms of:
(i) cylindrical polar coordinates;
(ii) spherical polar coordinates.
Two vectors are dened by u = u
r
e
r
+ u

+ u

and v = v
r
e
r
+ v

+ v

in terms of unit
vectors associated with spherical polar coordinates at the same point in space.
Show that in this case the scalar product u v = u
r
v
r
+ u

+ u

.
Would this result still hold if u and v were dened in terms of unit vectors associated with
spherical polar coordinates at different points in space?
What happens to the three unit vectors:
(i) as changes while = /2?
(ii) as changes while = /4?
(iii) as r changes?
4 Partial differentiation
The notion of a partial derivative was introduced last year for functions of more than one variable. This
course is primarily concerned with elds: functions of spatial position, and hence functions of three vari-
ables which might be Cartesian coordinates e.g. f (x, y, z) or another coordinate system e.g. spherical polar
coordinates g(r , , ).
Recall the notation of curly s used to denote that a derivative is being taken with respect to one variable
while the others are held constant. For f (x, y, z)
_
f
y
_
z,x
= lim
y0
f (x, y + y, z) f (x, y, z)
y
means differentiate f with respect to y holding z and x constant. Sometimes the subscript showing which
variables are held constant is omitted if it is obvious from the context (e.g. for cylindrical polar coordinates
it would be understood that a partial derivative with respect to z was taken holding and constant.)
Department of Materials, Imperial College London
12 Vector calculus
Second and higher derivatives may also be dened and recall that if a function is differentiable then the
second crossed derivatives are equal i.e.
_

2
f
x y
_
=
_

2
f
y x
_
Examples
A scalar eld V is dened in terms of spherical polar coordinates {r , , } as V(r , , ) =
r
2
sin
2
cos 2. Calculate:

_
V
r
_
=

_
V

_
=

_
V

_
=

2
V

2
_
=

_

2
V
r
_
=

_

2
V
r
_
=

_

2
V
r
_
=

_

2
V
r
_
=
Express V from the previous example in terms of Cartesian coordinates i.e. as a function V(x, y, z).
Verify that the crossed second partial derivatives with respect to x and y are equal.
4.1 Total differentials
The partial derivatives so far give the rate of change of a function when only one of its arguments changes.
However in general, several or all of the arguments may change simultaneously. The total differential gives
the innitesimal change in a function in response to innitesimal changes in all of its arguments e.g. for a
function f (x, y, z) the total differential is
df =
_
f
x
_
y,z
dx +
_
f
y
_
z,x
dy +
_
f
z
_
x,y
dz
This denition extends in an obvious way to different numbers of arguments.
Examples
Find the total differentials of the following functions:
f (x, y) = exp(x + y)
(x, y, z) = x
2
+ 3yz
V(, , z) = cos exp(z)
Department of Materials, Imperial College London
MSE 201: Mathematics 13
4.2 Exact differentials
The previous section shows how to obtain the total differential of a known function. However sometimes it
is desirable to reverse this process i.e. to nd the function that differentiates to a known differential.
Consider the differential
x
2
dy + 2xy dx.
Integrating the rst term with respect to y gives x
2
y + c
1
(x) note that the arbitrary constant of normal
integration becomes a function of one variable since it comes from a partial derivative. Integrating the
second termwith respect to x gives x
2
y+c
2
(y). So f (x, y) = x
2
y+c is the required function (c
1
(x) = c
2
(y) = c
is required for consistency). This differential is therefore said to be exact since it can be directly integrated
in this way. Those that cannot are inexact differentials.
Now consider the general case involving two variables. The general form for the total differential of a
function f (x, y) is
df = u(x, y) dx + v(x, y) dy
where
u(x, y) =
_
f
x
_
y
and v(x, y) =
_
f
y
_
x
The equality of second cross derivatives of f (x, y):
_

2
f
x y
_
=
_

2
f
y x
_
requires
_
u
y
_
x
=
_
v
x
_
y
and this is the necessary and sufcient condition for the differential to be exact.
For functions of more than two variables, all of the second cross derivatives must be equal, resulting in
more conditions e.g. for u(x, y, z) dx + v(x, y, z) dy + w(x, y, z) dz to be exact,
_
u
y
_
z,x
=
_
v
x
_
y,z
and
_
v
z
_
x,y
=
_
w
y
_
z,x
and
_
w
x
_
y,z
=
_
u
z
_
x,y
In general, for n variables there will be
1
2
n(n 1) conditions.
The importance of the distinction between exact and inexact differentials will become clear later in the
course.
Examples
Establish whether or not the following differentials are exact or inexact. For each one that is exact, nd
the function from which it originates.
x dy + y dx
x dy + 2y dx
dx/x + dy/y
2xz dx 2yz dy + (x
2
y
2
) dz
Department of Materials, Imperial College London
14 Vector calculus
4.3 Chain rule
The chain rule for partial differentiation was covered in year 1. It is worth revisiting here because of its role
in enabling the changes of variable that occur when moving from one coordinate system to another.
A convenient way of remembering the chain rule is to start from the total differential e.g. for f (x, y, z)
expressed in terms of Cartesian coordinates:
df =
_
f
x
_
y,z
dx +
_
f
y
_
z,x
dy +
_
f
z
_
x,y
dz
Consider transforming to spherical polar coordinates. The required rst partial derivatives are
_
f
r
_
,
,
_
f

_
,r
and
_
f

_
r ,
.
For instance, to obtain the expression for (f /r )
,
, take the expression for the total differential and divide
by r at constant and , i.e.
_
f
r
_
,
=
_
f
x
_
y,z
_
x
r
_
,
+
_
f
y
_
z,x
_
y
r
_
,
+
_
f
z
_
x,y
_
z
r
_
,
Note the form of the expression: for three variables there are three terms, each the product of two partial
derivatives. In each term, the rst partial derivative is taken from the total differential. The second partial
derivative is with respect to the same variable (here r ) holding the same variables constant (here and )
as the left-hand side.
Examples
Write down the chain rule for the remaining partial derivatives of f : (f /)
,r
and (f /)
r ,
. Eval-
uate them for the function f (x, y, z) = x + y + z.
For f (x, y, z) = xyz calculate the rst partial derivatives with respect to the cylindrical polar
coordinates , and z and express the results in terms of these variables only.
_
f

_
,z
=
_
f

_
z,
=
_
f
z
_
,
=
5 Multidimensional integration
Having discussed how to differentiate functions of more than one variable, the logical next step is to con-
sider how to integrate a function with respect to more than one variable. This is a technique that was
introduced briey in year 1.
Department of Materials, Imperial College London
MSE 201: Mathematics 15
5.1 Double integrals
Consider a double integral involving two variables x and y. The limits of integration can usually be repre-
sented by the boundary of some region R as shown in Fig. 11 and the integral I is denoted
I =

R
f (x, y) dA
where dA denotes an innitesimal element of area. In Cartesian coordinates, the area element is dA =
dx dy and hence the integral may also be written
I =

R
f (x, y) dx dy
x
y
R
dA = dx dy
y
max
y
min
x
min
(y) x
max
(y) x
y
R
y
max
(x)
y
min
(x)
x
min
x
max
Figure 11: Two-dimensional integration.
As indicated in Fig. 11 there are two ways to proceed. In each we consider the integral as the limit of a sum
involving elements of area. The left-hand diagram represents the case where the region R is split rst into
strips of width dy in the x-direction. The contribution from each strip is obtained by integrating with respect
to x, and then the contributions of the strips are summed by integrating with respect to y:
I =

y
max
y=y
min
_

x
max
(y)
x=x
min
(y)
f (x, y) dx
_
dy
y
min
and y
max
dene the extent of R in the y-direction whereas x
min
(y) and x
max
(y) give the limits of the strip
at position y.
Equivalently, the order of integration may be reversed, as illustrated in the right-hand diagram:
I =

x=x
max
x=x
min
_

y=y
max
(x)
y=y
min
(x)
f (x, y) dy
_
dx
This is best explained by way of an example. Consider the double integral
I =

R
xy
2
dx dy
where R is the triangle bounded by the x-axis, y-axis and the line x + y = 1. The aim is to show that the
order of integration does not matter.
Department of Materials, Imperial College London
16 Vector calculus
x
y
0 1
1
x + y = 1
x
y
0 1
1
1. Perform x integration rst (left-hand diagram):
I =

1
y=0
_

x=1y
x=0
xy
2
dx
_
dy =

1
y=0
_
1
2
x
2
y
2
_
x=1y
x=0
dy =
1
2

1
y=0
(1 y)
2
y
2
dy
=
1
2

1
y=0
_
y
2
2y
3
+ y
4
_
dy =
1
2
_
1
3
y
3

1
2
y
4
+
1
5
y
5
_
1
y=0
=
1
60
2. Perform y integration rst (right-hand diagram):
I =

1
x=0
_

y=1x
y=0
xy
2
dy
_
dx =

1
x=0
_
1
3
xy
3
_
y=1x
y=0
dx
=
1
3

1
x=0
_
x 3x
2
+ 3x
3
x
4
_
dx =
1
3
_
1
2
x
2
x
3
+
3
4
x
4

1
5
x
5
_
1
x=0
=
1
60
The result is therefore independent of the order of integration.
Example
Integrate the function f (x, y) = xy over the rectangular region dened by the points (0, 0),(a, 0),(0, b) and
(a, b).
5.2 Triple integrals
The triple integral involves a function integrated over a three-dimensional region R i.e.
I =

R
f (x, y, z) dV =

R
f (x, y, z) dx dy dz
As with the double integral, the order of integration does not matter and the limits are determined by the
boundary of R.
Again consider an example. Calculate the volume bounded by the four planes x = 0, y = 0, z = 0 and
x/a + y/b + z/c = 1.
Department of Materials, Imperial College London
MSE 201: Mathematics 17
x
a
y b
z
c
Perform the integration rst along columns parallel to z, then combine these columns into vertical slabs by
integrating along y and then nally integrate along x. So the limits on x are simply 0 x a. The line
x/a + y/b = 1 denes the upper limit on the y-integration, and the column height is dened by x/a + y/b +
z/c = 1.
V =

a
x=0
_

b(1x/a)
y=0
_

c(1x/ay/b)
z=0
dz
_
dy
_
dx
= c

a
x=0
_

b(1x/a)
y=0
_
1
x
a

y
b
_
dy
_
dx
= c

a
x=0
_
y
xy
a

y
2
2b
_
b(1x/a)
y=0
dx
= bc

a
x=0
_
_
1
x
a
_

x
a
_
1
x
a
_

1
2
_
1
x
a
_
2
_
dx
= bc

a
x=0
_
1
2

x
a
+
x
2
2a
2
_
dx
= bc
_
x
2

x
2
2a
+
x
3
6a
2
_
a
x=0
=
abc
6
5.3 Changing variables
The concept of a substitution or change of variables to make one-dimensional integrals more tractable was
covered in year 1 e.g. consider substituting x = sin to calculate

1
x=0

1 x
2
dx =

/2
=0

1 sin
2

dx
d
d =

/2
=0
cos
2
d
=
1
2

/2
=0
[1 + cos(2)] d =
1
2
_
+
1
2
sin(2)
_
/2
=0
=

4
In this case, dx has been replaced by (dx/d) d. For similar reasons it is desirable to be able to make
substitutions or changes of variable in multidimensional integrals e.g. to change coordinate system.
Department of Materials, Imperial College London
18 Vector calculus
First consider a two-dimensional integral in terms of Cartesian coordinates

R
f (x, y) dx dy
that is to be transformed to plane polar coordinates and . Dene the Jacobian of x and y with respect
to and as
J =
(x, y)
(, )
=
_
x

_
y

_
x

_
y

J =
(x, y)
(, )
=

(x/)

(y/)

(x/)

(y/)

## The change of variables then involves the replacement

dx dy = |J|d d =

(x, y)
(, )

d d
For the transformation from Cartesian to plane polar coordinates:
J =
(x, y)
(, )
=

cos sin
sin cos

=
_
cos
2
+ sin
2

_
=
Thus this change of variables involves the replacement:
dx dy = d d
which of course simply replaces the expression for an area element dA in Cartesians with that for plane
polar coordinates. The Jacobian is simply a formal device for manipulating the scale factors, and the same
result could be obtained from physical reasoning.
Hence

R
f (x, y) dx dy =

R

g(, )

(x, y)
(, )

d d
where R

is a region of integration with respect to and that corresponds to R and g(, ) = f ( cos , sin)
is the function that results when f (x, y) is re-written in terms of and .
Examples
Consider the integral
I =

R
y

x
2
+ y
2
dx dy
where R is the top right quadrant of the unit circle.
Calculate I directly using Cartesian coordinates.
I =

1
x=0

1x
2
y=0
y

x
2
+ y
2
dx dy =

1
x=0
_
1
3
_
x
2
+ y
2
_
3/2
_

1x
2
y=0
dx
=
1
3

1
x=0
_
1 x
3
_
dx =
1
3
_
x
1
4
x
4
_
1
x=0
=
1
4
Department of Materials, Imperial College London
MSE 201: Mathematics 19
Change variables to plane polar coordinates and repeat the calculation.
Since =

x
2
+ y
2
and y = sin the function being integrated transforms to
2
sin.
The Jacobian for this transformation is and so
I =

1
=0

/2
=0

3
sind d
which is separable and much more straightforward to evaluate:
I =
_
1
4

4
_
1
=0
[cos ]
/2
=0
=
1
4
Calculate the following integral where R is the unit circle:
I =

R
1

x
2
+ y
2
dx dy
Evaluate I where R is the unit semicircle in the upper-half plane (y > 0):
I =

R
exp
_

x
2
+ y
2
_
dx dy
5.4 Properties of Jacobians
The denition of the Jacobian as a determinant generalises to more than two dimensions. For example in
three dimensions, the Jacobian for transforming from x, y and z to a new set of variables u, v and w is
(x, y, z)
(u, v, w)
=

(x/u)
v,w
(y/u)
v,w
(z/u)
v,w
(x/v)
w,u
(y/v)
w,u
(z/v)
w,u
(x/w)
u,v
(y/w)
u,v
(z/w)
u,v

and
dV = dx dy dz =

(x, y, z)
(u, v, w)

du dv dw
A property of Jacobians (stated in three dimensions for illustration but completely general) is
(x, y, z)
(u, v, w)
=
(x, y, z)
(p, q, r )
(p, q, r )
(u, v, w)
Setting u x, v y and w z then yields the useful result
1 =
(x, y, z)
(p, q, r )
(p, q, r )
(x, y, z)
or
(p, q, r )
(x, y, z)
= 1
_
(x, y, z)
(p, q, r )
Examples
Evaluate the Jacobian for transforming from Cartesian coordinates x, y and z to cylindrical polar
coordinates , and z. Hence conrm the expression for the volume element dV in section 3.2.
Evaluate the Jacobian for transforming from plane polar to Cartesian coordinates. Show that
(x, y)
(, )
(, )
(x, y)
= 1
Department of Materials, Imperial College London
20 Vector calculus
6 Derivatives of vectors
Consider a vector v that is a function of a scalar variable t e.g. this might be the velocity as a function of
time. This function maps the scalar t onto a vector v(t ). The vector may be expressed in terms of a set of
scalar functions e.g. in terms of Cartesian components v = v
x
(t ) i + v
y
(t ) j + v
z
(t ) k.
The derivative of v(t ) (which is also a vector) may be dened as a limit in the same way as the derivative of
a scalar function:
dv
dt
= lim
t 0
v(t + t ) v(t )
t
For this limit to exist (and therefore for the function to be differentiable) the individual components must also
be differentiable.
Since the Cartesian unit vectors i, j and k are constant,
dv
dt
=
dv
x
dt
i +
dv
y
dt
j +
dv
z
dt
k.
Example
A particle moving in a helix has position vector r(t ) = cos(t ) i + sin(t ) j + ut k where and u are
constants. Calculate the velocity v(t ) and acceleration a(t ) of the particle and show that at all times
a r =
2

2
.
The situation is not so straightforward when using non-Cartesian coordinates, as not only the components
but also the basis vectors change with position. Consider cylindrical polar coordinates
e

= cos i + sin j
e

= sini + cos j
e
z
= k
These expressions can be differentiated:
d e

dt
= sin
d
dt
i + cos
d
dt
j =
d
dt
e

d e

dt
= cos
d
dt
i sin
d
dt
j =
d
dt
e

d e
z
dt
= 0
6.1 Product rule
The product rule for differentiation is familiar when two scalar functions are involved. However it generalises
readily to the products involving vector functions. If f (t ) is a scalar function of a single variable t , and a(t )
and b(t ) are both vector functions of t , then
d
dt
(f a) = f
da
dt
+
df
dt
a
d
dt
(a b) = a
db
dt
+
da
dt
b
d
dt
(a b) = a
db
dt
+
da
dt
b
Department of Materials, Imperial College London
MSE 201: Mathematics 21
Note that it is important to maintain the order of the vectors in the cross product since a b = ba. These
results are straightforward (if a little tedious) to prove by expanding in terms of Cartesian components.
Examples
Reconsider the previous example, but now in cylindrical polars where r(t ) = e

+ ut k and the
azimuthal angle = t . Calculate the velocity v(t ) and acceleration a(t ) of the particle and show
that a r =
2

2
still holds why is this not a surprise?
Angular momentum is dened as L = r mv for a particle of mass m with velocity v at position r.
Find an expression for the rate of change of angular momentum (with respect to time)

L.
6.2 Partial derivatives
As the rules for standard derivatives of scalar functions readily generalise to vector functions, so do the
rules for partial derivatives e.g. for a vector eld. In terms of Cartesian components of the vector function
a(x, y, z) a(r) i.e. a
x
(x, y, z), a
y
(x, y, z) and a
z
(x, y, z):
_
a
x
_
y,z
=
_
a
x
x
_
y,z
i +
_
a
y
x
_
y,z
j +
_
a
z
x
_
y,z
k
and so on.
The total derivative can therefore be written
da =
_
a
x
_
y,z
dx +
_
a
y
_
z,x
dy +
_
a
z
_
x,y
dz
which, if expanded in terms of Cartesian components of a, involves nine different partial derivatives since
in general each component depends on all three coordinates.
Finally the chain rule for partial differentiation also applies e.g.
_
a
r
_
,
=
_
a
x
_
y,z
_
x
r
_
,
+
_
a
y
_
z,x
_
y
r
_
,
+
_
a
z
_
x,y
_
z
r
_
,
Example
The vector eld F = exp(x) exp(y) cos z k.
Calculate the partial derivatives of F with respect to the Cartesian coordinates x, y and z.
Hence write down an expression for the total derivative dF.
Department of Materials, Imperial College London
22 Vector calculus
Consider a scalar eld f (r) expressed in terms of the Cartesian coordinates of r i.e. f (x, y, z). The total
differential is
df =
_
f
x
_
y,z
dx +
_
f
y
_
z,x
dy +
_
f
z
_
x,y
dz
This can be written as the scalar product between the total differential of the position vector r:
dr = dx i + dy j + dz k
and the vector eld g(r) dened by
g =
_
f
x
_
y,z
i +
_
f
y
_
z,x
j +
_
f
z
_
x,y
k
g is called the gradient of f . It contains all of the information about the rate of change of f with respect to
position in any direction (i.e. for an arbitrary dr.)
df = g dr
Examples
Calculate the gradients of the following scalar elds:
f (x, y, z) = 1/

x
2
+ y
2
+ z
2
(x, y, z) = (x
2
y
2
)z
7.1 Notation
The gradient of a function f may be denoted
but a more compact notation involves introducing the vector differential operator known as del or nabla. It
is denoted by an upside-down capital Greek letter delta and in Cartesian coordinates is
= i

x
+ j

y
+ k

z
Using this notation
Since possesses the properties of both a vector and a differential operator, it does not obey all the rules
of vector algebra. For example a = a .
Department of Materials, Imperial College London
MSE 201: Mathematics 23
7.2 Geometric interpretation
The gradient was introduced as a scalar product
df = f dr = |f | dr cos
where is the angle between f and dr. Moving a xed distance dr = |dr| therefore produces the largest
change df if = 0 i.e. dr is parallel to f . Hence f points in the direction of steepest ascent i.e. the
direction in which f increases most rapidly.
The equation f = constant denes a surface in three dimensions. If dr lies along this surface (i.e. is tan-
gential to it) then f cannot change and df = 0. From above this implies that = /2 i.e. f is perpendicular
to the surfaces of constant f .
Figure 12: Field lines (solid) and contours (dashed) intersect at right angles.
A scalar eld may be represented by contours, lines along which the eld is constant, shown by the dashed
lines in Fig. 12. A vector eld may be represented by eld lines, shown by the solid lines in Fig. 12: the
direction of the vector eld is tangential to the eld line at that point, and the magnitude of the eld is
represented by the spacing between the eld lines: the more closely spaced the eld lines, the stronger the
eld. For a vector eld that is the gradient of a scalar eld, the eld lines of the vector eld always intersect
the contours of the scalar eld at right angles, due to the results above.
7.3 Other coordinate systems
Consider a non-Cartesian coordinate system e.g. cylindrical polar coordinates for illustration. Write the
total differential of a function V(, , z):
dV =
_
V

_
,z
d +
_
V

_
z,
d +
_
V
z
_
,
dz
In this coordinate system, the total differential of the position vector r involves the scale factors:
dr = h

d e

+ h

d e

+ h
z
dz e
z
where of course h

= h
z
= 1 and h

= .
Department of Materials, Imperial College London
24 Vector calculus
The equation df = f dr involves vectors and is therefore independent of coordinate system, from which
it is clear that
=
e

+
e

+
e
z
h
z

z
= e

+
e

+ e
z

z
and similarly in spherical polar coordinates
=
e
r
h
r

r
+
e

+
e

= e
r

r
+
e

+
e

r sin

Note that whatever coordinate system is used, the gradient vector of a given scalar eld is the same at all
points in space.
Examples
Calculate the gradients of the scalar elds:
V(, , z) = ln (cylindrical polar coordinates)
f (r , , ) = cos /r (spherical polar coordinates)
8 Divergence
The divergence of a vector eld F(r), div F, is itself a scalar eld. In terms of Cartesian coordinates F =
F
x
i + F
y
j + F
z
k, where each of the three components F
x
, F
y
and F
z
is itself a function of three variables x,
y and z:
div F =
_
F
x
x
_
y,z
+
_
F
y
y
_
z,x
+
_
F
z
z
_
x,y
This expression is a scalar product between the del operator and the vector eld F and is therefore
denoted
div F F
Examples
Calculate the divergence of the following vector elds:
F = ax i + by j + cz k where a, b and c are constants.
E =
x i
y
2
+ z
2
g = exp(xyz)
_
i
yz
+
j
zx
+
k
xy
_
Department of Materials, Imperial College London
MSE 201: Mathematics 25
8.1 Geometric interpretation
Field lines begin at a source and end at a sink. In electrostatics with point charges, electric eld lines can
only begin at positive charges (sources) and end at negative charges (sinks), as illustrated in Fig. 13. For
a continuous charge distribution the situation is more complicated, but in general a positive charge density
will act as a source of eld lines and a negative charge density will act as a sink. The strength of the source
or sink is determined by the magnitude of the charge density.
+
Figure 13: Electric eld lines begin on positive charges (sources) and end on negative charges (sinks).
The geometric interpretation of the divergence is that it measures the rate at which electric eld lines are
begin created or destroyed at a point in other words, it is proportional to the density of sources or sinks
at a point in space.
In free space there are no sources or sinks, and hence the divergence of a eld vanishes. A vector eld
with zero divergence is said to be solenoidal.
8.2 Other coordinate systems
In other coordinate systems the expressions for the divergence are more complicated, since it is necessary
to take the change in the basis vectors as well as the change in components into account, and so the scale
factors come into play again. Here the results are simply stated.
In cylindrical polar coordinates, the divergence of a vector eld F = F

+ F

+ F
z
e
z
takes the form
F =
1

_
F

_
+
1

+
F
z
z
In spherical polar coordinates where F = F
r
e
r
+ F

+ F

:
F =
1
r
2

r
_
r
2
F
r
_
+
1
r sin

(sin F

) +
1
r sin
F

## Department of Materials, Imperial College London

26 Vector calculus
Examples
Calculate the divergence of the following vector elds:
r = r e
r
F = r
n
e
r
It is signicant that the divergence vanishes for the case n = 2 since this corresponds to the
inverse square law for electric and gravitational elds.
u =
e

2
E = exp(i d r) k
9 Curl
The divergence of a vector eld was dened in terms of the scalar product betwen the del operator and
the vector eld. Another alternative is clearly to take the vector product between del and the vector eld,
the result being itself a vector eld. This is called the curl (or sometimes the rotation) of a vector eld and
is denoted
curl F F
As a vector product it can be calculated from a determinant. In Cartesian coordinates
F =

i j k
/x /y /z
F
x
F
y
F
z

=
_
_
F
z
y
_
z,x

_
F
y
z
_
x,y
_
i +
_
_
F
x
z
_
x,y

_
F
z
x
_
y,z
_
j +
_
_
F
y
x
_
y,z

_
F
x
y
_
z,x
_
k
Examples
Calculate the curl of the following vector elds:
F = yz i + zx j + xy k
A =
1
2
B
0
(x j y i)
E = exp(i d r) k
9.1 Geometric interpretation
As implied by the fact that the curl is also known as the rotation, the geometric interpretation of the curl
has to do with the way in which eld lines rotate around a given point. As illustrated in Fig. 14 this can be
visualised in terms of the rate at which a paddle wheel would turn if placed in the eld. A eld which has
zero curl is said to be irrotational.
The magnitude of the curl at a point is proportional to the speed with which the paddle wheel rotates. The
direction of the curl points along the axis of rotation: in Fig. 14 this points out of the plane of the paper.
Department of Materials, Imperial College London
MSE 201: Mathematics 27
Figure 14: Geometric interpretation of the curl of a vector eld as the rate at which a paddle wheel would turn.
9.2 Other coordinate systems
As with the divergence, the expressions for the curl are more complicated in non-Cartesian coordinate
systems and involve the scale factors. In cylindrical polar coordinates
F =
1

e
z
/ / /z
F

F
z

## and in spherical polar coordinates

F =
1
r
2
sin

e
r
r e

r sin e

/r / /
F
r
rF

r sinF

The whole determinant is divided by the product of the scale factors, and in the top and bottom rows of
each column the scale factor for that coordinate appears.
Examples
Calculate the curl of the following vector elds:
F = r
n
e
r
g =
e

r
2
u =
e

2
B =
e

2
+ v e
z
Department of Materials, Imperial College London
28 Vector calculus
10 Combinations of grad, div and curl
The gradient, divergence and curl are the three building blocks of vector calculus, all based upon the
del vector differential operator . However they are often combined or modied to create other vector
operators, for example consider a where a is a vector eld. As mentioned earlier, although the scalar
product is usually commutative (a b = b a) this does not hold when vector operators are involved. In terms
of Cartesian coordinates
a = a
x

x
+ a
y

y
+ a
z

z
which is a scalar differential operator.
10.1 Laplacian
The most commonly encountered combination is the Laplacian, a second order scalar differential operator
that can in fact operate on either a scalar or vector eld. When operating on a scalar eld it is equivalent
to taking the gradient to obtain a vector eld whose divergence is then taken to obtain the result, a scalar
eld i.e.
2
f f
where the
2
notation has been introduced (as well as the capital delta symbol that is less common). In
Cartesians i /x + j /y + k /z so
(f ) =
_
i

x
+ j

y
+ k

z
_

_
i
f
x
+ j
f
y
+ k
f
z
_
=

2
f
x
2
+

2
f
y
2
+

2
f
z
2
and therefore

2
x
2
+

2
y
2
+

2
z
2
In other coordinate systems the scale factors are involved. In cylindrical polar coordinates

_
+
1

2
+

2
z
2
and in spherical polar coordinates

1
r
2

r
_
r
2

r
_
+
1
r
2
sin

_
sin

_
+
1
r
2
sin
2

2
The Laplacian occurs in many physical equations, including those listed in Table 2.
Examples
Calculate the Laplacian of the following scalar elds:
(x, y, z) = sin
_
x
a
_
cos
_
y
b
_
exp(kz)
V(r , , ) = r sin cos
f (, , z) =
2
cos(2) + z
2
Department of Materials, Imperial College London
MSE 201: Mathematics 29

2
= 0 Laplace equation

2
= (r) Poisson equation

2
+ k
2
= 0 Helmholtz equation
D
2
c =
c
t
Diffusion equation

2
=
1
c
2

t
2
Wave equation

h
2
2m

2
+ V(r) = E Schr odinger equation
Table 2: Physical equations involving the Laplacian operator.
10.2 Vector operator identities
A number of identities involving can be derived, including the following, where u and v are scalar elds,
and a and b are vector elds:
(uv) = u v + v u
(a b) = a (b) + b (a) + (a )b + (b )a
(ua) = u a + a u
(a b) = b (a) a (b)
(ua) = u a + u a
(a b) = a( b) b( a) + (b )a (a )b
These identities (and more) may be proved using Cartesian coordinates: as the identity involves physical
quantities (scalars, vectors and operators) without reference to a particular coordinate system they are valid
whichever coordinate system is employed.
As an example consider (F) where F = F
x
i + F
y
j + F
z
k is a vector eld.
F =
_
_
F
z
y
_
z,x

_
F
y
z
_
x,y
_
i +
_
_
F
x
z
_
x,y

_
F
z
x
_
y,z
_
j +
_
_
F
y
x
_
y,z

_
F
x
y
_
z,x
_
k
Consider the x-component of (F) i.e.
i [(F)] =

y
[k (F)]

z
[j (F)]
=

y
_
_
F
y
x
_
y,z

_
F
x
y
_
z,x
_

z
_
_
F
x
z
_
x,y

_
F
z
x
_
y,z
_
=

2
F
y
yx
+

2
F
z
zx

2
F
x
y
2

2
F
x
z
2
Department of Materials, Imperial College London
30 Vector calculus
2
F
x
/x
2
, and using the property of second crossed derivatives:
i [(F)] =

2
F
x
x
2
+

2
F
y
xy
+

2
F
z
xz

2
F
x
x
2

2
F
x
y
2

2
F
x
z
2
=

x
_
_
F
x
x
_
y,z
+
_
F
y
y
_
z,x
+
_
F
z
z
_
x,y
_

2
F
x
x
2
+

2
F
x
y
2
+

2
F
x
z
2
_
The term in square brackets is simply the divergence F while the term in curly brackets is the Laplacian
of the x-component
2
F
x
. Therefore
i [(F)] =

x
( F)
2
F
x
The y- and z-components yield similar results and hence
(F) =
_
i

x
( F) + j

y
( F) + k

z
( F)
_

2
F
x
i +
2
F
y
j +
2
F
z
k
_
The term in square brackets is just the gradient of F while the term in curly brackets while the term in
curly brackets denes the Laplacian of a vector eld. The identity is therefore
(F) = ( F)
2
F
In Cartesian coordinates the Laplacian of a vector eld is simply the vector obtained by taking the Laplacian
of each component i.e.

2
F =
_
_
_

2
F
x

2
F
y

2
F
z
_
_
_
However this is not true in a general coordinate system. In this case the Laplacian of a vector eld must
be calculated by manipulating the previous identity:

2
F = ( F) (F)
Examples
Using Cartesian coordinates, prove the following identities:
(uv) = uv + vu where u and v are scalar elds
(ua) = u a + a u where u is a scalar eld and a is a vector eld
(u) 0 where u is any scalar eld
(a) 0 where a is any vector eld
11 Line integrals
A line integral is a one-dimensional integral where the integrand is evaluated along a general path or curve,
as illustrated in Fig. 15. Here the path C joins the points A and B along a curve that can be split into vector
line elements ds as shown.
The integrand for a line integral may involve a scalar or vector eld, and the result itself may be a scalar or
a vector:
Department of Materials, Imperial College London
MSE 201: Mathematics 31
x
y
A
B
C
ds
Figure 15: A path for a line integral in two dimensions.

C
f (r) ds is a vector quantity derived from a scalar eld f

C
F(r) ds is a scalar quantity derived from a vector eld F

C
F(r) ds is a vector quantity derived from a vector eld F
The second of these is the most common. For example, consider the work done when a force moves an
object along a path C. The work done when a constant force F causes a displacement s is W = F s. If the
force is caused by a eld, then in general it will vary in space and will not be constant. Split the path up into
line elements ds along which the force may be considered constant: the work done for the line element is
dW = F ds and the total work for the whole path is therefore

C
F ds.
An example of the third kind is the Biot-Savart law for calculating magnetic elds there is a problem on
11.1 Properties
From vector summation it is clear that for a path that runs from point A to point B

C
ds =

AB
Reversing the sense of the contour involves making the change ds ds and hence

AB
along C
... ds =

BA
along C
... ds
If the points A and B coincide, then C is a closed path, which may be denoted by placing a circle on the
integral sign:
_
C
... ds
Department of Materials, Imperial College London
32 Vector calculus
11.2 Scalar line integrals
Consider rst line integrals of the form

C
F ds
where F is a vector eld that in three-dimensional Cartesian coordinates may be written F = F
x
i +F
y
j +F
z
k
whereas the line element is ds = dx i + dy j + dz k and hence

C
F ds =

C
_
F
x
dx + F
y
dy + F
z
dz
_
The path C denes a relationship between dx, dy and dz. For example, for a straight line dened by
x x
0
x
1
x
0
=
y y
0
y
1
y
0
=
z z
0
z
1
= z
0
that runs between the points r
0
= x
0
i + y
0
j + z
0
k and r
1
= x
1
i + y
1
j + z
1
k:
dy =
y
1
y
0
x
1
x
0
dx and dz =
z
1
z
0
x
1
x
0
dx
so

C
F ds =

x
1
x=x
0
_
F
x
+ F
y
_
y
1
y
0
x
1
x
0
_
+ F
z
_
z
1
z
0
x
1
x
0
__
dx
More generally, if the equation of the path C between r
0
and r
1
can be written as y = y(x) and z = z(x)
then

C
F ds =

x
1
x=x
0
_
F
x
+ F
y
dy
dx
+ F
z
dz
dx
_
dx
More generally still, the path C may be dened parametrically i.e. the points on the path C are dened by
the equations x = x(u), y = y(u) and z = z(u) in terms of a parameter u that varies between u
0
and u
1
.
Then

C
F ds =

u
1
u=u
0
_
F
x
dx
du
+ F
y
dy
du
+ F
z
dz
du
_
du
In all of the above, the components of the vector eld being integrated must be written in terms of the
integration variable alone.
Examples
Calculate the line integrals

C
F ds where F = x i + y j + z k and:
C runs along the x-axis from x = 0 to x = 1.
C is a straight line parallel to the x-axis and hence along C: dy = dz = 0. Also on C,
y = z = 0 and so F = x i in the integral:

C
F ds =

1
x=0
x dx =
_
1
2
x
2
_
1
x=0
=
1
2
Department of Materials, Imperial College London
MSE 201: Mathematics 33
C is a straight line from the origin to the point a i + b j + c k.
The equation of this straight line is x/a = y/b = z/c and hence along C, dy/dx = b/a
and dz/dx = c/a. Along C the eld F can be written in terms of x only as
F = x i +
b
a
x j +
c
a
x k
Putting this all together:

C
F ds =

a
x=0
_
x +
_
b
a
_
2
x +
_
c
a
_
2
x
_
dx =
_
1 +
_
b
a
_
2
+
_
c
a
_
2
_
_
1
2
x
2
_
a
0
=
1
2
_
a
2
+ b
2
+ c
2
_
C is a straight line between the points r
0
= a i + b j and r
1
= a i + b j + c k.
C is a single turn of a helix dened parametrically by x = a cos , y = a sin and z = u.
From the parametric equations, dx/d = a sin, dy/d = a cos and dz/d = u.
Hence

C
F ds =

2
0
[(a cos )(a sin) + (a sin)(a cos ) + (u)u ] d
= u
2

2
0
d = 2
2
u
2
In non-Cartesian coordinates the same ideas apply as above: the vector eld F is expanded in the appro-
priate basis vectors and the relevant expression for the line integral involving the scale factors is used. For
cylindrical polar coordinates:

C
F ds =

C
_
F

d + F

d + F
z
dz

## and in spherical polar coordinates:

C
F ds =

C
_
F
r
dr + F

r d + F

r sin d

Non-Cartesian coordinates are generally chosen when the symmetry of the path C may be exploited to
simplify the integration.
Examples
Consider the previous example with the helical path in cylindrical polar coordinates.
First note that F = r and hence F = e

+ z e
z
. A more long-winded derivation of the above
uses the expressions from section 3.2:
F = x i + y j + z k
= ( cos )(cos e

sin e

) + ( sin)(sin e

+ cos e

) + z e
z
= (cos
2
+ sin
2
) e

## + (sincos cos sin) e

+ z e
z
= e

+ z e
z
The expression for the line element in cylindrical polar coordinates is
ds = d e

+ d e

+ dz e
z
Department of Materials, Imperial College London
34 Vector calculus
and hence

C
F ds = [d + zdz]
Along the helical path C, is a constant a so d = 0. The integral can be performed by making the
parametric substitution for z, but in this case this is unnecessary:

C
F ds =

2u
z=0
z dz =
_
1
2
z
2
_
2u
z=0
= 2
2
u
2
Consider the line integral

C
B ds where B = I/(2) e

## and C is a circle of radius a in the xy-plane.

11.3 Conservative elds
The integrands in the scalar integrals considered previously take the form of differentials F
x
(x, y, z) dx +
F
y
(x, y, z) dy +F
z
(x, y, z) dz. If the differential is exact then it can be written as the total differential of some
scalar function f (x, y, z) i.e. df = F
x
(x, y, z) dx + F
y
(x, y, z) dy + F
z
(x, y, z) dz. In this case the line integral
becomes rather simple:

C
F ds =

C
_
F
x
dx + F
y
dy + F
z
dz

C
df = f (B) f (A)
where A and B are again the beginning and end points, respectively, of the path C. The value of the line
integral is simply the difference in the scalar eld f between the end points, and is independent of the
particular path C taken between A and B.
The conditions for an exact differential involving three variables are
F
x
y
=
F
y
x
,
F
y
z
=
F
z
y
and
F
z
x
=
F
x
z
Compare the expression for the curl of F:
F =
_
F
z
y

F
y
z
_
i +
_
F
x
z

F
z
x
_
j +
_
F
y
x

F
x
y
_
k
which must vanish if the above conditions are satised. Hence a scalar line integral will correspond to an
exact differential (and thus depend only upon its end points) if and only if the curl of the vector eld vanishes
at all points. Such a vector eld is said to be a conservative eld and corresponds to many (but not all)
physical elds: electrostatic and gravitational elds are conservative, but magnetic elds are not.
In the previous section it was stated that the curl of the gradient of any scalar eld vanishes i.e.
f . Indeed since the denition of the gradient of a scalar eld f was df = f ds then it is clear that a
conservative eld must be the gradient of some scalar eld in physics this scalar eld is known as the
potential and gives the potential energy of a unit test particle at a given point in the eld. In summary, if a
vector eld F is conservative then:
F 0 at all points in space;
there exists some scalar eld f such that F = f .
For a conservative eld F, it is also obvious that
_
C
F ds = 0
since any closed path C starts and ends at the same point.
Department of Materials, Imperial College London
MSE 201: Mathematics 35
11.4 Greens theorem in the plane
Consider the two-dimensional case of a simple closed path C in the xy-plane, taken in an anticlockwise
sense as shown in Fig. 16, and the scalar line integral
_
C
F ds
for a vector eld F = F
x
(x, y) i + F
y
(x, y) j.
x
y
x
y
C C
Figure 16: Closed line integral used for the proof of Greens theorem in the plane.
Note that the line integral may be split into two parts:
_
C
F ds = I
x
+ I
y
=
_
C
F
x
dx +
_
C
F
y
dy
Now consider the double integral

R
_
F
y
x

F
x
y
_
dx dy
where R is the region bounded by C. As in section 5 the order in which the x and y integrations are
performed is arbitrary. For the rst term, perform the x integration rst, as shown on the left of Fig. 16, and
consider the contribution from a single strip located at y:

x
max
(y)
x=x
min
(y)
F
y
x
dx =
_
F
y

x
max
(y)
x=x
min
(y)
= F
y
(x
max
(y), y) F
y
(x
min
(y), y)
Multiplying by the strip height dy gives a contribution towards I
y
: F
y
(x
max
(y), y) dy is the contribution from
the right-hand edge of the strip to I
y
. F
y
(x
min
(y), y) dy is the left-hand edge where the minus sign accounts
for the fact that C is in a downward sense on the left-hand side.
For the second term, perform the y integration rst, as shown on the right of Fig. 16, and consider the
contribution from a single strip located at x:

y
max
(x)
y=y
min
(x)
F
x
y
dy = [F
x
]
y
max
(x)
y=y
min
(x)
= F
x
(x, y
min
(x)) F
x
(x, y
max
(x))
Multiplying by the strip width dx gives a contribution towards I
x
: F
x
(x, y
min
(x)) dx is from the bottom edge
(where the sense of C is in the positive x-direction) and F
x
(x, y
max
(x)) dx is from the top edge (where C
is in the negative x-direction).
Thus Greens theorem in the plane is established:
_
C
_
F
x
dx + F
y
dy
_
=

R
_
F
y
x

F
x
y
_
dx dy
Department of Materials, Imperial College London
36 Vector calculus
where C is the anticlockwise path that bounds the region R: this sometimes denoted C = R.
Embedding the xy-plane in three-dimensional space as usual, it may be noted that the integrand on the
right-hand side is the z-component of the curl of F. dx dy is the area element dA that may be represented
by an element of vector area dS = dAk. Thus Greens theorem in the plane could be rewritten as
_
C
F ds =

R
(F) dS
where C and R are restricted to lie in the xy-plane. This is a special case of Stokes theorem.
Note that for a conservative eld (for which F
y
/x = F
x
/y and F
x
dx +F
y
dy is an exact differential) this
conrms that a line integral around a closed path vanishes.
Example
Conrm Greens theorem in the plane for the eld F = 3x dy + y dx integrated anticlockwise around the
unit square in the xy-plane.
This is not a conservative eld so the integrals must be evaluated explicitly.
The line integral (starting from the origin) consists of four parts:
_
C
F ds =

1
x=0
F
x
(x, 0) dx +

1
y=0
F
y
(1, y) dy +

0
x=1
F
x
(x, 1) dx +

0
y=1
F
y
(0, y) dy
= 0 +

1
y=0
3dy

1
x=0
dx 0 = 3 1 = 2
and only the right and top edges contribute.
The integrand for the area integral is F
y
/x F
x
/y = 3 1 = 2 which is a constant so the
integral is simply

R
2 dx dy = 2
from the area of the unit square.
Hence both sides of Greens theorem in the plane equal two.
11.5 Vector line integrals
Consider a line integral of the form

C
f (s) ds
where f is a scalar eld. In terms of Cartesian coordinates,

C
f (s) ds = i
_
C
f (x, y, z) dx
_
+ j
_
C
f (x, y, z) dy
_
+ k
_
C
f (x, y, z) dz
_
i.e. a sum involving three scalar line integrals along the same path C, which may be parameterised as
before.
Department of Materials, Imperial College London
MSE 201: Mathematics 37
Examples
Calculate the following line integrals

C
f ds where f (x, y, z) = x
2
+ y
2
and:
C is a straight line from the origin to the point 2 i + j 3 k.
This straight line may be parameterised by x = 2, y = and z = 3 where 0 1.
dx/d = 2, dy/d = 1 and dz/d = 3. Along C, f = (2)
2
+
2
= 5
2
. Hence

C
fds = i

1
=0
10
2
d + j

1
=0
5
2
d k

1
=0
15
2
d =
5
3
(2i + j 3k)
C is the unit circle in the xy-plane, taken anticlockwise.
At rst glance, plane-polar coordinates might seem to be suitable for this. Along C, f =
2
= 1. The
general line element is ds = d e

+ d e

## but since is constant (unity) along C, d = 0. Thus for

C, ds = d e

and hence
_
C
f (s) ds =

2
=0
e

d
However there is a problem: the direction of e

## changes along C it is not a constant in the

integrand. In fact, for every point on C, the point diametrically opposite has e

pointing in exactly
the opposite direction. Thus the integral is in fact zero.
This can be conrmed using Cartesian coordinates (with the azimthual angle as a param-
eter to dene C) or even more straightforwardly, since f = 1 on C so this is a constant during the
integration:
_
C
f ds = f
_
C
ds = 0
since the start and end points are the same for a closed path.
Extra care must be taken when using non-Cartesian coordinate systems in vector line inte-
grals.
Finally consider line integrals of the form

C
F(s) ds
which, in terms of Cartesian coordinates, may be written

C
F(s) ds = i

C
_
F
y
dz F
z
dy
_
+ j

C
(F
z
dx F
x
dz) + k

C
_
F
x
dy F
y
dx
_
again a sum involving scalar line integrals along the same path C.
Consider the following special case:
_
C
1
2
r dr
illustrated in Fig. 17.
From section 2.4 it is known that
1
2
r dr is the vector area of the triangle with vertices at the origin and the
points with position vectors r and r + dr. The line integral thus sums up these elements of vector area dS
to obtain the total vector area of a surface bounded by the path C:
S =
1
2
_
C
r dr
Department of Materials, Imperial College London
38 Vector calculus
C
r
dr
O
r + dr
Figure 17: Vector area as a vector line integral.
This conrms the previous result that the vector area of a surface depends only upon the rim bounding it,
and also uniquely denes the direction of the vector area (since the positive sense of the line integral is
when C is traversed anticlockwise).
12 Surface and volume integrals
12.1 Surface integrals
A surface integral is a double integral where the integrand is evaluated over a general surface whose
orientation as well as area is taken into account by the use of the vector area. As with line integrals, scalar
and vector elds may be involved:

S
f dS is a vector quantity derived from a scalar eld f

S
F dS is a scalar quantity derived from a vector eld F

S
F dS is a vector quantity derived from a vector eld F
The second these is of primary interest because of its physical interpretation as the ux of the eld F
through the surface S. For example, in uid dynamics, an incompressible uid with density and velocity
eld v(r) would give rise to a ux (mass per unit time) J =

S
v dS. Attention is restricted to this case in
the following.
The surfaces over which the integral is performed may either be open i.e. bounded by a closed path C
whose anticlockwise circuit denes the positive sense of the vector area associated with the surface, or
closed. In the latter case, the
_
notation is sometimes used. Of course it has already been determined that
the total vector area of a closed surface vanishes:
_
dS = 0
Department of Materials, Imperial College London
MSE 201: Mathematics 39
The calculation of surface integrals is best illustrated by example.
Department of Materials, Imperial College London
40 Vector calculus
Examples
Calculate the surface integral of the vector eld F = sin(x + y) i + cos(x + y) j + exp(x y) k over
the quadrant x 0, y 0 of the xy-plane.
In this case an element of vector area is dx dy k so only the z-component of F contributes
and the surface integral reduces to a separable double scalar integral:

S
F dS =

x=0

y=0
exp(x y) dy dx
= [exp(x)]

x=0
[exp(y)]

y=0
= 1
Calculate the surface integral of the vector eld F = yz i + zx j + xy k over the surface S consisting
of that part of the plane 2x + y z = 0 bounded by 0 x a and 0 y b.
In Cartesian coordinates, F dS = F
x
dy dz + F
y
dz dx + F
z
dx dy so this integral separates
into three double integrals:

S
F dS =

S
yz dy dz +

S
zx dz dx +

S
xy dx dy
Since the boundary of S is determined by constraints on x and y, use z = 2x + y on S to eliminate
z from the integrands. From this same equation, dz = 2dx + dy. In the rst double integral, a
substitution for z in terms of x can be made, with dz = 2dx (y is constant during the z integration
so dy = 0). Whereas in the second double integral, a substitution for z in terms of y can be made
i.e. dz = dy (since x is constant during the z integration so dx = 0). Hence

S
F dS =

a
x=0

b
y=0
[2y(2x + y) + (2x + y)x + xy] dx dy
=

a
x=0

b
y=0
_
2x
2
+ 6xy + 2y
2
_
dx dy
=
2
3
a
3
b +
3
2
a
2
b
2
+
2
3
ab
3
Calculate the surface integral of the vector eld E = x sin(y/b) sin(z/c) i over the part of the plane
x = a that satises 0 y b, 0 z c.
Calculate the surface integral of the vector eld g = (/) e

## over the closed surface of a cylinder of

The closed surface of a cylinder consists of three parts: the curved surface and the two pla-
nar ends. For the ends, the surface element is parallel (or antiparallel) to e
z
and therefore
perpendicular to g. These surfaces make no contribution to the surface integral.
The surface element of the curved surface = a is a ddz e

and so
_
S
g dS =

L
z=0

2
=0

a
a ddz = 2L
Calculate the surface integral of the vector eld F =
2
e
z
over that part of the plane z = h satisfying
R.
Department of Materials, Imperial College London
MSE 201: Mathematics 41
Evaluate the surface integral I =

S
v dS where v = y j and S is the upper surface of a hemisphere
The surface S is x
2
+ y
2
+ z
2
= a
2
with z 0 i.e. 0 /2. The element of surface
area for a spherical surface is dS = r
2
sin d d e
r
. From section 3.3:
j e
r
= sin sin and y = r sin sin
Hence
I =

S
v dS =

/2
=0

2
=0
a
3
sin
2
sin
2
sin d d
=
_

/2
=0
sin
3
d
_ _

2
=0
sin
2
d
_
=
_

/2
=0
_
sin cos
2
sin
_
d
_ _

2
=0
1
2
(1 cos 2) d
_
=
_
cos +
1
3
cos
3

_
/2
=0
_

2

1
4
sin2
_
2
=0
=
2
3
Calculate the surface integral
_
S
F dS where F = Q/(4r
2
) e
r
and S is the closed surface of a
12.2 Stokes theorem
Stokes theorem may be stated as follows:

S
(F) dS =
_
C
F ds
where S is the open surface bounded by the path C. Greens theorem in the plane is a special case when
the path C and surface S are conned to a plane, however the theorem is more general than that.
Consider splitting the surface S into tiny planar tiles. The surface integral may be approximated by the sum
of the contribution of each tile. Naturally, the dimensions will be made vanishingly small to obtain the limit
in which this sum approaches the integral. Consider a single tile PQRS outlined in bold in Fig. 18. The
neighbouring tiles that share edges with the bold tile are also shown, with an articial gap between them
for clarity.
Since the tile is planar, Greens theorem in the plane applies:
_
PQRS
F ds =

PQRS
(F) dS
Consider the four neighbouring tiles that share edges with PQRS e.g. the one sharing the edge PQ. For
PQRS the contribution of this edge to the line integral is in the direction

PQ whereas for the neighbouring
tile it is in the opposite direction

QP. Hence when the contributions of these two tiles are added together,
Department of Materials, Imperial College London
42 Vector calculus
P Q
R
S
Figure 18: Diagram of a single tile surface element in the derivation of Stokes theorem.
the contributions to the line integrals from the edge PQ cancel, and the remaining line integral runs anti-
clockwise around the perimeter of both tiles. This cancellation will continue for all edges shared by tiles
in fact all the edges of all tiles except those which make up the boundary C of the whole surface S.
Examples
Verify Stokes theorem for the vector eld F = y i + x j + zk
for the hemispherical surface x
2
+ y
2
+ z
2
= a
2
, z 0:
Consider the left-hand side:

S
( F) dS. F = 2 k. In spherical polar coordinates the
surface element for the hemisphere is dS = a
2
sin d d e
r
. Since e
r
k = cos ,

S
(F) dS = 2

/2
=0

2
=0
(a
2
sin) cos d d
= a
2
_

/2
=0
sin2 d
_ _

2
=0
d
_
= 2a
2
_

1
2
cos 2
_
/2
=0
= 2a
2
For the right-hand side:
_
C
F ds, F ds = x dy y dx Use plane polar coordinates to parame-
terise C: x = a cos , y = a sin:
_
C
F ds =

2
=0
[(a cos )(a cos ) (a sin)(a sin)] d = a
2

2
=0
d = 2a
2
Hence Stokes theorem is veried.
for the square planar surface z = 0 where 0 x a, 0 y a
for the square planar surface x = a where 0 y b, 0 z b
Prove that
_
S
(u) dS = 0 for any vector eld u over any closed surface S.
Department of Materials, Imperial College London
MSE 201: Mathematics 43
12.3 Volume integrals
Volume integrals are triple integrals and much simpler than line or surface integrals since dV is a scalar.
There are therefore only two possibilities:

V
f dV is a scalar quantity derived from a scalar eld f

V
FdV is a vector quantity derived from a vector eld F
Examples
Calculate the volume integral of (r ) = r over the sphere of radius a centred on the origin.
Calculate the volume integral of (, z) =
2
+ z
2
over the cylinder dened by a and |z| L/2.
Calculate the volume integral of the vector eld F = x
2
i + xy j + z k over the cube 0 x L,
0 y L, 0 z L.
12.4 The divergence theorem
The divergence theorem may be stated as follows:

V
FdV =
_
S
F dS
where V is the volume bounded by the closed surface S. The derivation of the divergence theorem follows
a similar argument to that used for Stokes theorem. Consider splitting the volume V into tiny cuboids of
volume V = x y z with a corner located at (x
0
, y
0
, z
0
). Then

V
FdV =

x
0
+x
x=x
0

y
0
+y
y=y
0

z
0
+z
z=z
0
_
F
x
x
+
F
y
y
+
F
z
z
_
dx dy dz
For the rst term in the integrand, integrate with respect to x rst. For the second and third terms rst
integrate with respect to y and z respectively:

V
FdV =

y
0
+y
y=y
0

z
0
+z
z=z
0
[F
x
(x
0
+ x, y, z) F
x
(x
0
, y, z)] dy dz
+

z
0
+z
z=z
0

x
0
+x
x=x
0
_
F
y
(x, y
0
+ y, z) F
y
(x, y
0
, z)

dz dx
+

x
0
+x
x=x
0

y
0
+y
y=y
0
[F
z
(x, y, z
0
+ z) F
z
(x, y, z
0
)] dx dy
The right-hand side of this equation is the surface integral over the closed surface of the cuboid. For
example, for the front side x = x
0
+ x has outward normal parallel to i and surface area element dy dz i
where as the back side x = x
0
has a normal pointing in the opposite direction and surface element dy dz i
hence the minus sign in the integrand. Likewise the second and third lines give the contributions from the
left and right and top and bottom sides.
As with Stokes theorem, when the contributions from cuboids are summed, neighbouring cuboids share
surfaces whose contributions cancel because their outward normals point in opposite directions. Thus the
only contribution that remains is from the boundary of the whole volume V.
Department of Materials, Imperial College London
44 Vector calculus
Examples
Verify the divergence theorem for the vector eld F = x i + y j + z k for the unit cube 0 x 1,
0 y 1, 0 z 1.
Use the divergence theorem to evaluate the surface integral

S
F dS of
F = (x + y
2
z) i + (xz
2
2y) j + (z + x
2
+ y
2
) k
over the open hemispherical surface x
2
+ y
2
+ z
2
= a
2
, z 0.
13 Summary
From this section of the course, students should be able to:
understand the concept of vector area and calculate it for simple surfaces
understand the signicance of the scale factors in orthogonal coordinate systems and recall them for
Cartesian, cylindrical polar and spherical polar coordinates
nd expressions for line, surface and volume elements in Cartesian, cylindrical polar and spherical
polar coordinates
perform partial differentiation including the use of the chain rule to change coordinate system
calculate total differentials and establish whether a given differential is exact or inexact
perform double and triple integrals
calculate and use the Jacobian to change variables in multidimensional integrals
calculate derivatives of vector quantities
interpret the gradient, divergence and curl geometrically
recall and apply the formulae for the gradient, divergence, curl and Laplacian in Cartesian coordinates
apply given formulae for the gradient, divergence, curl and Laplacian in cylindrical polar and spherical
polar coordinates
derive vector operator identities using Cartesian coordinates
calculate line, surface and volume integrals
recall and apply Stokes theorem and the divergence theorem
use vector calculus to solve problems in materials science and engineering
Department of Materials, Imperial College London