This action might not be possible to undo. Are you sure you want to continue?

BooksAudiobooksComicsSheet Music### Categories

### Categories

### Categories

Editors' Picks Books

Hand-picked favorites from

our editors

our editors

Editors' Picks Audiobooks

Hand-picked favorites from

our editors

our editors

Editors' Picks Comics

Hand-picked favorites from

our editors

our editors

Editors' Picks Sheet Music

Hand-picked favorites from

our editors

our editors

Top Books

What's trending, bestsellers,

award-winners & more

award-winners & more

Top Audiobooks

What's trending, bestsellers,

award-winners & more

award-winners & more

Top Comics

What's trending, bestsellers,

award-winners & more

award-winners & more

Top Sheet Music

What's trending, bestsellers,

award-winners & more

award-winners & more

Welcome to Scribd! Start your free trial and access books, documents and more.Find out more

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 = ˙ r.

However it is a much richer and more powerful topic than that. In year 1 an introduction was also given to

functions of more than one variable, such as functions of three coordinates in space e.g. f(x, y, z) or f(r).

Such functions of position are known as ﬁelds and they can themselves be scalar or vector in nature. Some

examples are listed in Table 1.

Scalar ﬁelds Vector ﬁelds

Carrier concentration at a p-n junction Velocity ﬁelds in ﬂuid dynamics

Electrostatic potentials Electric ﬁelds

Temperature distribution in this room Magnetic ﬁelds

Table 1: Examples of scalar and vector ﬁelds.

The topic of vector calculus concerns itself with differentiating and integrating scalar and vector ﬁelds with

respect to position (or another vector argument). The mathematical framework that will be developed

provides a universal way of describing physical laws very elegantly. In particular it is essential for the study

of ﬂuid dynamics and electromagnetism.

2 Vector algebra

This course assumes knowledge and understanding of the following:

• rules for vector addition, subtraction and multiplication by a scalar

• magnitude of a vector and unit vectors

• basis vectors and Cartesian coordinates

• scalar (dot) and vector (cross) products and their geometric interpretation

Unfamiliarity with any of the above should be addressed as a matter of priority by reading the notes from

the year 1 “Vectors” course. However a few topics are reviewed below in order to clarify the notation used

in this course.

Department of Materials, Imperial College London

2 Vector calculus

2.1 Cartesian coordinates

Vectors may be speciﬁed by their components with respect to an underlying set of basis vectors, which also

deﬁne 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 deﬁned by three orthonormal vectors i, j and k which deﬁne

the x-, y- and z-axes respectively. (Note that the ‘hat’ that is sometimes used to denote unit vectors, e.g.

ˆ n, is omitted here since the properties of the Cartesian basis are well known). A general vector a may then

be denoted

a =

¸

¸

a

x

a

y

a

z

¸

= a

x

i +a

y

j +a

z

k

z

y

x

a

x

i

a

y

j

a

z

k

a

Figure 1: Cartesian coordinates and components of a vector.

2.2 Scalar product

The scalar or dot product of two vectors a and b is deﬁned as:

a · b = a b cos θ

where a and b denote the magnitudes of the vectors a and b respectively and θ is the angle between them.

a

b

θ

Figure 2: Deﬁnition of the scalar product.

Department of Materials, Imperial College London

MSE 201: Mathematics 3

In particular:

• a and b are orthogonal ⇔a · b = 0

• a · a = a

2

, the squared length of a

• a · b = b · a

and hence

• i · j = j · k = k · i = 0

• i · i = j · j = k · k = 1

From these results it is straightforward to prove that in terms of Cartesian components:

a · b = a

x

b

x

+a

y

b

y

+a

z

b

z

which may also be written using matrix notation as:

a · b = a

T

b =

(a

x

a

y

a

z

)

¸

¸

b

x

b

y

b

z

¸

= a

x

b

x

+a

y

b

y

+a

z

b

z

2.3 Vector product

The vector or cross product of two vectors a and b is deﬁned as:

a ×b = a b sin θ ˆ n

where a and b denote the magnitudes of the vectors a and b respectively, θ is the angle between them and

ˆ n is a unit vector orthogonal to both a and b, whose direction is determined in a right-hand sense.

a

b

θ

ˆ n

Figure 3: Deﬁnition 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:

a ×b = (a

y

b

z

−a

z

b

y

) i + (a

z

b

x

−a

x

b

z

) j + (a

x

b

y

−a

y

b

x

) k =

¸

¸

a

y

b

z

−a

z

b

y

a

z

b

x

−a

x

b

z

a

x

b

y

−a

y

b

x

¸

**which may also be written as a determinant :
**

a ×b =

i j k

a

x

a

y

a

z

b

x

b

y

b

z

2.4 Vector area

Consider the parallelogram shown in Fig. 4, bounded by the vectors a and b. The area of such a parallel-

ogram is a scalar equal to the magnitude of the vector product of a and b, |a ×b|. The orientation of the

plane may be speciﬁed by a unit normal vector i.e. the direction of the vector product of a and b. These two

properties of the area may be combined into a single vector whose magnitude gives the scalar area and

whose direction gives the orientation. Such a vector area S is given conveniently by

S = a ×b

a

b

S

Figure 4: Deﬁnition 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 speciﬁed explicitly.

Department of Materials, Imperial College London

MSE 201: Mathematics 5

This deﬁnition 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 m

2

(it will be shown later that this is

correct even if the parasol is curved). The unit normal to the ground is simply ˆ n = k so the area of

the shadow at noon is S· ˆ n = π/

√

2 i.e. about 70% of the maximum shadow it could cast at that time.

Since it is a vector quantity, vector area is additive, and this allows the vector area of a surface that is not

conﬁned to a single plane to be calculated. Consider the three unit squares in the xy-, yz- and zx-planes,

with vector areas k, i and j respectively (all pointing into the octant x > 0, y > 0, z > 0 as shown on the left

of Fig. 5). The total vector area of the surface is i +j +k which has magnitude

√

3 and direction along the

line x = y = z.

x

y

z

i

j

k

x y

z

Figure 5: Left: three unit squares and associated vector areas; right: the projection of the sum of these vector areas

onto the plane x +y +z = 0.

Note that the magnitude of the vector area does not equal the scalar sum of the individual areas (which

is 3). The interpretation of the magnitude of such a vector area is that it equals the (scalar) area of the

projection of the surfaces onto a plane perpendicular to its direction, as shown on the right of Fig. 5. In this

case the projection is a regular hexagon with sides

2/3 and area

√

3.

Conversely, the vector area of a general (i.e. non-planar) surface may be found by considering its projection

onto planes perpendicular to i, j and k (ensuring that the senses of the vector areas making up the surface

are taken into account – some parts may contribute positively, others negatively).

Department of Materials, Imperial College London

6 Vector calculus

Examples

• Show that the total vector area of the faces of a cube (with vector areas all chosen to point out of the

cube) is zero. Does this result apply to all closed surfaces?

• Find the vector area of a hemisphere of radius r whose base is the xy-plane.

3 Coordinate systems

The most convenient and hence commonly used coordinate systems are those that are orthogonal i.e. all

the coordinate axes intersect at right angles. The Cartesian coordinate system is the simplest because

the unit vectors i, j and k that deﬁne 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 ﬁrst.

3.1 Plane polar coordinates

A point in the xy-plane with Cartesian coordinates (x, y) may also be deﬁned by plane-polar coordinates ρ

and φ deﬁned by:

ρ =

x

2

+y

2

tan φ = y/x

¸

x = ρ cos φ

y = ρ sin φ

where ρ is the distance of the point from the origin and φ is the angle the vector xi + y j makes with the

x-axis (conventionally chosen to lie in the interval 0 ≤ φ < 2π).

x

y

ρ

φ

i

j

ˆ e

ρ

ˆ e

φ

(x, y)

Figure 6: Plane-polar coordinates in two dimensions.

The plane-polar coordinate system may also be deﬁned in terms of unit vectors ˆ e

ρ

and ˆ e

φ

that point in the

directions of increasing ρ and φ respectively. In terms of i and j these vectors are deﬁned by:

ˆ e

ρ

= cos φi + sinφj

ˆ e

φ

= −sinφi + cos φj

¸

i = cos φ ˆ e

ρ

−sin φ ˆ e

φ

j = sinφ ˆ e

ρ

+ cos φ ˆ e

φ

Department of Materials, Imperial College London

MSE 201: Mathematics 7

i.e. {ˆ e

ρ

, ˆ e

φ

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

rotating {ˆ e

ρ

, ˆ e

φ

} clockwise by φ. Transformations of this form were covered in the year 1 “Matrices” course.

It is often helpful to visualize coordinate systems in terms of the locus of points generated by holding one

coordinate constant and varying all the others. In two dimensions, these loci form lines, whereas in three

dimensions they form surfaces. The loci for plane polar coordinates are shown in Fig. 7: ρ = constant

(where the constant is greater than zero) traces out a circle centred on the origin, φ = constant traces

out a straight line from the origin. Note that the origin itself is a singularity in this coordinate system: it

corresponds to ρ = 0 and φ is undeﬁned there.

x

y

ρ = constant

φ = π/4

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

A couple of features are worth remarking on: the lines always intersect at right angles. Also at any given

point, ˆ e

ρ

is perpendicular to the tangent to the line of constant ρ and ˆ e

φ

is perpendicular to the line of

constant φ. These are general features of orthogonal coordinate systems.

Example

• The point P has Cartesian coordinates x = 4 and y = 3.

◦ Find the plane polar coordiates of P.

◦ Express ˆ e

ρ

and ˆ e

φ

at P in terms of i and j.

◦ The vector u has Cartesian components u

x

= u

y

= 5. Find its components in terms of the basis

{ˆ e

ρ

, ˆ e

φ

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

In Cartesian coordinates, both x and y have the same dimensions e.g. length. Thus if a small change is

made in these coordinates e.g. x →x +dx and y →y +dy then the position vector l = xi +y j changes by

dl = dxi +dy j and

dl

2

= dl · dl = dx

2

+dy

2

.

However the physical dimensions of ρ and φ are not the same: ρ is a length whereas φ is an angle and

hence dimensionless. Consider the position of a point P given by plane polar coordinates (ρ = ρ

0

, φ = φ

0

),

as shown in Fig. 8. If ρ is increased from its initial value ρ

0

whilst φ is held constant, then the point moves

radially outwards along the straight line φ = φ

0

. If ρ changes from ρ

0

to ρ

0

+ δρ then the point moves by a

distance δρ. However, if φ is increased from its initial value φ

0

whilst ρ is held constant, then the point moves

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 inﬁnitesimal

changes in the coordinates ρ and φ of l result in a change dl = dρ ˆ e

ρ

+ ρ dφ ˆ e

φ

. This deﬁnes 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

dl

2

= dρ

2

+ρ

2

dφ

2

.

x

y

ρ = ρ

0

ρ = ρ

0

+δρ

φ = φ

0

φ = φ

0

+δφ

P

Figure 8: The effect of small changes in plane polar coordinates (ρ, φ) on position.

Small changes in two-dimensional coordinates also map out an area of the y-plane. For Cartesians, varying

x and y in the intervals x

0

≤ x ≤ x

0

+dx and y

0

≤ y ≤ y

0

+dy sweeps out a rectangle of area dA = dxdy.

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 inﬁnitesimal changes, this shape tends to a rectangle with

sides dρ and ρ

0

dφ. In general then dA = ρ dρ dφ: note the role again played by the scale factor for φ.

3.2 Cylindrical polar coordinates

The cylindrical polar coordinate system is essentially a three-dimensional extension of plane polar coor-

dinates, with the addition of the z-coordinate from Cartesians. For a point P, z gives its height above

the xy-plane, and its projection onto the xy-plane is described by plane polar coordinates ρ and φ. For

completeness the relationship between Cartesians and cylindrical polars is:

ρ =

x

2

+y

2

tan φ = y/x

z = z

x = ρ cos φ

y = ρ sin φ

z = z

The unit vectors are related by:

ˆ e

ρ

= cos φi + sinφj

ˆ e

φ

= −sinφi + cos φj

ˆ e

z

= k

i = cos φ ˆ e

ρ

−sin φ ˆ e

φ

j = sinφ ˆ e

ρ

+ cos φ ˆ e

φ

k = ˆ e

z

Department of Materials, Imperial College London

MSE 201: Mathematics 9

x

y

z

P

z

ρ

φ

l

Figure 9: Cylindrical polar coordinates.

and the scale factors are h

ρ

= 1, h

φ

= ρ and h

z

= 1.

It is clear from its description that cylindrical polars form an orthogonal coordinate system: the position

vector of P, denoted l in Fig. 9, is l = ρ ˆ e

ρ

+ z ˆ e

z

with magnitude l =

ρ

2

+z

2

. Inﬁnitesimal changes in

coordinates results in dl = dρ ˆ e

ρ

+ρdφ ˆ e

φ

+dz ˆ e

z

and thus

dl

2

= dρ

2

+ρ

2

dφ

2

+dz

2

In three dimensions, the locus of points mapped out when one coordinate is held constant forms a surface.

In this case, the surfaces of constant ρ are cylinders (hence the name) centred on the z-axis. Surfaces of

constant φ are half-planes that contain the z-axis and make an angle φ with the zx-plane, and surfaces of

constant z are planes parallel to the xy-plane.

Consider an inﬁnitesimal change in ρ and φ made while z is held constant. As in plane polar coordinates,

this sweeps out an area dA

z

= ρ dρ dφ. However in three dimensions this may now be represented by the

vector area dS

z

= ρ dρ dφ ˆ e

z

. Similarly if ρ is held constant while φ and z vary, a vector area dS

ρ

= ρ dφdz ˆ e

ρ

is obtained. Likewise dS

φ

= dρ dz ˆ e

φ

.

The general situation would involve changes in all three coordinates, but subject to a single constraint that

conﬁnes 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 ˆ e

ρ

+dρ dz ˆ e

φ

+ρ dρ dφ ˆ e

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 ﬁnd

an equation for dρ satisﬁed by inﬁnitesimal 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 inﬁnitesimal change in all three coordinates. This maps out an inﬁnitesi-

mal volume, or volume element. For inﬁnitesimal 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 π.

x

y

z

P

z

ρ

φ

l

r

θ

Figure 10: Spherical polar coordinates.

From the diagram it is clear that z = r cos θ and ρ = r sin θ. From these results the relationship between

spherical polars and Cartesians may be derived:

r =

x

2

+y

2

+z

2

cos θ = z/

x

2

+y

2

+z

2

tan φ = y/x

x = r sin θ cos φ

y = r sin θ sin φ

z = r cos θ

and the unit vectors are given by:

ˆ e

r

= sin θ cos φi + sinθ sin φj + cos θ k

ˆ e

θ

= cos θ cos φi + cos θ sin φj −sin θ k

ˆ e

φ

= −sin φi + cos φj

i = sin θ cos φ ˆ e

r

+ cos θ cos φ ˆ e

θ

−sin φ ˆ e

φ

j = sin θ sin φ ˆ e

r

+ cos θ sin φ ˆ e

θ

+ cos φ ˆ e

φ

k = cos θ ˆ e

r

−sin θ ˆ e

θ

Surfaces of constant r are obviously spherical (hence the name) and as before, surfaces of constant φ

are half-planes containing the z-axis and make an angle φ with the zx-plane. Surfaces of constant θ are

cones swept out when a line along 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 h

r

= 1. A small change δθ sweeps out a small

arc of length r δθ and so h

θ

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

φ

= ρ = r sin θ.

Knowledge of the scale factors enables the expressions for the line, surface and volume elements to be

written down:

dl = h

r

dr ˆ e

r

+h

θ

dθ ˆ e

θ

+h

φ

dφ ˆ e

φ

= dr ˆ e

r

+r dθ ˆ e

θ

+r sinθ dφ ˆ e

φ

⇒ dl

2

= h

2

r

dr

2

+h

2

θ

dθ

2

+h

2

φ

dφ

2

= dr

2

+r

2

dθ

2

+r

2

sin

2

θ dφ

2

Department of Materials, Imperial College London

MSE 201: Mathematics 11

dS = h

θ

h

φ

dθ dφ ˆ e

r

+h

φ

h

r

dφdr ˆ e

θ

+h

r

h

θ

dr dθ ˆ e

φ

= r

2

sin θ dθ dφ ˆ e

r

+r sin θ dφdr ˆ e

θ

+r dr dθ ˆ e

φ

dV = h

r

h

θ

h

φ

dr dθ dφ = r

2

sin θ dr dθ dφ

These expressions can be generalized to all orthogonal coordinate systems once the scale factors are

known.

A word of warning: in these notes cylindrical polar coordinates have been denoted {ρ, φ, z} and spherical

polar coordinates {r, θ, φ}. However it is also fairly common to refer to the cylindrical polar coordinates as

{r, θ, z} i.e. to use r instead of ρ and θ instead of φ. This is obviously a potential source of great confusion!

Examples

• 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 deﬁned by u = u

r

ˆ e

r

+u

θ

ˆ e

θ

+u

φ

ˆ e

φ

and v = v

r

ˆ e

r

+v

θ

ˆ e

θ

+v

φ

ˆ e

φ

in terms of unit vectors

associated with spherical polar coordinates at the same point in space.

◦ Show that in this case the scalar product u · v = u

r

v

r

+u

θ

v

θ

+u

φ

v

φ

.

◦ Would this result still hold if u and v were deﬁned 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 ﬁelds: functions of spatial position, and hence functions of three vari-

ables which might be Cartesian coordinates e.g. f(x, y, z) or another coordinate system e.g. spherical polar

coordinates g(r, θ, φ).

Recall the notation of ‘curly’ ∂’s used to denote that a derivative is being taken with respect to one variable

while the others are held constant. For f(x, y, z)

∂f

∂y

z,x

= lim

δy→0

f(x, y +δy, z) −f(x, y, z)

δy

means “differentiate f with respect to y holding z and x constant.” Sometimes the subscript showing which

variables are held constant is omitted if it is obvious from the context (e.g. for cylindrical polar coordinates

it would be understood that a partial derivative with respect to z was taken holding ρ and φ constant.)

Department of Materials, Imperial College London

12 Vector calculus

Second and higher derivatives may also be deﬁned and recall that if a function is differentiable then the

second ‘crossed’ derivatives are equal i.e.

∂

2

f

∂x∂y

=

∂

2

f

∂y∂x

Examples

• A scalar ﬁeld V is deﬁned in terms of spherical polar coordinates {r, θ, φ} as V (r, θ, φ) = r

2

sin

2

θ cos 2φ.

Calculate:

◦

∂V

∂r

=

◦

∂V

∂θ

=

◦

∂V

∂φ

=

◦

∂

2

V

∂θ

2

=

◦

∂

2

V

∂r∂θ

=

◦

∂

2

V

∂r∂φ

=

◦

∂

2

V

∂φ∂r

=

◦

∂

2

V

∂θ∂r

=

• Express V from the previous example in terms of Cartesian coordinates i.e. as a function V (x, y, z).

Verify that the crossed second partial derivatives with respect to x and y are equal.

4.1 Total differentials

The partial derivatives so far give the rate of change of a function when only one of its arguments changes.

However in general, several or all of the arguments may change simultaneously. The total differential gives

the inﬁnitesimal change in a function in response to inﬁnitesimal changes in all of its arguments e.g. for a

function f(x, y, z) the total differential is

df =

∂f

∂x

y,z

dx +

∂f

∂y

z,x

dy +

∂f

∂z

x,y

dz

This deﬁnition extends in an obvious way to different numbers of arguments.

Examples

• Find the total differentials of the following functions:

◦ f(x, y) = exp(x +y)

◦ φ(x, y, z) = x

2

+ 3yz

◦ V (ρ, φ, z) = ρ cos φ exp(−z)

Department of Materials, Imperial College London

MSE 201: Mathematics 13

4.2 Exact differentials

The previous section shows how to obtain the total differential of a known function. However sometimes it

is desirable to reverse this process i.e. to ﬁnd the function that differentiates to a known differential.

Consider the differential

x

2

dy + 2xy dx.

Integrating the ﬁrst term with respect to y gives x

2

y + c

1

(x) – note that the arbitrary constant of normal

integration becomes a function of one variable since it comes from a partial derivative. Integrating the

second term with respect to x gives x

2

y + c

2

(y). So f(x, y) = x

2

y + c is the required function (c

1

(x) =

c

2

(y) = c for consistency). This differential is therefore said to be exact since it can be directly integrated in

this way. Those that cannot are inexact differentials.

Now consider the general case involving two variables. The general form for the total differential of a

function f(x, y) is

df = u(x, y) dx +v(x, y) dy

where

u(x, y) =

∂f

∂x

y

and v(x, y) =

∂f

∂y

x

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

∂

2

f

∂x∂y

=

∂

2

f

∂y∂x

requires

∂u

∂y

x

=

∂v

∂x

y

and this is the necessary and sufﬁcient condition for the differential to be exact.

For functions of more than two variables, all of the second cross derivatives must be equal, resulting in

more conditions e.g. for u(x, y, z) dx +v(x, y, z) dy +w(x, y, z) dz to be exact,

∂u

∂y

z,x

=

∂v

∂x

y,z

and

∂v

∂z

x,y

=

∂w

∂y

z,x

and

∂w

∂x

y,z

=

∂u

∂z

x,y

In general, for n variables there will be

1

2

n(n −1) conditions.

The importance of the distinction between exact and inexact differentials will become clear later in the

course.

Examples

• Establish whether or not the following differentials are exact or inexact. For each one that is exact,

ﬁnd the function from which it originates.

◦ xdy +y dx

◦ xdy + 2y dx

◦ dx/x +dy/y

◦ 2xz dx −2yz dy + (x

2

−y

2

) dz

Department of Materials, Imperial College London

14 Vector calculus

4.3 Chain rule

The chain rule for partial differentiation was covered in year 1. It is worth revisiting here because of its role

in enabling the changes of variable that occur when moving from one coordinate system to another.

A convenient way of remembering the chain rule is to start from the total differential e.g. for f(x, y, z)

expressed in terms of Cartesian coordinates:

df =

∂f

∂x

y,z

dx +

∂f

∂y

z,x

dy +

∂f

∂z

x,y

dz

Consider transforming to spherical polar coordinates. The required ﬁrst partial derivatives are

∂f

∂r

θ,φ

,

∂f

∂θ

φ,r

and

∂f

∂φ

r,θ

.

For instance, to obtain the expression for (∂f/∂r)

θ,φ

, take the expression for the total differential and “divide

by ∂r at constant θ and φ” i.e.

∂f

∂r

θ,φ

=

∂f

∂x

y,z

∂x

∂r

θ,φ

+

∂f

∂y

z,x

∂y

∂r

θ,φ

+

∂f

∂z

x,y

∂z

∂r

θ,φ

Note the form of the expression: for three variables there are three terms, each the product of two partial

derivatives. In each term, the ﬁrst partial derivative is taken from the total differential. The second partial

derivative is with respect to the same variable (here r) holding the same variables constant (here θ and φ)

as the left-hand side.

Examples

• Write down the chain rule for the remaining partial derivatives of f: (∂f/∂θ)

φ,r

and (∂f/∂φ)

r,θ

. Eval-

uate them for the function f(x, y, z) = x +y +z.

• For f(x, y, z) = xyz calculate the ﬁrst partial derivatives with respect to the cylindrical polar 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 brieﬂy in year 1.

Department of Materials, Imperial College London

MSE 201: Mathematics 15

5.1 Double integrals

Consider a double integral involving two variables x and y. The limits of integration can usually be repre-

sented by the boundary of some region R as shown in Fig. 11 and the integral I is denoted

I =

R

f(x, y) dA

where dA denotes an inﬁnitesimal element of area. In Cartesian coordinates, the area element is dA =

dxdy and hence the integral may also be written

I =

R

f(x, y) dxdy

x

y

R

dA = dxdy

y

max

y

min

x

min

(y) x

max

(y) x

y

R

y

max

(x)

y

min

(x)

x

min

x

max

Figure 11: Two-dimensional integration.

As indicated in Fig. 11 there are two ways to proceed. In each we consider the integral as the limit of a sum

involving elements of area. The left-hand diagram represents the case where the region R is split ﬁrst into

strips of width dy in the x-direction. The contribution from each strip is obtained by integrating with respect

to x, and then the contributions of the strips are summed by integrating with respect to y:

I =

y

max

y=y

min

¸

x

max

(y)

x=x

min

(y)

f(x, y) dx

¸

dy

y

min

and y

max

deﬁne the extent of R in the y-direction whereas x

min

(y) and x

max

(y) give the limits of the

strip at position y.

Equivalently, the order of integration may be reversed, as illustrated in the right-hand diagram:

I =

x=x

max

x=x

min

¸

y=y

max

(x)

y=y

min

(x)

f(x, y) dy

¸

dx

Examples

• Evaluate the double integral

I =

R

xy

2

dxdy

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

x

y

0 1

1

x +y = 1

x

y

0 1

1

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

I =

1

y=0

¸

x=1−y

x=0

xy

2

dx

dy =

1

y=0

¸

1

2

x

2

y

2

x=1−y

x=0

dy =

1

2

1

y=0

(1 −y)

2

y

2

dy

=

1

2

1

y=0

y

2

−2y

3

+y

4

dy =

1

2

¸

1

3

y

3

−

1

2

y

4

+

1

5

y

5

1

y=0

=

1

60

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

I =

1

x=0

¸

y=1−x

y=0

xy

2

dy

dx =

1

x=0

¸

1

3

xy

3

y=1−x

y=0

dx

=

1

3

1

x=0

x −3x

2

+ 3x

3

−x

4

dx =

1

3

¸

1

2

x

2

−x

3

+

3

4

x

4

−

1

5

x

5

1

x=0

=

1

60

• Integrate the function f(x, y) = xy over the rectangular region deﬁned by the points (0, 0),(a, 0),(0, b)

and (a, b).

5.2 Triple integrals

The triple integral involves a function integrated over a three-dimensional region R i.e.

I =

R

f(x, y, z) dV =

R

f(x, y, z) dxdy dz

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 ﬁrst along columns parallel to z, then combine these columns into vertical

slabs by integrating along y and then ﬁnally integrate along x. So the limits on x are simply 0 ≤ x ≤ a.

Department of Materials, Imperial College London

MSE 201: Mathematics 17

x

a

y b

z

c

The line x/a + y/b = 1 deﬁnes the upper limit on the y-integration, and the column height is deﬁned

by x/a +y/b +z/c = 1.

V =

a

x=0

b(1−x/a)

y=0

¸

c(1−x/a−y/b)

z=0

dz

¸

dy

¸

dx

= c

a

x=0

¸

b(1−x/a)

y=0

1 −

x

a

−

y

b

dy

¸

dx

= c

a

x=0

¸

y −

xy

a

−

y

2

2b

¸

b(1−x/a)

y=0

dx

= bc

a

x=0

¸

1 −

x

a

−

x

a

1 −

x

a

−

1

2

1 −

x

a

2

¸

dx

= bc

a

x=0

1

2

−

x

a

+

x

2

2a

2

dx

= bc

¸

x

2

−

x

2

2a

+

x

3

6a

2

¸

a

x=0

=

abc

6

5.3 Changing variables

The concept of a substitution or change of variables to make one-dimensional integrals more tractable was

covered in year 1 e.g. consider substituting x = sin θ to calculate

1

x=0

1 −x

2

dx =

π/2

θ=0

1 −sin

2

θ

dx

dθ

dθ =

π/2

θ=0

cos

2

θ dθ

=

1

2

π/2

θ=0

[1 + cos(2θ)] dθ =

1

2

¸

θ +

1

2

sin(2θ)

π/2

θ=0

=

π

4

In this case, dx has been replaced by (dx/dθ) dθ. For similar reasons it is desirable to be able to make

substitutions or changes of variable in multidimensional integrals e.g. to change coordinate system.

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

R

f(x, y) dxdy

Department of Materials, Imperial College London

18 Vector calculus

that is to be transformed to plane polar coordinates ρ and φ. Deﬁne the Jacobian of x and y with respect to

ρ and φ as

J =

∂(x, y)

∂(ρ, φ)

=

∂x

∂ρ

φ

∂y

∂φ

ρ

−

∂x

∂φ

ρ

∂y

∂ρ

φ

which may also be written as the determinant:

J =

∂(x, y)

∂(ρ, φ)

=

(∂x/∂ρ)

φ

(∂y/∂ρ)

φ

(∂x/∂φ)

ρ

(∂y/∂φ)

ρ

**The change of variables then involves the replacement
**

dxdy = |J|dρ dφ =

∂(x, y)

∂(ρ, φ)

dρ dφ

For the transformation from Cartesian to plane polar coordinates:

J =

∂(x, y)

∂(ρ, φ)

=

cos φ sinφ

−ρ sinφ ρ cos φ

= ρ

cos

2

φ + sin

2

φ

= ρ

Thus this change of variables involves the replacement:

dxdy = ρdρ dφ

which of course simply replaces the expression for an area element dA in Cartesians with that for plane

polar coordinates. The Jacobian is simply a formal device for manipulating the scale factors, and the same

result could be obtained from physical reasoning.

Hence

R

f(x, y) dxdy =

R

g(ρ, φ)

∂(x, y)

∂(ρ, φ)

dρ dφ

where R

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

I =

R

y

x

2

+y

2

dxdy

where R is the top right quadrant of the unit circle.

◦ Calculate I directly using Cartesian coordinates.

I =

1

x=0

√

1−x

2

y=0

y

x

2

+y

2

dxdy =

1

x=0

¸

1

3

x

2

+y

2

3/2

√

1−x

2

y=0

dx

=

1

3

1

x=0

1 −x

3

dx =

1

3

¸

x −

1

4

x

4

1

x=0

=

1

4

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

Since ρ =

x

2

+y

2

and y = ρ sin φ the function being integrated transforms to ρ

2

sinφ. The

Jacobian for this transformation is ρ and so

I =

1

ρ=0

π/2

φ=0

ρ

3

sin φdρ dφ

Department of Materials, Imperial College London

MSE 201: Mathematics 19

which is separable and much more straightforward to evaluate:

I =

¸

1

4

ρ

4

1

ρ=0

[−cos φ]

π/2

φ=0

=

1

4

• Calculate

I =

R

1

x

2

+y

2

dxdy

where R is the unit circle.

• Calculate

I =

R

exp

−

x

2

+y

2

dxdy

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

5.4 Properties of Jacobians

The deﬁnition of the Jacobian as a determinant generalises to more than two dimensions. For example in

three dimensions, the Jacobian for transforming from x, y and z to a new set of variables u, v and w is

∂(x, y, z)

∂(u, v, w)

=

(∂x/∂u)

v,w

(∂y/∂u)

v,w

(∂z/∂u)

v,w

(∂x/∂v)

w,u

(∂y/∂v)

w,u

(∂z/∂v)

w,u

(∂x/∂w)

u,v

(∂y/∂w)

u,v

(∂z/∂w)

u,v

and

dV = dxdy dz =

∂(x, y, z)

∂(u, v, w)

dudv dw

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

∂(x, y, z)

∂(u, v, w)

=

∂(x, y, z)

∂(p, q, r)

∂(p, q, r)

∂(u, v, w)

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

1 =

∂(x, y, z)

∂(p, q, r)

∂(p, q, r)

∂(x, y, z)

or

∂(p, q, r)

∂(x, y, z)

= 1

∂(x, y, z)

∂(p, q, r)

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 conﬁrm 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)

∂(ρ, φ)

∂(ρ, φ)

∂(x, y)

= 1

Department of Materials, Imperial College London

20 Vector calculus

6 Derivatives of vectors

Consider a vector v that is a function of a scalar variable t e.g. this might be the velocity as a function of

time. This function maps the scalar t onto a vector v(t). The vector may be expressed in terms of a set of

scalar functions e.g. in terms of Cartesian components v = v

x

(t) i +v

y

(t) j +v

z

(t) k.

The derivative of v(t) (which is also a vector) may be deﬁned as a limit in the same way as the derivative

of a scalar function:

dv

dt

= lim

δt→0

v(t +δt) −v(t)

δt

For this limit to exist (and therefore for the function to be differentiable) the individual components must also

be differentiable.

Since the Cartesian unit vectors i, j and k are constant,

dv

dt

=

dv

x

dt

i +

dv

y

dt

j +

dv

z

dt

k.

Example

• A particle moving in a helix has position vector r(t) = ρ cos(ωt) i +ρ sin(ωt) j +ut k where ω and u are

constants. Calculate the velocity v(t) and acceleration a(t) of the particle and show that at all times

a · r = −ρ

2

ω

2

.

The situation is not so straightforward when using non-Cartesian coordinates, as not only the components

but also the basis vectors change with position. Consider cylindrical polar coordinates

ˆ e

ρ

= cos φi + sin φj

ˆ e

φ

= −sin φi + cos φj

ˆ e

z

= k

These expressions can be differentiated:

dˆ e

ρ

dt

= −sin φ

dφ

dt

i + cos φ

dφ

dt

j =

dφ

dt

ˆ e

φ

dˆ e

φ

dt

= −cos φ

dφ

dt

i −sin φ

dφ

dt

j = −

dφ

dt

ˆ e

ρ

dˆ e

z

dt

= 0

6.1 Product rule

The product rule for differentiation is familiar when two scalar functions are involved. However it generalises

readily to the products involving vector functions. If f(t) is a scalar function of a single variable t, and a(t)

and b(t) are both vector functions of t, then

d

dt

(fa) = f

da

dt

+

df

dt

a

d

dt

(a · b) = a ·

db

dt

+

da

dt

· b

d

dt

(a ×b) = a ×

db

dt

+

da

dt

×b

Department of Materials, Imperial College London

MSE 201: Mathematics 21

Note that it is important to maintain the order of the vectors in the cross product since a×b = 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) = ρˆ e

ρ

+ 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 deﬁned as L = r × mv for a particle of mass m with velocity v at position r.

Find an expression for the rate of change of angular momentum (with respect to time)

˙

L.

6.2 Partial derivatives

As the rules for standard derivatives of scalar functions readily generalise to vector functions, so do the

rules for partial derivatives e.g. for a vector ﬁeld. In terms of Cartesian components of the vector function

a(x, y, z) ≡ a(r) i.e. a

x

(x, y, z), a

y

(x, y, z) and a

z

(x, y, z):

∂a

∂x

y,z

=

∂a

x

∂x

y,z

i +

∂a

y

∂x

y,z

j +

∂a

z

∂x

y,z

k

and so on.

The total derivative can therefore be written

da =

∂a

∂x

y,z

dx +

∂a

∂y

z,x

dy +

∂a

∂z

x,y

dz

which, if expanded in terms of Cartesian components of a, involves nine different partial derivatives since

in general each component depends on all three coordinates.

Finally the chain rule for partial differentiation also applies e.g.

∂a

∂r

θ,φ

=

∂a

∂x

y,z

∂x

∂r

θ,φ

+

∂a

∂y

z,x

∂y

∂r

θ,φ

+

∂a

∂z

x,y

∂z

∂r

θ,φ

Example

• The vector ﬁeld F = exp(−x) exp(−y) cos z k.

◦ Calculate the partial derivatives of F with respect to the Cartesian coordinates x, y and z.

◦ Hence write down an expression for the total derivative dF.

Department of Materials, Imperial College London

22 Vector calculus

7 Gradient

Consider a scalar ﬁeld f(r) expressed in terms of the Cartesian coordinates of r i.e. f(x, y, z). The total

differential is

df =

∂f

∂x

y,z

dx +

∂f

∂y

z,x

dy +

∂f

∂z

x,y

dz

This can be written as the scalar product between the total differential of the position vector r:

dr = dxi +dy j +dz k

and the vector ﬁeld g(r) deﬁned by

g =

∂f

∂x

y,z

i +

∂f

∂y

z,x

j +

∂f

∂z

x,y

k

g is called the gradient of f. It contains all of the information about the rate of change of f with respect to

position in any direction (i.e. for an arbitrary dr.)

df = g · dr

Examples

• Calculate the gradients of the following scalar ﬁelds:

◦ f(x, y, z) = 1/

x

2

+y

2

+z

2

◦ φ(x, y, z) = (x

2

−y

2

)z

7.1 Notation

The gradient of a function f may be denoted

g = gradf

but a more compact notation involves introducing the vector differential operator known as del or nabla. It

is denoted by an upside-down capital Greek letter delta and in Cartesian coordinates is

∇ = i

∂

∂x

+j

∂

∂y

+k

∂

∂z

Using this notation

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 = a · ∇.

Department of Materials, Imperial College London

MSE 201: Mathematics 23

7.2 Geometric interpretation

The gradient was introduced as a scalar product

df = ∇f · dr = |∇f| dr cos θ

where θ is the angle between ∇f and dr. Moving a ﬁxed distance dr = |dr| therefore produces the largest

change df if θ = 0 i.e. dr is parallel to ∇f. Hence ∇f points in the direction of steepest ascent i.e. the

direction in which f increases most rapidly.

The equation f = constant deﬁnes 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 ﬁeld may be represented by contours, lines along which the ﬁeld is constant, shown by the dashed

lines in Fig. 12. A vector ﬁeld may be represented by ﬁeld lines, shown by the solid lines in Fig. 12: the

direction of the vector ﬁeld is tangential to the ﬁeld line at that point, and the magnitude of the ﬁeld is

represented by the spacing between the ﬁeld lines: the more closely spaced the ﬁeld lines, the stronger the

ﬁeld. For a vector ﬁeld that is the gradient of a scalar ﬁeld, the ﬁeld lines of the vector ﬁeld always intersect

the contours of the scalar ﬁeld at right angles, due to the results above.

7.3 Other coordinate systems

Consider a non-Cartesian coordinate system e.g. cylindrical polar coordinates for illustration. Write the

total differential of a function V (ρ, φ, z):

dV =

∂V

∂ρ

φ,z

dρ +

∂V

∂φ

z,ρ

dφ +

∂V

∂z

ρ,φ

dz

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

dr = h

ρ

dρ ˆ e

ρ

+h

φ

dφ ˆ e

φ

+h

z

dz ˆ e

z

where of course h

ρ

= h

z

= 1 and h

φ

= ρ.

Department of Materials, Imperial College London

24 Vector calculus

The equation df = ∇f · dr involves vectors and is therefore independent of coordinate system, from which

it is clear that

∇ =

ˆ e

ρ

h

ρ

∂

∂ρ

+

ˆ e

φ

h

φ

∂

∂φ

+

ˆ e

z

h

z

∂

∂z

= ˆ e

ρ

∂

∂ρ

+

ˆ e

φ

ρ

∂

∂φ

+ ˆ e

z

∂

∂z

and similarly in spherical polar coordinates

∇ =

ˆ e

r

h

r

∂

∂r

+

ˆ e

θ

h

θ

∂

∂θ

+

ˆ e

φ

h

φ

∂

∂φ

= ˆ e

r

∂

∂r

+

ˆ e

θ

r

∂

∂θ

+

ˆ e

φ

r sin θ

∂

∂φ

Note that whatever coordinate system is used, the gradient vector of a given scalar ﬁeld is the same at all

points in space.

Examples

• Calculate the gradients of the scalar ﬁelds:

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

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

8 Divergence

The divergence of a vector ﬁeld F(r), div F, is itself a scalar ﬁeld. In terms of Cartesian coordinates

F = F

x

i + F

y

j + F

z

k, where each of the three components F

x

, F

y

and F

z

is itself a function of three

variables x, y and z:

div F =

∂F

x

∂x

y,z

+

∂F

y

∂y

z,x

+

∂F

z

∂z

x,y

This expression is a scalar product between the del operator ∇ and the vector ﬁeld F and is therefore

denoted

div F ≡ ∇· F

Examples

• Calculate the divergence of the following vector ﬁelds:

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

◦ E =

xi

y

2

+z

2

◦ g = exp(−xyz)

¸

i

yz

+

j

zx

+

k

xy

**Department of Materials, Imperial College London
**

MSE 201: Mathematics 25

8.1 Geometric interpretation

Field lines begin at a source and end at a sink. In electrostatics with point charges, electric ﬁeld lines can

only begin at positive charges (sources) and end at negative charges (sinks), as illustrated in Fig. 13. For

a continuous charge distribution the situation is more complicated, but in general a positive charge density

will act as a source of ﬁeld lines and a negative charge density will act as a sink. The strength of the source

or sink is determined by the magnitude of the charge density.

+ −

Figure 13: Electric ﬁeld lines begin on positive charges (sources) and end on negative charges (sinks).

The geometric interpretation of the divergence is that it measures the rate at which electric ﬁeld lines are

begin created or destroyed at a point – in other words, it is proportional to the density of sources or sinks

at a point in space.

In free space there are no sources or sinks, and hence the divergence of a ﬁeld vanishes. A vector ﬁeld

with zero divergence is said to be solenoidal.

8.2 Other coordinate systems

In other coordinate systems the expressions for the divergence are more complicated, since it is necessary

to take the change in the basis vectors as well as the change in components into account, and so the scale

factors come into play again. Here the results are simply stated.

In cylindrical polar coordinates, the divergence of a vector ﬁeld F = F

ρ

ˆ e

ρ

+F

φ

ˆ e

φ

+F

z

ˆ e

z

takes the form

∇· F =

1

ρ

∂

∂ρ

(ρF

ρ

) +

1

ρ

∂F

φ

∂φ

+

∂F

z

∂z

In spherical polar coordinates where F = F

r

ˆ e

r

+F

θ

ˆ e

θ

+F

φ

ˆ e

φ

:

∇· F =

1

r

2

∂

∂r

r

2

F

r

+

1

r sin θ

∂

∂θ

(sin θ F

θ

) +

1

r sinθ

∂F

φ

∂φ

Department of Materials, Imperial College London

26 Vector calculus

Examples

• Calculate the divergence of the following vector ﬁelds:

◦ r = r ˆ e

r

◦ F = r

n

ˆ e

r

It is signiﬁcant that the divergence vanishes for the case n = −2 since this corresponds to the

inverse square law for electric and gravitational ﬁelds.

◦ u =

ˆ e

φ

2πρ

◦ E = exp(id · r) k

9 Curl

The divergence of a vector ﬁeld was deﬁned in terms of the scalar product betwen the del operator ∇ and

the vector ﬁeld. Another alternative is clearly to take the vector product between del and the vector ﬁeld,

the result being itself a vector ﬁeld. This is called the curl (or sometimes the rotation) of a vector ﬁeld and

is denoted

curl F ≡ ∇×F

As a vector product it can be calculated from a determinant. In Cartesian coordinates

∇×F =

i j k

∂/∂x ∂/∂y ∂/∂z

F

x

F

y

F

z

=

¸

∂F

z

∂y

z,x

−

∂F

y

∂z

x,y

¸

i +

¸

∂F

x

∂z

x,y

−

∂F

z

∂x

y,z

¸

j +

¸

∂F

y

∂x

y,z

−

∂F

x

∂y

z,x

¸

k

Examples

• Calculate the curl of the following vector ﬁelds:

◦ F = yz i +zxj +xy k

◦ A =

1

2

B

0

(xj −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 ﬁeld lines rotate around a given point. As illustrated in Fig. 14 this can be

visualised in terms of the rate at which a paddle wheel would turn if placed in the ﬁeld. A ﬁeld which has

zero curl is said to be irrotational.

The magnitude of the curl at a point is proportional to the speed with which the paddle wheel rotates. The

direction of the curl points along the axis of rotation: in Fig. 14 this points out of the plane of the paper.

Department of Materials, Imperial College London

MSE 201: Mathematics 27

Figure 14: Geometric interpretation of the curl of a vector ﬁeld as the rate at which a paddle wheel would turn.

9.2 Other coordinate systems

As with the divergence, the expressions for the curl are more complicated in non-Cartesian coordinate

systems and involve the scale factors. In cylindrical polar coordinates

∇×F =

1

ρ

ˆ e

ρ

ρ ˆ e

φ

ˆ e

z

∂/∂ρ ∂/∂φ ∂/∂z

F

ρ

ρF

φ

F

z

**and in spherical polar coordinates
**

∇×F =

1

r

2

sin θ

ˆ e

r

r ˆ e

θ

r sin θ ˆ e

φ

∂/∂r ∂/∂θ ∂/∂φ

F

r

rF

θ

r 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 ﬁelds:

◦ F = r

n

ˆ e

r

◦ g =

ˆ e

φ

r

2

◦ u =

ˆ e

φ

2πρ

◦ B =

ˆ e

φ

ρ

2

+v ˆ e

z

Department of Materials, Imperial College London

28 Vector calculus

10 Combinations of grad, div and curl

The gradient, divergence and curl are the three building blocks of vector calculus, all based upon the

del vector differential operator ∇. However they are often combined or modiﬁed to create other vector

operators, for example consider a · ∇ where a is a vector ﬁeld. As mentioned earlier, although the scalar

product is usually commutative (a · b = b · a) this does not hold when vector operators are involved. In

terms of Cartesian coordinates

a · ∇ = a

x

∂

∂x

+a

y

∂

∂y

+a

z

∂

∂z

which is a scalar differential operator.

10.1 Laplacian

The most commonly encountered combination is the Laplacian, a second order scalar differential operator

that can in fact operate on either a scalar or vector ﬁeld. When operating on a scalar ﬁeld it is equivalent

to taking the gradient to obtain a vector ﬁeld whose divergence is then taken to obtain the result, a scalar

ﬁeld i.e.

div gradf ≡ ∇· (∇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) =

¸

i

∂

∂x

+j

∂

∂y

+k

∂

∂z

·

¸

i

∂f

∂x

+j

∂f

∂y

+k

∂f

∂z

=

∂

2

f

∂x

2

+

∂

2

f

∂y

2

+

∂

2

f

∂z

2

and therefore

∇

2

≡

∂

2

∂x

2

+

∂

2

∂y

2

+

∂

2

∂z

2

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

∇

2

≡

1

ρ

∂

∂ρ

ρ

∂

∂ρ

+

1

ρ

2

∂

2

∂φ

2

+

∂

2

∂z

2

and in spherical polar coordinates

∇

2

≡

1

r

2

∂

∂r

r

2

∂

∂r

+

1

r

2

sin θ

∂

∂θ

sinθ

∂

∂θ

+

1

r

2

sin

2

θ

∂

2

∂φ

2

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

Examples

• Calculate the Laplacian of the following scalar ﬁelds:

◦ φ(x, y, z) = sin

πx

a

cos

πy

b

exp (−kz)

◦ V (r, θ, φ) = r sin θ cos φ

◦ f(ρ, φ, z) = ρ

2

cos(2φ) +z

2

Department of Materials, Imperial College London

MSE 201: Mathematics 29

∇

2

φ = 0 Laplace equation

∇

2

φ = (r) Poisson equation

∇

2

ψ +k

2

ψ = 0 Helmholtz equation

D∇

2

c =

∂c

∂t

Diffusion equation

∇

2

ψ =

1

c

2

∂

2

ψ

∂t

2

Wave equation

−

¯h

2

2m

∇

2

ψ +V (r)ψ = Eψ Schr ¨ odinger equation

Table 2: Physical equations involving the Laplacian operator.

10.2 Vector operator identities

A number of identities involving ∇ can be derived, including the following, where u and v are scalar ﬁelds,

and a and b are vector ﬁelds:

∇(uv) = u∇v +v∇u

∇(a · b) = a ×(∇×b) +b ×(∇×a) + (a · ∇)b + (b · ∇)a

∇· (ua) = u∇· a +a · ∇u

∇· (a ×b) = b · (∇×a) −a · (∇×b)

∇×(ua) = ∇u ×a +u∇×a

∇×(a ×b) = a(∇· b) −b(∇· a) + (b · ∇)a −(a · ∇)b

These identities (and more) may be proved using Cartesian coordinates: as the identity involves physical

quantities (scalars, vectors and operators) without reference to a particular coordinate system they are valid

whichever coordinate system is employed.

As an example consider ∇×(∇×F) where F = F

x

i +F

y

j +F

z

k is a vector ﬁeld.

∇×F =

¸

∂F

z

∂y

z,x

−

∂F

y

∂z

x,y

¸

i +

¸

∂F

x

∂z

x,y

−

∂F

z

∂x

y,z

¸

j +

¸

∂F

y

∂x

y,z

−

∂F

x

∂y

z,x

¸

k

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

i · [∇×(∇×F)] =

∂

∂y

[k · (∇×F)] −

∂

∂z

[j · (∇×F)]

=

∂

∂y

¸

∂F

y

∂x

y,z

−

∂F

x

∂y

z,x

¸

−

∂

∂z

¸

∂F

x

∂z

x,y

−

∂F

z

∂x

y,z

¸

=

∂

2

F

y

∂y∂x

+

∂

2

F

z

∂z∂x

−

∂

2

F

x

∂y

2

−

∂

2

F

x

∂z

2

Department of Materials, Imperial College London

30 Vector calculus

Adding and subtracting ∂

2

F

x

/∂x

2

, and using the property of second crossed derivatives:

i · [∇×(∇×F)] =

∂

2

F

x

∂x

2

+

∂

2

F

y

∂x∂y

+

∂

2

F

z

∂x∂z

−

∂

2

F

x

∂x

2

−

∂

2

F

x

∂y

2

−

∂

2

F

x

∂z

2

=

∂

∂x

¸

∂F

x

∂x

y,z

+

∂F

y

∂y

z,x

+

∂F

z

∂z

x,y

¸

−

∂

2

F

x

∂x

2

+

∂

2

F

x

∂y

2

+

∂

2

F

x

∂z

2

¸

The term in square brackets is simply the divergence ∇· F while the term in curly brackets is the Laplacian

of the x-component ∇

2

F

x

. Therefore

i · [∇×(∇×F)] =

∂

∂x

(∇· F) −∇

2

F

x

The y- and z-components yield similar results and hence

∇×(∇×F) =

¸

i

∂

∂x

(∇· F) +j

∂

∂y

(∇· F) +k

∂

∂z

(∇· F)

−

∇

2

F

x

i +∇

2

F

y

j +∇

2

F

z

k

¸

The term in square brackets is just the gradient of ∇· F while the term in curly brackets while the term in

curly brackets deﬁnes the Laplacian of a vector ﬁeld. The identity is therefore

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

2

F

In Cartesian coordinates the Laplacian of a vector ﬁeld is simply the vector obtained by taking the Laplacian

of each component i.e.

∇

2

F =

¸

¸

∇

2

F

x

∇

2

F

y

∇

2

F

z

¸

However this is not true in a general coordinate system. In this case the Laplacian of a vector ﬁeld must

be calculated by manipulating the previous identity:

∇

2

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

Examples

• Using Cartesian coordinates, prove the following identities:

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

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

11 Line integrals

A line integral is a one-dimensional integral where the integrand is evaluated along a general path or curve,

as illustrated in Fig. 15. Here the path C joins the points A and B along a curve that can be split into vector

line elements dl as shown.

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

a vector:

Department of Materials, Imperial College London

MSE 201: Mathematics 31

x

y

A

B

C

dl

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

•

C

f(r) dl is a vector quantity derived from a scalar ﬁeld f

•

C

F(r) · dl is a scalar quantity derived from a vector ﬁeld F

•

C

F(r) ×dl is a vector quantity derived from a vector ﬁeld F

The second of these is the most common. For example, consider the work done when a force moves an

object along a path C. The work done when a constant force F causes a displacement l is W = F · l. If

the force is caused by a ﬁeld, then in general it will vary in space and will not be constant. Split the path up

into line elements dl along which the force may be considered constant: 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 ﬁelds – 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

C

dl =

−→

AB

Reversing the sense of the contour involves making the change dl →−dl and hence

A→B

along C

. . . dl = −

B→A

along C

. . . dl

If the points A and B coincide, then C is a closed path, which may be denoted by placing a circle on the

integral sign:

C

. . . dl

Department of Materials, Imperial College London

32 Vector calculus

11.2 Scalar line integrals

Consider ﬁrst line integrals of the form

C

F · dl

where Fis a vector ﬁeld that in three-dimensional Cartesian coordinates may be written F = F

x

i+F

y

j+F

z

k

whereas the line element is dl = dxi +dy j +dz k and hence

C

F · dl =

C

(F

x

dx +F

y

dy +F

z

dz)

The path C deﬁnes a relationship between dx, dy and dz. For example, for a straight line deﬁned by

x −x

0

x

1

−x

0

=

y −y

0

y

1

−y

0

=

z −z

0

z

1

= z

0

that runs between the points r

0

= x

0

i +y

0

j +z

0

k and r

1

= x

1

i +y

1

j +z

1

k:

dy =

y

1

−y

0

x

1

−x

0

dx and dz =

z

1

−z

0

x

1

−x

0

dx

so

C

F · dl =

x

1

x=x

0

¸

F

x

+F

y

y

1

−y

0

x

1

−x

0

+F

z

z

1

−z

0

x

1

−x

0

dx

More generally, if the equation of the path C between r

0

and r

1

can be written as y = y(x) and z = z(x)

then

C

F · dl =

x

1

x=x

0

¸

F

x

+F

y

dy

dx

+F

z

dz

dx

dx

More generally still, the path C may be deﬁned parametrically i.e. the points on the path C are deﬁned by

the equations x = x(u), y = y(u) and z = z(u) in terms of a parameter u that varies between u

0

and u

1

.

Then

C

F · dl =

u

1

u=u

0

¸

F

x

dx

du

+F

y

dy

du

+F

z

dz

du

du

In all of the above, the components of the vector ﬁeld being integrated must be written in terms of the

integration variable alone.

Examples

• Calculate the line integrals

C

F · dl where F = xi +y j +z k and:

◦ C runs along the x-axis from x = 0 to x = 1.

C is a straight line parallel to the x-axis and hence along C: dy = dz = 0. Also on C, y = z = 0

and so F = xi in the integral:

C

F · dl =

1

x=0

xdx =

¸

1

2

x

2

1

x=0

=

1

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

F = xi +

b

a

xj +

c

a

xk

Putting this all together:

C

F · dl =

a

x=0

¸

x +

b

a

2

x +

c

a

2

x

¸

dx =

1 +

b

a

2

+

c

a

2

¸

¸

1

2

x

2

a

0

=

1

2

a

2

+b

2

+c

2

**◦ C is a straight line between the points r
**

0

= a i +b j and r

1

= a i +b j +c k.

◦ C is a single turn of a helix deﬁned parametrically by x = a cos φ, y = a sin φ and z = uφ.

From the parametric equations, dx/dφ = −a sin φ, dy/dφ = a cos φ and dz/dφ = u. Hence

C

F · dl =

2π

0

[(a cos φ)(−a sinφ) + (a sin φ)(a cos φ) + (uφ)u] dφ

= u

2

2π

0

φdφ = 2π

2

u

2

In non-Cartesian coordinates the same ideas apply as above: the vector ﬁeld F is expanded in the appro-

priate basis vectors and the relevant expression for the line integral involving the scale factors is used. For

cylindrical polar coordinates:

C

F · dl =

C

[F

ρ

dρ +F

φ

ρ dφ +F

z

dz]

and in spherical polar coordinates:

C

F · dl =

C

[F

r

dr +F

θ

r dθ +F

φ

r sinθ dφ]

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

simplify the integration.

Example

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

First note that F = r and hence F = ρ ˆ e

ρ

+ z ˆ e

z

. A more long-winded derivation of the above

uses the expressions from section 3.2:

F = xi +y j +z k

= (ρ cos φ)(cos φ ˆ e

ρ

−sin φ ˆ e

φ

) + (ρ sin φ)(sinφ ˆ e

ρ

+ cos φ ˆ e

φ

) +z ˆ e

z

= ρ(cos

2

φ + sin

2

φ) ˆ e

ρ

+ρ(sin φcos φ −cos φsin φ) ˆ e

φ

+z ˆ e

z

= ρ ˆ e

ρ

+z ˆ e

z

The expression for the line element in cylindrical polar coordinates is

dl = dρ ˆ e

ρ

+ρdφ ˆ e

φ

+dz ˆ e

z

Department of Materials, Imperial College London

34 Vector calculus

and hence

C

F · dl = [ρdρ +zdz]

Along the helical path C, ρ is a constant a so dρ = 0. The integral can be performed by making the

parametric substitution for z, but in this case this is unnecessary:

C

F · dl =

2πu

z=0

z dz =

¸

1

2

z

2

2πu

z=0

= 2π

2

u

2

• Consider the line integral

C

B· dl where B = I/(2πρ) ˆ e

φ

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

11.3 Conservative ﬁelds

The integrands in the scalar integrals considered previously take the form of differentials F

x

(x, y, z) dx +

F

y

(x, y, z) dy +F

z

(x, y, z) dz. If the differential is exact then it can be written as the total differential of some

scalar function f(x, y, z) i.e. df = F

x

(x, y, z) dx +F

y

(x, y, z) dy +F

z

(x, y, z) dz. In this case the line integral

becomes rather simple:

C

F · dl =

C

[F

x

dx +F

y

dy +F

z

dz] =

C

df = f(B) −f(A)

where A and B are again the beginning and end points, respectively, of the path C. The value of the line

integral is simply the difference in the scalar ﬁeld f between the end points, and is independent of the

particular path C taken between A and B.

The conditions for an exact differential involving three variables are

∂F

x

∂y

=

∂F

y

∂x

,

∂F

y

∂z

=

∂F

z

∂y

and

∂F

z

∂x

=

∂F

x

∂z

Compare the expression for the curl of F:

∇×F =

∂F

z

∂y

−

∂F

y

∂z

i +

∂F

x

∂z

−

∂F

z

∂x

j +

∂F

y

∂x

−

∂F

x

∂y

k

which must vanish if the above conditions are satisﬁed. Hence a scalar line integral will correspond to an

exact differential (and thus depend only upon its end points) if and only if the curl of the vector ﬁeld vanishes

at all points. Such a vector ﬁeld is said to be a conservative ﬁeld and corresponds to many (but not all)

physical ﬁelds: electrostatic and gravitational ﬁelds are conservative, but magnetic ﬁelds are not.

In the previous section it was stated that the curl of the gradient of any scalar ﬁeld vanishes i.e. ∇ × ∇f.

Indeed since the deﬁnition of the gradient of a scalar ﬁeld f was df = ∇f · dl then it is clear that a

conservative ﬁeld must be the gradient of some scalar ﬁeld – in physics this scalar ﬁeld is known as the

potential and gives the potential energy of a unit test particle at a given point in the ﬁeld. In summary, if a

vector ﬁeld F is conservative then:

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

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

For a conservative ﬁeld F, it is also obvious that

C

F · dl = 0

since any closed path C starts and ends at the same point.

Department of Materials, Imperial College London

MSE 201: Mathematics 35

11.4 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

C

F · dl

for a vector ﬁeld F = F

x

(x, y) i +F

y

(x, y) j.

x

y

x

y

C C

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

Note that the line integral may be split into two parts:

C

F · dl = I

x

+I

y

=

C

F

x

dx +

C

F

y

dy

Now consider the double integral

R

∂F

y

∂x

−

∂F

x

∂y

dxdy

where R is the region bounded by C. As in section 5 the order in which the x and y integrations are

performed is arbitrary. For the ﬁrst term, perform the x integration ﬁrst, as shown on the left of Fig. 16, and

consider the contribution from a single strip located at y:

x

max

(y)

x=x

min

(y)

∂F

y

∂x

dx = [F

y

]

x

max

(y)

x=x

min

(y)

= F

y

(x

max

(y), y) −F

y

(x

min

(y), y)

Multiplying by the strip height dy gives a contribution towards I

y

: F

y

(x

max

(y), y) dy is the contribution from

the right-hand edge of the strip to I

y

. −F

y

(x

min

(y), y) dy is the left-hand edge where the minus sign 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 ﬁrst, as shown on the right of Fig. 16, and consider the

contribution from a single strip located at x:

−

y

max

(x)

y=y

min

(x)

∂F

x

∂y

dy = −[F

x

]

y

max

(x)

y=y

min

(x)

= F

x

(x, y

min

(x)) −F

x

(x, y

max

(x))

Multiplying by the strip width dx gives a contribution towards I

x

: F

x

(x, y

min

(x)) dx is from the bottom edge

(where the sense of C is in the positive x-direction) and −F

x

(x, y

max

(x)) dx is from the top edge (where C

is in the negative x-direction).

Thus Green’s theorem in the plane is established:

C

(F

x

dx +F

y

dy) =

R

∂F

y

∂x

−

∂F

x

∂y

dxdy

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. dxdy is the area element dA that may be represented

by an element of vector area dS = dAk. Thus Green’s theorem in the plane could be rewritten as

C

F · dl =

R

(∇×F) · dS

where C and R are restricted to lie in the xy-plane. This is a special case of Stokes’ theorem.

Note that for a conservative ﬁeld (for which ∂F

y

/∂x = ∂F

x

/∂y and F

x

dx+F

y

dy is an exact differential) this

conﬁrms that a line integral around a closed path vanishes.

Example

• Conﬁrm Green’s theorem in the plane for the ﬁeld F = 3xdy + y dx integrated anticlockwise around

the unit square in the xy-plane.

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

The line integral (starting from the origin) consists of four parts:

C

F · dl =

1

x=0

F

x

(x, 0) dx +

1

y=0

F

y

(1, y) dy +

0

x=1

F

x

(x, 1) dx +

0

y=1

F

y

(0, y) dy

= 0 +

1

y=0

3 dy −

1

x=0

dx −0 = 3 −1 = 2

and only the right and top edges contribute.

The integrand for the area integral is ∂F

y

/∂x − ∂F

x

/∂y = 3 − 1 = 2 which is a constant so the

integral is simply

R

2 dxdy = 2

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

C

f(r) dl

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

C

f(r) dl = i

C

f(x, y, z) dx

+j

C

f(x, y, z) dy

+k

C

f(x, y, z) dz

**i.e. a sum involving three scalar line integrals along the same path C, which may be parameterised as
**

before.

Department of Materials, Imperial College London

MSE 201: Mathematics 37

Examples

• Calculate the following line integrals

C

fdl where f(x, y, z) = x

2

+y

2

and:

◦ C is a straight line from the origin to the point 2 i +j −3 k.

This straight line may be parameterised by x = 2λ, y = λ and z = −3λ where 0 ≤ λ ≤ 1.

dx/dλ = 2, dy/dλ = 1 and dz/dλ = −3. Along C, f = (2λ)

2

+λ

2

= 5λ

2

. Hence

C

fdl = i

1

λ=0

10λ

2

dλ +j

1

λ=0

5λ

2

dλ −k

1

λ=0

15λ

2

dλ =

5

3

(2 i +j −3 k)

◦ C is the unit circle in the xy-plane, taken anticlockwise.

At ﬁrst glance, plane-polar coordinates might seem to be suitable for this. Along C, f = ρ

2

= 1.

The general line element is dl = dρ ˆ e

ρ

+ ρdφ ˆ e

φ

but since ρ is constant (unity) along C, dρ = 0.

Thus for C, dl = dφ ˆ e

φ

and hence

C

f(r) dl =

2π

φ=0

ˆ e

φ

dφ

However there is a problem: the direction of ˆ e

φ

changes along C – it is not a constant in the

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

φ

pointing in exactly

the opposite direction. Thus the integral is in fact zero.

This can be conﬁrmed using Cartesian coordinates (with the azimthual angle φ as a param-

eter to deﬁne C) or even more straightforwardly, since f = 1 on C so this is a constant during

the integration:

C

f dl = f

C

dl = 0

since the start and end points are the same for a closed path.

Extra care must be taken when using non-Cartesian coordinate systems in vector line integrals.

Finally consider line integrals of the form

C

F(r) ×dl

which, in terms of Cartesian coordinates, may be written

C

F(r) ×dl = i

C

(F

y

dz −F

z

dy) +j

C

(F

z

dx −F

x

dz) +k

C

(F

x

dy −F

y

dx)

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

Consider the following special case:

C

1

2

r ×dr

illustrated in Fig. 17.

From section 2.4 it is known that

1

2

r ×dr is the vector area of the triangle with vertices at the origin and the

points with position vectors r and r + dr. The line integral thus sums up these elements of vector area dS

to obtain the total vector area of a surface bounded by the path C:

S =

1

2

C

r ×dr

Department of Materials, Imperial College London

38 Vector calculus

C

r

dr

O

r +dr

Figure 17: Vector area as a vector line integral.

This conﬁrms the previous result that the vector area of a surface depends only upon the rim bounding it,

and also uniquely deﬁnes the direction of the vector area (since the positive sense of the line integral is

when C is traversed anticlockwise).

12 Surface and volume integrals

12.1 Surface integrals

A surface integral is a double integral where the integrand is evaluated over a general surface whose

orientation as well as area is taken into account by the use of the vector area. As with line integrals, scalar

and vector ﬁelds may be involved:

•

S

f(r) dS is a vector quantity derived from a scalar ﬁeld f

•

S

F · dS is a scalar quantity derived from a vector ﬁeld F

•

S

F ×dS is a vector quantity derived from a vector ﬁeld F

The second these is of primary interest because of its physical interpretation as the ﬂux of the ﬁeld F

through the surface S. For example, in ﬂuid dynamics, an incompressible ﬂuid with density and velocity

ﬁeld v(r) would give rise to a ﬂux (mass per unit time) J =

S

v · dS. Attention is restricted to this case in

the following.

The surfaces over which the integral is performed may either be open i.e. bounded by a closed path C

whose anticlockwise circuit deﬁnes the positive sense of the vector area associated with the surface, or

closed. In the latter case, the

**notation is sometimes used. Of course it has already been determined that
**

the total vector area of a closed surface vanishes:

dS = 0

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 ﬁeld F = sin(x + y) i + cos(x + y) j + exp(−x − y) k over

the quadrant x ≥ 0, y ≥ 0 of the xy-plane.

In this case an element of vector area is dxdy k so only the z-component of F contributes and the

surface integral reduces to a separable double scalar integral:

S

F · dS =

∞

x=0

∞

y=0

exp(−x −y) dy dx

= [−exp(−x)]

∞

x=0

[−exp(−y)]

∞

y=0

= 1

• Calculate the surface integral of the vector ﬁeld F = yz i +zxj +xy k over the surface S consisting of

that part of the plane 2x +y −z = 0 bounded by 0 ≤ x ≤ a and 0 ≤ y ≤ b.

In Cartesian coordinates, F · dS = F

x

dy dz +F

y

dz dx +F

z

dxdy so this integral separates into three

double integrals:

S

F · dS =

S

yz dy dz +

S

zxdz dx +

S

xy dxdy

Since the boundary of S is determined by constraints on x and y, use z = 2x + y on S to eliminate

z from the integrands. From this same equation, dz = 2dx + dy. In the ﬁrst double integral, a

substitution for z in terms of x can be made, with dz = 2dx (y is constant during the z integration so

dy = 0). Whereas in the second double integral, a substitution for z in terms of y can be made i.e.

dz = dy (since x is constant during the z integration so dx = 0). Hence

S

F · dS =

a

x=0

b

y=0

[2y(2x +y) + (2x +y)x +xy] dxdy

=

a

x=0

b

y=0

2x

2

+ 6xy + 2y

2

dxdy

=

2

3

a

3

b +

3

2

a

2

b

2

+

2

3

ab

3

• Calculate the surface integral of the vector ﬁeld E = xsin(πy/b) sin(πz/c) i over the part of the plane

x = a that satisﬁes 0 ≤ y ≤ b, 0 ≤ z ≤ c.

• Calculate the surface integral of the vector ﬁeld g = (λ/ρ) ˆ e

ρ

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 ˆ e

z

and therefore perpendicular to g.

These surfaces make no contribution to the surface integral.

The surface element of the curved surface ρ = a is a dφdz ˆ e

ρ

and so

S

g · dS =

L

z=0

2π

φ=0

λ

a

a dφdz = 2πλL

• Calculate the surface integral of the vector ﬁeld F = ρ

2

ˆ e

z

over that part of the plane z = h satisfying

ρ ≤ R.

Department of Materials, Imperial College London

40 Vector calculus

• Evaluate the surface integral I =

S

v · dS where v = y j and S is the upper surface of a hemisphere

of radius a.

The surface S is x

2

+ y

2

+ z

2

= a

2

with z ≥ 0 i.e. 0 ≤ θ ≤ π/2. The element of surface area for

a spherical surface is dS = r

2

sin θ dθ dφ ˆ e

r

. From section 3.3:

j · ˆ e

r

= sin θ sinφ and y = r sinθ sin φ

Hence

I =

S

v · dS =

π/2

θ=0

2π

φ=0

a

3

sin

2

θ sin

2

φsin θ dθ dφ

=

¸

π/2

θ=0

sin

3

θ dθ

¸

¸

2π

φ=0

sin

2

φdφ

=

¸

π/2

θ=0

sin θ −cos

2

θ sin θ

dθ

¸

¸

2π

φ=0

1

2

(1 −cos 2φ) dφ

=

¸

−cos θ +

1

3

cos

3

θ

π/2

θ=0

¸

φ

2

−

1

4

sin 2φ

2π

φ=0

=

2π

3

• Calculate the surface integral

S

F· dS where F = Q/(4πr

2

) ˆ e

r

and S is the closed surface of a sphere

of radius R.

12.2 Stokes’ theorem

Stokes’ theorem may be stated as follows:

S

(∇×F) · dS =

C

F · dl

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 conﬁned to a plane, however the theorem is more general than that.

Consider splitting the surface S into tiny planar tiles. The surface integral may be approximated by the sum

of the contribution of each tile. Naturally, the dimensions will be made vanishingly small to obtain the limit

in which this sum approaches the integral. Consider a single tile PQRS outlined in bold in Fig. 18. The

neighbouring tiles that share edges with the bold tile are also shown, with an artiﬁcial gap between them

for clarity.

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

PQRS

F · dl =

PQRS

(∇×F) · dS

Consider the four neighbouring tiles that share edges with PQRS e.g. the one sharing the edge PQ. For

PQRS the contribution of this edge to the line integral is in the direction

−→

PQ whereas for the neighbouring

tile it is in the opposite direction

−→

QP. Hence when the contributions of these two tiles are added together,

the contributions to the line integrals from the edge PQ cancel, and the remaining line integral runs anti-

clockwise around the perimeter of both tiles. This cancellation will continue for all edges shared by tiles –

in fact all the edges of all tiles except those which make up the boundary C of the whole surface S.

Department of Materials, Imperial College London

MSE 201: Mathematics 41

P Q

R

S

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

Examples

• Verify Stokes’ theorem for the vector ﬁeld F = −y i +xj +zk

◦ for the hemispherical surface x

2

+y

2

+z

2

= a

2

, z ≥ 0:

Consider the left-hand side:

S

(∇ × F) · dS. ∇ × F = 2 k. In spherical polar coordinates

the surface element for the hemisphere is dS = a

2

sin θ dθ dφ ˆ e

r

. Since ˆ e

r

· k = cos θ,

S

(∇×F) · dS = 2

π/2

θ=0

2π

φ=0

(a

2

sin θ) cos θ dθ dφ

= a

2

¸

π/2

θ=0

sin 2θ dθ

¸

¸

2π

φ=0

dφ

= 2πa

2

¸

−

1

2

cos 2θ

π/2

θ=0

= 2πa

2

For the right-hand side:

C

F· dl, F· dl = xdy−y dx Use plane polar coordinates to parameterise

C: x = a cos φ, y = a sinφ:

C

F · dl =

2π

φ=0

[(a cos φ)(a cos φ) −(a sin φ)(−a sinφ)] dφ = a

2

2π

φ=0

dφ = 2πa

2

Hence Stokes’ theorem is veriﬁed.

◦ for the square planar surface z = 0 where 0 ≤ x ≤ a, 0 ≤ y ≤ a

◦ for the square planar surface x = a where 0 ≤ y ≤ b, 0 ≤ z ≤ b

• Prove that

S

(∇×u) · dS = 0 for any vector ﬁeld u over any closed surface S.

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

•

V

f(r) dV is a scalar quantity derived from a scalar ﬁeld f

•

V

F(r) dV is a vector quantity derived from a vector ﬁeld F

Examples

• Calculate the volume integral of (r) = αr over the sphere of radius a centred on the origin.

• Calculate the volume integral of σ(ρ, z) = ρ

2

+z

2

over the cylinder deﬁned by ρ ≤ a and |z| ≤ L/2.

• Calculate the volume integral of the vector ﬁeld F = x

2

i + xy j + z k over the cube 0 ≤ x ≤ L,

0 ≤ y ≤ L, 0 ≤ z ≤ L.

12.4 The divergence theorem

The divergence theorem may be stated as follows:

V

∇· FdV =

S

F · dS

where V is the volume bounded by the closed surface S. The derivation of the divergence theorem follows

a similar argument to that used for Stokes’ theorem. Consider splitting the volume V into tiny cuboids of

volume δV = δxδy δz with a corner located at (x

0

, y

0

, z

0

). Then

δV

∇· FdV =

x

0

+δx

x=x

0

y

0

+δy

y=y

0

z

0

+δz

z=z

0

∂F

x

∂x

+

∂F

y

∂y

+

∂F

z

∂z

dxdy dz

For the ﬁrst term in the integrand, integrate with respect to x ﬁrst. For the second and third terms ﬁrst

integrate with respect to y and z respectively:

δV

∇· FdV =

y

0

+δy

y=y

0

z

0

+δz

z=z

0

[F

x

(x

0

+δx, y, z) −F

x

(x

0

, y, z)] dy dz

+

z

0

+δz

z=z

0

x

0

+δx

x=x

0

[F

y

(x, y

0

+δy, z) −F

y

(x, y

0

, z)] dz dx

+

x

0

+δx

x=x

0

y

0

+δy

y=y

0

[F

z

(x, y, z

0

+δz) −F

z

(x, y, z

0

)] dxdy

The right-hand side of this equation is the surface integral over the closed surface of the cuboid. For

example, for the ‘front’ side x = x

0

+ δx has outward normal parallel to i and surface area element dy dz i

where as the ‘back’ side x = x

0

has a normal pointing in the opposite direction and surface element −dy dz i

– hence the minus sign in the integrand. Likewise the second and third lines give the contributions from the

‘left’ and ‘right’ and ’top’ and ’bottom’ sides.

As with Stokes’ theorem, when the contributions from cuboids are summed, neighbouring cuboids share

surfaces whose contributions cancel because their outward normals point in opposite directions. Thus the

only contribution that remains is from the boundary of the whole volume V .

Department of Materials, Imperial College London

MSE 201: Mathematics 43

Examples

• Verify the divergence theorem for the vector ﬁeld F = xi + y j + z k for the unit cube 0 ≤ x ≤ 1,

0 ≤ y ≤ 1, 0 ≤ z ≤ 1.

• Use the divergence theorem to evaluate the surface integral

S

F · dS of F = (x + y

2

z) i + (xz

2

−

2y) j + (z +x

2

+y

2

) k over the open hemispherical surface x

2

+y

2

+z

2

= a

2

, z ≥ 0.

13 Summary

From this section of the course, students should be able to:

• understand the concept of vector area and calculate it for simple surfaces

• understand the signiﬁcance of the scale factors in orthogonal coordinate systems and recall them for

Cartesian, cylindrical polar and spherical polar coordinates

• ﬁnd expressions for line, surface and volume elements in Cartesian, cylindrical polar and spherical

polar coordinates

• perform partial differentiation including the use of the chain rule to change coordinate system

• calculate total differentials and establish whether a given differential is exact or inexact

• perform double and triple integrals

• calculate and use the Jacobian to change variables in multidimensional integrals

• calculate derivatives of vector quantities

• interpret the gradient, divergence and curl geometrically

• recall and apply the formulae for the gradient, divergence, curl and Laplacian in Cartesian coordinates

• apply given formulae for the gradient, divergence, curl and Laplacian in cylindrical polar and spherical

polar coordinates

• derive vector operator identities using Cartesian coordinates

• calculate line, surface and volume integrals

• recall and apply Stokes’ theorem and the divergence theorem

• use vector calculus to solve problems in materials science and engineering

Department of Materials, Imperial College London

2

Vector calculus

2.1 Cartesian coordinates

Vectors may be speciﬁed by their components with respect to an underlying set of basis vectors, which also deﬁne 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 deﬁned by three orthonormal vectors i, j and k which deﬁne 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 z

a ax i x ay j

az k y

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 deﬁned 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.

b

θ a

Figure 2: Deﬁnition 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: a · b = aT b = (ax ay az )

bx by = ax bx + ay by + az bz bz

2.3 Vector product

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

ˆ n

b

θ a

Figure 3: Deﬁnition 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: a×b= i j k 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 parallelogram is a scalar equal to the magnitude of the vector product of a and b, |a × b|. The orientation of the plane may be speciﬁed 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

S b

a

Figure 4: Deﬁnition 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 speciﬁed explicitly. Department of Materials, Imperial College London

In this case the magnitude and direction of the vector area are calculated separately. 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. as shown on the right of Fig.g. right: the projection of the sum of these vector areas onto the plane x + y + z = 0. z z j i y k x y x Figure 5: Left: three unit squares and associated vector areas. The interpretation of the magnitude of such a vector area is that it equals the (scalar) area of the projection of the surfaces onto a plane perpendicular to its direction. For example. The total vector area of the surface is i + j + k which has magnitude 3 and direction along the line x = y = z. In this √ case the projection is a regular hexagon with sides 2/3 and area 3. the unit circle in the xy-plane has vector area πk. i × j = k. Since it is a vector quantity.MSE 201: Mathematics 5 This deﬁnition is not restricted to areas that are plane parallelograms. Imperial College London . This is simply achieved using the scalar product i. non-planar) surface may be found by considering its projection onto planes perpendicular to i. how much shadow is cast? Set up a Cartesian coordinate system such that the ground √ in the xy-plane and the sun moves lies in the zx-plane. The direction is given by a normalised cross product of any two vectors in the plane of the area e. others negatively). about 70% of the maximum shadow it could cast at that time.e. i and j respectively (all pointing into the octant x > 0. The unit normal to the ground is simply n = k so the area of √ ˆ the shadow at noon is S · n = π/ 2 i. Consider the three unit squares in the xy-. j and k (ensuring that the senses of the vector areas making up the surface are taken into account – some parts may contribute positively. at that time 45◦ above the horizon. Vector area permits easy calculation of the projection of the area of a surface onto another plane. Department of Materials. 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). vector area is additive. 5. y > 0.e. with vector areas k. 5). the vector area of a general (i. and this allows the vector area of a surface that is not conﬁned to a single plane to be calculated.e. the area of the projection of the vector area S onto a plane ˆ ˆ with unit normal n is S · n.and zx-planes. Conversely. By noon when the sun is straight overhead.√ > 0 as shown on the left z of Fig. Note that the magnitude of the vector area does not equal the scalar sum of the individual areas (which is 3). yz.

By way of orientation. In terms of i and j these vectors are deﬁned by: ˆ eρ = cos φ i + sin φ j ˆ eφ = − sin φ i + cos φj Department of Materials.1 Plane polar coordinates A point in the xy-plane with Cartesian coordinates (x. y) i Figure 6: Plane-polar coordinates in two dimensions. all the coordinate axes intersect at right angles.e. However. 3. j and k that deﬁne it are constant in space i. Imperial College London ˆ ˆ i = cos φ eρ − sin φ eφ ˆ ˆ j = sin φ eρ + cos φ eφ . in which the unit vectors that point along the coordinate axes vary in direction throughout space. The Cartesian coordinate system is the simplest because the unit vectors i. 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. Does this result apply to all closed surfaces? • Find the vector area of a hemisphere of radius r whose base is the xy-plane. y ˆ eφ j ˆ eρ ρ φ x (x. symmetry sometimes dictates that other coordinate systems are more convenient. the familiar example of plane polar coordinates in two dimensions is considered ﬁrst. y) may also be deﬁned by plane-polar coordinates ρ and φ deﬁned by: x = ρ cos φ ρ = x2 + y 2 y = ρ sin φ tan φ = y/x 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π).e. at every position they point in the same direction. 3 Coordinate systems The most convenient and hence commonly used coordinate systems are those that are orthogonal i. ˆ ˆ The plane-polar coordinate system may also be deﬁned in terms of unit vectors eρ and eφ that point in the directions of increasing ρ and φ respectively.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.

φ = φ0 ). However the physical dimensions of ρ and φ are not the same: ρ is a length whereas φ is an angle and hence dimensionless.e. these loci form lines. then the point moves radially outwards along the straight line φ = φ0 . eφ } clockwise by φ. Consider the position of a point P given by plane polar coordinates (ρ = ρ0 . [Hint: use the scalar product. The loci for plane polar coordinates are shown in Fig. Thus if a small change is made in these coordinates e. Also at any given ˆ ˆ point. length. whereas in three dimensions they form surfaces. If ρ changes from ρ0 to ρ0 + δρ then the point moves by a distance δρ.] e ˆ In Cartesian coordinates. These are general features of orthogonal coordinate systems. y φ = π/4 x ρ = constant Figure 7: Examples of lines of constant ρ (dashed) and lines of constant φ (dotted). if φ is increased from its initial value φ0 whilst ρ is held constant. A couple of features are worth remarking on: the lines always intersect at right angles.g. {i. 7: ρ = constant (where the constant is greater than zero) traces out a circle centred on the origin. ◦ The vector u has Cartesian components ux = uy = 5. ˆ ˆ ◦ Express eρ and eφ at P in terms of i and j. ◦ Find the plane polar coordiates of P . j} are obtained by e ˆ rotating {ˆρ . φ = constant traces out a straight line from the origin. {ˆρ . Conversely. 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 . eφ } are obtained by rotating {i. Note that the origin itself is a singularity in this coordinate system: it corresponds to ρ = 0 and φ is undeﬁned there. as shown in Fig. In two dimensions.MSE 201: Mathematics 7 i. Transformations of this form were covered in the year 1 “Matrices” course. eφ } at P . However. If ρ is increased from its initial value ρ0 whilst φ is held constant. e ˆ 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. Example • The point P has Cartesian coordinates x = 4 and y = 3.g. Find its components in terms of the basis {ˆρ . then the point moves Department of Materials. Imperial College London . 8. j} anticlockwise by an angle φ. both x and y have the same dimensions e. eρ is perpendicular to the tangent to the line of constant ρ and eφ is perpendicular to the line of constant φ.

y φ = φ0 + δφ φ = φ0 P ρ = ρ0 ρ = ρ0 + δρ x Figure 8: The effect of small changes in plane polar coordinates (ρ. Thus inﬁnitesimal ˆ ˆ changes in the coordinates ρ and φ of l result in a change dl = dρ eρ + ρ dφ eφ . 8. For Cartesians.8 Vector calculus along the arc of the circle ρ = ρ0 . This is quite intuitive: the larger ρ. and its projection onto the xy-plane is described by plane polar coordinates ρ and φ. Imperial College London x = ρ cos φ z=z y = ρ sin φ i = cos φ eρ − sin φ eφ ˆ ˆ k=e ˆz ˆ ˆ j = sin φ eρ + cos φ eφ . z gives its height above the xy-plane. in the limit of inﬁnitesimal changes. If φ changes from φ0 to φ0 + δφ then the point moves an arc distance ρ0 δφ. 3. with the addition of the z-coordinate from Cartesians. In the limit that δφ → 0 the arc becomes indistinguishable from a straight line. As shown in Fig. this shape tends to a rectangle with sides dρ and ρ0 dφ. Note that the directions in which P moves in response to changes in ρ and φ are orthogonal. For a point P .2 Cylindrical polar coordinates The cylindrical polar coordinate system is essentially a three-dimensional extension of plane polar coordinates. Small changes in two-dimensional coordinates also map out an area of the y-plane. the greater the distance caused by a small change in φ since the lines of constant φ diverge with radius. For completeness the relationship between Cartesians and cylindrical polars is: ρ = x2 + y 2 tan φ = y/x z=z The unit vectors are related by: ˆ eρ = cos φ i + sin φ j ˆ eφ = − sin φ i + cos φ j ˆ ez = k Department of Materials. hence the distance moved by a general change ρ → ρ + dρ and φ → φ + dφ is dl2 = dρ2 + ρ2 dφ2 . This deﬁnes 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. In general then dA = ρ dρ dφ: note the role again played by the scale factor for φ. φ) on position. varying ρ and φ in the intervals ρ0 ≤ ρ ≤ ρ0 + δρ and φ0 ≤ φ ≤ φ0 + δφ maps out a shape outlined in bold. However. 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.

ρ and the scale factors are hρ = 1. This maps out an inﬁnitesimal volume. For inﬁnitesimal changes the shape of this volume tends to a cuboid. the locus of points mapped out when one coordinate is held constant forms a surface. In this case. Consider an inﬁnitesimal change in ρ and φ made while z is held constant.MSE 201: Mathematics z 9 P l z y φ x Figure 9: Cylindrical polar coordinates. ◦ Write down the equation for a surface of radius a in cylindrical polar coordinates and hence ﬁnd an equation for dρ satisﬁed by inﬁnitesimal change of coordinates that remain on this surface. this sweeps out an area dAz = ρ dρ dφ. is l = ρ eρ + z ez with magnitude l = ρ2 + z 2 . ρdφ and dz (the scale factors come into play again). and surfaces of constant z are planes parallel to the xy-plane. Inﬁnitesimal changes in ˆ ˆ ˆ coordinates results in dl = dρ eρ + ρdφ eφ + dz ez and thus dl2 = dρ2 + ρ2 dφ2 + dz 2 In three dimensions. Imperial College London . the surfaces of constant ρ are cylinders (hence the name) centred on the z-axis. It is clear from its description that cylindrical polars form an orthogonal coordinate system: the position ˆ ˆ vector of P . Thus dV = ρ dρ dφ dz. Surfaces of constant φ are half-planes that contain the z-axis and make an angle φ with the zx-plane. However in three dimensions this may now be represented by the ˆ ˆ vector area dSz = ρ dρ dφ ez . 9. Department of Materials. hφ = ρ and hz = 1. Finally consider an unconstrained inﬁnitesimal change in all three coordinates. The general situation would involve changes in all three coordinates. but subject to a single constraint that conﬁnes points to a surface i. or volume element. a vector area dSρ = ρ dφ dz eρ ˆ is obtained. Similarly if ρ is held constant while φ and z vary. Likewise dSφ = dρ dz eφ . ◦ Write down an expression for dS for this surface and mark it on a sketch. In this case the element of surface area is ˆ ˆ ˆ dS = ρ dφ dz eρ + dρ dz eφ + ρ dρ dφ ez Example • Consider a cylindrical surface with its axis parallel to the z-axis. dρ. denoted l in Fig. As in plane polar coordinates. with sides of length dρ.e. dφ and dz are not all independent.

9 except that the polar angle θ has been marked. θ and φ. and a small change δr moves P a distance δr. Whereas φ ranges from 0 to 2π. From cylindrical polar coordinates it is already known that hφ = ρ = r sin θ. 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. z P l θ φ x Figure 10: Spherical polar coordinates. φ is the same azimuthal angle as in cylindrical polar coordinates. From these results the relationship between spherical polars and Cartesians may be derived: r = x2 + y 2 + z 2 cos θ = z/ x2 + y 2 + z 2 tan φ = y/x and the unit vectors are given by: ˆ er = sin θ cos φ i + sin θ sin φ j + cos θ k ˆ eθ = cos θ cos φ i + cos θ sin φ j − sin θ k ˆ eφ = − sin φ i + cos φ j i = sin θ cos φ er + cos θ cos φ eθ − sin φ eφ ˆ ˆ ˆ r k = cos θ e − sin θ e ˆr ˆθ x = r sin θ cos φ z = r cos θ y = r sin θ sin φ ˆ ˆ ˆ j = sin θ sin φ e + cos θ sin φ eθ + cos φ eφ Surfaces of constant r are obviously spherical (hence the name) and as before. surface and volume elements to be written down: dl = ˆ ˆ ˆ ˆ ˆ ˆ hr dr er + hθ dθ eθ + hφ dφ eφ = dr er + r dθ eθ + r sin θ dφ eφ ⇒ dl2 = h2 dr2 + h2 dθ2 + h2 dφ2 = dr2 + r2 dθ2 + r2 sin2 θ dφ2 r θ φ Department of Materials. so hr = 1. Knowledge of the scale factors enables the expressions for the line. A small change δθ sweeps out a small arc of length r δθ and so hθ = r.3 Spherical polar coordinates Figure 10 is identical to Fig.10 Vector calculus 3. Surfaces of constant θ are cones swept out when a line along l is rotated around the z-axis. surfaces of constant φ are half-planes containing the z-axis and make an angle φ with the zx-plane. θ is restricted to the range 0 to π. r has dimensions of length.) From the previous examples it has been seen that the scale factors are the key quantities. Spherical polar coordinates consist of r = |l|. z r y ρ From the diagram it is clear that z = r cos θ and ρ = r sin θ. constant φ corresponds to constant longitude (although the customary range of longitude corresponds to −π < φ ≤ π. Imperial College London .

z) − f (x. spherical polar coordinates g(r. y. This course is primarily concerned with ﬁelds: functions of spatial position. Specify their positions in terms of: (i) cylindrical polar coordinates (ii) spherical polar coordinates ˆ ˆ ˆ ˆ ˆ ˆ • Two vectors are deﬁned by u = ur er + uθ eθ + uφ eφ and v = vr er + vθ eθ + vφ eφ in terms of unit vectors associated with spherical polar coordinates at the same point in space. y + δy. −2) and (−1. y. This is obviously a potential source of great confusion! Examples • Two points P and Q have Cartesian coordinates (3. ◦ Would this result still hold if u and v were deﬁned in terms of unit vectors associated with spherical polar coordinates at different points in space? ◦ What happens to the three unit vectors: (i) as φ changes while θ = π/2? (ii) as θ changes while φ = π/4? (iii) as r changes? 4 Partial differentiation The notion of a partial derivative was introduced last year for functions of more than one variable. 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. θ. z} and spherical polar coordinates {r.” Sometimes the subscript showing which variables are held constant is omitted if it is obvious from the context (e.x f (x. θ. y. However it is also fairly common to refer to the cylindrical polar coordinates as {r. and hence functions of three variables which might be Cartesian coordinates e.e. z} i. A word of warning: in these notes cylindrical polar coordinates have been denoted {ρ. z) or another coordinate system e. for cylindrical polar coordinates it would be understood that a partial derivative with respect to z was taken holding ρ and φ constant. 3. z) δy→0 δy means “differentiate f with respect to y holding z and x constant.g. θ.) Department of Materials. to use r instead of ρ and θ instead of φ. φ. z) ∂f ∂y = lim z.g. f (x. 2) respectively.g. φ}.MSE 201: Mathematics 11 dS dV = = = ˆ ˆ ˆ hθ hφ dθ dφ er + hφ hr dφ dr eθ + hr hθ dr dθ eφ ˆ ˆ ˆ r2 sin θ dθ dφ er + r sin θ dφ dr eθ + r dr dθ eφ 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. Imperial College London . 4. For f (x. ◦ Show that in this case the scalar product u · v = ur vr + uθ vθ + uφ vφ . φ).

Examples • Find the total differentials of the following functions: ◦ f (x.y This deﬁnition extends in an obvious way to different numbers of arguments. However in general. Imperial College London . for a function f (x.x ∂f ∂z dz x. z). The total differential gives the inﬁnitesimal change in a function in response to inﬁnitesimal changes in all of its arguments e. as a function V (x.e.12 Vector calculus Second and higher derivatives may also be deﬁned and recall that if a function is differentiable then the second ‘crossed’ derivatives are equal i. y. z) = x2 + 3yz ◦ V (ρ. θ. y) = exp(x + y) ◦ φ(x. Calculate: ◦ ◦ ◦ ◦ ∂V ∂r ∂V ∂θ ∂V ∂φ ∂2V ∂θ2 = = = = ◦ ◦ ◦ ◦ ∂2V ∂r∂θ ∂2V ∂r∂φ ∂2V ∂φ∂r ∂2V ∂θ∂r = = = = • Express V from the previous example in terms of Cartesian coordinates i.e. ∂2f ∂x∂y = ∂2f ∂y∂x Examples • A scalar ﬁeld V is deﬁned in terms of spherical polar coordinates {r. several or all of the arguments may change simultaneously. 4. θ. y. y. z) the total differential is df = ∂f ∂x dx + y. z) = ρ cos φ exp(−z) Department of Materials.g. φ.1 Total differentials The partial derivatives so far give the rate of change of a function when only one of its arguments changes. φ} as V (r. Verify that the crossed second partial derivatives with respect to x and y are equal. φ) = r2 sin2 θ cos 2φ.z ∂f ∂y dy + z.

y. Those that cannot are inexact differentials. 2 The importance of the distinction between exact and inexact differentials will become clear later in the course. Now consider the general case involving two variables. for u(x. y) dy where u(x. Imperial College London . y. ◦ x dy + y dx ◦ x dy + 2y dx ◦ dx/x + dy/y ◦ 2xz dx − 2yz dy + (x2 − y 2 ) dz Department of Materials. y) dx + v(x.z ∂v ∂z = x. z) dz to be exact. This differential is therefore said to be exact since it can be directly integrated in this way.2 Exact differentials The previous section shows how to obtain the total differential of a known function.e. all of the second cross derivatives must be equal. resulting in more conditions e. y. y) = x2 y + c is the required function (c1 (x) = c2 (y) = c for consistency).y ∂w ∂y and z.g. Integrating the ﬁrst 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. y): ∂2f ∂x∂y requires ∂u ∂y = ∂2f ∂y∂x ∂v ∂x = x y and this is the necessary and sufﬁcient condition for the differential to be exact. However sometimes it is desirable to reverse this process i. For functions of more than two variables.MSE 201: Mathematics 13 4.y In general. y) is df = u(x. ∂u ∂y = z.x ∂v ∂x and y. to ﬁnd the function that differentiates to a known differential. z) dy + w(x. for n variables there will be 1 n(n − 1) conditions. So f (x. The general form for the total differential of a function f (x.x ∂w ∂x = y.z ∂u ∂z x. Integrating the second term with respect to x gives x2 y + c2 (y). z) dx + v(x. y) = ∂f ∂x and v(x. Consider the differential x2 dy + 2xy dx. Examples • Establish whether or not the following differentials are exact or inexact. For each one that is exact. y) = y ∂f ∂y x The equality of second cross derivatives of f (x. ﬁnd the function from which it originates.

This is a technique that was introduced brieﬂy in year 1. A convenient way of remembering the chain rule is to start from the total differential e. each the product of two partial derivatives.φ ∂f ∂y z. ∂f ∂r = θ.z ∂x ∂r + θ.y ∂z ∂r θ. y. φ and z and express the results in terms of these variables only. z) expressed in terms of Cartesian coordinates: df = ∂f ∂x dx + y.z ∂f ∂y dy + z. 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.θ .y Consider transforming to spherical polar coordinates.e. to obtain the expression for (∂f /∂r)θ. Examples • Write down the chain rule for the remaining partial derivatives of f : (∂f /∂θ)φ.φ ∂f ∂x y.φ ∂f ∂z x. r.x ∂f ∂z dz x. y.φ 5 Multidimensional integration Having discussed how to differentiate functions of more than one variable.3 Chain rule The chain rule for partial differentiation was covered in year 1. the logical next step is to consider how to integrate a function with respect to more than one variable.z = z. Department of Materials. take the expression for the total differential and “divide by ∂r at constant θ and φ” i.r and (∂f /∂φ)r.x ∂y ∂r + θ. z) = xyz calculate the ﬁrst partial derivatives with respect to the cylindrical polar coordinates ρ.14 Vector calculus 4.r ∂f ∂φ . • For f (x.φ . z) = x + y + z.φ Note the form of the expression: for three variables there are three terms. for f (x.g. θ. The required ﬁrst partial derivatives are ∂f ∂r . 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. In each term. ∂f ∂ρ ∂f ∂φ ∂f ∂z = φ. y. Imperial College London . Evaluate them for the function f (x.φ ∂f ∂θ and φ. the ﬁrst partial derivative is taken from the total differential.ρ = ρ.θ For instance.

and then the contributions of the strips are summed by integrating with respect to y: I= ymax y=ymin xmax (y) x=xmin (y) f (x. Department of Materials. In each we consider the integral as the limit of a sum involving elements of area. 11 and the integral I is denoted I= R f (x. The left-hand diagram represents the case where the region R is split ﬁrst into strips of width dy in the x-direction. the order of integration may be reversed. The limits of integration can usually be represented by the boundary of some region R as shown in Fig. 11 there are two ways to proceed. y) dx dy y ymax (x) R R ymin xmin (y) xmax (y) x ymin (x) xmin xmax x Figure 11: Two-dimensional integration. Equivalently. As indicated in Fig. y) dx dy ymin and ymax deﬁne the extent of R in the y-direction whereas xmin (y) and xmax (y) give the limits of the strip at position y. In Cartesian coordinates.MSE 201: Mathematics 15 5. The contribution from each strip is obtained by integrating with respect to x. y) dA where dA denotes an inﬁnitesimal element of area. as illustrated in the right-hand diagram: I= x=xmax x=xmin y=ymax (x) y=ymin (x) f (x.1 Double integrals Consider a double integral involving two variables x and y. y) dy dx Examples • Evaluate the double integral I= R xy 2 dx dy where R is the triangle bounded by the x-axis. the area element is dA = dx dy and hence the integral may also be written I= y ymax dA = dx dy R f (x. Imperial College London . y-axis and the line x + y = 1. Show that the order of integration does not matter.

0). Perform y integration ﬁrst (right-hand diagram): I = = 1 x=0 y=1−x y=0 xy 2 dy dx = 1 x=0 1 3 xy 3 y=1−x dx y=0 1 1 3 1 x=0 x − 3x2 + 3x3 − x4 dx = 3 1 1 1 2 x − x3 + x4 − x5 3 2 4 5 = x=0 1 60 • Integrate the function f (x. Examples • Calculate the volume bounded by the four planes x = 0. Perform the integration ﬁrst along columns parallel to z. I= f (x. b). 5.16 Vector calculus y 1 1 y x+y =1 x 0 1 0 1 x 1. 0). Imperial College London . Perform x integration ﬁrst (left-hand diagram): I = = 1 y=0 1 y=0 x=1−y x=0 xy 2 dx dy = 1 2 y 2 − 2y 3 + y 4 1 1 1 2 2 x=1−y dy = x y (1 − y)2 y 2 dy 2 2 y=0 y=0 x=0 1 1 1 3 1 4 1 5 1 y − y + y = dy = 2 3 2 5 60 y=0 1 2. b) and (a. y = 0. y. y. y) = xy over the rectangular region deﬁned by the points (0.e. the order of integration does not matter and the limits are determined by the boundary of R.(a.2 Triple integrals The triple integral involves a function integrated over a three-dimensional region R i. z) dV = f (x. Department of Materials. then combine these columns into vertical slabs by integrating along y and then ﬁnally integrate along x.(0. So the limits on x are simply 0 ≤ x ≤ a. z) dx dy dz R R As with the double integral. z = 0 and x/a + y/b + z/c = 1.

V = = c = c = bc = bc a x=0 a x=0 a x=0 a x=0 a x=0 b(1−x/a) y=0 b(1−x/a) y=0 c(1−x/a−y/b) z=0 dz dy dy dx dx 1− x y − a b xy y 2 y− − a 2b 1− x a − b(1−x/a) dx y=0 x x 1− a a dx = abc 6 − 1 x 1− 2 a 2 dx 1 x x2 − + 2 2 a 2a a x=0 x x2 x3 = bc − + 2 2 2a 6a 5. Imperial College London . First consider a two-dimensional integral in terms of Cartesian coordinates R f (x. 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.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.MSE 201: Mathematics z c 17 b y a x The line x/a + y/b = 1 deﬁnes the upper limit on the y-integration. and the column height is deﬁned by x/a + y/b + z/c = 1. to change coordinate system.g.g. y) dx dy Department of Materials. consider substituting x = sin θ to calculate 1 x=0 1 − x2 dx = = π/2 θ=0 1 π/2 1 − sin2 θ dx dθ = dθ π/2 θ=0 cos2 θ dθ π/2 2 θ=0 [1 + cos(2θ)] dθ = 1 1 θ + sin(2θ) 2 2 = θ=0 π 4 In this case.

y) is re-written in terms of ρ and φ. Deﬁne the Jacobian of x and y with respect to ρ and φ as ∂x ∂(x. y) = ∂(ρ. y) dx dy = R g(ρ. Examples • Consider the integral I= R y x2 + y 2 dx dy where R is the top right quadrant of the unit circle. φ) where R is a region of integration with respect to ρ and φ that corresponds to R and g(ρ. φ) For the transformation from Cartesian to plane polar coordinates: J= ∂(x. Hence R f (x. φ) ∂(x. Imperial College London . and the same result could be obtained from physical reasoning. Since ρ = x2 + y 2 and y = ρ sin φ the function being integrated transforms to ρ2 sin φ. y) dρ dφ ∂(ρ. y) ∂x ∂y ∂y − J= = ∂(ρ. φ) cos φ sin φ −ρ sin φ ρ cos φ = ρ cos2 φ + sin2 φ = ρ 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. y) = ∂(ρ. I = = 1 √ 1−x2 √ 3/2 x=0 y=0 y x2 + y 2 dx dy = 1 x=0 1 x=0 1 2 x + y2 3 = 1 4 1−x2 dx y=0 1 3 1 x=0 1 − x3 dx = 1 1 x − x4 3 4 ◦ Change variables to plane polar coordinates and repeat the calculation. φ) ∂ρ φ ∂φ ρ ∂φ ρ ∂ρ φ which may also be written as the determinant: J= ∂(x. φ) (∂x/∂ρ)φ (∂y/∂ρ)φ (∂x/∂φ)ρ (∂y/∂φ)ρ The change of variables then involves the replacement dx dy = |J|dρ dφ = ∂(x. The Jacobian for this transformation is ρ and so I= 1 π/2 ρ=0 φ=0 ρ3 sin φ dρ dφ Department of Materials. φ) is the function that results when f (x. ◦ Calculate I directly using Cartesian coordinates.18 Vector calculus that is to be transformed to plane polar coordinates ρ and φ. The Jacobian is simply a formal device for manipulating the scale factors. y) dρ dφ ∂(ρ.

Hence conﬁrm the expression for the volume element dV in section 3. r) =1 ∂(x. • Calculate I= R R 1 4 ρ 4 1 ρ=0 [− cos φ]φ=0 = π/2 1 4 x2 1 dx dy + y2 exp − x2 + y 2 dx dy where R is the unit semicircle in the upper-half plane (y > 0). z) ∂(p. q. w) ∂(p. v. φ) ∂(x. y. y) Department of Materials. v. φ and z.u (∂x/∂w)u. w) and dV = dx dy dz = (∂x/∂u)v. y. v and w is ∂(x. Examples • Evaluate the Jacobian for transforming from Cartesian coordinates x.2. Imperial College London . q. z) du dv dw ∂(u. y. r) ∂(p. v. r) which can sometimes be useful in calculating Jacobians.v ∂(x. y. y.w (∂x/∂v)w.4 Properties of Jacobians The deﬁnition of the Jacobian as a determinant generalises to more than two dimensions. Show that ∂(x. z) ∂(p. y. q. z) = ∂(u. • Evaluate the Jacobian for transforming from plane polar coordinates to Cartesian coordinates. the Jacobian for transforming from x.w (∂z/∂u)v. q. y. r) ∂(x. y. For example in three dimensions. q.MSE 201: Mathematics 19 which is separable and much more straightforward to evaluate: I= • Calculate I= where R is the unit circle.u (∂y/∂v)w. y and z to a new set of variables u. φ) =1 ∂(ρ. z) ∂(x.v (∂y/∂w)u.u (∂z/∂v)w. v ≡ y and w ≡ z then yields 1= ∂(x. r) = ∂(u. q. r) ∂(u. z) ∂(x.w (∂y/∂u)v. 5.v (∂z/∂w)u. z) ∂(p. y and z to cylindrical polar coordinates ρ. z) or ∂(p. y) ∂(ρ. v. w) Setting u ≡ x. w) A property of Jacobians (stated in three dimensions for illustration but completely general) is ∂(x.

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.1 Product rule The product rule for differentiation is familiar when two scalar functions are involved. this might be the velocity as a function of time. The vector may be expressed in terms of a set of scalar functions e. Since the Cartesian unit vectors i. Consider cylindrical polar coordinates ˆ eρ = cos φ i + sin φ j ˆ eφ = − sin φ i + cos φ j ˆ ez = k These expressions can be differentiated: dˆρ e dt dˆφ e dt dˆz e dt dφ dφ dφ ˆ i + cos φ j= eφ dt dt dt dφ dφ dφ ˆ = − cos φ i − sin φ j=− eρ dt dt dt = − sin φ = 0 6. as not only the components but also the basis vectors change with position.g. dv dvx dvy dvz = i+ j+ k. If f (t) is a scalar function of a single variable t.20 Vector calculus 6 Derivatives of vectors Consider a vector v that is a function of a scalar variable t e. and a(t) and b(t) are both vector functions of t. This function maps the scalar t onto a vector v(t).g. Imperial College London . The situation is not so straightforward when using non-Cartesian coordinates. The derivative of v(t) (which is also a vector) may be deﬁned as a limit in the same way as the derivative of a scalar function: dv v(t + δt) − v(t) = lim δt→0 dt δt For this limit to exist (and therefore for the function to be differentiable) the individual components must also be differentiable. j and k are constant. However it generalises readily to the products involving vector functions. in terms of Cartesian components v = vx (t) i + vy (t) j + vz (t) k. Calculate the velocity v(t) and acceleration a(t) of the particle and show that at all times a · r = −ρ2 ω 2 . 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.

y which. In terms of Cartesian components of the vector function a(x.x ∂y ∂r + θ. ay (x.z = y. z) ≡ a(r) i. 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 deﬁned as L = r × mv for a particle of mass m with velocity v at position r. Imperial College London . These results are straightforward (if a little tedious) to prove by expanding in terms of Cartesian components.φ ∂a ∂z x. Department of Materials.φ ∂a ∂y z. ◦ Calculate the partial derivatives of F with respect to the Cartesian coordinates x.z ∂az ∂x k y.2 Partial derivatives As the rules for standard derivatives of scalar functions readily generalise to vector functions.g. Examples • Reconsider the previous example. but now in cylindrical polars where r(t) = ρˆρ + utk and the e azimuthal angle φ = ωt. ∂a ∂r = θ.MSE 201: Mathematics 21 Note that it is important to maintain the order of the vectors in the cross product since a × b = b × a. ˙ Find an expression for the rate of change of angular momentum (with respect to time) L. y. ◦ Hence write down an expression for the total derivative dF.x ∂a ∂z dz x. z) and az (x.g.z ∂ay ∂x j+ y.z ∂ax ∂x i+ y. if expanded in terms of Cartesian components of a.φ Example • The vector ﬁeld F = exp(−x) exp(−y) cos z k. so do the rules for partial derivatives e. z).z ∂a ∂y dy + z. involves nine different partial derivatives since in general each component depends on all three coordinates. y. z): ∂a ∂x and so on.e. y. The total derivative can therefore be written da = ∂a ∂x dx + y. 6. ax (x. Finally the chain rule for partial differentiation also applies e. y and z. y.y ∂z ∂r θ.φ ∂a ∂x y.z ∂x ∂r + θ. for a vector ﬁeld.

for an arbitrary dr. it does not obey all the rules of vector algebra.e.z ∂y z.e. Department of Materials. It is denoted by an upside-down capital Greek letter delta and in Cartesian coordinates is =i Using this notation g = grad f ≡ f ∂ ∂ ∂ +j +k ∂x ∂y ∂z Since possesses the properties of both a vector and a differential operator. z) = (x2 − y 2 )z 7. f (x.) df = g · dr Examples • Calculate the gradients of the following scalar ﬁelds: ◦ f (x.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.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 ﬁeld g(r) deﬁned by g= ∂f ∂x i+ y. For example · a = a · . z). Imperial College London . It contains all of the information about the rate of change of f with respect to position in any direction (i. y. y.x ∂f ∂z k x.y g is called the gradient of f .22 Vector calculus 7 Gradient Consider a scalar ﬁeld f (r) expressed in terms of the Cartesian coordinates of r i.z ∂f ∂y j+ z. The total differential is ∂f ∂f ∂f df = dx + dy + dz ∂x y.x ∂z x. y. z) = 1/ x2 + y 2 + z 2 ◦ φ(x.

φ In this coordinate system.ρ ∂V ∂z dz ρ. f is perpendicular to the surfaces of constant f . lines along which the ﬁeld is constant. 12: the direction of the vector ﬁeld is tangential to the ﬁeld line at that point. cylindrical polar coordinates for illustration.g. φ. the stronger the ﬁeld.e. the ﬁeld lines of the vector ﬁeld always intersect the contours of the scalar ﬁeld at right angles. the total differential of the position vector r involves the scale factors: ˆ ˆ ˆ dr = hρ dρ eρ + hφ dφ eφ + hz dz ez where of course hρ = hz = 1 and hφ = ρ.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. Hence f points in the direction of steepest ascent i. 12. From above this implies that θ = π/2 i. dr is parallel to f . If dr lies along this surface (i. and the magnitude of the ﬁeld is represented by the spacing between the ﬁeld lines: the more closely spaced the ﬁeld lines. shown by the solid lines in Fig. Imperial College London . is tangential to it) then f cannot change and df = 0. shown by the dashed lines in Fig.e. Moving a ﬁxed distance dr = |dr| therefore produces the largest change df if θ = 0 i. A scalar ﬁeld may be represented by contours. Figure 12: Field lines (solid) and contours (dashed) intersect at right angles. 7. z): dV = ∂V ∂ρ dρ + φ. The equation f = constant deﬁnes a surface in three dimensions. Department of Materials. A vector ﬁeld may be represented by ﬁeld lines. due to the results above.e.MSE 201: Mathematics 23 7.e.3 Other coordinate systems Consider a non-Cartesian coordinate system e. the direction in which f increases most rapidly. Write the total differential of a function V (ρ. For a vector ﬁeld that is the gradient of a scalar ﬁeld.z ∂V ∂φ dφ + z.

φ) = cos θ/r (spherical polar coordinates) 8 Divergence The divergence of a vector ﬁeld F(r). from which = ˆ ˆ ˆ ˆ eφ ∂ eφ ∂ eρ ∂ ez ∂ ∂ ∂ ˆ ˆ + + = eρ + + ez hρ ∂ρ hφ ∂φ hz ∂z ∂ρ ρ ∂φ ∂z and similarly in spherical polar coordinates = ˆ ˆ ˆ ˆ ˆ eφ ∂ eφ ∂ eθ ∂ ∂ eθ ∂ er ∂ ˆ + + = er + + hr ∂r hθ ∂θ hφ ∂φ ∂r r ∂θ r sin θ ∂φ Note that whatever coordinate system is used.z ∂y z. In terms of Cartesian coordinates F = Fx i + Fy j + Fz k.x ∂z x. Imperial College London . div F. b and c are constants.24 Vector calculus The equation df = it is clear that f · dr involves vectors and is therefore independent of coordinate system. θ. Examples • Calculate the gradients of the scalar ﬁelds: ◦ V (ρ. xi ◦ E= 2 y + z2 j k i + + ◦ g = exp(−xyz) yz zx xy Department of Materials. where each of the three components Fx . φ. the gradient vector of a given scalar ﬁeld is the same at all points in space. z) = λ ln ρ (cylindrical polar coordinates) ◦ f (r. is itself a scalar ﬁeld.y This expression is a scalar product between the del operator denoted div F ≡ · F and the vector ﬁeld F and is therefore Examples • Calculate the divergence of the following vector ﬁelds: ◦ F = ax i + by j + cz k where a. Fy and Fz is itself a function of three variables x. y and z: ∂Fx ∂Fy ∂Fz div F = + + ∂x y.

it is proportional to the density of sources or sinks at a point in space. and so the scale factors come into play again. but in general a positive charge density will act as a source of ﬁeld lines and a negative charge density will act as a sink.2 Other coordinate systems In other coordinate systems the expressions for the divergence are more complicated.MSE 201: Mathematics 25 8. For a continuous charge distribution the situation is more complicated. 13. A vector ﬁeld with zero divergence is said to be solenoidal. The geometric interpretation of the divergence is that it measures the rate at which electric ﬁeld lines are begin created or destroyed at a point – in other words. as illustrated in Fig. ˆ ˆ ˆ In cylindrical polar coordinates. 8. + − Figure 13: Electric ﬁeld lines begin on positive charges (sources) and end on negative charges (sinks). Here the results are simply stated.1 Geometric interpretation Field lines begin at a source and end at a sink. since it is necessary to take the change in the basis vectors as well as the change in components into account. and hence the divergence of a ﬁeld vanishes. In free space there are no sources or sinks. The strength of the source or sink is determined by the magnitude of the charge density. Imperial College London . electric ﬁeld lines can only begin at positive charges (sources) and end at negative charges (sinks). the divergence of a vector ﬁeld F = Fρ eρ + Fφ eφ + Fz ez takes the form ·F= 1 ∂ 1 ∂Fφ ∂Fz (ρFρ ) + + ρ ∂ρ ρ ∂φ ∂z ˆ ˆ ˆ In spherical polar coordinates where F = Fr er + Fθ eθ + Fφ eφ : ·F= 1 ∂ 1 ∂ 1 ∂Fφ r2 Fr + (sin θ Fθ ) + r2 ∂r r sin θ ∂θ r sin θ ∂φ Department of Materials. In electrostatics with point charges.

The direction of the curl points along the axis of rotation: in Fig. the result being itself a vector ﬁeld.26 Vector calculus Examples • Calculate the divergence of the following vector ﬁelds: ˆ ◦ r = r er ˆ ◦ F = rn er It is signiﬁcant that the divergence vanishes for the case n = −2 since this corresponds to the inverse square law for electric and gravitational ﬁelds.1 Geometric interpretation As implied by the fact that the curl is also known as the rotation.z ∂Fy ∂x − y. A ﬁeld which has zero curl is said to be irrotational.x i+ x.y ∂Fz ∂x j+ y. Another alternative is clearly to take the vector product between del and the vector ﬁeld. 14 this can be visualised in terms of the rate at which a paddle wheel would turn if placed in the ﬁeld. 14 this points out of the plane of the paper. the geometric interpretation of the curl has to do with the way in which ﬁeld lines rotate around a given point. Department of Materials.y = − z.z ∂Fx ∂y k z. ˆ eφ ◦ u= 2πρ ◦ E = exp(id · r) k 9 Curl The divergence of a vector ﬁeld was deﬁned in terms of the scalar product betwen the del operator and the vector ﬁeld. This is called the curl (or sometimes the rotation) of a vector ﬁeld and is denoted curl F ≡ × F As a vector product it can be calculated from a determinant.x Examples • Calculate the curl of the following vector ﬁelds: ◦ F = yz i + zx j + xy k ◦ A = 1 B0 (x j − y i) 2 ◦ E = exp(id · r) k 9. In Cartesian coordinates ×F= ∂Fz ∂y ∂Fy ∂z i j k ∂/∂x ∂/∂y ∂/∂z Fx Fy Fz ∂Fx ∂z − x. The magnitude of the curl at a point is proportional to the speed with which the paddle wheel rotates. Imperial College London . As illustrated in Fig.

Imperial College London .MSE 201: Mathematics 27 Figure 14: Geometric interpretation of the curl of a vector ﬁeld as the rate at which a paddle wheel would turn. Examples • Calculate the curl of the following vector ﬁelds: ˆ ◦ F = rn er ˆ eφ ◦ g= 2 r ˆ eφ ◦ u= 2πρ ˆ eφ ˆ ◦ B = 2 + v ez ρ Department of Materials. 9.2 Other coordinate systems As with the divergence. and in the top and bottom rows of each column the scale factor for that coordinate appears. the expressions for the curl are more complicated in non-Cartesian coordinate systems and involve the scale factors. In cylindrical polar coordinates ×F= and in spherical polar coordinates ×F= 1 2 sin θ r ˆ ˆ ˆ er r eθ r sin θ eφ ∂/∂r ∂/∂θ ∂/∂φ Fr rFθ r sin θFφ 1 ρ ˆ ˆ ˆ ez eρ ρ eφ ∂/∂ρ ∂/∂φ ∂/∂z Fρ ρFφ Fz The whole determinant is divided by the product of the scale factors.

In cylindrical polar coordinates 2 ≡ 1 ∂ ∂ ρ ρ ∂ρ ∂ρ + 1 ∂2 ∂2 + 2 ρ2 ∂φ2 ∂z 1 ∂2 r2 sin2 θ ∂φ2 and in spherical polar coordinates 2 ≡ ∂ 1 ∂ r2 2 ∂r r ∂r + 1 ∂ ∂ sin θ 2 sin θ ∂θ r ∂θ + The Laplacian occurs in many physical equations. In terms of Cartesian coordinates ∂ ∂ ∂ a · = ax + ay + az ∂x ∂y ∂z which is a scalar differential operator. θ. φ) = r sin θ cos φ ◦ φ(x. although the scalar product is usually commutative (a · b = b · a) this does not hold when vector operators are involved. As mentioned earlier.e. However they are often combined or modiﬁed to create other vector operators. div and curl The gradient. all based upon the del vector differential operator . Examples • Calculate the Laplacian of the following scalar ﬁelds: πx πy cos exp (−kz) a b ◦ V (r. including those listed in Table 2. a scalar ﬁeld i.28 Vector calculus 10 Combinations of grad. y. Imperial College London . φ. z) = sin ◦ f (ρ. In ≡ i ∂/∂x + j ∂/∂y + k ∂/∂z so · ( f) = = ∂ ∂ ∂f ∂f ∂f ∂ +j +k · i +j +k ∂x ∂y ∂z ∂x ∂y ∂z 2f 2f 2f ∂ ∂ ∂ + 2 + 2 2 ∂x ∂y ∂z i 2 and therefore ≡ ∂2 ∂2 ∂2 + 2+ 2 ∂x2 ∂y ∂z In other coordinate systems the scale factors are involved. a second order scalar differential operator that can in fact operate on either a scalar or vector ﬁeld. 10. div grad f ≡ · ( f ) ≡ 2 f ≡ ∆f where the Cartesians 2 notation has been introduced (as well as the capital delta symbol ∆ that is less common).1 Laplacian The most commonly encountered combination is the Laplacian. z) = ρ2 cos(2φ) + z 2 Department of Materials. for example consider a · where a is a vector ﬁeld. When operating on a scalar ﬁeld it is equivalent to taking the gradient to obtain a vector ﬁeld whose divergence is then taken to obtain the result. divergence and curl are the three building blocks of vector calculus.

y ∂Fx ∂z − x. (uv) = u v + v u (a · b) = a × ( · (ua) = u × (ua) = · (a × b) = b · ( × (a × b) = a( × b) + b × ( u × b) )a − (a · )b ×a · a) + (b · × a) − a · ( · b) − b( × a) + (a · )b + (b · )a ·a+a· u×a+u These identities (and more) may be proved using Cartesian coordinates: as the identity involves physical quantities (scalars.z ∂Fy ∂x − y. ∂Fy ∂z ×( i+ x.MSE 201: Mathematics 29 2φ =0 Laplace equation 2φ = (r) + k2 ψ = 0 ∂c ∂t Poisson equation 2ψ Helmholtz equation D 2c = Diffusion equation 2ψ = 1 ∂2ψ c2 ∂t2 2 Wave equation − h ¯2 2m ψ + V (r)ψ = Eψ ¨ Schrodinger equation Table 2: Physical equations involving the Laplacian operator.x × F)] = = = × F)] − ∂ ∂z ∂Fx ∂z − x. As an example consider ×F= ∂Fz ∂y ×( − z. vectors and operators) without reference to a particular coordinate system they are valid whichever coordinate system is employed. ∂ [k · ( ∂y ∂ ∂y ∂ 2 Fy ∂y∂x ∂Fy ∂x + × F)] − − − ∂ [j · ( ∂z ∂Fx ∂y ∂2F x 2 ∂y z.z 2F ∂ z ∂Fz ∂x y.z ∂z∂x − ∂ 2 Fx ∂z 2 Department of Materials.e.z ∂Fx ∂y k z. 10. Imperial College London .y ∂Fz ∂x j+ y.x Consider the x-component of i·[ ×( × F) i.y y. where u and v are scalar ﬁelds.x × F) where F = Fx i + Fy j + Fz k is a vector ﬁeld.2 Vector operator identities A number of identities involving and a and b are vector ﬁelds: can be derived. including the following.

y ∂ 2 Fx ∂ 2 Fx ∂ 2 Fx + + ∂x2 ∂y 2 ∂z 2 The term in square brackets is simply the divergence of the x-component 2 Fx . and using the property of second crossed derivatives: i·[ ×( × F)] = = ∂ 2 Fx ∂ 2 Fy ∂ 2 Fz ∂ 2 Fx ∂ 2 Fx ∂ 2 Fx + − + − − ∂x2 ∂x∂y ∂x∂z ∂x2 ∂y 2 ∂z 2 ∂ ∂x ∂Fx ∂x + y.e. 15.30 Adding and subtracting ∂ 2 Fx /∂x2 . The identity is therefore ×( × F) = ( · F) − 2 F In Cartesian coordinates the Laplacian of a vector ﬁeld is simply the vector obtained by taking the Laplacian of each component i. as illustrated in Fig.and z-components yield similar results and hence ×( × F) = i − ∂ ( ∂x 2 · F) + j 2 ∂ ( ∂y · F) + k 2 ∂ ( ∂z · F) Fx i + Fy j + 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 deﬁnes the Laplacian of a vector ﬁeld.z Vector calculus ∂Fy ∂y + z. prove the following identities: ◦ ◦ (uv) = u v + v u where u and v are scalar ﬁelds · (ua) = u ·a+a· u where u is a scalar ﬁeld and a is a vector ﬁeld 11 Line integrals A line integral is a one-dimensional integral where the integrand is evaluated along a general path or curve. The integrand for a line integral may involve a scalar or vector ﬁeld. In this case the Laplacian of a vector ﬁeld must be calculated by manipulating the previous identity: 2 F= ( · F) − ×( × F) Examples • Using Cartesian coordinates. 2F x 2 F = 2 Fy 2F z However this is not true in a general coordinate system.x ∂Fz ∂z − x. Therefore i·[ ×( × F)] = · F while the term in curly brackets is the Laplacian ∂ ( ∂x · F) − 2 Fx The y. and the result itself may be a scalar or a vector: Department of Materials. Here the path C joins the points A and B along a curve that can be split into vector line elements dl as shown. Imperial College London .

dl If the points A and B coincide. Split the path up into line elements dl along which the force may be considered constant: the work done for the line element is dW = F · dl and the total work for the whole path is therefore C F · dl. consider the work done when a force moves an object along a path C. then C is a closed path. dl = − along C B→A . The work done when a constant force F causes a displacement l is W = F · l. then in general it will vary in space and will not be constant.MSE 201: Mathematics y 31 B dl C A x Figure 15: A path for a line integral in two dimensions. dl Department of Materials. . .1 Properties From vector summation it is clear that for a path that runs from point A to point B dl =AB −→ C Reversing the sense of the contour involves making the change dl → −dl and hence A→B along C . which may be denoted by placing a circle on the integral sign: C . 11. . . • • • C f (r) dl is a vector quantity derived from a scalar ﬁeld f F(r) · dl is a scalar quantity derived from a vector ﬁeld F F(r) × dl is a vector quantity derived from a vector ﬁeld F C C The second of these is the most common. Imperial College London . An example of the third kind is the Biot-Savart law for calculating magnetic ﬁelds – there is a problem on Question Sheet 3 about this. . . If the force is caused by a ﬁeld. For example.

the components of the vector ﬁeld being integrated must be written in terms of the integration variable alone. y = y(u) and z = z(u) in terms of a parameter u that varies between u0 and u1 .e. if the equation of the path C between r0 and r1 can be written as y = y(x) and z = z(x) then x1 dy dz Fx + Fy F · dl = + Fz dx dx dx C x=x0 More generally still. the path C may be deﬁned parametrically i. For example.32 Vector calculus 11. the points on the path C are deﬁned by the equations x = x(u). C is a straight line parallel to the x-axis and hence along C: dy = dz = 0. Examples • 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. dy and dz. y = z = 0 and so F = x i in the integral: F · dl = 1 x=0 C x dx = 1 2 x 2 1 = x=0 1 2 ◦ C is a straight line from the origin to the point a i + b j + c k. Department of Materials. Then u1 dx dy dz F · dl = Fx + Fy + Fz du du du du C u=u0 In all of the above.2 Scalar line integrals Consider ﬁrst line integrals of the form C F · dl where F is a vector ﬁeld 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 F · dl = (Fx dx + Fy dy + Fz dz) C C The path C deﬁnes a relationship between dx. Imperial College London . Also on C. for a straight line deﬁned by y − y0 z − z0 x − x0 = = 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: dy = so C y1 − y0 z1 − z0 dx and dz = dx x1 − x0 x1 − x0 Fx + Fy y1 − y0 x1 − x0 + Fz z1 − z0 x1 − x0 dx F · dl = x1 x=x0 More generally.

A more long-winded derivation of the above uses the expressions from section 3. dy/dx = b/a and dz/dx = c/a. From the parametric equations. Along C the ﬁeld F can be written in terms of x only as b c F = xi + xj + xk a a Putting this all together: F · dl = = a x=0 C x+ b a 2 x+ c a 2 x dx = 1+ b a 2 + c a 2 1 2 x 2 a 0 1 2 a + b2 + c2 2 ◦ C is a straight line between the points r0 = a i + b j and r1 = a i + b j + c k. Example • Consider the previous example with the helical path in cylindrical polar coordinates.MSE 201: Mathematics 33 The equation of this straight line is x/a = y/b = z/c and hence along C. dx/dφ = −a sin φ. y = a sin φ and z = uφ. dy/dφ = a cos φ and dz/dφ = u.2: F = xi + yj + zk ˆ ˆ ˆ ˆ ˆ = (ρ cos φ)(cos φ eρ − sin φ eφ ) + (ρ sin φ)(sin φ eρ + cos φ eφ ) + z ez ˆ ˆ ˆ = ρ(cos2 φ + sin2 φ) eρ + ρ(sin φ cos φ − cos φ sin φ) eφ + z ez ˆ ˆ = ρ eρ + z ez The expression for the line element in cylindrical polar coordinates is ˆ ˆ ˆ dl = dρ eρ + ρdφ eφ + dz ez Department of Materials. Imperial College London . ˆ ˆ First note that F = r and hence F = ρ eρ + z ez . ◦ C is a single turn of a helix deﬁned parametrically by x = a cos φ. For cylindrical polar coordinates: C F · dl = C [Fρ dρ + Fφ ρ dφ + Fz dz] and in spherical polar coordinates: 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. Hence F · dl = 2π 0 C [(a cos φ)(−a sin φ) + (a sin φ)(a cos φ) + (uφ)u] dφ 2π = u2 0 φ dφ = 2π 2 u2 In non-Cartesian coordinates the same ideas apply as above: the vector ﬁeld F is expanded in the appropriate basis vectors and the relevant expression for the line integral involving the scale factors is used.

z) dy + Fz (x. • there exists some scalar ﬁeld f such that F = For a conservative ﬁeld F. The value of the line integral is simply the difference in the scalar ﬁeld f between the end points. In this case the line integral becomes rather simple: C F · dl = C [Fx dx + Fy dy + Fz dz] = C df = f (B) − f (A) where A and B are again the beginning and end points. ρ is a constant a so dρ = 0. f. y.3 Conservative ﬁelds The integrands in the scalar integrals considered previously take the form of differentials Fx (x. z) dy + Fz (x. but in this case this is unnecessary: C F · dl = 2πu z=0 z dz = 1 2 z 2 2πu z=0 = 2π 2 u2 • Consider the line integral C ˆ B · dl where B = I/(2πρ) eφ and C is a circle of radius a in the xy-plane. × f . y. if a vector ﬁeld F is conservative then: • × F ≡ 0 at all points in space. Hence a scalar line integral will correspond to an exact differential (and thus depend only upon its end points) if and only if the curl of the vector ﬁeld vanishes at all points. Imperial College London . it is also obvious that C F · dl = 0 since any closed path C starts and ends at the same point. If the differential is exact then it can be written as the total differential of some scalar function f (x. The conditions for an exact differential involving three variables are ∂Fy ∂Fx = ∂y ∂x . y. df = Fx (x. z) dz. y. z) dx + Fy (x. Indeed since the deﬁnition of the gradient of a scalar ﬁeld f was df = f · dl then it is clear that a conservative ﬁeld must be the gradient of some scalar ﬁeld – in physics this scalar ﬁeld is known as the potential and gives the potential energy of a unit test particle at a given point in the ﬁeld. of the path C. and is independent of the particular path C taken between A and B. z) i. y. y. but magnetic ﬁelds are not. y. ∂Fy ∂Fz = ∂z ∂y and ∂Fz ∂Fx = ∂x ∂z ∂Fy ∂Fx − ∂x ∂y Compare the expression for the curl of F: ×F= ∂Fy ∂Fz − ∂y ∂z i+ ∂Fx ∂Fz − ∂z ∂x j+ k which must vanish if the above conditions are satisﬁed. The integral can be performed by making the parametric substitution for z. respectively. 11.34 Vector calculus and hence C F · dl = [ρdρ + zdz] Along the helical path C. z) dx + Fy (x. In summary.e. Department of Materials. Such a vector ﬁeld is said to be a conservative ﬁeld and corresponds to many (but not all) physical ﬁelds: electrostatic and gravitational ﬁelds are conservative. In the previous section it was stated that the curl of the gradient of any scalar ﬁeld vanishes i. z) dz.e.

MSE 201: Mathematics 35 11. and the scalar line integral C F · dl for a vector ﬁeld F = Fx (x. −Fy (xmin (y). taken in an anticlockwise sense as shown in Fig. perform the y integration ﬁrst. ymax (x)) ∂y Multiplying by the strip width dx gives a contribution towards Ix : Fx (x. 16. y) j. 16. y) dy is the contribution from the right-hand edge of the strip to Iy . Thus Green’s theorem in the plane is established: (Fx dx + Fy dy) = ∂Fy ∂Fx − ∂x ∂y dx dy C R Department of Materials. y) ∂x Multiplying by the strip height dy gives a contribution towards Iy : Fy (xmax (y). y) i + Fy (x. ymin (x)) − Fx (x. perform the x integration ﬁrst. As in section 5 the order in which the x and y integrations are performed is arbitrary. as shown on the right of Fig. For the second term. 16. and consider the contribution from a single strip located at y: xmax (y) x=xmin (y) ∂Fy xmax (y) dx = [Fy ]x=xmin (y) = Fy (xmax (y). as shown on the left of Fig. ymax (x)) dx is from the top edge (where C is in the negative x-direction). ymin (x)) dx is from the bottom edge (where the sense of C is in the positive x-direction) and −Fx (x. y) dy is the left-hand edge where the minus sign accounts for the fact that C is in a downward sense on the left-hand side. y) − Fy (xmin (y). and consider the contribution from a single strip located at x: − ymax (x) y=ymin (x) ∂Fx ymax (x) dy = − [Fx ]y=ymin (x) = Fx (x. y y C x C x Figure 16: Closed line integral used for the proof of Green’s theorem in the plane. Imperial College London . For the ﬁrst term. Note that the line integral may be split into two parts: C F · dl = Ix + Iy = C Fx dx + C Fy dy Now consider the double integral R ∂Fx ∂Fy − ∂x ∂y dx dy where R is the region bounded by C.4 Green’s theorem in the plane Consider the two-dimensional case of a simple closed path C in the xy-plane.

Embedding the xy-plane in three-dimensional space as usual. Hence both sides of Green’s theorem in the plane equal two. y. y) dy = 0+ 3 dy − 1 x=0 dx − 0 = 3 − 1 = 2 and only the right and top edges contribute. Department of Materials. This is not a conservative ﬁeld so the integrals must be evaluated explicitly. y. The line integral (starting from the origin) consists of four parts: F · dl = 1 x=0 C Fx (x. Note that for a conservative ﬁeld (for which ∂Fy /∂x = ∂Fx /∂y and Fx dx + Fy dy is an exact differential) this conﬁrms that a line integral around a closed path vanishes. 1) dx + 0 y=1 Fy (0. The integrand for the area integral is ∂Fy /∂x − ∂Fx /∂y = 3 − 1 = 2 which is a constant so the integral is simply R 2 dx dy = 2 from the area of the unit square. 11. f (r) dl = i f (x. Example • Conﬁrm Green’s theorem in the plane for the ﬁeld F = 3x dy + y dx integrated anticlockwise around the unit square in the xy-plane. z) dy + k f (x. z) dx + j f (x.5 Vector line integrals Consider a line integral of the form C f (r) dl where f is a scalar ﬁeld. which may be parameterised as before. 0) dx + 1 y=0 1 y=0 Fy (1.e.36 Vector calculus where C is the anticlockwise path that bounds the region R: this sometimes denoted C = ∂R. dx dy is the area element dA that may be represented by an element of vector area dS = dA k. Imperial College London . z) dz C C C C i. This is a special case of Stokes’ theorem. Thus Green’s theorem in the plane could be rewritten as F · dl = ( × F) · dS C R where C and R are restricted to lie in the xy-plane. y) dy + 0 x=1 Fx (x. a sum involving three scalar line integrals along the same path C. In terms of Cartesian coordinates. it may be noted that the integrand on the right-hand side is the z-component of the curl of F. y.

Thus the integral is in fact zero. This straight line may be parameterised by x = 2λ. taken anticlockwise. plane-polar coordinates might seem to be suitable for this. In fact. Along C. Finally consider line integrals of the form C F(r) × dl which. since f = 1 on C so this is a constant during the integration: C f dl = f C dl = 0 since the start and end points are the same for a closed path. y. Imperial College London . dl = dφ eφ and hence f (r) dl = 2π φ=0 C ˆ eφ dφ ˆ However there is a problem: the direction of eφ changes along C – it is not a constant in the ˆ integrand. This can be conﬁrmed using Cartesian coordinates (with the azimthual angle φ as a parameter to deﬁne C) or even more straightforwardly. Consider the following special case: C 1 r × dr 2 illustrated in Fig. in terms of Cartesian coordinates.MSE 201: Mathematics 37 Examples • Calculate the following line integrals f dl where f (x. may be written C F(r) × dl = i C (Fy dz − Fz dy) + j C (Fz dx − Fx dz) + k C (Fx dy − Fy dx) again a sum involving scalar line integrals along the same path C. At ﬁrst glance. dy/dλ = 1 and dz/dλ = −3. ˆ ˆ The general line element is dl = dρ eρ + ρdφ eφ but since ρ is constant (unity) along C. f = (2λ)2 + λ2 = 5λ2 . f = ρ2 = 1. the point diametrically opposite has eφ pointing in exactly the opposite direction. ˆ Thus for C.4 it is known that 1 r × dr is the vector area of the triangle with vertices at the origin and the 2 points with position vectors r and r + dr. y = λ and z = −3λ where 0 ≤ λ ≤ 1. dρ = 0. for every point on C. dx/dλ = 2. Hence f dl = i 1 λ=0 C 10λ2 dλ + j 1 λ=0 5λ2 dλ − k 1 λ=0 15λ2 dλ = 5 (2 i + j − 3 k) 3 ◦ C is the unit circle in the xy-plane. From section 2. Extra care must be taken when using non-Cartesian coordinate systems in vector line integrals. z) = x2 + y 2 and: C ◦ C is a straight line from the origin to the point 2 i + j − 3 k. Along C. 17. The line integral thus sums up these elements of vector area dS to obtain the total vector area of a surface bounded by the path C: S= 1 2 C r × dr Department of Materials.

Attention is restricted to this case in The surfaces over which the integral is performed may either be open i. and also uniquely deﬁnes the direction of the vector area (since the positive sense of the line integral is when C is traversed anticlockwise).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. Department of Materials.e. bounded by a closed path C whose anticlockwise circuit deﬁnes the positive sense of the vector area associated with the surface. or closed. S v · dS. This conﬁrms the previous result that the vector area of a surface depends only upon the rim bounding it. an incompressible ﬂuid with density and velocity ﬁeld v(r) would give rise to a ﬂux (mass per unit time) J = the following. In the latter case. 12 Surface and volume integrals 12. For example. Of course it has already been determined that the total vector area of a closed surface vanishes: dS = 0 The calculation of surface integrals is best illustrated by example. scalar and vector ﬁelds may be involved: • • • f (r) dS is a vector quantity derived from a scalar ﬁeld f F · dS is a scalar quantity derived from a vector ﬁeld F F × dS is a vector quantity derived from a vector ﬁeld F S S S The second these is of primary interest because of its physical interpretation as the ﬂux of the ﬁeld F through the surface S. As with line integrals.38 Vector calculus C dr r r + dr O Figure 17: Vector area as a vector line integral. in ﬂuid dynamics. Imperial College London . the notation is sometimes used.

dz = 2dx + dy.e. a substitution for z in terms of y can be made i. Department of Materials. F · dS = Fx dy dz + Fy dz dx + Fz dx dy so this integral separates into three double integrals: S F · dS = S yz dy dz + S zx dz dx + S xy dx dy Since the boundary of S is determined by constraints on x and y. Whereas in the second double integral. These surfaces make no contribution to the surface integral. a substitution for z in terms of x can be made. ˆ The surface element of the curved surface ρ = a is a dφ dz eρ and so g · dS = L 2π S z=0 φ=0 λ a dφ dz = 2πλL a ˆ • Calculate the surface integral of the vector ﬁeld F = ρ2 ez over that part of the plane z = h satisfying ρ ≤ R. From this same equation. The closed surface of a cylinder consists of three parts: the curved surface and the two planar ends. 0 ≤ z ≤ c. 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: F · dS = ∞ ∞ S x=0 y=0 exp(−x − y) dy dx = [− exp(−x)]∞ [− exp(−y)]∞ x=0 y=0 = 1 • Calculate the surface integral of the vector ﬁeld F = yz i + zx j + xy k over the surface S consisting of that part of the plane 2x + y − z = 0 bounded by 0 ≤ x ≤ a and 0 ≤ y ≤ b.MSE 201: Mathematics 39 Examples • Calculate the surface integral of the vector ﬁeld F = sin(x + y) i + cos(x + y) j + exp(−x − y) k over the quadrant x ≥ 0. Imperial College London . ˆ • Calculate the surface integral of the vector ﬁeld g = (λ/ρ) eρ over the closed surface of a cylinder of radius a and length L. the surface element is parallel (or antiparallel) to ez and therefore perpendicular to g. use z = 2x + y on S to eliminate z from the integrands. dz = dy (since x is constant during the z integration so dx = 0). Hence F · dS = = = a b S x=0 y=0 a b x=0 y=0 [2y(2x + y) + (2x + y)x + xy] dx dy 2x2 + 6xy + 2y 2 dx dy 3 2 2 3 a b + a2 b2 + ab3 3 2 3 • Calculate the surface integral of the vector ﬁeld E = x sin(πy/b) sin(πz/c) i over the part of the plane x = a that satisﬁes 0 ≤ y ≤ b. In Cartesian coordinates. y ≥ 0 of the xy-plane. with dz = 2dx (y is constant during the z integration so dy = 0). In the ﬁrst double integral. ˆ For the ends.

40 Vector calculus • Evaluate the surface integral I = of radius a.g. The surface integral may be approximated by the sum of the contribution of each tile. ˆ F·dS where F = Q/(4πr2 ) er and S is the closed surface of a sphere 12. the dimensions will be made vanishingly small to obtain the limit in which this sum approaches the integral. the one sharing the edge P Q. and the remaining line integral runs anticlockwise around the perimeter of both tiles. with an artiﬁcial gap between them for clarity.2 Stokes’ theorem Stokes’ theorem may be stated as follows: S ( × F) · dS = C F · dl where S is the open surface bounded by the path C. the contributions to the line integrals from the edge P Q cancel. 0 ≤ θ ≤ π/2. Department of Materials. 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. Green’s theorem in the plane is a special case when the path C and surface S are conﬁned to a plane.e. The element of surface area for ˆ a spherical surface is dS = r2 sin θ dθ dφ er . Green’s theorem in the plane applies: P QRS F · dl = P QRS ( × F) · dS Consider the four neighbouring tiles that share edges with P QRS e. The neighbouring tiles that share edges with the bold tile are also shown. however the theorem is more general than that. 18. S v · dS where v = y j and S is the upper surface of a hemisphere The surface S is x2 + y 2 + z 2 = a2 with z ≥ 0 i.3: ˆ j · er = sin θ sin φ and y = r sin θ sin φ Hence I= S v · dS = = = = = π/2 θ=0 π/2 θ=0 π/2 θ=0 2π φ=0 a3 sin2 θ sin2 φ sin θ dθ dφ 2π φ=0 sin3 θ dθ sin2 φ dφ 2π φ=0 sin θ − cos2 θ sin θ dθ 1 cos3 θ 3 π/2 θ=0 1 (1 − cos 2φ) dφ 2 2π φ=0 − cos θ + 2π 3 S φ 1 − sin 2φ 2 4 • Calculate the surface integral of radius R. From section 3. Naturally. Hence when the contributions of these two tiles are added together. Consider splitting the surface S into tiny planar tiles. Since the tile is planar. Imperial College London −→ −→ . Consider a single tile P QRS outlined in bold in Fig. 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 .

There are therefore only two possibilities: Department of Materials. ◦ for the square planar surface z = 0 where 0 ≤ x ≤ a. F·dl = x dy −y dx Use plane polar coordinates to parameterise C [(a cos φ)(a cos φ) − (a sin φ)(−a sin φ)] dφ = a2 2π φ=0 dφ = 2πa2 Hence Stokes’ theorem is veriﬁed.3 Volume integrals Volume integrals are triple integrals and much simpler than line or surface integrals since dV is a scalar. S 12. 0 ≤ y ≤ a ◦ for the square planar surface x = a where 0 ≤ y ≤ b. In spherical polar coordinates ˆ ˆ the surface element for the hemisphere is dS = a2 sin θ dθ dφ er .MSE 201: Mathematics 41 S R P Q Figure 18: Diagram of a single tile surface element in the derivation of Stokes’ theorem. z ≥ 0: Consider the left-hand side: ( × F) · dS. Examples • Verify Stokes’ theorem for the vector ﬁeld F = −y i + x j + zk ◦ for the hemispherical surface x2 + y 2 + z 2 = a2 . Since er · k = cos θ. 0 ≤ z ≤ b • Prove that ( × u) · dS = 0 for any vector ﬁeld u over any closed surface S. × F = 2 k. ( × F) · dS = 2 = a2 π/2 θ=0 2π φ=0 π/2 θ=0 S S (a2 sin θ) cos θ dθ dφ 2π φ=0 sin 2θ dθ π/2 θ=0 dφ 1 = 2πa2 − cos 2θ 2 For the right-hand side: = 2πa2 C: x = a cos φ. y = a sin φ: F · dl = 2π φ=0 C F·dl. Imperial College London .

0 ≤ z ≤ L. • Calculate the volume integral of the vector ﬁeld F = x2 i + xy j + z k over the cube 0 ≤ x ≤ L. y0 . Likewise the second and third lines give the contributions from the ‘left’ and ‘right’ and ’top’ and ’bottom’ sides. y. For the second and third terms ﬁrst integrate with respect to y and z respectively: · F dV = y0 +δy z0 +δz δV + y=y0 z=z0 z0 +δz x0 +δx [Fx (x0 + δx. neighbouring cuboids share surfaces whose contributions cancel because their outward normals point in opposite directions. The derivation of the divergence theorem follows a similar argument to that used for Stokes’ theorem. y.4 The divergence theorem The divergence theorem may be stated as follows: · F dV = F · dS V S where V is the volume bounded by the closed surface S.42 Vector calculus • • V f (r) dV is a scalar quantity derived from a scalar ﬁeld f F(r) dV is a vector quantity derived from a vector ﬁeld F V Examples • Calculate the volume integral of (r) = αr over the sphere of radius a centred on the origin. Thus the only contribution that remains is from the boundary of the whole volume V . y0 + δy. 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. y. y. z) − Fx (x0 . Consider splitting the volume V into tiny cuboids of volume δV = δx δy δz with a corner located at (x0 . Then · F dV = x0 +δx x=x0 y0 +δy y=y0 z0 +δz z=z0 δV ∂Fz ∂Fx ∂Fy + + ∂x ∂y ∂z dx dy dz For the ﬁrst term in the integrand. As with Stokes’ theorem. integrate with respect to x ﬁrst. 0 ≤ y ≤ L. z)] dz dx [Fz (x. z) − Fy (x. • Calculate the volume integral of σ(ρ. z0 ). Department of Materials. z0 + δz) − Fz (x. z) = ρ2 + z 2 over the cylinder deﬁned by ρ ≤ a and |z| ≤ L/2. when the contributions from cuboids are summed. z)] dy dz [Fy (x. z0 )] dx dy + z=z0 x=x0 x0 +δx y0 +δy x=x0 y=y0 The right-hand side of this equation is the surface integral over the closed surface of the cuboid. For example. Imperial College London . 12. y0 .

0 ≤ y ≤ 1. cylindrical polar and spherical polar coordinates • ﬁnd expressions for line. 13 Summary From this section of the course. surface and volume elements in Cartesian. • Use the divergence theorem to evaluate the surface integral S F · dS of F = (x + y 2 z) i + (xz 2 − 2y) j + (z + x2 + y 2 ) k over the open hemispherical surface x2 + y 2 + z 2 = a2 . z ≥ 0. divergence. 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. curl and Laplacian in Cartesian coordinates • apply given formulae for the gradient.MSE 201: Mathematics 43 Examples • Verify the divergence theorem for the vector ﬁeld F = x i + y j + z k for the unit cube 0 ≤ x ≤ 1. 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. curl and Laplacian in cylindrical polar and spherical polar coordinates • derive vector operator identities using Cartesian coordinates • calculate line. students should be able to: • understand the concept of vector area and calculate it for simple surfaces • understand the signiﬁcance of the scale factors in orthogonal coordinate systems and recall them for Cartesian. 0 ≤ z ≤ 1. divergence and curl geometrically • recall and apply the formulae for the gradient. Imperial College London . divergence.

Are you sure?

This action might not be possible to undo. Are you sure you want to continue?

We've moved you to where you read on your other device.

Get the full title to continue

Get the full title to continue listening from where you left off, or restart the preview.

scribd