You are on page 1of 43

MSE 201: Mathematics 1

Vector calculus
Dr 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 = ṙ.

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 fields and they can themselves be scalar or vector in nature. Some
examples are listed in Table 1.

Scalar fields Vector fields

Carrier concentration at a p-n junction Velocity fields in fluid dynamics


Electrostatic potentials Electric fields
Temperature distribution in this room Magnetic fields

Table 1: Examples of scalar and vector fields.

The topic of vector calculus concerns itself with differentiating and integrating scalar and vector fields 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 fluid 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 specified by their components with respect to an underlying set of basis vectors, which also
define 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 defined by three orthonormal vectors i, j and k which define
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  
ax
 
a =  ay  = ax i + ay j + az k
az

a
az k

ax i
y
x
ay j

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 defined 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.

Figure 2: Definition 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 = a2 , 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 = ax bx + ay by + az bz

which may also be written using matrix notation as:


 
(ax ay az ) bx
 
a · b = aT b =  by  = ax bx + ay by + az bz
bz

2.3 Vector product

The vector or cross product of two vectors a and b is defined 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.

b

Figure 3: Definition of the vector product.

In particular:

Department of Materials, Imperial College London


4 Vector calculus

• a and b are parallel or antiparallel ⇔ a × b = 0

• a×a=0

• a × b = −b × a

and hence

• 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:


 
ay bz − az by
 
a × b = (ay bz − az by ) i + (az bx − ax bz ) j + (ax by − ay bx ) k =  az bx − ax bz 
ax by − ay bx

which may also be written as a determinant:


¯ ¯
¯ i j k ¯¯
¯
¯ ¯
a × b = ¯ ax ay az ¯
¯ ¯
¯ bx by bz ¯

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 specified 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

Figure 4: Definition 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 ambiguity is usually resolved by the context in which the vector area is used or otherwise
has to be specified explicitly.

Department of Materials, Imperial College London


MSE 201: Mathematics 5

This definition is not restricted to areas that are 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 much shadow is cast?

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 m2 (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
confined 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.
z

i
j
y
k
x y
x

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
pto 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 define 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 coordinates 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 first.

3.1 Plane polar coordinates

A point in the xy-plane with Cartesian coordinates (x, y) may also be defined by plane-polar coordinates ρ
and φ defined by: ) (
p
ρ = x2 + y 2 x = ρ cos φ
tan φ = y/x 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π).
y

j
êφ

êρ
i
ρ (x, y)

φ
x

Figure 6: Plane-polar coordinates in two dimensions.

The plane-polar coordinate system may also be defined in terms of unit vectors êρ and êφ that point in the
directions of increasing ρ and φ respectively. In terms of i and j these vectors are defined by:
) (
êρ = cos φ i + sin φ j i = cos φ êρ − sin φ êφ
êφ = − sin φ i + cos φj j = sin φ êρ + cos φ êφ

Department of Materials, Imperial College London


MSE 201: Mathematics 7

i.e. {êρ , êφ } are obtained by rotating {i, j} anticlockwise by an angle φ. Conversely, {i, j} are obtained by
rotating {êρ , êφ } 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 undefined there.
y

φ = π/4

ρ = constant

Figure 7: Examples of lines of constant ρ (dashed) and lines of constant φ (dotted).

A couple of features are worth remarking on: the lines always intersect at right angles. Also at any given
point, êρ is perpendicular to the tangent to the line of constant ρ and êφ 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 êρ and êφ at P in terms of i and j.
◦ The vector u has Cartesian components ux = uy = 5. Find its components in terms of the basis
{êρ , êφ } 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 l = x i + y j changes by
dl = dx i + dy j and
dl2 = dl · dl = dx2 + 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

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 infinitesimal
changes in the coordinates ρ and φ of l result in a change dl = dρ êρ + ρ dφ êφ . This defines 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
dl2 = dρ2 + ρ2 dφ2 .

φ = φ0 + δφ

φ = φ0

P
x

ρ = ρ0

ρ = ρ0 + δρ

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 x0 ≤ x ≤ x0 + dx and y0 ≤ y ≤ y0 + 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 infinitesimal 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:
p  
ρ = x2 + y 2 
 
 x = ρ cos φ
tan φ = y/x y = ρ sin φ

 
 z=z
z=z

The unit vectors are related by:


 
êρ = cos φ i + sin φ j 
 
 i = cos φ êρ − sin φ êφ
êφ = − sin φ i + cos φ j j = sin φ êρ + cos φ êφ

 
 k = ê
êz = k z

Department of Materials, Imperial College London


MSE 201: Mathematics 9

l z

y
φ
ρ
x

Figure 9: Cylindrical polar coordinates.

and the scale factors are hρ = 1, hφ = ρ and hz = 1.

It is clear from its description that cylindrical polars form an orthogonal


p coordinate system: the position
vector of P , denoted l in Fig. 9, is l = ρ êρ + z êz with magnitude l = ρ2 + z 2 . Infinitesimal changes in
coordinates results in dl = dρ êρ + ρdφ êφ + dz êz and thus
dl2 = 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 infinitesimal change in ρ and φ made while z is held constant. As in plane polar coordinates,
this sweeps out an area dAz = ρ dρ dφ. However in three dimensions this may now be represented by the
vector area dSz = ρ dρ dφ êz . Similarly if ρ is held constant while φ and z vary, a vector area dSρ = ρ dφ dz êρ
is obtained. Likewise dSφ = dρ dz êφ .

The general situation would involve changes in all three coordinates, but subject to a single constraint that
confines points to a surface i.e. dρ, dφ and dz are not all independent. In this case the element of surface
area is
dS = ρ dφ dz êρ + dρ dz êφ + ρ dρ dφ êz

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 find
an equation for dρ satisfied by infinitesimal change of coordinates that remain on this surface.
◦ Write down an expression for dS for this surface and mark it on a sketch.

Finally consider an unconstrained infinitesimal change in all three coordinates. This maps out an infinitesi-
mal volume, or volume element. For infinitesimal 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ρ dφ dz.

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 = |l|, θ and φ. φ is the same azimuthal angle as in cylindrical polar coordinates. Whereas φ
ranges from 0 to 2π, θ is restricted to the range 0 to π.
z

l z
r
θ
y
φ
ρ
x

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:
p  
r = px2 + y 2 + z 2 
 
 x = r sin θ cos φ
cos θ = z/ x2 + y 2 + z 2 y = r sin θ sin φ
 
tan φ = y/x   z = r cos θ

and the unit vectors are given by:


 
êr = sin θ cos φ i + sin θ sin φ j + cos θ k 
 
 i = sin θ cos φ êr + cos θ cos φ êθ − sin φ êφ
êθ = cos θ cos φ i + cos θ sin φ j − sin θ k j = sin θ sin φ ê + cos θ sin φ êθ + cos φ êφ
r

 
 k = cos θ ê − sin θ ê
êφ = − sin φ i + cos φ j r θ

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 l 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 hr = 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:

dl = hr dr êr + hθ dθ êθ + hφ dφ êφ = dr êr + r dθ êθ + r sin θ dφ êφ


⇒ dl2 = h2r dr2 + h2θ dθ2 + h2φ dφ2 = dr2 + r2 dθ2 + r2 sin2 θ dφ2

Department of Materials, Imperial College London


MSE 201: Mathematics 11

dS = hθ hφ dθ dφ êr + hφ hr dφ dr êθ + hr hθ dr dθ êφ


= r2 sin θ dθ dφ êr + r sin θ dφ dr êθ + r dr dθ êφ
dV = hr hθ hφ dr dθ dφ = r2 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

• Two points P and Q have Cartesian coordinates (3, 4, −2) and (−1, 3, 2) respectively. Specify their
positions in terms of:

(i) cylindrical polar coordinates


(ii) spherical polar coordinates

• Two vectors are defined by u = ur êr + uθ êθ + uφ êφ and v = vr ê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 = ur vr + uθ vθ + uφ vφ .


◦ Would this result still hold if u and v were defined in terms of unit vectors associated with spher-
ical 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 fields: 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 f (x, y + δy, z) − f (x, y, z)
= lim
∂y z,x δy→0 δ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 defined and recall that if a function is differentiable then the
second ‘crossed’ derivatives are equal i.e.
à ! à !
∂2f ∂2f
=
∂x∂y ∂y∂x

Examples

• A scalar field V is defined in terms of spherical polar coordinates {r, θ, φ} as V (r, θ, φ) = r2 sin2 θ cos 2φ.
Calculate:
µ ¶ Ã !
∂V ∂2V
◦ = ◦ =
∂r ∂r∂θ
µ ¶ Ã !
∂V ∂2V
◦ = ◦ =
∂θ ∂r∂φ
µ ¶ Ã !
∂V ∂2V
◦ = ◦ =
∂φ ∂φ∂r
à ! à !
∂2V ∂2V
◦ = ◦ =
∂θ2 ∂θ∂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 infinitesimal change in a function in response to infinitesimal changes in all of its arguments e.g. for a
function f (x, y, z) the total differential is
µ ¶ µ ¶ µ ¶
∂f ∂f ∂f
df = dx + dy + dz
∂x y,z ∂y z,x ∂z x,y

This definition 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) = x2 + 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 find the function that differentiates to a known differential.

Consider the differential


x2 dy + 2xy dx.
Integrating the first term with respect to y gives x2 y + c1 (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 term with respect to x gives x2 y + c2 (y). So f (x, y) = x2 y + c is the required function (c1 (x) =
c2 (y) = c 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 µ ¶ µ ¶
∂f ∂f
u(x, y) = and v(x, y) =
∂x y ∂y x

The equality of second cross derivatives of f (x, y):


à ! à !
∂2f ∂2f
=
∂x∂y ∂y∂x

requires µ ¶ µ ¶
∂u ∂v
=
∂y x ∂x y

and this is the necessary and sufficient 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 ∂v ∂v ∂w ∂w ∂u
= and = and =
∂y z,x ∂x y,z ∂z x,y ∂y z,x ∂x y,z ∂z x,y

In general, for n variables there will be 12 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,
find the function from which it originates.

◦ x dy + y dx
◦ x dy + 2y dx
◦ dx/x + dy/y
◦ 2xz dx − 2yz dy + (x2 − 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:
µ ¶ µ ¶ µ ¶
∂f ∂f ∂f
df = dx + dy + dz
∂x y,z ∂y z,x ∂z x,y

Consider transforming to spherical polar coordinates. The required first partial derivatives are
µ ¶ µ ¶ µ ¶
∂f ∂f ∂f
, and .
∂r θ,φ ∂θ φ,r ∂φ 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 ∂f ∂x ∂f ∂y ∂f ∂z
= + +
∂r θ,φ ∂x y,z ∂r θ,φ ∂y z,x ∂r θ,φ ∂z x,y ∂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 first 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 first partial derivatives with respect to the cylindrical polar coordi-
nates ρ, φ 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 briefly 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
Z
I= f (x, y) dA
R

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

y y

ymax dA = dx dy ymax (x)

R
ymin ymin (x)

xmin (y) xmax (y) x xmin xmax x

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 first 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:
Z ymax "Z xmax (y) #
I= f (x, y) dx dy
y=ymin x=xmin (y)

ymin and ymax define the extent of R in the y-direction whereas xmin (y) and xmax (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:
Z x=xmax "Z y=ymax (x) #
I= f (x, y) dy dx
x=xmin y=ymin (x)

Examples

• Evaluate the double integral Z Z


I= xy 2 dx dy
R
where R is the triangle bounded by the x-axis, y-axis and the line x + y = 1. Show that the order of
integration does not matter.

Department of Materials, Imperial College London


16 Vector calculus

y y

1 1

x+y =1

x x
0 1 0 1

1. Perform x integration first (left-hand diagram):


Z 1 ·Z x=1−y ¸ Z 1 · ¸ Z
1 2 2 x=1−y 1 1
I = xy 2 dx dy = x y dy = (1 − y)2 y 2 dy
y=0 x=0 y=0 2 x=0 2 y=0
Z ³ ´ · ¸1
1 1 1 1 3 1 4 1 5 1
= y 2 − 2y 3 + y 4 dy = y − y + y =
2 y=0 2 3 2 5 y=0 60

2. Perform y integration first (right-hand diagram):


Z 1 ·Z y=1−x ¸ Z 1 · ¸y=1−x
2 1 3
I = xy dy dx = xy dx
x=0 y=0 x=0 3 y=0
Z 1 ³ ´ · ¸1
1 2 3 4 1 1 2 3 1 1
= x − 3x + 3x − x dx = x − x3 + x4 − x5 =
3 x=0 3 2 4 5 x=0 60

• Integrate the function f (x, y) = xy over the rectangular region defined 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.
Z Z Z Z
I= f (x, y, z) dV = f (x, y, z) dx dy dz
R R

As with the double integral, the order of integration does not matter and the limits are determined by the
boundary of R.

Examples

• Calculate the volume bounded by the four planes x = 0, y = 0, z = 0 and x/a + y/b + z/c = 1.
Perform the integration first along columns parallel to z, then combine these columns into vertical
slabs by integrating along y and then finally integrate along x. So the limits on x are simply 0 ≤ x ≤ a.

Department of Materials, Imperial College London


MSE 201: Mathematics 17

z
c

b y

a
x

The line x/a + y/b = 1 defines the upper limit on the y-integration, and the column height is defined
by x/a + y/b + z/c = 1.
Z a (Z b(1−x/a) "Z c(1−x/a−y/b) # )
V = dz dy dx
x=0 y=0 z=0
Z a "Z b(1−x/a) µ ¶ #
x y
= c 1− − dy dx
x=0 y=0 a b
Z a " #b(1−x/a)
xy y 2
= c y− − dx
x=0 a 2b y=0
Z a "µ ¶ µ ¶ µ ¶2 #
x x x 1 x
= bc 1− − 1− − 1− dx
x=0 a a a 2 a
Z a à !
1 x x2
= bc − + 2 dx
x=0 2 a 2a
" #a
x x2 x3 abc
= bc − + 2 =
2 2a 6a x=0
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
Z 1 p Z π/2 q Z π/2
dx
1− x2 dx = 1 − sin θ 2
dθ = cos2 θ dθ
x=0 θ=0 dθ θ=0
Z · ¸π/2
1 π/2 1 1 π
= [1 + cos(2θ)] dθ = θ + sin(2θ) =
2 θ=0 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.

First consider a two-dimensional integral in terms of Cartesian coordinates


Z Z
f (x, y) dx dy
R

Department of Materials, Imperial College London


18 Vector calculus

that is to be transformed to plane polar coordinates ρ and φ. Define the Jacobian of x and y with respect to
ρ and φ as µ ¶ µ ¶ µ ¶µ ¶
∂(x, y) ∂x ∂y ∂x ∂y
J= = −
∂(ρ, φ) ∂ρ φ ∂φ ρ ∂φ ρ ∂ρ φ
which may also be written as the determinant:
¯ ¯
∂(x, y) ¯¯ (∂x/∂ρ)φ (∂y/∂ρ)φ ¯¯
J= =¯ ¯
∂(ρ, φ) ¯ (∂x/∂φ)ρ (∂y/∂φ)ρ ¯

The change of variables then involves the replacement


¯ ¯
¯ ∂(x, y) ¯
dx dy = |J|dρ dφ = ¯¯ ¯ dρ dφ
∂(ρ, φ) ¯
For the transformation from Cartesian to plane polar coordinates:
¯ ¯
∂(x, y) ¯¯ cos φ sin φ ¯
¯
³ ´
J= =¯ ¯ = ρ cos2 φ + sin2 φ = ρ
∂(ρ, φ) ¯ −ρ sin φ ρ cos φ ¯

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 Z Z Z Z ¯ ¯
¯ ∂(x, y) ¯
f (x, y) dx dy = g(ρ, φ) ¯¯ ¯ dρ dφ
R R0 ∂(ρ, φ) ¯
where R0 is a region of integration with respect to ρ and φ that corresponds to R and g(ρ, φ) is the function
that results when f (x, y) is re-written in terms of ρ and φ.

Examples

• Consider the integral Z Z q


I= y x2 + y 2 dx dy
R
where R is the top right quadrant of the unit circle.

◦ Calculate I directly using Cartesian coordinates.



Z 1 Z √1−x2 q Z 1 · ³ ´3/2 ¸ 1−x2
1
I = y x2 + y 2 dx dy = x2 + y 2 dx
x=0 y=0 x=0 3 y=0
Z 1 ³ ´ · ¸1
1 3 1 1 1
= 1−x dx = x − x4 =
3 x=0 3 4 x=0 4

◦ Change variables to plane polar coordinates and repeat the calculation.


p
Since ρ = x2 + y 2 and y = ρ sin φ the function being integrated transforms to ρ2 sin φ. The
Jacobian for this transformation is ρ and so
Z 1 Z π/2
I= ρ3 sin φ dρ dφ
ρ=0 φ=0

Department of Materials, Imperial College London


MSE 201: Mathematics 19

which is separable and much more straightforward to evaluate:


· ¸1
1 π/2 1
I = ρ4 [− cos φ]φ=0 =
4 ρ=0 4

• Calculate Z Z
1
I= p dx dy
R x2 + y2
where R is the unit circle.

• Calculate Z Z µ q ¶
I= exp − x2 + y2 dx dy
R

where R is the unit semicircle in the upper-half plane (y > 0).

5.4 Properties of Jacobians

The definition 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/∂u) (∂y/∂u)v,w (∂z/∂u)v,w ¯
∂(x, y, z) ¯ v,w ¯
¯ ¯
= ¯ (∂x/∂v)w,u (∂y/∂v)w,u (∂z/∂v)w,u ¯
∂(u, v, w) ¯¯ ¯
¯
(∂x/∂w)u,v (∂y/∂w)u,v (∂z/∂w)u,v

and ¯ ¯
¯ ∂(x, y, z) ¯
dV = dx dy dz = ¯¯ ¯ du dv dw
∂(u, v, w) ¯

A property of Jacobians (stated in three dimensions for illustration but completely general) is

∂(x, y, z) ∂(x, y, z) ∂(p, q, r)


=
∂(u, v, w) ∂(p, q, r) ∂(u, v, w)

Setting u ≡ x, v ≡ y and w ≡ z then yields


Á
∂(x, y, z) ∂(p, q, r) ∂(p, q, r) ∂(x, y, z)
1= or =1
∂(p, q, r) ∂(x, y, z) ∂(x, y, z) ∂(p, q, r)

which can sometimes be useful in calculating Jacobians.

Examples

• Evaluate the Jacobian for transforming from Cartesian coordinates x, y and z to cylindrical polar
coordinates ρ, φ and z. Hence confirm the expression for the volume element dV in section 3.2.

• Evaluate the Jacobian for transforming from plane polar coordinates to Cartesian coordinates. Show
that
∂(x, y) ∂(ρ, φ)
=1
∂(ρ, φ) ∂(x, y)

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 = vx (t) i + vy (t) j + vz (t) k.

The derivative of v(t) (which is also a vector) may be defined as a limit in the same way as the derivative
of a scalar function:
dv v(t + δt) − v(t)
= lim
dt δt→0 δ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 dvx dvy dvz
= i+ j+ k.
dt dt dt dt

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
êρ = cos φ i + sin φ j
êφ = − sin φ i + cos φ j
êz = k
These expressions can be differentiated:
dêρ dφ dφ dφ
= − sin φ i + cos φ j= êφ
dt dt dt dt
dêφ dφ dφ dφ
= − cos φ i − sin φ j=− êρ
dt dt dt dt
dêz
= 0
dt

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 da df
(f a) = f + a
dt dt dt
d db da
(a · b) = a · + ·b
dt dt dt
d db da
(a × b) = a × + ×b
dt dt dt

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 6= b × a. 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) = ρêρ + utk 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 defined 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 field. In terms of Cartesian components of the vector function
a(x, y, z) ≡ a(r) i.e. ax (x, y, z), ay (x, y, z) and az (x, y, z):
µ ¶ µ ¶ µ ¶ µ ¶
∂a ∂ax ∂ay ∂az
= i+ j+ k
∂x y,z ∂x y,z ∂x y,z ∂x y,z

and so on.

The total derivative can therefore be written


µ ¶ µ ¶ µ ¶
∂a ∂a ∂a
da = dx + dy + dz
∂x y,z ∂y z,x ∂z x,y

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 ∂a ∂x ∂a ∂y ∂a ∂z
= + +
∂r θ,φ ∂x y,z ∂r θ,φ ∂y z,x ∂r θ,φ ∂z x,y ∂r θ,φ

Example

• The vector field 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

7 Gradient

Consider a scalar field f (r) expressed in terms of the Cartesian coordinates of r i.e. f (x, y, z). The total
differential is µ ¶ µ ¶ µ ¶
∂f ∂f ∂f
df = dx + dy + dz
∂x y,z ∂y z,x ∂z x,y

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 field g(r) defined by


µ ¶ µ ¶ µ ¶
∂f ∂f ∂f
g= i+ j+ k
∂x y,z ∂y z,x ∂z x,y

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 fields:


p
◦ f (x, y, z) = 1/ x2 + y 2 + z 2
◦ φ(x, y, z) = (x2 − y 2 )z

7.1 Notation

The gradient of a function f may be denoted

g = grad f

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 +j +k
∂x ∂y ∂z

Using this notation


g = grad f ≡ ∇f

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 6= 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 fixed 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 defines a surface in three dimensions. If dr lies along this surface (i.e. is
tangential 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 field may be represented by contours, lines along which the field is constant, shown by the dashed
lines in Fig. 12. A vector field may be represented by field lines, shown by the solid lines in Fig. 12: the
direction of the vector field is tangential to the field line at that point, and the magnitude of the field is
represented by the spacing between the field lines: the more closely spaced the field lines, the stronger the
field. For a vector field that is the gradient of a scalar field, the field lines of the vector field always intersect
the contours of the scalar field 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):
µ ¶ µ ¶ µ ¶
∂V ∂V ∂V
dV = dρ + dφ + dz
∂ρ φ,z ∂φ z,ρ ∂z ρ,φ

In this coordinate system, the total differential of the position vector r involves the scale factors:

dr = hρ dρ êρ + hφ dφ êφ + hz dz êz

where of course hρ = hz = 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
êρ ∂ êφ ∂ êz ∂ ∂ êφ ∂ ∂
∇= + + = êρ + + êz
hρ ∂ρ hφ ∂φ hz ∂z ∂ρ ρ ∂φ ∂z
and similarly in spherical polar coordinates

êr ∂ êθ ∂ êφ ∂ ∂ êθ ∂ êφ ∂


∇= + + = êr + +
hr ∂r hθ ∂θ hφ ∂φ ∂r r ∂θ r sin θ ∂φ

Note that whatever coordinate system is used, the gradient vector of a given scalar field is the same at all
points in space.

Examples

• Calculate the gradients of the scalar fields:

◦ V (ρ, φ, z) = λ ln ρ (cylindrical polar coordinates)


◦ f (r, θ, φ) = cos θ/r (spherical polar coordinates)

8 Divergence

The divergence of a vector field F(r), div F, is itself a scalar field. In terms of Cartesian coordinates
F = Fx i + Fy j + Fz k, where each of the three components Fx , Fy and Fz is itself a function of three
variables x, y and z: µ ¶ µ ¶ µ ¶
∂Fx ∂Fy ∂Fz
div F = + +
∂x y,z ∂y z,x ∂z x,y
This expression is a scalar product between the del operator ∇ and the vector field F and is therefore
denoted
div F ≡ ∇ · F

Examples

• Calculate the divergence of the following vector fields:

◦ F = ax i + by j + cz k where a, b and c are constants.


xi
◦ E= 2
y + z2
· ¸
i j k
◦ g = exp(−xyz) + +
yz zx 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 field 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 field 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 field 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 field 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 field vanishes. A vector field
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 field F = Fρ êρ + Fφ êφ + Fz êz takes the form

1 ∂ 1 ∂Fφ ∂Fz
∇·F= (ρFρ ) + +
ρ ∂ρ ρ ∂φ ∂z

In spherical polar coordinates where F = Fr êr + Fθ êθ + Fφ êφ :

1 ∂ ³ 2 ´ 1 ∂ 1 ∂Fφ
∇·F= r Fr + (sin θ Fθ ) +
r2 ∂r r sin θ ∂θ r sin θ ∂φ

Department of Materials, Imperial College London


26 Vector calculus

Examples

• Calculate the divergence of the following vector fields:

◦ r = r êr
◦ F = rn êr
It is significant that the divergence vanishes for the case n = −2 since this corresponds to the
inverse square law for electric and gravitational fields.
êφ
◦ u=
2πρ
◦ E = exp(id · r) k

9 Curl

The divergence of a vector field was defined in terms of the scalar product betwen the del operator ∇ and
the vector field. Another alternative is clearly to take the vector product between del and the vector field,
the result being itself a vector field. This is called the curl (or sometimes the rotation) of a vector field and
is denoted
curl F ≡ ∇ × F
As a vector product it can be calculated from a determinant. In Cartesian coordinates
¯ ¯
¯ i j k ¯
¯ ¯
¯ ¯
∇ × F = ¯ ∂/∂x ∂/∂y ∂/∂z ¯
¯ ¯
¯ Fx Fy Fz ¯
"µ ¶ µ ¶ # "µ ¶ µ ¶ # "µ ¶ µ ¶ #
∂Fz ∂Fy ∂Fx ∂Fz ∂Fy ∂Fx
= − i+ − j+ − k
∂y z,x ∂z x,y ∂z x,y ∂x y,z ∂x y,z ∂y z,x

Examples

• Calculate the curl of the following vector fields:

◦ F = yz i + zx j + xy k
◦ A = 12 B0 (x j − y i)
◦ E = exp(id · 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 field 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 field. A field 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 field 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
¯ ¯
¯ ê ρ êφ êz ¯¯
1 ¯¯ ρ
¯
∇ × F = ¯ ∂/∂ρ ∂/∂φ ∂/∂z ¯
ρ ¯¯ ¯
Fρ ρFφ Fz ¯

and in spherical polar coordinates


¯ ¯
¯ ê r êθ r sin θ êφ ¯
1 ¯ r ¯
¯ ¯
∇×F= 2 ¯ ∂/∂r ∂/∂θ ∂/∂φ ¯
r sin θ ¯¯ ¯
¯
Fr rFθ r sin θFφ

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 fields:

◦ F = rn êr
êφ
◦ g= 2
r
êφ
◦ u=
2πρ
êφ
◦ B = 2 + v ê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 modified to create other vector
operators, for example consider a · ∇ where a is a vector field. 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 · ∇ = ax + ay + az
∂x ∂y ∂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 field. When operating on a scalar field it is equivalent
to taking the gradient to obtain a vector field whose divergence is then taken to obtain the result, a scalar
field i.e.
div grad f ≡ ∇ · (∇f ) ≡ ∇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 ∂f ∂f
∇ · (∇f ) = i +j +k · i +j +k
∂x ∂y ∂z ∂x ∂y ∂z
2
∂ f 2
∂ f 2
∂ f
= 2
+ 2 + 2
∂x ∂y ∂z
and therefore
∂2 ∂2 ∂2
∇2 ≡ + +
∂x2 ∂y 2 ∂z 2

In other coordinate systems the scale factors are involved. In cylindrical polar coordinates
µ ¶
1 ∂
2 ∂ 1 ∂2 ∂2
∇ ≡ ρ + +
ρ ∂ρ ∂ρ ρ2 ∂φ2 ∂z 2
and in spherical polar coordinates
µ ¶ µ ¶
1 ∂ ∂ 1 ∂ ∂ 1 ∂2
∇2 ≡ r2 + sin θ +
2
r ∂r ∂r 2
r sin θ ∂θ ∂θ r2 sin2 θ ∂φ2

The Laplacian occurs in many physical equations, including those listed in Table 2.

Examples

• Calculate the Laplacian of the following scalar fields:


µ ¶ µ ¶
πx πy
◦ φ(x, y, z) = sin cos exp (−kz)
a b
◦ 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

∂c
D∇2 c = Diffusion equation
∂t

1 ∂2ψ
∇2 ψ = Wave equation
c2 ∂t2

h̄2 2
− ∇ ψ + V (r)ψ = Eψ Schrödinger equation
2m

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 fields,
and a and b are vector fields:

∇(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 = Fx i + Fy j + Fz k is a vector field.


"µ ¶ µ ¶ # "µ ¶ µ ¶ # "µ ¶ µ ¶ #
∂Fz ∂Fy ∂Fx ∂Fz ∂Fy ∂Fx
∇×F= − i+ − j+ − k
∂y z,x ∂z x,y ∂z x,y ∂x y,z ∂x y,z ∂y z,x

Consider the x-component of ∇ × (∇ × F) i.e.

∂ ∂
i · [∇ × (∇ × F)] = [k · (∇ × F)] − [j · (∇ × F)]
∂y ∂z
"µ ¶ µ ¶ # "µ ¶ µ ¶ #
∂ ∂Fy ∂Fx ∂ ∂Fx ∂Fz
= − − −
∂y ∂x y,z ∂y z,x ∂z ∂z x,y ∂x y,z
∂ 2 Fy ∂ 2 Fz ∂2F x ∂ 2 Fx
= + − 2

∂y∂x ∂z∂x ∂y ∂z 2

Department of Materials, Imperial College London


30 Vector calculus

Adding and subtracting ∂ 2 Fx /∂x2 , and using the property of second crossed derivatives:

∂ 2 Fx ∂ 2 Fy ∂ 2 Fz ∂ 2 Fx ∂ 2 Fx ∂ 2 Fx
i · [∇ × (∇ × F)] = + + − − −
∂x2 ∂x∂y ∂x∂z ∂x2 ∂y 2 ∂z 2
"µ ¶ µ ¶ µ ¶ # ( )
∂ ∂Fx ∂Fy ∂Fz ∂ 2 Fx ∂ 2 Fx ∂ 2 Fx
= + + − + +
∂x ∂x y,z ∂y z,x ∂z x,y ∂x2 ∂y 2 ∂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 Fx . Therefore

i · [∇ × (∇ × F)] = (∇ · F) − ∇2 Fx
∂x
The y- and z-components yield similar results and hence
· ¸
∂ ∂ ∂
∇ × (∇ × F) = i (∇ · F) + j (∇ · F) + k (∇ · F)
∂x ∂y ∂z
n o
− ∇2 Fx i + ∇2 Fy j + ∇2 Fz k

The term in square brackets is just the gradient of ∇ · F while the term in curly brackets while the term in
curly brackets defines the Laplacian of a vector field. The identity is therefore

∇ × (∇ × F) = ∇(∇ · F) − ∇2 F

In Cartesian coordinates the Laplacian of a vector field is simply the vector obtained by taking the Laplacian
of each component i.e.  
∇2 Fx
 
∇2 F =  ∇2 Fy 
∇2 Fz
However this is not true in a general coordinate system. In this case the Laplacian of a vector field must
be calculated by manipulating the previous identity:

∇2 F = ∇(∇ · F) − ∇ × (∇ × F)

Examples

• Using Cartesian coordinates, prove the following identities:

◦ ∇(uv) = u∇v + v∇u where u and v are scalar fields


◦ ∇ · (ua) = u∇ · a + a · ∇u where u is a scalar field and a is a vector field

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 dl as shown.

The integrand for a line integral may involve a scalar or vector field, and the result itself may be a scalar or
a vector:

Department of Materials, Imperial College London


MSE 201: Mathematics 31

dl

C
A
x

Figure 15: A path for a line integral in two dimensions.

Z
• f (r) dl is a vector quantity derived from a scalar field f
C
Z
• F(r) · dl is a scalar quantity derived from a vector field F
C
Z
• F(r) × dl is a vector quantity derived from a vector field F
C

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 l is W = F · l. If
the force is caused by a field, then in general it will vary in space and will not be constant. Split the path up
into line elements dl along which the force may be considered constant:
R
the work done for the line element
is dW = F · dl and the total work for the whole path is therefore C F · dl.

An example of the third kind is the Biot-Savart law for calculating magnetic fields – there is a problem on
Question Sheet 3 about this.

11.1 Properties

From vector summation it is clear that for a path that runs from point A to point B
Z −→
dl =AB
C

Reversing the sense of the contour involves making the change dl → −dl and hence
Z Z
A→B . . . dl = − B→A . . . dl
along C along C

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: I
. . . dl
C

Department of Materials, Imperial College London


32 Vector calculus

11.2 Scalar line integrals

Consider first line integrals of the form Z


F · dl
C

where F is a vector field that in three-dimensional Cartesian coordinates may be written F = Fx i+Fy j+Fz k
whereas the line element is dl = dx i + dy j + dz k and hence
Z Z
F · dl = (Fx dx + Fy dy + Fz dz)
C C

The path C defines a relationship between dx, dy and dz. For example, for a straight line defined by
x − x0 y − y0 z − z0
= =
x1 − x0 y1 − y0 z1 = z0

that runs between the points r0 = x0 i + y0 j + z0 k and r1 = x1 i + y1 j + z1 k:


y1 − y0 z1 − z0
dy = dx and dz = dx
x1 − x0 x1 − x0
so Z Z x1 · µ ¶ µ ¶¸
y1 − y0 z1 − z0
F · dl = Fx + Fy + Fz dx
C x=x0 x1 − x0 x1 − x0
More generally, if the equation of the path C between r0 and r1 can be written as y = y(x) and z = z(x)
then Z Z x1 · ¸
dy dz
F · dl = Fx + Fy + Fz dx
C x=x0 dx dx

More generally still, the path C may be defined parametrically i.e. the points on the path C are defined by
the equations x = x(u), y = y(u) and z = z(u) in terms of a parameter u that varies between u0 and u1 .
Then Z Z u1 · ¸
dx dy dz
F · dl = Fx + Fy + Fz du
C u=u0 du du du
In all of the above, the components of the vector field being integrated must be written in terms of the
integration variable alone.

Examples
Z
• Calculate the line integrals F · dl where F = x i + y j + z k and:
C

◦ 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:
Z Z 1 · ¸1
1 2 1
F · dl = x dx = x =
C x=0 2 x=0 2

◦ C is a straight line from the origin to the point a i + b j + c k.

Department of Materials, Imperial College London


MSE 201: Mathematics 33

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 field F can be written in terms of x only as

b c
F = xi + xj + xk
a a
Putting this all together:
Z Z a " µ ¶2 µ ¶2 # ( µ ¶2 µ ¶2 ) · ¸a
b c b c 1 2
F · dl = x+ x+ x dx = 1+ + x
C x=0 a a a a 2 0
1³ 2 ´
= a + b2 + c2
2
◦ C is a straight line between the points r0 = a i + b j and r1 = a i + b j + c k.
◦ C is a single turn of a helix defined 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
Z Z 2π
F · dl = [(a cos φ)(−a sin φ) + (a sin φ)(a cos φ) + (uφ)u] dφ
C 0
Z 2π
= u2 φ dφ = 2π 2 u2
0

In non-Cartesian coordinates the same ideas apply as above: the vector field 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: Z Z
F · dl = [Fρ dρ + Fφ ρ dφ + Fz dz]
C C
and in spherical polar coordinates:
Z Z
F · dl = [Fr dr + Fθ r dθ + Fφ r sin θ dφ]
C C

Non-Cartesian coordinates are generally chosen when the symmetry of the path C may be exploited to
simplify the integration.

Example

• Consider the previous example with the helical path in cylindrical polar coordinates.

First note that F = r and hence F = ρ êρ + z êz . A more long-winded derivation of the above
uses the expressions from section 3.2:

F = xi + yj + zk
= (ρ cos φ)(cos φ êρ − sin φ êφ ) + (ρ sin φ)(sin φ êρ + cos φ êφ ) + z êz
= ρ(cos2 φ + sin2 φ) êρ + ρ(sin φ cos φ − cos φ sin φ) êφ + z êz
= ρ êρ + z êz

The expression for the line element in cylindrical polar coordinates is

dl = dρ êρ + ρdφ êφ + dz êz

Department of Materials, Imperial College London


34 Vector calculus

and hence Z
F · dl = [ρdρ + zdz]
C
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:
Z Z 2πu · ¸2πu
1
F · dl = z dz = z 2 = 2π 2 u2
C z=0 2 z=0
Z
• Consider the line integral B · dl where B = I/(2πρ) êφ and C is a circle of radius a in the xy-plane.
C

11.3 Conservative fields

The integrands in the scalar integrals considered previously take the form of differentials Fx (x, y, z) dx +
Fy (x, y, z) dy + Fz (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 = Fx (x, y, z) dx + Fy (x, y, z) dy + Fz (x, y, z) dz. In this case the line integral
becomes rather simple:
Z Z Z
F · dl = [Fx dx + Fy dy + Fz dz] = df = f (B) − f (A)
C C C
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 field 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


∂Fx ∂Fy ∂Fy ∂Fz ∂Fz ∂Fx
= , = and =
∂y ∂x ∂z ∂y ∂x ∂z
Compare the expression for the curl of F:
µ ¶ µ ¶ µ ¶
∂Fz ∂Fy ∂Fx ∂Fz ∂Fy ∂Fx
∇×F= − i+ − j+ − k
∂y ∂z ∂z ∂x ∂x ∂y
which must vanish if the above conditions are satisfied. 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 field vanishes
at all points. Such a vector field is said to be a conservative field and corresponds to many (but not all)
physical fields: electrostatic and gravitational fields are conservative, but magnetic fields are not.

In the previous section it was stated that the curl of the gradient of any scalar field vanishes i.e. ∇ × ∇f .
Indeed since the definition of the gradient of a scalar field f was df = ∇f · dl then it is clear that a
conservative field must be the gradient of some scalar field – in physics this scalar field is known as the
potential and gives the potential energy of a unit test particle at a given point in the field. In summary, if a
vector field F is conservative then:

• ∇ × F ≡ 0 at all points in space;


• there exists some scalar field f such that F = ∇f .

For a conservative field F, it is also obvious that


I
F · dl = 0
C
since any closed path C starts and ends at the same point.

Department of Materials, Imperial College London


MSE 201: Mathematics 35

11.4 Green’s 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
I
F · dl
C

for a vector field F = Fx (x, y) i + Fy (x, y) j.


y y

C x C x

Figure 16: Closed line integral used for the proof of Green’s theorem in the plane.

Note that the line integral may be split into two parts:
I I I
F · dl = Ix + Iy = Fx dx + Fy dy
C C C

Now consider the double integral Z Z µ ¶


∂Fy ∂Fx
− dx dy
R ∂x ∂y
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 first term, perform the x integration first, as shown on the left of Fig. 16, and
consider the contribution from a single strip located at y:
Z xmax (y)
∂Fy x
max (y)
dx = [Fy ]x=x min (y)
= Fy (xmax (y), y) − Fy (xmin (y), y)
x=xmin (y) ∂x

Multiplying by the strip height dy gives a contribution towards Iy : Fy (xmax (y), y) dy is the contribution from
the right-hand edge of the strip to Iy . −Fy (xmin (y), y) dy is the left-hand edge where the minus sign ac-
counts for the fact that C is in a downward sense on the left-hand side.

For the second term, perform the y integration first, as shown on the right of Fig. 16, and consider the
contribution from a single strip located at x:
Z ymax (x)
∂Fx maxy (x)
− dy = − [Fx ]y=y min (x)
= Fx (x, ymin (x)) − Fx (x, ymax (x))
y=ymin (x) ∂y

Multiplying by the strip width dx gives a contribution towards Ix : Fx (x, ymin (x)) dx is from the bottom edge
(where the sense of C is in the positive x-direction) and −Fx (x, ymax (x)) dx is from the top edge (where C
is in the negative x-direction).

Thus Green’s theorem in the plane is established:


I Z Z µ ¶
∂Fy ∂Fx
(Fx dx + Fy dy) = − dx dy
C R ∂x ∂y

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 = dA k. Thus Green’s theorem in the plane could be rewritten as
I Z
F · dl = (∇ × F) · dS
C R

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 field (for which ∂Fy /∂x = ∂Fx /∂y and Fx dx + Fy dy is an exact differential) this
confirms that a line integral around a closed path vanishes.

Example

• Confirm Green’s theorem in the plane for the field F = 3x dy + y dx integrated anticlockwise around
the unit square in the xy-plane.

This is not a conservative field so the integrals must be evaluated explicitly.

The line integral (starting from the origin) consists of four parts:
I Z 1 Z 1 Z 0 Z 0
F · dl = Fx (x, 0) dx + Fy (1, y) dy + Fx (x, 1) dx + Fy (0, y) dy
C x=0 y=0 x=1 y=1
Z 1 Z 1
= 0+ 3 dy − dx − 0 = 3 − 1 = 2
y=0 x=0

and only the right and top edges contribute.

The integrand for the area integral is ∂Fy /∂x − ∂Fx /∂y = 3 − 1 = 2 which is a constant so the
integral is simply Z
2 dx dy = 2
R

from the area of the unit square.

Hence both sides of Green’s theorem in the plane equal two.

11.5 Vector line integrals

Consider a line integral of the form Z


f (r) dl
C

where f is a scalar field. In terms of Cartesian coordinates,


Z µZ ¶ µZ ¶ µZ ¶
f (r) dl = i f (x, y, z) dx + j f (x, y, z) dy + k f (x, y, z) dz
C C C C

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
Z
• Calculate the following line integrals f dl where f (x, y, z) = x2 + y 2 and:
C

◦ 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
Z Z 1 Z 1 Z 1
2 2 5
f dl = i 10λ dλ + j 5λ dλ − k 15λ2 dλ = (2 i + j − 3 k)
C λ=0 λ=0 λ=0 3
◦ C is the unit circle in the xy-plane, taken anticlockwise.

At first glance, plane-polar coordinates might seem to be suitable for this. Along C, f = ρ2 = 1.
The general line element is dl = dρ êρ + ρdφ êφ but since ρ is constant (unity) along C, dρ = 0.
Thus for C, dl = dφ êφ and hence
I Z 2π
f (r) dl = êφ dφ
C φ=0

However there is a problem: the direction of êφ changes along C – it is not a constant in the
integrand. In fact, for every point on C, the point diametrically opposite has êφ pointing in exactly
the opposite direction. Thus the integral is in fact zero.

This can be confirmed using Cartesian coordinates (with the azimthual angle φ as a param-
eter to define C) or even more straightforwardly, since f = 1 on C so this is a constant during
the integration: I I
f dl = f dl = 0
C C
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 integrals.

Finally consider line integrals of the form Z


F(r) × dl
C
which, in terms of Cartesian coordinates, may be written
Z Z Z Z
F(r) × dl = i (Fy dz − Fz dy) + j (Fz dx − Fx dz) + k (Fx dy − Fy dx)
C C C C

again a sum involving scalar line integrals along the same path C.

Consider the following special case: I


1
r × dr
C 2
illustrated in Fig. 17.

From section 2.4 it is known that 12 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:
I
1
S= r × dr
2 C

Department of Materials, Imperial College London


38 Vector calculus

dr

r
r + dr

Figure 17: Vector area as a vector line integral.

This confirms the previous result that the vector area of a surface depends only upon the rim bounding it,
and also uniquely defines 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 fields may be involved:
Z
• f (r) dS is a vector quantity derived from a scalar field f
S
Z
• F · dS is a scalar quantity derived from a vector field F
S
Z
• F × dS is a vector quantity derived from a vector field F
S

The second these is of primary interest because of its physical interpretation as the flux of the field F
through the surface S. For example, in fluid dynamics, an incompressible
Z fluid with density % and velocity
field v(r) would give rise to a flux (mass per unit time) J = % v · dS. Attention is restricted to this case in
S
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 defines
H
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:
I
dS = 0

The calculation of surface integrals is best illustrated by example.

Department of Materials, Imperial College London


MSE 201: Mathematics 39

Examples

• Calculate the surface integral of the vector field 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:
Z Z ∞ Z ∞
F · dS = exp(−x − y) dy dx
S x=0 y=0
= [− exp(−x)]∞ ∞
x=0 [− exp(−y)]y=0
= 1

• Calculate the surface integral of the vector field 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 = Fx dy dz + Fy dz dx + Fz dx dy so this integral separates into three


double integrals:
Z Z Z Z Z Z Z
F · dS = yz dy dz + zx dz dx + xy dx dy
S S S S

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 first 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
Z Z a Z b
F · dS = [2y(2x + y) + (2x + y)x + xy] dx dy
S x=0 y=0
Z a Z b h i
= 2x2 + 6xy + 2y 2 dx dy
x=0 y=0
2 3 3 2
= a b + a2 b2 + ab3
3 2 3

• Calculate the surface integral of the vector field E = x sin(πy/b) sin(πz/c) i over the part of the plane
x = a that satisfies 0 ≤ y ≤ b, 0 ≤ z ≤ c.

• Calculate the surface integral of the vector field g = (λ/ρ) êρ over the closed surface of a cylinder of
radius a and length L.

The closed surface of a cylinder consists of three parts: the curved surface and the two planar ends.
For the ends, the surface element is parallel (or antiparallel) to ê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 dφ dz êρ and so


I Z L Z 2π
λ
g · dS = a dφ dz = 2πλL
S z=0 φ=0 a

• Calculate the surface integral of the vector field F = ρ2 êz over that part of the plane z = h satisfying
ρ ≤ R.

Department of Materials, Imperial College London


40 Vector calculus

Z
• Evaluate the surface integral I = v · dS where v = y j and S is the upper surface of a hemisphere
S
of radius a.

The surface S is x2 + y 2 + z 2 = a2 with z ≥ 0 i.e. 0 ≤ θ ≤ π/2. The element of surface area for
a spherical surface is dS = r2 sin θ dθ dφ êr . From section 3.3:

j · êr = sin θ sin φ and y = r sin θ sin φ

Hence
Z Z π/2 Z 2π
I= v · dS = a3 sin2 θ sin2 φ sin θ dθ dφ
S θ=0 φ=0
"Z # ·Z ¸
π/2 2π
3
= sin θ dθ sin2 φ dφ
θ=0 φ=0
"Z # ·Z ¸
π/2 ³ ´ 2π 1
2
= sin θ − cos θ sin θ dθ (1 − cos 2φ) dφ
θ=0 φ=0 2
· ¸π/2 · ¸2π
1 φ 1
= − cos θ + cos3 θ − sin 2φ
3 θ=0 2 4 φ=0

=
3
I
• Calculate the surface integral F·dS where F = Q/(4πr2 ) êr and S is the closed surface of a sphere
S
of radius R.

12.2 Stokes’ theorem

Stokes’ theorem may be stated as follows:


Z I
(∇ × F) · dS = F · dl
S C

where S is the open surface bounded by the path C. Green’s theorem in the plane is a special case when
the path C and surface S are confined 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 P QRS outlined in bold in Fig. 18. The
neighbouring tiles that share edges with the bold tile are also shown, with an artificial gap between them
for clarity.

Since the tile is planar, Green’s theorem in the plane applies:


I Z
F · dl = (∇ × F) · dS
P QRS P QRS

Consider the four neighbouring tiles that share edges with P QRS e.g. the one sharing the edge P Q. For
−→
P QRS the contribution of this edge to the line integral is in the direction P Q whereas for the neighbouring
−→
tile it is in the opposite direction QP . Hence when the contributions of these two tiles are added together,
the contributions to the line integrals from the edge P Q 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.

Department of Materials, Imperial College London


MSE 201: Mathematics 41

S
R

P Q

Figure 18: Diagram of a single tile surface element in the derivation of Stokes’ theorem.

Examples

• Verify Stokes’ theorem for the vector field F = −y i + x j + zk

◦ for the hemispherical surface x2 + y 2 + z 2 = a2 , z ≥ 0:


Z
Consider the left-hand side: (∇ × F) · dS. ∇ × F = 2 k. In spherical polar coordinates
S
the surface element for the hemisphere is dS = a2 sin θ dθ dφ êr . Since êr · k = cos θ,
Z Z π/2 Z 2π
(∇ × F) · dS = 2 (a2 sin θ) cos θ dθ dφ
S θ=0 φ=0
"Z # ·Z ¸
π/2 2π
2
= a sin 2θ dθ dφ
θ=0 φ=0
· ¸π/2
1
= 2πa2 − cos 2θ = 2πa2
2 θ=0
I
For the right-hand side: F·dl, F·dl = x dy −y dx Use plane polar coordinates to parameterise
C
C: x = a cos φ, y = a sin φ:
I Z 2π Z 2π
F · dl = [(a cos φ)(a cos φ) − (a sin φ)(−a sin φ)] dφ = a2 dφ = 2πa2
C φ=0 φ=0

Hence Stokes’ theorem is verified.


◦ 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
I
• Prove that (∇ × u) · dS = 0 for any vector field u over any closed surface S.
S

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:

Department of Materials, Imperial College London


42 Vector calculus

Z
• f (r) dV is a scalar quantity derived from a scalar field f
V
Z
• F(r) dV is a vector quantity derived from a vector field F
V

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 defined by ρ ≤ a and |z| ≤ L/2.

• Calculate the volume integral of the vector field F = x2 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:


Z I
∇ · F dV = F · dS
V S

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 (x0 , y0 , z0 ). Then
Z Z x0 +δx Z y0 +δy Z z0 +δz µ ¶
∂Fx ∂Fy ∂Fz
∇ · F dV = + + dx dy dz
δV x=x0 y=y0 z=z0 ∂x ∂y ∂z

For the first term in the integrand, integrate with respect to x first. For the second and third terms first
integrate with respect to y and z respectively:
Z Z y0 +δy Z z0 +δz
∇ · F dV = [Fx (x0 + δx, y, z) − Fx (x0 , y, z)] dy dz
δV y=y0 z=z0
Z z0 +δz Z x0 +δx
+ [Fy (x, y0 + δy, z) − Fy (x, y0 , z)] dz dx
z=z0 x=x0
Z x0 +δx Z y0 +δy
+ [Fz (x, y, z0 + δz) − Fz (x, y, z0 )] dx dy
x=x0 y=y0

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 = x0 + δx has outward normal parallel to i and surface area element dy dz i
where as the ‘back’ side x = x0 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


MSE 201: Mathematics 43

Examples

• Verify the divergence theorem for the vector field F = x i + y j + z k for the unit cube 0 ≤ x ≤ 1,
0 ≤ y ≤ 1, 0 ≤ z ≤ 1.
Z
• Use the divergence theorem to evaluate the surface integral F · dS of F = (x + y 2 z) i + (xz 2 −
S
2y) j + (z + x2 + y 2 ) k over the open hemispherical surface x2 + y 2 + z 2 = a2 , 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 significance of the scale factors in orthogonal coordinate systems and recall them for
Cartesian, cylindrical polar and spherical polar coordinates

• find 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

You might also like