Professional Documents
Culture Documents
Roman Zwicky
• Email: roman.zwicky@ph.ed.ac.uk
• Web: http://www.ph.ed.ac.uk/∼rzwicky2/VC/main.html
• These are very similar to the ones of by Brian Pendleton. In addition I have introduced
index notation and emphasised the vector nature of the del operator.
Abstract
In this course, we shall study differential vector calculus, which is the branch of mathematics
that deals with differentiation and integration of scalar and vector fields. We shall encounter
many examples of vector calculus in physics.
Timetable
Students should attend both lectures and one tutorial workshop each week. Tutorials start
in Week 2.
Genealogy
Contents
1 Fields and why we need them in Physics 1
1.1 Vectors and scalars . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.3 Examples: Gravitation and Electrostatics . . . . . . . . . . . . . . . . . . . . 2
1.4 The need for vector calculus . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.5 Revision of vector algebra . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.6 Index notation - the use of tensor calculus . . . . . . . . . . . . . . . . . . . 6
i
3.1.2 More examples on grad . . . . . . . . . . . . . . . . . . . . . . . . . . 14
3.1.3 Newton’s Law of Gravitation: . . . . . . . . . . . . . . . . . . . . . . 15
3.2 Identities for gradients . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
3.3 The operator del . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
3.4 Equations of points, lines and planes . . . . . . . . . . . . . . . . . . . . . . 18
3.4.1 The position vector . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
3.4.2 The equation of a line . . . . . . . . . . . . . . . . . . . . . . . . . . 19
3.4.3 The equation of a plane . . . . . . . . . . . . . . . . . . . . . . . . . 19
7 Line integrals 29
7.1 Revision of ordinary integrals . . . . . . . . . . . . . . . . . . . . . . . . . . 29
7.2 Motivation and formal definition of line integrals . . . . . . . . . . . . . . . . 30
7.3 Parametric representation of line integrals . . . . . . . . . . . . . . . . . . . 31
7.4 Current loop in a magnetic field . . . . . . . . . . . . . . . . . . . . . . . . . 34
8 Surface integrals 35
8.1 Parametric form of the surface integral . . . . . . . . . . . . . . . . . . . . . 37
ii
9.2 Flux of a vector field through a surface . . . . . . . . . . . . . . . . . . . . . 42
9.3 Other surface integrals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
10 Volume integrals 46
10.1 Integrals over scalar fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
10.2 Parametric form of volume integrals . . . . . . . . . . . . . . . . . . . . . . . 48
10.3 Integrals over vector fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
10.4 Summary of polar coordinate systems . . . . . . . . . . . . . . . . . . . . . . 51
iii
15.1 Orthogonal curvilinear coordinates . . . . . . . . . . . . . . . . . . . . . . . 79
15.1.1 Examples of orthogonal curvilinear coordinates (OCCs) . . . . . . . . 79
15.2 Elements of length, area and volume in OCCs . . . . . . . . . . . . . . . . . 80
15.3 Components of a vector field in curvilinear coordinates . . . . . . . . . . . . 82
15.4 Div, grad, curl and the Laplacian in orthogonal curvilinears . . . . . . . . . 82
15.4.1 Gradient . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
15.4.2 Divergence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
15.4.3 Curl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
15.4.4 Laplacian of a scalar field . . . . . . . . . . . . . . . . . . . . . . . . 86
15.4.5 Laplacian of a vector field . . . . . . . . . . . . . . . . . . . . . . . . 86
15.5 ∇-expression in cylindrical and spherical coordinates . . . . . . . . . . . . . 87
15.6 An alternative derivation of the divergence in OCC . . . . . . . . . . . . . . 88
iv
Synopsis
We will cover all the topics below, but not necessarily in that order.
Syllabus
The Contents section of this document is the course syllabus!
Books
The course will not use any particular textbook. The first six listed below are standard
texts; Spiegel contains many examples and problems. Matthews works with index notation
(δij - and εijk -tensors) which is very useful. All are available from Amazon.co.uk
v
Prologue
This course deals with vector calculus and its differential version. In particular we will study
the vector (or more generally the tensor tensor) formalism of the three dimensional Euclidian
space. Intuitively the latter is the space we live in and it is therefore not surprising that
there are many applications. Having our three dimensional space as a basis will allow us
to resort to geometrical understanding. One of the most notable applications of the three
dimensional vector calculus is Maxwell’s theory of electromagnetism.
There is no problem in extending any of the learnt material to higher dimensional spaces.
This becomes relevant when studying Einstein’s theory of special relativity where space
and time are united into a four dimensional space for example. Results even find their
counterparts in curved spaces which is the basis of differential geometry and Einstein’s theory
of general relativity. The underlying structure of the three dimensional vector calculus is the
rotational symmetry of the three dimensional space which is described by the rotation group
denoted by SO(3). From a mathematical point of view vectors are objects that transform
in a definite way under rotations. The latter subject is known as representation theory and
is part of the course on symmetry of quantum mechanics which I also happen to teach. Of
course these matters go beyond the scope of this course but the reason for mentioning them
is to broaden your horizon and mainly to motivate you for this course. In fact one might
say that having a solid basis in vector calculus opens the door to an understanding of these
subsequent matters.
1
e 1 · e 1 = e 2 · e 2 = e 3 · e 3 = 1 and e 1 · e 2 = e 1 · e 3 = e 2 · e 3 = 0 . (1)
In such a basis, we may write the position vector r in terms of its Cartesian components
(x1 , x2 , x3 ) as follows
r ≡ x1 e 1 + x2 e 2 + x3 e 3 .
This is an important notation that you will have to remember throughout p this course. The
length or magnitude of the vector r is a scalar and is denoted by r ≡ |r| = x21 + x22 + x23 .
Any vector a may written in this notation as2
3
X
a = a1 e 1 + a2 e 2 + a3 e 3 = ai ei .
i=1
1.2 Fields
In physics we have quantities that vary in some region of space, e.g. the temperature T (r)
of the ocean depends on position r. To study this variation we require the concept of a field.
In these lectures we shall develop the calculus of scalar fields and vector fields.
If to each point r in some region of space there corresponds a scalar φ(x1 , x2 , x3 ), then φ(r)
is a scalar field: φ is a function of the three Cartesian position coordinates (x1 , x2 , x3 ).
Examples: the temperature distribution in a body T (r), pressure in the atmosphere P (r),
electric charge (or mass) density ρ(r), electrostatic potential φ(r), the Higgs field h(r).
Similarly a vector field assigns a vector V (r) to each point r of some region.
Examples: velocity in a fluid v(r), electric current density j(r), electric field E(r), magnetic
field B(r) (actually a pseudo-vector field).
A vector field in 2-d can be represented graphically, at a carefully selected set of points r, by
an arrow whose length and direction is proportional to V (r), e.g. wind velocity on a weather
forecast chart.
a = ax i + ay j + az k or perhaps as a = ax ex + ay ey + az ez .
There are good reasons for our conventions: the ‘123’ notation is succinct; it’s easier to generalise to an
arbitrary number of dimensions; and it avoids possible confusion between the index i and the unit vector i
and it more suitable to the tensor calculus.
2
The force F on a particle3 of mass m1 at the point with position vector r due to a particle
of mass m situated at the origin is given (in SI units) by
r
F (r) = − Gmm1 3
r
where G = 6.672 59(85)×10−11 N m2 kg 2 is Newton’s Gravitational Constant.
3 The magnitude
of F (r) is proportional to the length of the vector r/r , which is just r /r = r/r3 = 1/r2 ,
3
Electrostatics: Coulomb’s Law was also deduced experimentally; it states that the force
F (r) on a particle of charge q1 situated at r due to a particle of charge q situated at the
origin is given (in SI units) by
q1 q r
F = ,
4π0 r3
where 0 ≡ 107 /(4πc2 ) = 8.854 187 817 · · · × 10−12 C 2 N −1 m−2 is called the permittivity of
free space. The electric field E(r) at r due to the charge q at the origin is defined by
q r
F (r) ≡ q1 E(r) ⇒ E(r) = (4)
4π0 r3
Again the test charge q1 is taken as small, so as not to disturb the electric field from q.
The electrostatic potential φ(r) is then (see later)
q
φ(r) = (5)
4π0 r
and the potential energy of a charge q1 in the electric field is V = q1 φ.
Note that electrostatics and gravitation are very similar mathematically, the only real dif-
ference being that the gravitational force between two masses is always attractive, whereas
like charges repel.4
3
In this course, a “particle” will refer to an idealised point particle, i.e. a particle of negligible size.
4
From the view of particle physics this originates in the so-called spin of the force carrier. The electro-
magnetic and gravitational force are transmitted by so-called photons and gravitons which have spin one
and two respectively. You may think of a spin one object as an ordinary vector.
3
1.4 The need for vector calculus
At this point, we may ask several questions:
(i) How are equations (2) through (5) changed when the mass m or the charge q moves
away from the origin?
(ii) How do the vector fields in equations (2) and (4) change when the mass m1 or the
charge q1 moves a small distance from position r to position r + δr — where δr is very
small but its direction is arbitrary? In the language of mathematics, how do we define
derivatives of a vector field with respect to the position vector?
(iv) What happens when there are more than two masses or charges, or when the masses
and charges have a finite size? For example, when the masses are lumpy asteroids or
the charged objects are irregular lumps of metal.
a = a1 e 1 + a2 e 2 + a3 e 3 (6)
which is also an orthonormal (and therefore called orthonormal basis). All quantities in this
course will first be defined in Cartesian coordinates before investigating them in other types
of coordinates. Often
a is represented by (a1 , a2 , a3 ) .
4
Figure 1: Geometric interpretation of scalar- (left) and cross-product (right).
5
The properties of the determinant imply that (a, b, c) = (b, c, a) = (c, a, b) – cylic permuta-
tion, and (a, b, c) = −(b, a, c), etc – non-cyclic permutation.
If a, b and c are three concurrent edges of a parallelepiped, its volume is (a, b, c). This
assertion follows from the combined geometric interpretation of the scalar product and cross-
product given in figure 1.
where ESC stands for the Einstein summation convention. The latter implies that whenever
there are two identical indices then a summation over that index is implied. Such indices
6
The word tensor originates from physics, namely from Euler stress tensor which describes the tension in
a material. A stress tensor is a 2-tensor with symmetric indices.
7
If one works in spaces with curvature such as in general relativity then one needs to distinguish so called
co- and contravariant indices. This is far beyond the scope of this course and so is the general notion of a
tensor which we just mention in passing by here. As indicated above the notions introduced below will safe
us a lot of writing in the demonstrations.
6
are also known as dummy indices. In using tensor calculus you MUST pay attention never
to introduce the same dummy index twice (e.g. a · b c · d can be replaced by ai bi cj dj but
ai bi ci di is ambiguous and therefore wrong). In order to safe ourselves writing we shall use the
Einstein summation convention as do many classic textbooks on physics and mathematics.
The vector product (9) can be written as
3
ESC
X
a×b= εijk ai bj e k = εijk ai bj e k , (14)
i,j=1
where we made use of the Einstein summation convention. The ith component of the vector
product is then given by
The latter form is the one which is most useful for manipulations. The triple scalar product
(10) is written in indices notation as
Beyond the somewhat minimal definition above we intend to give a few useful rules and
properties:
e i · e j = δij . (18)
will be most useful for this course. You can convince yourself of the correctness of
this equation by checking it for fixed values of the indices. For what this course is
concerned we will just use it without being concerned about the deeper reason why
such an identity has to exist.
7
– The ijk symbol is antisymmetric in its three indices. I.e.
• If any two antisymmetri c tensor indices take the same value then the entry is zero.
For example 113 = 0.
• The contraction of two antisymmetric indices with two symmetric indices is zero. Let
sij = +sji and aij = −aji symmetric and antisymmetric indices respectively. Hence
where in the second step we have relabelled the dummy indices i and j. For example
δij εijk = 0.
As one immediate application of the tensor calculus we are going to rederive the the vector
triple product a × (b × c)
a × (b × c) = (a · c) b − (a · b) c . (23)
which was derived in Linear Algebra and Several Variable Calculus by writing out each
component. Using the tensor formalism and the Lagrange identity one gets
(9) (9)
(a × (b × c))i = ijk aj (b × c)k = ijk aj klm bl cm
(19) (17)
= (δil δjm − δjl δim )aj bl cm = (a · c)bi − (a · b)ci . (24)
This might appear to be complicated at first view but one gets used to it rather quickly and
it is much more elegant and compact than writing out everything in terms of components.
A large part of this course consists in generalising identities like 23 to the case where one
of the vectors is the differential vector nabla ∇. This mainly involves taking the Leibniz
(product) rule of differentiation into account.
8
(i) Suppose that
φ(r) = r2 ≡ x21 + x22 + x23
√
The level surface φ(r) = c is the surface of a sphere of radius c centred on the origin.
If we vary c, we obtain a family of level surfaces or equipotentials which are concentric
spheres.9
(ii) The electrostatic potential at r due to a point charge q situated at the point a is
q 1
φ(r) =
4π0 |r − a|
where |r − a| denotes the length of the vector r − a :
q p
|r − a| = (r − a) · (r − a) = (x1 − a1 )2 + (x2 − a2 )2 + (x3 − a3 )2
The equipotentials or level surfaces are concentric spheres centred on the point a, as
shown in the figure.
r
r−a
O
a
q
9
Taylor’s theorem: Recall that if f (x) is a function of a single variable x, Taylor’s theorem
states that f (x + δx) can be expanded in powers of δx
∂f (a, b, ..)
∂a f (a, b, ..) ≡ , (25)
∂a
which will safe us a lot of writing in the notes and in particular during the lecture.10
exist, and are continuous at every point r ∈ R. We will generally assume scalar fields are
continuously differentiable.
Let φ(r) be a scalar field, and consider 2 nearby points: P with position vector r, and Q
with position vector r + δr, where δr has components (δx1 , δx2 , δx3 ). Assume P and Q lie
on different level surfaces as shown:
δr_ Q
P
φ = constant2
_r φ = constant1
O
10
For the derivatives with respect to Cartesian coordinates it is common practice to introduce the even
(25)
more compact notation ∂i f (x1 , x2 , x3 ) ≡ ∂xi f (x1 , x2 , x3 ) = ∂f (x∂x
1 ,x2 ,x3 )
i
for i = 1..3; whenever there is no
ambiguity. In this course I shall refrain from using this shorthand and remain at the level of (25).
10
Now use Taylor’s theorem to first order in each of the 3 variables x1 , x2 and x3 to evaluate
the change in φ as we move from P to Q
where we assumed that the higher order partial derivatives exist. For sufficiently small δr
we can neglect these higher order terms, and we have
δφ = ∇ φ · δr
where the 3 quantities (∂x1 φ , ∂x2 φ , ∂x3 φ) form the Cartesian components of a vector field
∇ φ(r), which we can write as
The vector field ∇ φ(r) is called the gradient of φ(r), and is pronounced ‘grad phi’.
Example: Calculate the gradient of the scalar field φ(r) = r2 = x21 + x22 + x23 .
First, recall that the partial derivative ∂x1 φ is the derivative of φ(r) = φ(x1 , x2 , x2 ) with
respect to x1 , keeping x2 and x3 fixed, etc.
So ∂x1 x1 = 1 and ∂x1 x2 = 0 . Similarly ∂x1 x21 = 2x1 and ∂x1 x22 = 0 , etc.
Similarly for the 2nd and 3rd components (exercise), and hence
The vector ∇ r2 = 2r points radially outwards from the origin with magnitude 2r. The level
surfaces, r2 = constant, are spheres centred on the origin.
11
Example: Calculate ∇ (a · r) where a is a constant vector. The first component is
∂x1 (a1 x1 + a2 x2 + a3 x3 ) = a1 + 0 + 0
∇ (a · r) = a1 e 1 + a2 e 2 + a3 e 3 = a
δφ = ∇ φ · δr = 0
∆
_φ
P
δ_r
Q
.
In this case, the infinitesimal vector δr lies in the level surface at r, and since the above
equation holds for all such δr, we may deduce that
To construct a unit normal n(r) to the level surface at r, we divide ∇ φ by its length
∇ φ(r)
n(r) = when |∇ φ(r)| =
6 0
|∇ φ(r)|
δφ = ∇ φ · δr = (∇ φ) · ŝ δs
12
Now divide by δs, and then let δs → 0. The rate of change of φ, with respect to distance, s,
in the direction of ŝ , is then
dφ
= ŝ · ∇ φ = |∇ φ| cos θ (27)
ds
where θ is the angle between ŝ and the normal to the level surface at r.
dφ
= ŝ · ∇ φ is called the directional derivative of the scalar field φ in the direction of ŝ
ds
Recall that this direction is normal (perpendicular) to the level surface. A familiar example
is that of contour lines on a map: the steepest direction is perpendicular to the contour lines,
i.e. straight up the hill.
Example: Find the directional derivative of √ φ(r) = x1 x2 (x1 + x3 ) at the point (1, 2, −1)
in the direction of the unit vector (e 1 + e 2 )/ 2.
Physical example: Let T (r) be the temperature of the atmosphere at the point r. An
object flies through the atmosphere with velocity v ≡ dr/dt . Obtain an expression for the
rate of change of temperature experienced by the object.
As the object moves from r to r + δr in time δt, it experiences a change in temperature
δr
δT = ∇ T · δr = ∇T · δt
δt
dT (r)
= v · ∇ T (r)
dt
13
3 More on gradient, the operator del
The potential energy of a particle of mass m at a modest height, z, above the Earth’s surface
is V = mgz. The force due to gravity can be written as
F = −∇ V = −mg e z
We conclude that for φ(r) = r = “the length of the position vector at position r”, the
gradient ∇ φ is just the unit vector r̂ which points radially outwards from the origin.11
It has the same magnitude everywhere, but its direction is normal to the level surfaces
which are spheres centered on the origin.
1 1
(ii) Calculate ∇ φ for φ(r) = =p 2
r x1 + x22 + x23
The first component of ∇ (1/r) is
1 x1
∂x1 (x21 + x22 + x23 )−1/2 = − (x21 + x22 + x23 )−3/2 2x1 = − 3
2 r
11
We use the notations r̂ and e r for a unit vector in the direction of the position r.
14
Similarly for the second and third components:
x2 x3
∂x2 (x21 + x22 + x23 )−1/2 = − and ∂x3 (x21 + x22 + x23 )−1/2 = −
r3 r3
Hence
1 1
∇ (1/r) = − r = − r̂
r3 r2
For φ(r) = 1/r = “the inverse of the length of the position vector”, the gradient ∇ φ
points radially inwards towards the origin, with magnitude 1/r2 . The level surfaces
are again spheres centered on the origin.
Armed with this result, we now return to the force F (r) on a mass m1 at r due to a
mass m at the origin:
Gm1 m
F (r) = − r
r3
Using the result ∇ (1/r) = −r/r3 derived in (ii) above, we may write this as
F (r) = − ∇ V (r)
∇ (φ + ψ) = ∇ φ + ∇ ψ
15
Proof: It follows from the partial derivatves being distributive. More explicitly for
the ith component,
∇ (φ + ψ) i ≡ ∂xi (φ + ψ) = ∂xi (φ) + ∂xi (ψ) = ∇ φ i + ∇ ψ i .
If you’re not comfortable with evaluating the ith component, then put i = 1 to recover
the expression in the first derivation. Then put i = 2, then i = 3. After a while, it
seems perfectly natural to consider the ith component from the beginning.
(ii) Product rule ∇ (φ ψ) = ∇φ ψ + φ ∇ψ
Proof: Follows from the Leibniz rule (∂x (f g) = (∂x f )g + f (∂x g)) of ordinary calculus.
More explicitly for the ith component,
∇ (φψ) i = ∂xi (φψ) = ∂xi (φ) ψ + ∂xi (ψ) φ = ∇ φ i ψ + φ ∇ ψ i .
∇ F (φ) = ∂φ F (φ) ∇ φ
Proof: Follows from the chain rule of ordinary calculus. The ith component is
∇ F (φ) i = ∂xi F (φ) = ∂φ F (φ)∂xi φ = ∂φ F (φ) ∇ φ i
where we used the ordinary chain rule to get the second-last expression.
p
Example of chain rule: If φ(r) = r = x21 + x22 + x23 we can use result (i) from sec-
tion (3.1.2), ∇ r = r/r, to get
F 0 (r)
∇ F (r) = ∂r F (r) ∇ r = r
r
where, as usual, F 0 (r) denotes the derivative of the function F (r) with respect to r.
If F φ(r) = rn , we have φ(r) = r as in the previous example, and we obtain the important
result
1
∇ (rn ) = ∂r rn ∇ r n rn−1 n rn−2 r
= r =
r
NB: This is a much quicker way of evaluating ∇ (rn ) than writing out the components – as
you were asked to do in Homework Problem 1.8.
Setting n = −1 gives
r
1
∇ = − 3
r r
which reproduces result (ii) from section (3.1.2).
16
m
Example: Calculate ∇ φ when φ(r) = rn a · r .
m m m
∇ rn a · r = ∇ rn a · r + rn ∇ a · r
(using the product rule)
m m−1
= ∇ rn a · r + rn m a · r
∇ a·r (using the chain rule)
m m−1
= n rn−2 a · r r + mrn a · r a
where, in the last line, we used ∇ rn = n rn−2 r and ∇ a · r = a.
This example demonstrates the “toolkit” approach to evaluating gradients of complicated
expressions. Here,we combined the product rule for grad with known gradients of “simple”
scalar fields a · r and rn , which you should know, and be able to work out from first
principles.
∂ ∂ ∂
∇ ≡ e1 + e2 + e3 ≡ e i ∂xi (28)
∂x1 ∂x2 ∂x3
where we have used the standard Einstein summation convention and the shorthand (25).
We call ∇ an operator since it operates on something to its right. It is a vector opera-
tor because it produces a vector field when it operates on a scalar field. The derivatives
transform in the same way as coordinates12 which are vectors and are therefore themselves
vectors.
We have seen how ∇ acts on a scalar field to produce a vector field. We can take products
of the vector operator ∇ with other vector quantities to produce new operators and fields
in the same way we can take scalar and vector products of two vectors.
For example, the directional derivative of φ in the direction ŝ, is given by ŝ · ∇ φ.
More generally, if a = ai e i is any vector (or any vector field), we can interpret a · ∇ = ai ∂xi
as a scalar operator
The operator a · ∇ acts on a scalar field to its right to produce another scalar field
(a · ∇ ) φ = ai ∂xi φ = a · (∇ φ)
We can also act with this operator on a vector field b(r) to get another vector field,
(a · ∇ ) b = e 1 (a · ∇ ) b1 + e 2 (a · ∇ ) b2 + e 3 (a · ∇ ) b3
The alternative expression a · ∇ b is undefined because ∇ b doesn’t make sense – just like
a b doesn’t make sense.
(For this reason, the parentheses are sometimes omitted, and a·∇ b is taken to mean (a·∇ ) b,
but I wouldn’t recommend doing this because it often leads to errors.)
12
On a curved space this statement has to be refined. The derivatives transform contravariant and the
coordinates transform covariant like bra and ket vectors in quantum mechanics. This can also be deduced
from the orthogonality relation (26). These remarks go beyond the scope of this course and are given to you
to encourage to broaden your horizon in further studies.
17
Attention to ordering:
• We have written the orhtonormal vectors e i to the left of the derivatives. For Cartesian
coordinates ∂xj e i = 0 and it does therefore not matter whether we write the orhtonor-
mal vectors e i to the left or to the right of the partial derivatives. For cylindrical and
spherical coordinates this is not the case and this is why it is better to be strict, i.e.
e i to the left of the derivatives in (28).
• Great care is required with the order in products since, in general, products involving
operators are not commutative. For example, if a(r) is a vector field
a · ∇ 6= ∇ · a
The quantity a · ∇ is a scalar differential operator, whereas ∇ · a is a scalar field called
the divergence of a – see later.
Example: If a(r) is a vector field, show that a · ∇ r = a. This is left as an
(important) tutorial exercise for the student.
Examples: In section (2.2) we showed that, for small displacements δr, we have
φ(r + δr) = φ(r) + ∇ φ · δr + O (δr)2 = φ(r) + δr · ∇ φ + O (δr)2
(29)
If we set δr = a, where a is an arbitrary (but small) constant vector, we have13
As we shall see, this expression is is very useful when φ(r) is the electrostatic potential.
We can expand a vector field about some point r in exactly the same way. For example, let
E(r) be the electric field at r. If we take the result of equation (29), and simply replace φ(r)
by (say) the first component of the electric field E1 (r), we obtain:
E1 (r + δr) = E1 (r) + δr · ∇ E1 (r) + O (δr)2
Doing the same for the second and third components of the electric field, and again setting
δr = a, gives
E(r + a) = E(r) + a · ∇ E(r) + O (a2 )
(31)
Equations (30) and (31) arise in the study of dipoles in electrostatics. Incidentally (31) and
(29) answer questions (ii) and (iii) posed in section ??.
18
3.4.1 The position vector
P
The equation for a point is simply r = a where a is some constant
_r vector.
O
Suppose that the point P lies on a line which passes through a point A, which has a position
vector a with respect to an origin O. Let P have position vector r relative to O, and let u
be a vector through the origin in a direction parallel to the line.
−→ −→
From the figure, r = OA + AP , which, for some λ, we may write
r_ P as
_u
r = a + λu
O a_ A This is the explicit or parametric equation of the line, i.e. as we
vary the parameter λ from −∞ to ∞, r describes all points on
the line.
Rearranging and using u × u = 0, we can also write this as
(r − a) × u = 0
or
r×u=c
where c = a × u is normal to the plane containing the line and the origin.
Notes
(ii) r × u = 0 is the equation of a line through the origin (a and u are parallel in this case.)
O
−→
We can express the vector AP in terms of u and v, so that
−→
r = a + AP = a + λu + µv (32)
19
for some λ and µ. This is the parametric equation of the plane.
Now define the unit normal to the plane
u×v
n= .
|u × v|
Clearly u · n = v · n = 0. Rearranging equation (32), and using these results, we find the
implicit equation for the plane
(r − a) · n = 0 .
r·n = p
Note: r · n = 0 is the equation for a plane through the origin (with unit normal n).
Example: Recall that ∇ (a · r) = a when a is a constant vector. Thus the level surfaces
of the scalar field a · r are planes orthogonal to a.
4.1 Divergence
The divergence of a vector field a (6) (pronounced ‘div a’ ) is obtained by taking the scalar
product of the vector with the del operator (28) as follows
div a(r) = ∇ · a(r) = ∂xi aj (e i · e j ) = ∂xi aj δij = ∂xi ai (33)
where we have assumed that ∂xi e j = 0 which is true for Cartesian coordinates in particular.
This is no longer true for cylindrical and spherical coordinates and complicates the derivation
of the divergence, Laplacian. We shall investigate this viewpoint in the very last subsection
15.6. which will complicate matters slightly. For later reference we rewrite the divergence in
Cartesian coordinates using the standard Einstein summation convention and the shorthand
(25):
∇ · a is a single number at each point r, and it’s invariant under a change of coordinates
(basis) and therefore a scalar or scalar field.
20
Example: If a(r) = r then ∇·r = 3 which is a very important and useful result.
Explicitly:
∇ · r = ∂ xi x i = 1 + 1 + 1 = 3 (35)
4.2 Curl
We define the curl of a vector field a(r) by
∇ × a is a vector field.14
We can write the curl in determinant form, as we did for the ordinary vector product:
e1 e2 e3
∇ × a = ∂x1 ∂x2 ∂x3 = ijk e i ∂x ak
j
a a2 a3
1
(36)
where we have given the definition using the determinant as well as the one using the ε-
tensor. You may or may not find the former form more convenient for actual computation
whereas the latter is certainly more efficient for proofs. More explicitly, the components of
∇ × a are:
∇ × a 1 = ∂ x 2 a3 − ∂ x 3 a2 ∇ × a 2 = ∂x3 a1 − ∂x1 a3 ∇ × a 3 = ∂x1 a2 − ∂x2 a1
21
Example: Compute the curl of a = x21 x2 e 1 + x22 x1 e 2 + x1 x2 x3 e 3 :
e1 e2 e3
∇ × a = ijk e i ∂xj ak = ∂x1 ∂ x2 ∂x3
x2 x x 2 x x x x
1 2 2 1 1 2 3
We have given both forms for the curl and leaving it up to the student to choose which one
to use. Maybe you should use both and convince yourself that they indeed give the same
result.
This defines the so-called Laplacian operator (sometimes called the Laplacian)
3
∂2 ∂2 ∂2 X
∇2 = + + = ∂x2i , (39)
∂x21 ∂x22 ∂x23 i=1
where we have used the shorthand (25) but have not dared to imply the Einstein summation
convention in the last equality because of an anticipated degree of ambiguity. In Cartesian
coordinates applied to a scalar function φ(r):
3
∂ 2φ ∂ 2φ ∂ 2φ X 2
∇2 φ = + + = ∂xi φ (40)
∂x21 ∂x22 ∂x23 i=1
Remarks
• The Laplace operator (39), operates on functions to its right. In (40) the Laplace
operator acts on a scalar. The next item clarifies how this generalises.
• This Laplacian, being a scalar, can act on any tensor without changing its degree. For
example for a vector one (just) replaces φ → v in Eq. (40). In this course it will only
act on scalars and vectors
• From Eq. (38) it ought to be understood that ∇ · (∇φ) = ∇2 φ.
• In Eq. (38) in the second equality we have assumed that ∂xi e j = 0. This assumption
is valid for Cartesian coordinates but not for cylindrical or spherical coordinates which
will complicate matters slightly.
22
Example: Evaluate ∇2 r2 and ∇2 a · r where a is a constant vector.
∇2 r2 = ∇ · ∇ r2 = ∇ · 2r = 2 × 3 = 6 .
∇2 a · r = ∇ · ∇ a · r
= ∇·a = 0 (because a is a constant)
We could have performed these calculations using components, but that would take longer.
Example: Evaluate ∇2 rn .
∇2 rn = ∇ · ∇ rn = ∇ · nrn−2 r
= ?
We could evaluate the last expression by writing out its components, but we shall be patient
and work out a better way of doing it in the next section.
B. ∇ × (a + b) = ∇ × a + ∇ × b
The proofs of these are straightforward using components and they follow from the fact that
div and curl are linear operations.
23
5.2 Product laws: one scalar field and one vector field
The results of taking the div or curl of products of vector and scalar fields are the most
useful. They are predictable but they need a little care.
C. ∇ · (φ a) = ∇φ · a + φ ∇ · a
D. ∇ × (φ a) = (∇ φ) × a + φ ∇ × a
Proof of (F): Using Leibniz rule and the double cross product formula (6) can be derived.
(23)
∇ × (a × b) = ∇ · b a − ∇ · a b = ∇ · b a + b · ∇ a − ∇ · a b − a · ∇ b .
After the first equality the nabla operator ∇ is meant to act on both a and b on the left. In
this case it did not seem necessary to go to index notation but you could do that yourself as
an additional exercise if you wanted.
24
Example: Show that ∇ · r−3 r = 0, for r 6= 0, where as usual r = |r|.
−3 −3
3 3
= 5
r · r + 3 = 5 r2 + 3 = 0 (except at r = 0)
r r r r
where we used the results ∇ rn = n rn−2 r and ∇ · r = 3 that we derived previously.
Proofs of (H) and (I) are readily obtained directly in index notation. You should know (H)
and (I), and knowing (J) is really, really useful!15
Proof of (H):
(22)
∇ × ∇ φ = εijk ∂xj ∂xk φ = 0
where in the last step we used the result that partial derivatives and therefore ∂xj ∂xk is a
symmetric tensor.
Proof of (I): This is (very) similar to (H) and is left as a tutorial exercise.
2φ0 (r) 1 0
∇2 φ(r) = φ00 (r) + = 2 r2 φ0 (r)
r r
15
A mnemonic for the Laplacian acting on a vector field is GDMCC – Grad-Div Minus Curl-Curl, pro-
nounced g(i)d(u)mcc!
25
where the prime denotes differentiation with respect to r. Proof of this relation utilises the
chain rule
dφ(r) r
∇ φ(r) = ∇ r = φ0 (r)
dr r
and is left to the tutorial.
a = c × r.
c×r
1 1
∇× = ∇ × c × r + ∇ × c × r
r3 r3 r3
r 1
= −3 × c × r + 3 2c
r5 r
1 2 2 3 r·c r c
= −3 5 r c − r · c r + 3 c = −
r r r5 r3
where we used ∇ rn = nrn−2 r with n = −3, and ∇ × c × r = 2c
Physical example: The vector potential of an electric dipole has the form A(r) = c × r /r3 .
5.5 Summary
Elementary results: We can calculate div, grad, curl and the Laplacian of many of the
scalar and vector fields that occur in physics using the following elementary results, which
you must know and be able to derive:
Identities for scalar fields: You must know, and be able to derive, all of the following
for scalar fields φ(r) and ψ(r):
dF (φ)
(iii) Chain rule: If F (φ(r)) is a scalar field, then ∇ F (φ) = ∇ φ(r)
dφ
Important example: ∇ f (r) = (f 0 (r)/r) r
26
Identities for vector fields: For vector fields a(r) and b(r), and scalar fields φ(r):
A. ∇ · (a + b) = ∇ · a + ∇ · b
B. ∇ × (a + b) = ∇ × a + ∇ × b
C. ∇ · (φ a) = ∇ φ · a + φ ∇ · a
D. ∇ × (φ a) = (∇ φ) × a + φ ∇ × a
E. ∇ · a × b = b · ∇ × a − a · ∇ × b
F. ∇ × a × b = ∇ · b a + b · ∇ a − ∇ · a b − a · ∇ b
G. ∇ a · b = a · ∇ b + b · ∇ a + a × ∇ × b + b × ∇ × a
H. ∇ × ∇ φ = 0 (curl grad φ is always zero)
I. ∇ · ∇ × a = 0 (div curl a is always zero)
J. ∇ × ∇ × a = ∇ ∇ · a − ∇2 a
You must know and be able to use & derive identities A-D and H-I. You must be familiar
with the others, and be able to use them in calculations.
27
6 Geometrical/physical interpretation of div and curl
A full interpretation of the divergence and curl of a vector field is best left until after we
have studied the divergence theorem and Stokes’ theorem respectively. However, we can gain
some intuitive understanding by looking at simple examples where div and/or curl vanish.
Example: Consider the radial field a(r) = r. We have just
shown that ∇ · r = 3 and ∇ × r = 0. We may sketch the
vector field a(r) by drawing vectors of the appropriate direction
and magnitude at selected points. These give the tangents of
‘flow lines’. Roughly speaking, in this example the divergence
is positive because bigger arrows come out of any point than go
into it. So the field ‘diverges’. (Once the concept of flux of a
vector field is understood this will make more sense.)
Angular velocity: Consider a point in a rigid body rotating with angular velocity ω = ω ω̂.
The magnitude ω = |ω| is the angular speed of rotation measured in radians per second,
and the unit vector ω̂ lies along the axis of rotation. Let the position vector of the point
with respect to an origin O on the axis of rotation be r.
ω
_
You should convince yourself that the velocity of the point is given
by v = ω × r by checking that this gives the right direction for v;
_
v
that it is perpendicular to the plane of ω and r; that the magnitude
|v| = ωr sin θ = ωρ, where ρ is the radius of the circle in which the
θ _r
point is travelling.
O
_v
_v
To evaluate ∇ × ω × r and ∇ · ω × r , we recall that ∇ × r = 0 (37) and ∇ · r = 3 (35)
and the identities (5) and (6) from section 5.5. One gets
(F )
∇× ω×r = ∇ · r ω + r · ∇ ω −(∇ · ω )r − ω · ∇ r
| {z } | {z }
=0 =0
(26)
= 3ω − ωi ∂xi (xj e j ) = 3ω − wi δij e j = 2ω (41)
and
(E)
∇ · (ω × r) = r · (∇ × ω ) − ω · (∇ × r) = 0 . (42)
| {z } | {z }
=0 =0
28
Thus we have two more important and useful results, which hold for all constant vectors ω
∇ × ω × r = 2ω and ∇· ω×r =0
To understand intuitively the non-zero curl of v(r) = ω × r, imagine that the flow lines are
those of a rotating fluid with a ball centred on a flow line of the field. The centre of the ball
will follow the flow line. However the effect of the neighbouring flow lines is to make the ball
rotate. Therefore the field has non-zero ‘curl’, and the axis of rotation gives the direction
that the field rotates or ‘curls’ around.
In the previous example, a(r) = r , the ball would just move away from the origin without
rotating, therefore the field r has zero curl. Colloquially, the vector field a(r) = r , doesn’t
“curl around” any point at all.
7 Line integrals
Having completed our study of differential vector calculus using Cartesian coordinates, we
now embark on integral vector calculus.
We begin by revising the standard definition of the integral of a function of a single variable.
We then introduce line integrals, surface integrals and volume integrals. We shall assume
familiarity with integrals over plane areas (double integrals) using Cartesian and plane polar
coordinates, as covered in Linear Algebra and Several Variable Calculus or the School of
Mathematics course Several Variable Calculus and Differential Equations.
In interval j, pick an arbitrary point x∗j with xj ≤ x∗j ≤ xj+1 , as illustrated in the figure.
29
f (x)
f (x∗j )
x
a x1 xj xj+1 b
x∗j xn−1
It canPbe shown that Sn → unique limit as we let n → ∞ and (xj+1 − xj ) → 0 for all j,
with n−1j=0 (xj+1 − xj ) = (b − a) kept fixed.
16
In this limit Z b
Sn → f (x) dx
a
One can then prove the usual properties of integrals. Note that we also define
Z a Z b
f (x) dx = − f (x) dx
b a
30
This is called a line integral along the curve C.
Formal definition: Let a(r) be a vector field defined in the region R, and let C be a curve
in R between two points P and Q. Let r be the position vector at some point on the curve,
and let dr be an infinitesimal vector along the curve at r .
p
The magnitude of dr is the infinitesimal arc length: ds = dr · dr
If t is the unit vector tangent to the curve at r (i.e. t points in the direction of dr at r), then
dr = t ds
The line integral is defined formally as a Riemann sum by dividing the curve into n intervals
Z Z n−1
lim X
(i)
(i)
a · dr = a · t ds ≡ (i) a r ·t δs(i)
δs → 0
C C n → ∞ i=0
the ith interval having length δs(i) , unit tangent vector t(i) , etc. It can be shown that the
limit is unique for sufficiently smooth vector fields a(r).
The integrand a · t is the component of a along dr at the point r.
In Cartesian coordinates, we have
Z Z 3
Z X
a · dr = (a1 dx1 + a2 dx2 + a3 dx3 ) = ai dxi (43)
C C C i=1
NB: In general, the line integral depends on the path joining P and Q. For example, the a1
component is a1 (x1 , x2 , x3 ) and all three Rcoordinates will generally change at once along the
path. Therefore, you can not compute a1 dx1 as an ordinary integral over x1 holding x2
and x3 constant. That would only be correct if x2 and x3 were constant along the path, i.e.
if the path were parallel to the x1 axis. This is a common source of mistakes.
If necessary, the curve C may be subdivided into sections, each with a different parameteri-
sation (piecewise smooth curve).
31
Example: Let a(r) = −ky e x + kx e y , where k is a positive constant.
R
Evaluate C a · dr between the points with Cartesian coordinates (1, 0, 0) and (0, 1, 0) along
the curve C: (x = cos λ, y = sin λ, z = 0), where 0 ≤ λ ≤ π/2.
Convince yourself that C is one quarter of a unit circle. Sketch the curve C and the field
a(r) on C.
On the curve C, we have
a(r) = −ky e x + kx e y = − k sin λ e x + k cos λ e y
r = cos λ e x + sin λ e y
dr
= − sin λ e x + cos λ e y
dλ
Therefore
π/2 Z π/2 Z π/2
dr
kπ
Z Z
2 2
a · dr = a· dλ = k sin λ + cos λ dλ = k dλ =
C 0 dλ 0 0 2
dr
In this example, the result is simple because the field a is parallel to and hence to dr.
dλ
y (1,1,1)
path (ii)
(1,1,0)
path (i)
O x
(1,0,0)
(i) (a) Along the line from (0, 0, 0) to (1, 0, 0), we have y = z = 0, so dy = dz = 0, hence
dr = e x dx and a = 3x2 e x (here the parameter is just x itself), and
Z (1,0,0) Z x=1
1
a · dr = 3x2 dx = x3 0 = 1
(0,0,0) x=0
32
(b) Along the line from (1, 0, 0) to (1, 1, 0), we have x = 1, dx = 0, z = dz = 0, so
dr = e y dy (here the parameter is y), and
(c) Along the line from (1, 1, 0) to (1, 1, 1), we have x = y = 1, dx = dy = 0, and
hence dr = e z dz and a = 9 e x − 14z e y + 20z 2 e z . Therefore
(1,1,1) z=1 1
20 3 20
Z Z
2
a · dr = 20z dz = z =
(1,1,0) z=0 3 0 3
(ii) To integrate a = (3x2 + 6y) e x − 14yze y + 20xz 2 e z along path (ii), we parameterise
r = λ e x + λ2 e y + λ3 e z
dr
= e x + 2λ e y + 3λ2 e z
dλ
a = 3λ2 + 6λ2 e x − 14λ5 e y + 20λ7 e z so that
Z λ=1
dr
Z
1
9λ2 − 28λ6 + 60λ9 dλ = 3λ3 − 4λ7 + 6λ10 0 = 5
a· dλ =
C
dλ λ=0
Z
Hence a · dr = 5 along path (ii)
C
In this case, the integral of a from (0, 0, 0) to (1, 1, 1) depends on the path taken.
Notes:
Z Z
(i) The line integral a · dr is a scalar quantity. Another scalar line integral is f ds
C p C
where f (r) is a scalar field and ds = dr · dr is the infinitesimal arc-length introduced
earlier.
33
I
2 2
Example: Let f (r) = ax + by . Evaluate f ds around the unit circle C centred on the
C
origin in the x−y plane:
Z Z 2π
The length s of a curve C is given by s = ds. In this example s = dφ = 2π.
C 0
34
z
Example: For the case where the external mag- B(r)
netic field is B(r) = B0 x e x + y e y , evaluate the
total force on a circular current loop of radius a −a a y
B(r)
which lies in the x−y plane and is centred on the r dr
origin.
−a C B(r)
a
We parameterise the curve by the angle φ (as in
plane polars), so that on the curve C, we have
B(r) B(r) x
r = a cos φ e x + a sin φ e y
− a sin φ e x + a cos φ e y dφ
dr =
B = B0 a cos φ e x + a sin φ e y
I Z 2π Z 2π
2 2 2 2 2
dφ = 2πa2 B0 e z
⇒ B × dr = B0 a cos φ + a sin φ e z dφ = B0 e z a
C 0 0
8 Surface integrals
_n Let S be a two-sided surface in three-dimensional space
as shown. If an infinitesimal element of surface with
dS
(scalar) area dS has unit normal n, then the infinitesimal
vector element of area is defined by
S
dS = n dS
Example: If S lies in the (x, y) plane, then in Cartesian coordinates the infinitesimal scalar
element of area is dS = dx dy, and the infinitesimal vector element of area is dS = e z dx dy.
or
− n_
n_
n_
n_
35
If a(r) is a vector field defined on the surface S, we define the (normal) surface integral
formally by the Riemann sum
Z Z m−1
X
a r(i) · n(i) δS (i)
a · dS = a · n dS = lim
m→∞
S S i=0
δS (i) →0
where we divided the surface S into m small areas, the ith area having vector area δS (i) .
The quantity a(r(i) ) · n(i) is the component of a normal to the surface at the point r(i) . This
is similar to the definition of planar integrals given in Linear Algebra and Several Variable
Calculus, except that the (scalar) area elements δS (i) are not constrained to lie in a plane.
Z
• We use the notation a·dS for both open and closed surfaces. Sometimes the integral
S I
over a closed surface is denoted by a · dS (not used here).
S
Example: Let S be the surface of a unit cube. Note that S is the sum of all six faces of
the cube.
z
On the front face, parallel to the (y, z) plane, at x = 1,
dS = n dS = e x dy dz
1
On the back face at x = 0 in the (y, z) plane, dS
_ y
dz
dS = n dS = − e x dy dz dy
1 dS_
Similarly for the other four faces.
O
In each case, the unit normal n is an outward normal
because S is a closed surface. 1 x
Z
If a(r) is a vector field, the integral a · dS over the front face, where dS = e x dy dz, is
S
z=1 y=1 z=1 y=1 z=1 y=1
Z Z Z Z Z Z
a · e x dy dz = dz a · e x dy = dz ax dy
z=0 y=0 z=0 y=0 z=0 y=0 x=1
where ax |x=1 ≡ ax (1, y, z). The integral over y and z is an ordinary double integral over a
square of side 1.
Similarly, the integral over the back face, where dS = −e x dy dz is
Z z=1 Z y=1 Z z=1 Z y=1 Z z=1 Z y=1
a · −e x dy dz = − dz a · e x dy = − dz ax dy
z=0 y=0 z=0 y=0 z=0 y=0 x=0
ZZ
17
Surface integrals are sometimes denoted by a · dS (not used here).
S
36
where ax |x=0 ≡ ax (0, y, z). Again, this is an ordinary double integral over a square of side 1.
The total integral over S is the sum of integrals over all 6 faces of the cube. See Tutorial 6
for an explicit example.
Then
lines of
constantu
lines of
S constant v
If we change u by du, and v by dv, then r changes by dr, where the infinitesimal vector dr
lies in the surface, and is given by
dr = ∂u r du + ∂v r dv
37
The infinitesimal vectors dr u and dr v lie in the surface at r.
The vectors ∂u r and ∂v r lie in the tangent plane to the surface at r.
We can construct a unit vector n, normal to the surface at r
n = ∂u r × ∂v r ∂u r × ∂v r
Since the vector element of area, dS, has magnitude equal to the area of the infinitesimal
parallelogram shown in the figure above, and it points in the direction of n, we can write by
virtue of the equation above and the geometric interpretation of the vector product (9)
dS = dr u × dr v = ∂u r du × ∂v r dv = ∂u r × ∂v r du dv
dS = ∂u r × ∂v r du dv
Z Z Z
a · dS = a · ∂u r × ∂v r du dv
S v u
We use two integral signs when writing surface integrals in terms of explicit parameters u
and v. The limits for the integrals over u and v must be chosen appropriately for the surface.
This was a little abstract and a little complicated. . .
Fortunately, in most practical cases we dont need the detailed form of this expression, since
we tend to use orthogonal curvilinear coordinates, where the vectors ∂r/∂u and ∂r/∂v are
perpendicular to each other. It is normally clear from the geometry of the situation whether
this is the case, as it is for cylindrical coordinates and spherical polar coordinates - as we
shall see.
38
9 Curvilinear coordinates, flux and surface integrals
The variables ρ and φ are plane polar coordinates. Any point in the plane can be specified
by its Cartesian coordinates (x, y), or by its plane polar coordinates (ρ, φ). Clearly, ρ = 0
at the origin, but φ is undefined there.
Basis vectors: Thus far, we have used only Cartesian basis vectors {e 1 , e 2 , e 3 }, also
known as {e x , e y , e z }. These point in the same direction everywhere in space.
Restricting ourselves to vectors in the (x−y) plane for now, we can
define two new orthonormal basis vectors in the plane.
−→ y eφ
Define the unit vector e ρ parallel to the position vector OP ≡ ρ . eρ
39
Components of vectors in plane polars: Any vector a which lies in the x−y plane may
be expressed in the original Cartesian basis {e x , e y }, or in the plane polar basis {e ρ , e φ }
a = ax e x + ay e y = aρ e ρ + aφ e φ (45)
The quantities aρ and aφ are the components of the vector a in the basis {e ρ , e φ }.
Example: The position vector of a point in the x−y plane (which we call ρ to distinguish
it from the position vector r in 3-d) is
NB: ρ 6= ρ e ρ + φ e φ . This is a common mistake and it’s very important not to make it! By
definition, ρ has no component in the direction of e φ , as can be seen in the figure.
This is the simplest extension of plane polars to three dimensions.19 The usual plane polar
coordinates ρ and φ replace the x and y coordinates, but the Cartesian z coordinate is
retained.
The cylindrical coordinates (ρ, φ, z) of a point are there-
fore related to its Cartesian coordinates (x, y, z) by z
x = ρ cos φ , y = ρ sin φ , z=z
ρ
where 0 ≤ ρ < ∞ , 0 ≤ φ < 2π , and −∞ < z < ∞ . (x, y, z)
The position vector of the point with Cartesian coordi-
nates (x, y, z) is z
0
r = ρ cos φ e x + ρ sin φ e y + z e z φ y
where {e x , e y , e z } are the usual Cartesian basis vec- x
tors.
The basis vectors for cylindrical coordinates are the plane polar basis vectors, plus the third
Cartesian basis vector
In this basis, the position vector for the point with cylindrical coordinates (ρ, φ, z) is20
r = ρ eρ + z ez
A general vector a has components (ax , ay , az ) in the Cartesian basis, and components
(aρ , aφ , az ) in the cylindrical basis, so that
a = ax e x + ay e y + az e z = aρ e ρ + aφ e φ + az e z
Cylindrical coordinates are useful for problems with cylindrical symmetry, and also for prob-
lems involving cones and paraboloids.
19
Cylindrical coordinates are also known as circular cylindrical coordinates or cylindrical polar coordinates.
20
Note that r 6= ρ e ρ + φ e φ + z e z
40
9.1.3 Spherical polar coordinates
where {e 1 , e 2 , e 3 } are the usual Cartesian basis vectors, and e r is a unit vector in the
direction of r ,
e r = sin θ cos φ e 1 + sin θ sin φ e 2 + cos θ e 3
Unit vectors e θ and e φ will be derived later.
We may invert the expressions for (x, y, z) in spherical polars (r, θ, φ) to obtain
( )
p z y
r = x2 + y 2 + z 2 , θ = cos−1 p , φ = tan−1 .
x2 + y 2 + z 2 x
NB with our conventions, the angle φ is the same in each of plane polar coordinates,
cylindrical coordinates and spherical polar coordinates, and r is always the length of the
position vector in three dimensions. Beware of other conventions!
Note that r sin θ in spherical polars is equal to the coordinate ρ in cylindrical coordinates.
41
9.2 Flux of a vector field through a surface
The concept of flux is useful in many different contexts e.g. flux of molecules in a flow of
gas; electric or magnetic flux through a surface, etc.
Example: Let S be the surface of the sphere x21 + x22 + x23 = R2 , with radius R. Find the
unit normal n , the vector element of area dS, and evaluate the total flux of the vector field
a(r) = r/r3 out of the sphere.
An arbitrary point r on the surface S may be parameterised using the spherical polar co-
ordinates θ and φ as
r = R sin θ cos φ e 1 + R sin θ sin φ e 2 + R cos θ e 3 {0 ≤ θ ≤ π, 0 ≤ φ < 2π}
so ∂θ r = R cos θ cos φ e 1 + R cos θ sin φ e 2 − R sin θ e 3
and ∂φ r = −R sin θ sin φ e 1 + R sin θ cos φ e 2 + 0 e 3
Therefore
e1 e2 e3
∂θ r × ∂φ r = R cos θ cos φ R cos θ sin φ −R sin θ
−R sin θ sin φ R sin θ cos φ 0
42
where e r is the unit vector (e r · e r = 1) in the direction of r that we introduced previously
Hence the unit normal n = e r . Note: e r = e r (θ, φ) is a function of θ and φ, but not of r.
The vector element of area on the surface of the sphere is then
dS = ∂θ r × ∂φ r dθ dφ = R2 sin θ dθ dφ e r
In this example, the result of the integral is the surface area of a unit sphere. This is
important in physics, as we now show. . .
Physics example: The electric field E(r) at r due to a point charge q situated at the
origin is
q r
E(r) =
4π0 r3
Evaluate the total flux of E(r) out of the sphere x21 + x22 + x23 = R2 .
Noting that the electric field E(r) = q/ (4π0 ) a(r) in the example above, we can use our
previous result to obtain
q r · dS q q
Z Z
E · dS = 3
= 4π =
S 4π0 S r 4π0 0
This is an example of Gauss’ Law of Electromagnetism. We shall show later that the total
electric flux through any closed surface is the total charge enclosed by the surface, divided
by the constant 0 .
_e1
43
Similarly, we define the infinitesimal vectors dr θ and dr φ .
Each of these is a double integral, and is evaluated in a way similar to the scalar integrals,
the result being a vector in each case.
Z
The vector area of a surface is defined as S = dS.
S
Example: The vector area S of the (open) hemisphere, x21 + x22 + x23 = R2 , (x3 ≥ 0), of
radius R, is, using spherical polars,
Z Z 2π Z π/2
S ≡ dS = R2 sin θ e r dθ dφ .
S φ=0 θ=0
44
NB Since e r = sin θ cos φ e 1 + sin θ sin φ e 2 + cos θ e 3 is not a constant (it depends on θ and
φ), we can’t take it out of the integral. So we have
Z π/2 Z 2π Z π/2 Z 2π
2 2 2 2
S = e1 R sin θ dθ cos φ dφ + e 2 R sin θ dθ sin φ dφ +
0 0 0 0
Z π/2 Z 2π
2
e3 R sin θ cos θ dθ dφ
0 0
2
= 0 + 0 + πR e 3
Notes
The vector surface integral over the full sphere x21 + x22 + x23 = R2 is zero because the
contributions from the upper and lower hemispheres cancel. Similarly, the vector area of
a closed hemisphere is zero because the vector area of the bottom face, which is a circular
disc of radius R in the x1 −x2 plane, is −πR2 e 3 . This is just the projection of the sum of
infinitesimal vector areas onto the base of the hemisphere.
In fact, for any closed surface, Z
dS = 0
S
To show this, it is simplest to use the divergence theorem – see later.
45
10 Volume integrals
Volume integrals are conceptually simpler than line and surface integrals because the element
of volume dV is a scalar quantity.
We define integrals over a volume V in the standard way using the Riemann sum.
where f (r(i) ) is the value of the function f at some point r(i) in the element of volume δV (i) .
In Cartesian coordinates
Z Z Z Z
f (r) dV = f (x, y, z) dx dy dz
V z y x
R
where the integrals over x, y and z have appropriate limits. Note that V f (r) dV is a triple
integral, but we use three integral signs only when writing it in terms of explicit integration
variables, namely x, y, z in this case.
Example: Integrate f (x, y, z) = xyz 2 over the cuboid: {0 ≤ x < a, 0 ≤ y < b, 0 ≤ z < c}.
We choose to perform the integral over x first, keeping y and z fixed; then the integral over
y, keeping z fixed; and finally the integral over z :
Z Z z=c Z y=b Z x=a
I = f (r) dV = xyz 2 dx dy dz
V z=0 y=0 x=0
z=c y=b 2 z=c
a a2 b2 2 a2 b 2 c 3 a2 b 2 c 3
Z Z Z
2
= dz dy yz = dz z = =
z=0 y=0 2 2 z=0 2 2 2 3 12
The volume of the cuboid is simply
Z Z z=c Z y=b Z x=a
V = dV = dx dy dz = abc
V z=0 y=0 x=0
The integrals may be performed in any order, but the limits on the integrals must be chosen
appropriately to cover the volume V .
For example, if we choose to perform the z integral first, its limits may depend on x and
y. The limits on the second integral over y may then depend on x (but not on z, because
we have already integrated over z). The limits on the last integral over x can’t depend on
either y or z (because we have already integrated over them.)
Example:
1 x2 1
28
Z Z Z
dx dy 2x2 z dz = (exercise)
0 0 xy 165
46
We now illustrate how to find the limits in an explicit example, albeit a rather complicated
(and slightly masochistic) one.
47
z √
line y = 0 surface z = 1 − x2 − y 2
Example: Use Cartesian coordinates to
evaluate Z
(x + y + z) dV
V
where V is the positive octant of the unit O
sphere:
x2 + y 2 + z 2 ≤ 1, x ≥ 0, y ≥ 0, z ≥ 0
x y
If we choose to perform the z integral first: √
surface z = 0 line y = 1 − x2
Z Z 1 Z √
1−x2 Z √1−x2 −y2
⇒ (x + y + z) dV = dx dy (x + y + z) dz
V 0 0 0
⇒ dV = ∂u r · ∂v r × ∂w r du dv dw
dr
_u
48
We take the magnitude of the scalar triple product so that the element of volume dV is always
positive.
Jacobians revisited: We may write the volume element in terms of the Jacobian J ,
dV = |J| du dv dw , where
∂u x ∂u y ∂u z
∂(x, y, z)
J ≡ ≡ ∂v x ∂v y ∂v z
∂(u, v, w)
∂w x ∂ w y ∂w z
This is the three dimensional version of the 2 × 2 Jacobian derived in LA&SVC Section 18
and (presumably) in SVC&DE. It generalises to higher dimensions in a straightforward way.
Then
∂ρ r = cos φ e 1 + sin φ e 2
c
∂φ r = −ρ sin φ e 1 + ρ cos φ e 2
∂z r = e 3 _e z
_e φ
And hence (easy exercise) ρ
dV = ∂ρ r · ∂φ r × ∂z r dρ dφ dz = ρ dρ dφ dz _e 3 _e ρ
dV
The volume of the cylinder is z
Z Z z=c Z φ=2π Z ρ=a
V = dV = ρ dρ dφ dz = π a2 c. 0
V z=0 φ=0 ρ=0 φ
_e1 _e 2
(shown in the figure) are the orthonormal basis vectors that we wrote down earlier for
cylindrical coordinates (exercise).
Exercise: For spherical polars: r = r sin θ cos φ e 1 + r sin θ sin φ e 2 + r cos θ e 3 , show that
dV = ∂r r · ∂θ r × ∂φ r dr dθ dφ = r2 sin θ dr dθ dφ
49
10.3 Integrals over vector fields
The integral of a vector field a(r) over a volume V is
Z 3
X Z 3
X Z Z Z
a dV = ei ai dV = ei ai dx dy dz in Cartesian coordinates
V i=1 V i=1 z y x
The result of the integral is a vector, and we must evaluate 3 triple integrals for each of the
3 components of the vector.
Example: Consider a solid hemisphere of radius a centered on the e 3 axis, with its bottom
face at x3 = 0. If the mass density (mass/unit volume), a scalar field, is ρ(r) = ρ0 /r where
ρ0 is a constant, what is the total mass, M , of the hemisphere?
It is most convenient to use spherical polar coordinates. Then dV = r2 sin θ dr dθ dφ and
Z Z a Z π/2 Z 2π Z a
2
M = ρ(r) dV = ρ(r) r dr sin θ dθ dφ = 2πρ0 r dr = πρ0 a2
V 0 0 0 0
which gives
Z a Z π/2 Z 2π
3 2
MX = ρ(r) r dr sin θ dθ cos φ dφ = 0 (since the φ integral gives 0)
0 0 0
Z a Z π/2 Z 2π
3 2
MY = ρ(r) r dr sin θ dθ sin φ dφ = 0 (since the φ integral gives 0)
0 0 0
a π/2 2π a π/2
1 2
Z Z Z Z
3 2
MZ = ρ(r) r dr sin θ cos θ dθ dφ = 2πρ0 r dr sin θ
0 0 0 0 2 0
a3 1 πρ0 a3
= 2πρ0 =
3 2 3
Hence
πρ0 a3 /3 a
R = e3 = e (independent of ρ0 )
πρ0 a 2 3 3
Note that the integrals over φ in the first two components of M R are zero. Watch out for
integrals that are zero – spotting them can save you a lot of un-necessary work!
50
10.4 Summary of polar coordinate systems
To conclude this section, we give a brief summary of polar coordinate systems.
In the figures below, dS indicates an area element and dV a volume element. We also sketch
geometrical “derivations” of the infinitesimal elements of area and volume.
y
ρ dφ dS = ρ dρ dφ
x = ρ cos φ
y = ρ sin φ
dφ
dρ
φ ρ
O x
z x = ρ cosφ
dρ
ρ dz y = ρ sin φ
z=z
dV = ρ dρ dφ dz
x φ y
dφ
ρ dφ
z
dr rdθ x = r sinθ cosφ
y = r sinθ sinφ
dθ r
θ z = r cosθ
dV = r2 sinθ dr dθ dφ
x φ y
dφ
r sinθ dφ
51
11 The divergence theorem
1
Z
div a = lim a · dS
δV→0 δV δS
where δS is a closed surface in R which encloses the volume δV . The limit must be taken
so that the point P is within δV . It can be shown that the limit is independent of the shape
of δV .
This definition of div a is also basis independent, i.e. the result doesn’t depend on whether
we evaluate it in Cartesian coordinates, spherical polars, etc.
We now show that our original definition of ∇ · a is recovered in Cartesian co-ordinates.
Let P be a point with Cartesian coordinates (x0 , y0 , z0 )
situated at the centre of a small rectangular block of
size δx × δy × δz , with volume δV = δx δy δz .
dS
_ δz
• On the front face of the block, parallel to the y−z dz P
plane at x = x0 + δx /2, we have outward normal dy dS
_
n = e x and so dS = e x dy dz
z O δy
• On the back face of the block, parallel to the y−z δx
plane at x = x0 − δx /2, we have outward normal y
n = −e x and so dS = −e x dy dz x
Hence a · dS = ± ax dy dz on these two faces. Let us denote the union (sum) of the two faces
orthogonal to the x axis by δSx .
Z
The contribution of these two surfaces to the integral a · dS is given by
S
Z ZZ
a · dS = ax (x0 + δx /2, y, z) − ax (x0 − δx /2, y, z) dy dz
δSx z y
Z Z (" #
δx
+ O(δx2 )
= ax (x0 , y, z) + ∂x ax
z y 2 (x0 ,y,z)
" #)
δx
+ O(δx2 )
− ax (x0 , y, z) − ∂x ax dy dz
2 (x0 ,y,z)
Z Z
= δx ∂x ax dy dz
z y (x0 ,y,z)
52
where we Taylor-expanded ax (x, y, z) about the point (x0 , y, z), and we have dropped the
O(δx2 ) terms which will vanish when we divide by δV at the end.
So
1 1
Z Z Z
a · dS = ∂x ax dy dz
δV δSx δy δz z y (x0 ,y,z)
and hence
1
Z
lim a · dS = ∂x ax
δV →0 δV δSx (x0 ,y0 ,z0 )
div a = ∂x ax + ∂y ay + ∂z az = ∇ · a
in agreement with our original definition in Cartesian co-ordinates. Thus we can use the
notation ∇ · a for both the differential and the integral definitions of the divergence of a
vector field a(r).
The integral definition
1
Z
div a = ∇ · a = lim a · dS
δV→0 δV δS
provides a precise intuitive understanding of divergence as the (net) flux per unit volume
leaving a small volume around a point r. In pictures, for an infinitesimal volume dV ,
dV dV dV dV
Z Z
∇ · a dV = a · dS
V S
53
Proof: We derive the divergence theorem using the integral definition of ∇ · a
1
Z
∇ · a = lim a · dS.
δV →0 δV δS
Since this definition of ∇ · a is valid for volumes of arbitrary shape, we can build a smooth
surface S from a large number, N , of small blocks of volume δV (i) and area δS (i) . For small,
but not infinitesimal, δS (i) we may write
1
Z
(i)
∇ · a(r ) = (i)
a · dS + (i)
δV δS (i)
where (i) → 0 as δV (i) → 0. Now multiply both sides by δV (i) and sum over all i
N
X N Z
X N
X
(i) (i)
∇ · a(r ) δV = a · dS + (i) δV (i) (47)
i=1 i=1 δS (i) i=1
On the RHS the contributions from surface elements interior to S cancel. This is because
where two blocks touch, the outward normals are in opposite directions, implying that the
contributions to the respective integrals cancel.
To illustrate this, consider two adjacent blocks, 1 and 2.
The volume of block 1 is δV1 and its surface is δS1 . Sim-
ilarly for block 2. Denote the shaded surface common to
the two blocks by δS, then δS
Z δV1
dS
_2
a · dS regarded as part of block 1 dS
_1 δV2
δS
Z
= − a · dS regarded as part of block 2
δS
because their outward normals dS 1 and dS 2 are equal and opposite. Therefore
Z Z Z
a · dS + a · dS = a · dS (because contributions from δS cancel)
δS1 δS2 δS1+2
where we have denoted the exterior surface of the compound block by δS1+2 .
Thus the contributions from all interior surface elements cancel pairwise. Using this result,
and letting N → ∞ in equation (47), the O((i) δV (i) ) terms go to zero, and we get
Z Z
∇ · a dV = a · dS .
V S
For an alternative proof of the divergence theorem, see Bourne & Kendall, Chapter 6.
Note: The divergence theorem is the generalisation to 3-D of
Z b
df (x)
dx = f (b) − f (a)
a dx
54
11.3 Volume of a body using the divergence theorem
Z
The volume of a body is V = dV
V
Recalling that ∇ · r = 3 , we can write
1 1
Z Z
V = ∇ · r dV = r · dS
3 V 3 S
where we used the divergence theorem in the last step.
55
Example: Consider the hemisphere x2 + y 2 + z 2 ≤ R2 centered on e 3 with its bottom
face in the x−y plane. Recalling that the divergence theorem holds for a closed surface, the
volume of the hemisphere is
Z
1
Z
V = r · dS + r · dS
3 SC SB
where SC is the curved surface of the hemisphere and SB is its bottom. On SB , we have
dS = −e z dS and z = 0, so r · dS = −z dS = 0. Therefore the only contribution comes from
the (open) curved surface SC ,
1
Z
V = r · dS
3 SC
We can evaluate this surface integral using spherical polars. For a hemisphere of radius R
we showed previously that dS = R2 sin θ dθ dφ e r .
On the hemisphere, r · dS = R e r · dS = R3 sin θ dθ dφ , therefore
π/2 2π
1 R3 2πR3
Z Z Z
V = r · dS = sin θ dθ dφ =
3 S 3 0 0 3
as anticipated.
R
where M is the total mass in V , which may be written as M = V
ρ dV . Substituting this
into equation (49), we get
∂
Z Z
ρ dV + J · dS = 0 .
∂t V S
Using the divergence theorem to rewrite the second term as a volume integral, we obtain
Z
∂t ρ + ∇ · J dV = 0
V
56
∂t ρ + ∇ · J = 0
everywhere. This is the continuity equation. In this case, it expresses conservation of mass
locally at each point r.
57
The continuity equation appears in many different contexts because it holds for any conserved
quantity. Here we considered mass density ρ and mass current density J in a fluid, but
equally it could have been thermal energy density and heat-current density, electric charge
density and electric current density, or more abstract quantities such as probability density
and probability-current density in quantum mechanics [tutorial].
In the case of fluid flow, the continuity equation tells us that
if ∇ · J > 0 then ∂t ρ < 0 and the mass density at r decreases
if ∇ · J < 0 then ∂t ρ > 0 and the mass density at r increases
If the mass density at each point is constant in time, so that ∂ρ/∂t = 0, the continuity
equation tells us that for the mass density to be constant in time, and we must have ∇·J = 0,
i.e. the mass flux into a point equals the flux out.
If S contains neither sources nor sinks, or sources and sinks in equal measure, then
Z
a · dS = 0.
S
The quantity
1
Z
∇ · a = lim a · dS
V →0 V
S
is therefore a measure of the density of sources or sinks,
∇ · a = net outward flux per unit volume at r.
58
11.6 Electrostatics - Gauss’ law and Maxwell’s first equation
As a very important example, we consider electrostatics.
The electric field at r due to a point charge q at the origin is
q r
E(r) =
4π0 r3
Then, for r 6= 0,
r ∇·r 3r
q q 1 q 3
∇·E = ∇· 3 = ∇ ·r+ 3 = − 5 ·r+ 3 = 0
4π0 r 4π0 r3 r 4π0 r r
q r · dS q q
Z Z
E · dS = 3
= 4π = (50)
sphere 4π0 sphere r 4π0 0
where the integral is over the surface of a sphere centred on the origin. The key result was
(r · dS)/r3 = 4π, independent of the radius of the sphere.
R
sphere
dS
Now consider an arbitrary closed surface S which
encloses the charge at the origin. Define the vol- dS
ume V to be the region between the surfaces S S
r2 S2
and S1 , where S1 is a small sphere, radius δ,
centred on the origin. The volume V is then dS
bounded by the closed surface S+S1 . O δ dS
(Ignore the spheres S2 and S3 in the figure for S1 r3
V S3
now.)
Since the volume V does not contain the origin, r = 0, then ∇ · E = 0 everywhere in V ,
and the divergence theorem tells us that
Z Z Z Z
E · dS = E · dS + E · dS = ∇ · E dV = 0 (51)
S+S1 S S1 V
Since the outward normal on the sphere S1 (i.e. outward from within the volume V ) points
towards the origin, equation (50) gives
q
Z
E · dS = −
S1 0
independent of δ, and we may safely take the limit δ → 0. Equation (51) then becomes
q
Z
E · dS = (52)
S 0
This holds for any closed surface S which encloses the charge at the origin.
59
If, instead of charge q at the origin, we have charge qi at position r i inside S, we can change
integration variable from r to ρ = r − r i when integrating over the sphere Si (with outward
normal pointing towards its centre), and we get
qi (r − r i ) · dS qi ρ · dS qi
Z Z Z
E i · dS = 3
= 3
= − (53)
Si 4π0 Si |r − r i | 4π0 Si ρ 0
Equations (53) and (51) then give
qi
Z
E i · dS = (54)
S 0
Now let’s replace the single charge by a set of N charges qi at positions r i . Experiment tells
us that the total electric field E is the sum of the electric fields E i due to the individual
charges. Therefore, using equation (54), we get
N
! N Z N
qi Q
Z Z X X X
E · dS = E i · dS = E i · dS = =
S S i=1 i=1 S
i=1 0
0
PN
where Q = i=1 qi is the total charge enclosed by S. This is Gauss’ Law of electrostatics.
Generalising further, if we have a charge density ρ(r) (charge/unit volume), then the total
charge in a volume V is Z
Q= ρ(r) dV
V
Applying the divergence theorem and Gauss’ Law (respectively), we get
Q 1
Z Z Z
∇ · E dV = E · dS = = ρ(r) dV
V S 0 0 V
ρ(r)
∇ · E(r) =
0
60
(i) Let a = c where c is an arbitrary constant vector, then ∇ · c = 0, and hence
Z Z
c · dS = c · dS = 0
S S
∇ · (a × c) = c · (∇ × a) − a · (∇ × c) = c · (∇ × a) − 0
61
Hence Z Z ZZ
a · dS = a · dS = (P dy − Q dx) dz
S SC
The (trivial) integral over z again gives unity. Using the divergence theorem, we get
Z I
(∂x P + ∂y Q) dx dy = (P dy − Q dx)
A C
which is Green’s theorem in the plane (sometimes called the two dimensional divergence
theorem) relating the integral over a planar surface A to the line integral around the
closed curve C enclosing A. The theorem applies to any surface in the x−y plane,
because the proof above doesn’t rely on the base of the cylinder being circular.
1
I
n· ∇ × a = lim a · dr
δS→0 δS δC
NB: The integral around δC is taken in the right-hand sense with respect to the normal
n to the surface – as shown in the figure above.
This definition of curl is independent of the choice of basis.
Cartesian form of curl: The usual Cartesian form for curl can be recovered from this
general definition by considering small rectangles parallel to the x−y, y−z, and z−x planes
respectively.
62
_e z
Z B Z B
ax dx = ax (x, y0 + δy /2, z0 ) dx
C C
" #
x0 +δy /2
δy
Z
+ O(δy2 ) dx
= ax (x, y0 , z0 ) + ∂y ax
x0 −δx /2 2 (x,y0 ,z0 )
so
Z A C Z A B
1 1
Z Z
a · dr + a · dr = ax dx − ax dx
δS D B δx δy D C
" #
x0 +δx /2
1
Z
+ O(δy2 ) dx
= −δy ∂y ax
δx δy x0 −δx /2 (x,y0 ,z0 )
→ −∂y ax as δx , δy → 0
(x0 ,y0 ,z0 )
In the last step, as we take the limit δx → 0, the integrand tends to a constant in the region
of integration:
∂y ax → ∂y ax
(x,y0 ,z0 ) (x0 ,y0 ,z0 )
63
and the integral over x is then trivial.
A similar analysis of the line integrals along A → B and C → D gives (exercise)
Z B Z D
1
a · dr + a · dr → ∂x ay as δx , δy → 0
δS A C (x0 ,y0 ,z0 )
Adding the results gives, for our line integral definition of curl,
e z · ∇ × a = ∇ × a z = [∂x ay − ∂y ax ] (x0 , y0 , z0 )
64
12.2 Physical/geometrical interpretation of curl
Consider a force field F (r), and let δC be a small rectangular contour which encloses an area
δS in the x−y plane – as in the line-integral definition of curl above.
The work done on a (point) test particle in moving it around the closed curve δC is
I
δW = F · dr = circulation of F (r) about δC
δC
dS dS dS dS
Z I
∇ × a · dS = a · dr dS
_
S C
S
65
Proof: Divide the surface S into N adjacent small surfaces. Let δS (i) = δS (i) n(i) be the
vector element of area at r(i) , enclosed by the curve δC (i) .
.
(1)
_n
_n (2)
(1)
δC
δ C (2)
C
Start with the integral definition of curl
1
I
n· ∇×a = lim a · dr ,
δS→0 δS δC
Since each small closed curve δC (i) is traversed in the same sense, then, from the diagram,
N I
X
all contributions to a · dr cancel, except on those curves where part of δC (i) lies on
i=1 δC (i)
the curve C. For example, the line integrals along the common section of the two small
closed curves δC (1) and δC (2) in the figure cancel exactly. Therefore
N I
X I
a · dr = a · dr
i=1 δC (i) C
Hence, as N → ∞,
I Z Z
a · dr = ∇ × a · dS = n · ∇ × a dS
C S S
Mathematical note: For those worried about the ‘error term’, note that, for finite N , we
can establish an upper bound
N
X
(i) δS (i) ≤ S max (i)
i
i=1
66
The RHS tends to zero in the limit N → ∞, because S is finite and (i) → 0, ∀i. A similar
analysis works in the proof of the divergence theorem.22
We can check our result using Stokes’ theorem. The closed curve C bounding the hemisphere
is a circle of radius R in the x−y plane. Parameterising this by x = R cos φ, y = R sin φ,
z = 0, gives dx = −R sin φ dφ, dy = R cos φ dφ, and ax = 4y = 4R sin φ, ay = x = R cos φ,
az = 2z = 0. Hence
I I
a · dr = (4y dx + x dy)
C C
Z 2π
−4R2 sin2 φ + R2 cos2 φ dφ = − 3πR2
=
0
Planar areas: Consider a planar surface S parallel to the x−y plane, bounded by a closed
curve C, and let the vector field a(r) be
1
a = −y e x + x e y
2
In this case ∇×a = e z , and the vector element of area normal to the x−y plane is dS = dS e z .
Hence Z Z Z
∇ × a · dS = e z · dS = dS = S
S S S
We can then use Stokes’ theorem to find the area of the surface
1
I I
S = a · dr = (−y e x + xe y ) · (dx e x + dy e y )
C
2 C
which gives
1
I
S= (x dy − y dx)
2 C
67
The curve can be parameterised by x = cos3 φ, y = sin3 φ, for 0 ≤ φ ≤ 2π, so that
dx dy
= −3 cos2 φ sin φ , = 3 sin2 φ cos φ
dφ dφ
which gives
I
1 1 dy dx
I
S = (x dy − y dx) = x −y dφ
2 C
2 C
dφ dφ
Z 2π
1
3 cos4 φ sin2 φ + 3 sin4 φ cos2 φ dφ
=
2 0
3 2π 2 3 2π 2 3π
Z Z
2
= sin φ cos φ dφ = sin 2φ dφ =
2 0 8 0 8
where C is the boundary (traversed in the anticlockwise direction) of the open surface S.
I
(i) If a = c, where c is a constant vector, then ∇ × a = 0. Therefore c · dr = 0, and
C
because c is arbitrary, we have I
dr = 0
C
(ii) Take a = −Q(x, y) e x + P (x, y) e y , and S to lie in the x−y plane with area A. Then
∇ × a = (∂x P + ∂y Q) e z and dS = dx dy e z
a · dr = −Q dx + P dy
so
Z I
(∂x P + ∂y Q) dx dy = (−Q dx + P dy)
A C
which is again Green’s theorem in the plane, sometimes known as Stokes’ theorem in
the plane or the two-dimensional divergence theorem.
Taking P = x/2 and Q = y/2 and gives the planar area result of the previous section.
Indeed, Green’s theorem is a generalisation of this result.
Hence
∇ × φ c · dS = ∇ φ × c · dS = c · (dS × ∇φ)
68
which gives Z Z I
∇ × (φ c) · dS = c · dS × ∇φ = c · φ dr
S S C
This holds for all constant vectors c, so
I Z Z
φ dr = dS × ∇φ = − ∇φ × dS
C S S
Such results are hard to remember, but as we have seen, they can be derived quite
easily.
69
13 The scalar potential
A vector field a(r) is defined to be irrotational or conservative if its curl vanishes, i.e. if
∇×a=0
This is true for any S, and therefore for any paths C1 and C2 from r 0 to r.
Clearly, the converse is also true: if the line integral between two points is path independent,
then the line integral around any closed curve (connecting the two points) is zero, and Stokes’
theorem then gives ∇ × a = 0. We just reverse the steps of the argument above.
Therefore Z r
∇×a=0 ⇔ a(r0 ) · dr0 is path independent
r0
The scalar field φ(r) is called the scalar potential of the vector field a(r).
It is useful to invert this equation (and to give a more conventional result) by considering
70
two neighbouring points r and r + dr, for which
because a(r) is approximately constant between r and r+dr, and the correction term O(|dr|2 )
can be ignored as dr → 0.
But dφ = ∇ φ · dr (by definition), and so, since dr is arbitrary, we must have
a(r) = ∇ φ(r)
We have shown that the scalar potential φ(r) for a conservative vector field a(r) can be
constructed from a line integral which is independent of the path of integration between the
endpoints. A convenient way of evaluating such integrals is to integrate along a straight line
from r0 to r. Depending on the convergence of the integral, there are two standard choices:
71
with 0 ≤ λ ≤ 1. Thus dr0 = dλ r , and hence
Z r Z λ=1
0 0
φ(r) = a(r ) · dr = a(λr) · r dλ ,
0 λ=0
(ii) |r0 | = ∞: If φ(r) is finite or zero as |r| → ∞, we again parameterise the straight line
by r0 = λ r, but this time with 1 ≤ λ < ∞. Again, we have dr0 = dλ r , and hence
Z r Z λ=1
0 0
φ(r) = a(r ) · dr = a(λr) · r dλ ,
∞ λ=∞
NB: Always check that your potential φ(r) satisfies a(r) = ∇ φ(r) . (Exercise)
∇ × a = 2 ∇ c · r × r + c · r ∇ × r + ∇ r2 × c = 2 c × r + 0 + 2 r × c = 0
Then
Z r Z 1
0 0
φ(r) = a(r ) · dr = a λ r · dλ r
0 0
Z 1 Z 1
2 2 2
λ2 dλ
= 2 c · λ r λ r + λ r c · r dλ = 2 (c · r) r · r + r (c · r)
0 0
= r2 (c · r)
Integration along a straight line is a straightforward and fairly elegant method, and it’s
generally applicable.
72
We can integrate these equations separately to give
Z x
φ(x, y, z) = ax (x0 , y, z) dx0 + f (y, z)
Z y
φ(x, y, z) = ay (x, y 0 , z) dy 0 + g(x, z)
Z z
φ(x, y, z) = az (x, y, z 0 ) dz 0 + h(x, y)
and then determine the “constants” of integration f (y, z), g(x, z) and h(x, y) by consistency.
φ = x2 y + xz 3 + f (y, z)
φ = x2 y + g(x, z)
3
φ = xz + h(x, y)
These agree if we choose f (y, z) = 0, g(x, z) = xz 3 and h(x, y) = x2 y, hence
φ(r) = x2 y + xz 3
as before. This method is straightforward but it’s rather clumsy for problems such as Ex-
ample 2, which is typical of many Physics applications.
Example 2 (revisited)
2 2 2 2
a(r) = 2 (c · r) r + r c = (c · r)∇ r + r ∇ (c · r) = ∇ (c · r) r + constant
in agreement with what we had before if we choose the integration constant to be zero.
73
Proof: Let r(t) be the position vector of a particle at time t. Denote the first and second
derivatives of r with respect to time by ṙ (velocity) and r̈ (acceleration) respectively.
The particle moves under the influence of Newton’s second law (N2):
mr̈ = F (r)
m r̈ · dr = F (r) · dr = − ∇ V (r) · dr
Integrating this expression along the path of the particle starting from rA at time tA , to rB
at time tB , gives Z rB Z rB
m r̈ · dr = − ∇ V (r) · dr (56)
rA rA
where VA and VB are the values of the potential V at rA and rB , respectively. Therefore
1
m vB2 − vA2 = VA − VB
2
Rearranging, we get
1 2 1
mvA + VA = mvB2 + VB
2 2
1 2
Hence the total energy, defined as E ≡ mv + V , is conserved – it’s constant in time.
2
1
(Choosing F = +∇ V would lead to E ≡ mv 2 − V , a less desirable convention.)
2
Examples: Newtonian gravity and the electrostatic force are both conservative. Frictional
forces are not conservative: energy is dissipated and work is done in traversing a closed path.
In general, time-dependent forces are not conservative.
We now return to where we started in section (1.3).
1
Gm (r · r) dλ Gm
Z
2
= (−) 3 2
= −
∞ r λ r
Note: In this example, the vector field G is singular at the origin r = 0. This implies
that we have to exclude the origin, so it’s not possible to obtain the scalar potential at r by
integration along a path from the origin. Instead we integrate from infinity, which in turn
means that the gravitational potential at infinity is zero.
Note: Since F = m1 G = −∇ (m1 φ), the potential energy of the mass m1 is V (r) = m1 φ(r).
The distinction (a convention) between potential and potential energy is a common source
of confusion.
Electrostatics: Coulomb’s Law states that the force F (r) on a particle of charge q1 situ-
ated at r in the electric field E(r) due to a particle of charge q situated at the origin is given
(in SI units) by
q1 q r
F = q1 E = ,
4π0 r3
where 0 = 107 /(4πc2 ) = 8.854 187 817 · · · × 10−12 C 2 N −1 m−2 is called the permittivity of
free space. Again the test charge q1 is taken as small, so as not to disturb the electric field.
The electrostatic potential may be obtained by inspection, or by integrating E = −∇ φ from
infinity to r,
q
φ(r) = (58)
4π0 r
The potential energy of a charge q1 in the electric field is V (r) = q1 φ(r).
Note that electrostatics and gravitation are very similar mathematically, the only real dif-
ference being that the gravitational force between two masses is always attractive, whereas
like charges repel.
75
13.6 The equations of Poisson and Laplace
In section (11.6), we derived Gauss’ Law and Maxwell’s first equation (ME1) for the elec-
trostatic field
Q ρ(r)
Z
E · dS = and ∇ · E(r) =
S 0 0
R
where ρ(r) is the charge density at r, and Q = V ρ(r) dV is the total charge in volume V .
Writing E(r) = −∇ φ(r) and using Maxwell’s first equation gives Poisson’s equation
ρ
∇2 φ = −
0
If ρ(r) = 0 everywhere in some region, we have
∇2 φ = 0
(i) If ∇ · B = 0 , it can be shown that a vector field A can be found such that B = ∇ × A .
(ii) The converse is easy to prove. If the field B can be written as B = ∇ × A , then
∇ · B = ∇ · (∇ × A) = 0 because ‘div curl’ is always zero.
Hence
The field A is called the vector potential for the solenoidal field B.
For such a field B , which is finite or zero at the origin, it can be shown that
Z 1
A(r) = − r × B(λr) λ dλ (59)
0
76
It is easy to show that ∇ · B = 0 (exercise). Equation (59) then gives
Z 1 Z 1
A(r) = −r × B(λr) λ dλ = − r × (c × λr) λ dλ
0 0
Z 1
2 2 1 2
= − r c − (r · c) r) λ dλ = (r · c) r − r c
0 3
Gauge invariance: We can always add the gradient of an arbitrary scalar field f (r) to the
vector potential
A(r) → A0 (r) = A(r) + ∇ f (r)
without changing B.
We have ∇ × A0 = ∇ × A + 0 because ∇ × ∇ f = 0 for any scalar field (‘curl grad’ is always
zero). This is called gauge invariance in electromagnetism, and is one of the most important
symmetries in Physics. (Electroweak gauge invariance is (partly) broken by the Higgs field.)
Fluid mechanics: For incompressible fluids (which have constant mass density, ρ) with no
sources or sinks, we showed in section (11.5) that the velocity field v(r) satisfies ∇ · v = 0.
In this case, there exists a velocity potential Ψ(r) such that v = ∇ × Ψ.
We shall set up a formalism to deal with rather general coordinate systems, of which spherical
polars are a very important example.
77
Suppose we make a transformation from the Cartesian coordinates (x1 , x2 , x3 ) to the variables
(u1 , u2 , u3 ), which are functions of the {xi }
u1 = u1 (x1 , x2 , x3 )
u2 = u2 (x1 , x2 , x3 )
u3 = u3 (x1 , x2 , x3 )
If the variables {ui } are single-valued functions of the variables {xi }, then we can make the
inverse transformations,
xi = xi (u1 , u2 , u3 ) for i = 1, 2, 3,
• For Cartesian coordinates, the surfaces ‘xi = constant’ (i = 1, 2, 3) are planes, with
(constant) normal vectors e i (the Cartesian basis vectors) intersecting at right angles.
• For curvilinear coordinates, the surfaces ‘ui = constant’ do not, in general, have con-
stant normal vectors, nor do they intersect at right angles. For example, in 2-D, we
might have
x2
u2 = constant
x2 = c
x1 = c x1
u1 = constant
Not all of these surfaces are planes, but they do intersect at right angles.
23
Sometimes the curvilinear coordinates are called (u, v, w), just as Cartesians are called (x, y, z).
78
15.1 Orthogonal curvilinear coordinates
If the coordinate surfaces (surfaces of constant ui ), intersect at right angles, as in the above
example of spherical polars, the curvilinear coordinates are said to be orthogonal.
Scale factors and basis vectors: Suppose the point P has position vector r = r(u1 , u2 , u3 ).
If we change curvilinear coordinate u1 by du1 (with u2 and u3 fixed), then r → r + dr , with
where we have defined the scale factor h1 and the unit vector e 1 by
1
h1 = ∂u1 r and e 1 = ∂u r
h1 1
• The scale factor h1 gives the length h1 du1 of dr when we change u1 → u1 + du1 .
∂ui r = hi e i i = 1, 2, 3
• The unit vectors {e i } are in general not constant vectors – their directions depend
on the position vector r, and hence on the curvilinear coordinates {ui }. [They should
perhaps be called {eui } or {eu , ev , ew } to avoid confusion with Cartesian basis vectors.]
• If the curvilinear unit vectors satisfy e i · e j = δij , the {ui } are said to be orthogonal
curvilinear coordinates, and the three unit vectors {e i } form an orthonormal basis.
u3
e3
e2
u1
u2
e1
Cartesian coordinates:
∂r
r = x ex + y ey + z ez ⇒ hx e x = = e x , etc.
∂x
The scale factors are all unity, and the unit vectors point in the same direction everywhere.
79
Spherical polar coordinates: u1 = r , u2 = θ , u3 = φ (in that order)
r = r sin θ cos φ e x + r sin θ sin φ e y + r cos θ e z
∂r r = sin θ cos φ e x + sin θ sin φ e y + cos θ e z ⇒ hr = ∂r r = 1
∂θ r = r cos θ cos φ e x + r cos θ sin φ e y − r sin θ e z ⇒ hθ = ∂θ r = r
∂φ r = −r sin θ sin φ e x + r sin θ cos φ e y ⇒ hφ = ∂φ r = r sin θ
Hence the unit vectors for spherical polars are
e r = sin θ cos φ e x + sin θ sin φ e y + cos θ e z = r / r
e θ = cos θ cos φ e x + cos θ sin φ e y − sin θ e z
e φ = − sin φ e x + cos φ e y
These unit vectors are normal to the surfaces described above (spheres, cones and planes).
80
Arc length: If ds is the length of the infinitesimal vector dr, then (ds)2 = dr · dr.
In Cartesian coordinates
(ds)2 = (dx)2 + (dy)2 + (dz)2
In curvilinear coordinates, if we change the ith coordinate ui by dui , then
with Einstein summation convention implied as usual. For orthogonal curvilinear coordi-
nates, we have e i · e j = δij , which tells us to set j = i, and we can perform the sum over j.
Hence
(ds)2 = h2i (dui )2 = h21 du21 + h22 du22 + h23 du23
For spherical polars, hr = 1 , hθ = r , hφ = r sin θ , therefore
Vector Area: dS
e2
If we let u1 → u1 + du1 , then
The vector area of the infinitesimal parallelogram (actually a rectangle for OCCs) whose
sides are the vectors dr1 and dr 2 is
because e 1 × e 2 = e 3 for orthogonal systems. Clearly, dS3 points in the direction of e 3 which
is normal to the surfaces u3 =constant.
The vector areas dS 1 and dS 2 are defined similarly.
Example: For spherical polars, if we vary θ and φ, keeping r fixed, we obtain very easily
the familiar result
dS r = (hθ dθ e θ ) × hφ dφ e φ = hθ hφ dθ dφ e r = r2 sin θ dθ dφ e r
Similarly, if we vary φ and r, keeping θ fixed, we obtain the vector element of area on the
cone of semi-angle θ, with its axis along the z axis
dS θ = hφ dφ e φ × (hr dr e r ) = hφ hr dφ dr e θ = r sin θ dr dφ e θ
81
Volume: The volume of the infinitesimal parallelepiped (actually a cuboid for OCCs) with
edges dr1 , dr2 and dr3 is
dV = dr1 × dr2 · dr3 = (h1 du1 e 1 ) × (h2 du2 e 2 ) · (h3 du3 e 3 )
= h1 h2 h3 du1 du2 du3 (60)
where e i is the ith curvilinear basis vector (which again should really be called eui to avoid
confusion with the Cartesian basis vectors.)
For orthogonal curvilinear coordinates, the component ai can be obtained by taking the
scalar product of a with the ith curvilinear basis vector e i
ai = a(r) · e i
• You can often spot the curvilinear components “by inspection”. See tutorial ques-
tion (5.6) for an example of this.
• In general, one chooses the set of coordinates which matches most closely the symmetry
of the problem.
82
15.4.1 Gradient
In section (2) we defined the gradient in terms of the change in a scalar field24 f (r) when we
let r → r + dr
df (r) = ∇ f (r) · dr (61)
Now consider writing f (r) in terms of orthogonal curvilinear coordinates, f (r) = f (u1 , u2 , u3 ).
As usual, we denote the curvilinear basis vectors by {e 1 , e 2 , e 3 } .
Let u1 → u1 + du1 , u2 → u2 + du2 , and u3 → u3 + du3 .
Using Taylor’s theorem, we have
We can manipulate the RHS of this equation into the form of equation (61). Start with
Now use orthogonality of the curvilinear basis vectors, e i · e j = δij , to rewrite equation (62)
as
which reduces for Cartesian coordinates, with scale factors hi = 1, to the expression (28).
For reference we quote the action of ∇ on a scalar function f ,
1 1 1 1
∇f = e 1 ∂u1 f + e 2 ∂u2 f + e ∂u f = e ∂u f (64)
h1 h2 h3 3 3 hi i i
15.4.2 Divergence
24
We use f (r) rather than φ(r) here in order to avoid confusion with the angle φ in spherical polars.
25
a must be continuously differentiable.
83
where ai are the components of a in the curvilinear basis, and e i is the ith curvilinear basis
vector.
We obtain ∇ · a in orthogonal curvilinears using the integral definition of divergence
1
Z
∇ · a = lim a · dS ,
δV →0 δV δS
The outward element of area on the face ABCD is dS = +h2 h3 du2 du3 e 1
The outward element of area on the face P QRS is dS = −h2 h3 du2 du3 e 1
The contributions to the surface integral from the faces ABCD and P QRS are then
Z u3 +δu3 Z u2 +δu2 n o
[a1 h2 h3 ]ABCD − [a1 h2 h3 ]P QRS du2 du3
u3 u2
ZZ n o
= [a1 h2 h3 ](u1 +δu1 ,u2 ,u3 ) − [a1 h2 h3 ](u1 ,u2 ,u3 ) du2 du3
ZZ n o
= δu1 [∂u1 (a1 h2 h3 )](u1 ,u2 ,u3 ) du2 du3 (by Taylor’s theorem)
1
∇·a = {∂u1 (a1 h2 h3 ) + ∂u2 (a2 h3 h1 ) + ∂u3 (a3 h1 h2 )} (66)
h1 h2 h3
84
For Cartesian coordinates, the scale factors are all unity, and we recover the usual expression
for ∇ · a in Cartesians.
15.4.3 Curl
1
I
e3
n · ∇ × a = lim a · dr
δS→0 δS δC
The line integral around the curve δC is the sum of the line integrals along the lines 1 → 4
respectively,
I Z Z
a · dr = [a2 h2 ](u1 ,u2 ,u3 ) du2 + [a3 h3 ](u1 , u2 +δu2 ,u3 ) du3
δC
Z Z
− [a2 h2 ](u1 ,u2 ,u3 +δu3 ) du2 − [a3 h3 ](u1 , u2 ,u3 ) du3
In each case, we approximate the integrals over u3 and u2 by the product of the integrand
and the integration ranges δu3 and δu2 , respectively. Hence
I
a · dr = ∂u2 (a3 h3 ) δu2 δu3 − ∂u3 (a2 h2 ) δu3 δu2
δC
85
h1 e 1 h2 e 2 h3 e 3
1
∇×a = ∂ ∂u2 ∂u3
h1 h2 h3 u1
h1 a1 h2 a2 h3 a3
2 1 h2 h3 h3 h1 h1 h2
∇f = ∂u1 ∂u1 f + ∂u2 ∂u2 f + ∂u3 ∂u3 f (67)
h1 h2 h3 h1 h2 h3
86
15.5 ∇-expression in cylindrical and spherical coordinates
To this very end we summarise in table 1 the volume element dV (60), the gradient on scalars
and vector fields ∇f (64) and ∇ · a (66) and the Laplacian on a scalar ∇2 f (67) in terms
of cylindrical coordinates and spherical coordinates presented in section 15.1.1. The cross
product on vector ∇a is given in (69) in cylindrical and spherical coordinates respectively.
The vector a is written in cylindrical and spherical coordinates as
a = aρ e ρ + aφ e φ + az e z (cylindrical)
= ar e r + aθ e θ + aφ e φ (spherical) (68)
where for cylindrical coordinates
e ρ = (cos φ, sin φ, 0) , e φ = (− sin φ, cos φ, 0) , e z = (0, 0, 1) ,
and for spherical coordinates
e r = (sin θ cos φ, sin θ sin φ, cos θ) , e θ = (cos θ cos φ, cos θ sin φ, − sin θ) ,
e φ (− sin θ sin φ, sin θ cos φ, 0) .
Table 1: Summary of del-expression for cylindrical and spherical coordinates which can be obtained
from the generic formula for OCC described in the text above.
e r ρe φ e z
1 1 ∂az ∂aφ ∂ar ∂az e ∂(ρaφ ) ∂aρ
) + z(
∇ × a|cyl = ∂ ρ ∂φ ∂ z = e r(
− ) + e φ( − − )
ρ
ρ ∂φ ∂z ∂z ∂ρ ρ ∂ρ ∂φ
aρ ρaφ az
e r r e θ r sin θ e φ
1
∇ × a|spherical = 2 ∂ ∂θ ∂φ (69)
r sin θ r
ar raθ r sin θaφ
∂a
e r ∂(sin θaφ ) ∂aθ e θ ∂φr ∂raφ e φ ∂(raθ ) ∂ar
= ( − )+ ( − )+ ( − )
r sin θ ∂θ ∂φ r sin θ ∂r r ∂r ∂θ
87
15.6 An alternative derivation of the divergence in OCC
For Cartesian coordinates ∇ · a (34) was constructed by taking the scalar product of the del
operator (28) with the vector a (6). This construction does apply to cylindrical and spherical
coordinates as well but is not as straightforward as for Cartesian coordinates because the
basis vector are coordinate dependent. This implies that the derivatives of the del operator
do act on the basis vectors. For example the basis vectors e ρ and e φ are functions of the
angle φ and therefore the derivative with respect to φ will act on them in a non-trivial way,
Applying the definition of the divergence (34), taking (70) into account, we get
1
∇ · a = (e ρ ∂ρ + e φ ∂φ + e z ∂z ) · (aρ e ρ + aφ e φ + az e z )
ρ
1 1 ∂ ∂ 1 ∂ 1 ∂ ∂
= aρ + ∂ ρ aρ + aφ + az = (ρ aρ ) + aφ + az (71)
ρ ρ ∂φ ∂z ρ ∂ρ ρ ∂φ ∂z
the expression which is quoted in table 1. The extra term ρ1 aρ is generated by using ∂φ e ρ =
e φ . The moral of this section is that we could have equally well derived all the expressions
in table 1 by considering the nabla as a vector and contracting them with vectors
Rederiving results in a different manner is reassuring and usually leads to additional insight
and can be helpful in solving problems. With this remark it is time to end the course and
I hope that you are now well equipped with vector differential calculus for the rest of your
studies in physics and mathematics.
[The End]
88