86
Calculus in Three Dimensions and Applications Richard Earl Trinity Term 2010

Calculus in Three Dimensions and Applications

  • Upload
    rivalez

  • View
    106

  • Download
    20

Embed Size (px)

Citation preview

Page 1: Calculus in Three Dimensions and Applications

Calculus in Three Dimensions and Applications

Richard Earl

Trinity Term 2010

Page 2: Calculus in Three Dimensions and Applications

Syllabus1. Div, grad and curl in Euclidean coordinates.

2. Volume, surface and line integrals.

3. Stokes’ Theorem and the Divergence Theorem (proofs excluded). Illustration by red-erivation of models studied from Hilary Term, for example, the heat equation from theDivergence Theorem.

4. Gravity as a conservative force. Gauss’s Theorem. The equivalence of Poisson’s equationand the inverse-square law.

Recommended Texts• Erwin Kreyszig, Advanced Engineering Mathematics (Wiley, 8th Edition, 1999).

• D. E. Bourne & P. C. Kendall, Vector Analysis and Cartesian Tensors (Stanley Thornes,1992).

• H. M. Schey, Div, Grad and Curl and all that (W. W. Norton, Third Edition, 1996).

Further Reading• Mary L. Boas, Mathematical Models in the Physical Sciences (Wiley 2nd Edition, 1983).

• Gerald B. Folland Advanced Calculus (Prentice Hall, 2002)

Websitehttps://www.maths.ox.ac.uk/courses/material

2

Page 3: Calculus in Three Dimensions and Applications

1. DIV, GRAD AND CURL

Definition 1 By a scalar field φ on R3 we shall mean a map φ : R3 → R.

Definition 2 By a vector field F on R3 we shall mean a map F : R3 → R3.

• We will typically assume that scalar and vector fields are smooth — their partial derivativesexist with respect to x, y and z to all orders — though for brevity this will not always bestated.

• Occasionally we may consider more general scalar fields φ : Rn → R and vector fieldsF : Rn → Rm.

Example 3 The temperature in the lecture theatre at any given instant is a scalar field T (x, y, z) .At the same instant the velocity of the air flow would be a vector field v (x, y, z) . If we includetime as a fourth co-ordinate then T and v would now be fields on a subset of R4.

Example 4 The three co-ordinates x, y, z are each scalar fields on R3. The position vectorr =(x, y, z) is a vector field; its magnitude r = |r| =

px2 + y2 + z2 is a scalar field, though

note it is not smooth at (0, 0, 0) .

We shall also consider scalar and vector fields defined on proper subsets of R3 (or moregenerally Rn). The domains of these fields will usually be open, so that we can define theirpartial derivatives.

Definition 5 A set U ⊆ R3 is said to be open if for every x ∈ U there exists ε > 0 such that

B (x; ε) =©y ∈ R3 : |y− x| < ε

ª⊆ U .

We refer to B (x; ε) as the open ball of radius ε about x.

We will move straight on to defining three differential operators div, grad and curl andintroduce some examples and identities. In due course, we will look to make more sense of theirdefinitions physically.

Definition 6 (Gradient) Let φ : R3 → R be a scalar field. Then the gradient of φ, writtengradφ, is

gradφ =

µ∂φ

∂x,∂φ

∂y,∂φ

∂z

¶.

Note that grad takes scalar fields to vector fields.

DIV, GRAD AND CURL 3

Page 4: Calculus in Three Dimensions and Applications

Definition 7 (Divergence) Let F : R3 → R3 be a vector field with

F (x, y, z) = (F1 (x, y, z) , F2 (x, y, z) , F3 (x, y, z)) .

Then the divergence of F, written divF, is

divF =∂F1∂x

+∂F2∂y

+∂F3∂z

.

Note that div takes vector fields to scalar fields.

Definition 8 (Curl) Let F : R3 → R3 be a vector field with

F (x, y, z) = (F1 (x, y, z) , F2 (x, y, z) , F3 (x, y, z)) .

Then the curl of F, written curlF, is

curlF =

µ∂F3∂y− ∂F2

∂z,∂F1∂z− ∂F3

∂x,∂F2∂x− ∂F1

∂y

¶.

Note that curl takes vector fields to vector fields.

Example 9 Let r = (x, y, z) and r = |r| =px2 + y2 + z2. Then

div r =∂x

∂x+

∂y

∂y+

∂z

∂z= 3;

curl r =

¯¯ i j k

∂∂x

∂∂y

∂∂z

x y z

¯¯ = 0,

and if r 6= 0 then

grad r =

Ãxp

x2 + y2 + z2,

ypx2 + y2 + z2

zpx2 + y2 + z2

!=r

r.

Example 10 With r and r as above, and f a differentiable function on (0,∞) note

curl (f (r) r) =

¯¯ i j k

∂∂x

∂∂y

∂∂z

f (r)x f (r) y f (r) z

¯¯

=

µzf 0 (r)

∂r

∂y− yf 0 (r)

∂r

∂z, xf 0 (r)

∂r

∂z− zf 0 (r)

∂r

∂x, yf 0 (r)

∂r

∂x− xf 0 (r)

∂r

∂y

¶= f 0 (r)

³zyr− yz

r,xz

r− zx

r,yx

r− xy

r

´= 0.

4 DIV, GRAD AND CURL

Page 5: Calculus in Three Dimensions and Applications

Example 11 Let c = (c1, c2, c3) be a constant vector. Then

div (c ∧ r) =∂

∂x(c2z − c3y) +

∂y(c3x− c1z) +

∂z(c1y − c2x) = 0;

grad (c · r) = grad (c1x+ c2y + c3z) = (c1, c2, c3) = c;

curl (c ∧ r) =

¯¯ i j k

∂∂x

∂∂y

∂∂z

c2z − c3y c3x− c1z c1y − c2x

¯¯ = (2c1, 2c2, 2c3) = 2c.

Definition 12 The differential operator

∇ =µ

∂x,∂

∂y,∂

∂z

¶is called del or nabla.

Notation 13 By a slight abuse of notation we can write

gradφ =

µ∂φ

∂x,∂φ

∂y,∂φ

∂z

¶=

µ∂

∂x,∂

∂y,∂

∂z

¶φ;

divF =∂F1∂x

+∂F2∂y

+∂F3∂z

=

µ∂

∂x,∂

∂y,∂

∂z

¶· (F1, F2, F3) ;

curlF =

µ∂F3∂y− ∂F2

∂z,∂F1∂z− ∂F3

∂x,∂F2∂x− ∂F1

∂y

=

¯¯ i j k

∂∂x

∂∂y

∂∂z

F1 F2 F3

¯¯ = µ ∂

∂x,∂

∂y,∂

∂z

¶∧ (F1, F2, F3) .

So we often write

gradφ = ∇φ, divF = ∇ · F, curlF = ∇∧ F. (1.1)

Remark 14 The notation grad, div, curl and that of (1.1) are equally common in mathemat-ical texts, and so these lecture notes and the problem sheets will deliberately make use of bothnotations.

Remark 15 For any scalar field φ we have

div (gradφ) =∂

∂x

µ∂φ

∂x

¶+

∂y

µ∂φ

∂y

¶+

∂z

µ∂φ

∂z

¶=

∂2φ

∂x2+

∂2φ

∂y2+

∂2φ

∂z2,

which is the Laplacian. Asdiv grad = ∇ ·∇

then we often write

∇2φ = ∂2φ

∂x2+

∂2φ

∂y2+

∂2φ

∂z2.

Also, for vector fields F = (F1, F2, F3), it is common to write

∇2F =¡∇2F1,∇2F2,∇2F3

¢.

Thus the Laplacian can both take scalar fields to scalar fields and vector fields to vector fields.

DIV, GRAD AND CURL 5

Page 6: Calculus in Three Dimensions and Applications

Remark 16 Whilst ∇ looks, and occasionally behaves, like a standard vector it is very unwiseto assume this behaviour of ∇ without proof; most standard vector identities are not true whenthey involve ∇. For example, the commutativity of the dot product does not extend:

∇ · F 6= F ·∇.

The LHS is divF. The RHS at first glance doesn’t mean anything, it certainly isn’t a scalar.Rather

F ·∇ = (F1, F2, F3) ·µ

∂x,∂

∂y,∂

∂z

¶= F1

∂x+ F2

∂y+ F3

∂z

which is a differential operator. In fact F ·∇ is standard notation for it. When F is of unitsize, then F ·∇ equals the directional derivative in the direction of F. Note that F ·∇ can takescalar fields to scalar fields and also vector fields to vector fields.

In summary, we have the following table:

operator maps:div = ∇· vector fields to scalar fieldsgrad = ∇ scalar fields to vector fieldscurl = ∇∧ vector fields to vector fieldsdiv grad = ∇2 scalar fields to scalar fields

vector fields to vector fieldsF ·∇ scalar fields to scalar fields

vector fields to vector fields

The next proposition shows that the formulae for calculating each of div, grad and curl donot depend on our choice i, j,k of orthonormal co-ordinate system. Recall that:

Definition 17 The vectors e1, e2, e3 are said to be an orthonormal basis of R3 if

ei · ej = δij =

½1 if i = j,0 if i 6= j.

So the vectors are all of unit length and mutually perpendicular.Further it is said to be a right-handed orthonormal basis if e1 ∧ e2 = e3 and left-handed

if e1 ∧ e2 = −e3. So e1 = i, e2 = j, e3 = k is an example of a right-handed orthonormal basis.

Proposition 18 Let e1, e2, e3 be an orthonormal basis of R3 with associated co-ordinatesX,Y,Zdefined by the identity

Xe1 + Y e2 + Ze3 = xi+ yj+ zk. (1.2)

Then

e1∂

∂X+ e2

∂Y+ e3

∂Z= i

∂x+ j

∂y+ k

∂z.

6 DIV, GRAD AND CURL

Page 7: Calculus in Three Dimensions and Applications

Proof. From (1.2) we have that

x = (e1 · i)X + (e2 · i)Y + (e3 · i)Z,X = (e1 · i)x+ (e1 · j) y + (e1 · k) z,

and four other similar equations for y, z, Y, Z. It follows from the chain rule that

∂X=

∂x

∂X

∂x+

∂y

∂X

∂y+

∂z

∂X

∂z= (e1 · i)

∂x+ (e1 · j)

∂y+ (e1 · k)

∂z

and hence

e1∂

∂X+ e2

∂Y+ e3

∂Z

= e1

∙(e1 · i)

∂x+ (e1 · j)

∂y+ (e1 · k)

∂z

¸+ e2 [. . .] + e3 [. . .]

= [e1 (e1 · i) + e2 (e2 · i) + e3 (e3 · i)]∂

∂x+ [. . .]

∂y+ [. . .]

∂z

= i∂

∂x+ j

∂y+ k

∂z;

this last line follows from the orthonormality of the bases as

i = αe1 + βe2 + γe3

leads to α = e1 · i, β = e2 · i, γ = e3 · i, by dotting the equation with e1, e2, e3 respectively.

Corollary 19 Let f : R3 → R3 be a vector field given by f = (f1, f2, f3), let φ : R3 → R be ascalar field and let e1, e2, e3 be a right-handed orthonormal basis of R3. Suppose that

F1e1 + F2e2 + F3e3 = f1i+ f2j+ f3k;

Φ (X,Y, Z) = φ (x, y, z) .

That is, F and Φ represent f and φ in the new co-ordinates X,Y,Z. Then

gradφ =∂Φ

∂Xe1 +

∂Φ

∂Ye2 +

∂Φ

∂Ze3;

div f =∂F1∂X

+∂F2∂Y

+∂F3∂Z

;

curl f =

¯¯ e1 e2 e3

∂∂X

∂∂Y

∂∂Z

F1 F2 F3

¯¯ .

That is, we calculate grad, div and curl using the same formulae, irrespective of what right-handed orthonormal co-ordinate system we are using.

DIV, GRAD AND CURL 7

Page 8: Calculus in Three Dimensions and Applications

Proof. The previous proposition showed that the formula for grad does not change under anorthonormal change of co-ordinates. From Geometry I we know that the formula for the dotproduct is similarly invariant as is the formula for the cross product provided the change is toanother right-handed system. Hence the formulae for div = ∇· and curl = ∇∧ do not changewhen we change to another right-handed orthonormal system.

Certain adjustments to the above formulae need to be made for co-ordinate systems thataren’t orthonormal — e.g. cylindrical polar co-ordinates or spherical polar co-ordinates. Therelevant formulae below are for reference only; certainly you are not expected to memorizethem, and if needed in an exam there would be no presumption of their knowledge so that theywould be included in a hint or given and you would be asked to derive them. The main pointto take away from this is that the grad, div, curl formulae are different for co-ordinate systemsthat aren’t Euclidean.

Definition 20 Cylindrical polar co-ordinates r, θ, z are defined by the identity

r = (x, y, z) = (r cos θ, r sin θ, z) .

If we notedr = (cos θ, sin θ, 0) dr + (−r sin θ, r cos θ, 0) dθ + (0, 0, 1) dz

then we may writedr = erdr + reθdθ + ezdz

whereer = (cos θ, sin θ, 0) , eθ = (− sin θ, cos θ, 0) , ez = (0, 0, 1) .

Note, for any values of r, θ, z, the vectors er, eθ, ez make a right-handed orthonormal basis ofR3.

Definition 21 Spherical polar co-ordinates r, θ, φ are defined by the identity

r = (x, y, z) = (r sin θ cosφ, r sin θ sinφ, r cos θ) .

If we note dr equals

(sin θ cosφ, sin θ sinφ, cos θ) dr+r (cos θ cosφ, cos θ sinφ,− sin θ) dθ+r sin θ (− sinφ, cosφ, 0) dφ

then we may writedr = erdr + reθdθ + r sin θeφdφ

where

er = (sin θ cosφ, sin θ sinφ, cos θ) , eθ = (cos θ cosφ, cos θ sinφ,− sin θ) , eφ = (− sinφ, cosφ, 0) .

Note, for any values of r, θ, φ the vectors er, eθ, eφ, make a right-handed orthonormal basis.

8 DIV, GRAD AND CURL

Page 9: Calculus in Three Dimensions and Applications

Proposition 22 The formulae for grad, div, curl in terms of cylindrical polar co-ordinates offields ψ (r, θ, z) and F = Frer + Fθeθ + Fzez are

∇ψ =∂ψ

∂rer +

1

r

∂ψ

∂θeθ +

∂ψ

∂zez;

∇ · F =1

r

∂r(rFr) +

1

r

∂Fθ

∂θ+

∂Fz

∂z;

∇∧ F =1

r

¯¯ er reθ ez

∂∂r

∂∂θ

∂∂z

Fr rFθ Fz

¯¯ .

Proof. By way of example we shall prove only the first identity here. Recall that Cartesianco-ordinates are given in terms of cylindrical polar ones by

x = r cos θ, y = r sin θ, z = z

Say φ (x, y, z) = ψ (r, θ, z) . Then

∂ψ

∂r=

∂φ

∂x

∂x

∂r+

∂φ

∂y

∂y

∂r+

∂φ

∂z

∂z

∂r=

∂φ

∂xcos θ +

∂φ

∂ysin θ,

∂ψ

∂θ=

∂φ

∂x

∂x

∂θ+

∂φ

∂y

∂y

∂θ+

∂φ

∂z

∂z

∂θ= −∂φ

∂xr sin θ +

∂φ

∂yr cos θ,

∂ψ

∂z=

∂φ

∂z.

Hence∂ψ

∂rer +

1

r

∂ψ

∂θeθ +

∂ψ

∂zez

=

µ∂φ

∂xcos θ +

∂φ

∂ysin θ

¶(cos θ, sin θ, 0) +

1

r

µ−∂φ∂x

r sin θ +∂φ

∂yr cos θ

¶(− sin θ, cos θ, 0) + ∂φ

∂zk

=

µ∂φ

∂xcos2 θ +

∂φ

∂xsin2 θ

¶i+

µ∂φ

∂ysin2 θ +

∂φ

∂ycos2 θ

¶j+

∂φ

∂zk

= ∇φ.

Proposition 23 The formulae for grad, div, curl in terms of spherical polar co-ordinates offields ψ (r, φ, θ) and F = Frer + Fφeφ + Fθeθ are

∇ψ =∂ψ

∂rer +

1

r

∂ψ

∂θeθ +

1

r sin θ

∂ψ

∂φeφ;

∇ · F =1

r2 sin θ

∙∂

∂r

¡r2 sin θFr

¢+

∂θ(r sin θFθ) +

∂φ(rFφ)

¸;

∇∧ F =1

r2 sin θ

¯¯ er reθ r sin θeφ

∂∂r

∂∂θ

∂∂φ

Fr rFθ r sin θFφ

¯¯ .

Those interested in reading up on the more general theory of curvilinear co-ordinates (whichexplains the similarities in the previous two propositions) should see Boas (pp.427-435) orKreyszig (pp.498-504).

DIV, GRAD AND CURL 9

Page 10: Calculus in Three Dimensions and Applications

1.1 Identities

Proposition 24 Let F be a vector field on R3 and φ be a scalar field on R3. Then

curl gradφ = 0; div curlF = 0.

Proof. As ∇φ =¡φx, φy, φz

¢then

curl (∇φ) =

¯¯ i j k

∂∂x

∂∂y

∂∂z

φx φy φz

¯¯ = ¡φzy − φyz, φxz − φzx, φyx − φxy

¢= 0.

Also

div (curlF) = div

µ∂F3∂y− ∂F2

∂z,∂F1∂z− ∂F3

∂x,∂F2∂x− ∂F1

∂y

¶=

h(F3)yx − (F2)zx

i+h(F1)zy − (F3)xy

i+h(F2)xz − (F1)yz

i= 0.

Remark 25 These are in fact aspects of the same theorem, though a detailed explanation wouldstray into graduate level work on differential forms and topology. But it may be worth sayingthat the set-up on R3

scalargrad→ vector curl→ vector div→ scalar

can be extended to differentiating differential forms on Rn

degree 0 forms= scalars

d→ degree 1 forms d→ degree 2 forms d→ · · · d→ degree n forms= scalars

at each stage of which we have the identity dd = 0. The interested reader should check Folland,section 5.9.

Proposition 26 (Product Rules) Let F be a vector field on R3 and φ, ψ be scalar fields on R3.Then

∇ (φψ) = φ∇ψ + ψ∇φ;div (φF) = ∇φ · F+ φdivF;

curl (φF) = φ curlF+∇φ ∧ F.

Corollary 27 For any scalar field φ and integer n we have

∇ (φn) = nφn−1∇φ.

10 DIV, GRAD AND CURL

Page 11: Calculus in Three Dimensions and Applications

Proof. (i)

∇ (φψ) =³(φψ)x , (φψ)y , (φψ)z

´=

¡φψx + ψφx, φψy + ψφy, φψz + ψφz

¢= φ

¡ψx, ψy, ψz

¢+ ψ

¡φx, φy, φz

¢= φ∇ψ + ψ∇φ.

(ii)

div (φF) = (φF1)x + (φF2)y + (φF3)z= φ (F1)x + φxF1 + φ (F2)y + φyF2 + φ (F3)z + φzF3

= φh(F1)x + (F2)y + (F3)z

i+¡φx, φy, φz

¢· (F1, F2, F3)

= φdivF+ (∇φ) · F.

(iii) curl (φF) equalsµ∂ (φF3)

∂y− ∂ (φF2)

∂z,∂ (φF1)

∂z− ∂ (φF3)

∂x,∂ (φF2)

∂x− ∂ (φF1)

∂y

¶= φ

µ∂F3∂y− ∂F2

∂z,∂F1∂z− ∂F3

∂x,∂F2∂x− ∂F1

∂y

¶+¡φyF3 − φzF2, φzF1 − φxF3, φxF2 − φyF1

¢= φ curlF+

¯¯ i j kφx φy φzF1 F2 F3

¯¯

= φ curlF+ (∇φ) ∧ F.

Proposition 28 (Further Identities) For vector fields F,G and scalar fields φ, ψ:

∇ (F ·G) = (F ·∇)G+ (G ·∇)F+ F ∧ (∇∧G) +G ∧ (∇∧ F)∇ · (F ∧G) = G · (∇∧ F)− F · (∇∧G)∇∧ (F ∧G) = F (∇ ·G)−G (∇ · F) + (G ·∇)F− (F ·∇)G∇∧ (∇∧ F) = ∇ (∇ · F)−∇2F∇2 (φψ) = ψ∇2φ+ 2∇φ ·∇ψ + φ∇2ψ

Remark 29 All the identities above can be proven by simply grinding out the calculations. Butthere are neater ways to wrtie out the formula for div, grad and curl as given below:

∇φ =Xi

∂φ

∂xiei, ∇·F =

Xi

ei ·∂F

∂xi, ∇∧F =

Xi

ei∧∂F

∂xi, F·∇ =

Xi

(F · ei)∂

∂xi,

where the dummy variable i ranges over 1, 2, 3 in each case and e1, e2, e3 is any right-handedorthonormal basis. With these formulae the proofs of the identities above are much shorter; onthe o,ther hand the formulae need to be applied with much more care and attention to detailthan was previously the case.

IDENTITIES 11

Page 12: Calculus in Three Dimensions and Applications

Proof. The third and fifth identities appear in Exercise Sheet 1, Question 1.To prove the first identity recall that u ∧ (v ∧w) = (u ·w)v− (u · v)w and hence

(F ·∇)G+ (G ·∇)F+ F ∧ (∇∧G) +G ∧ (∇∧ F)

=Xi

(F · ei)∂G

∂xi+Xi

(G · ei)∂F

∂xi+ F ∧

ÃXi

ei ∧∂G

∂xi

!+G ∧

ÃXi

ei ∧∂F

∂xi

!

=Xi

(F · ei)∂G

∂xi+Xi

(G · ei)∂F

∂xi+Xi

F ∧µei ∧

∂G

∂xi

¶+Xi

G ∧µei ∧

∂F

∂xi

¶=

Xi

½(F · ei)

∂G

∂xi+ (G · ei)

∂F

∂xi+

∙µF · ∂G

∂xi

¶ei − (F · ei)

∂G

∂xi

¸+

∙µG · ∂F

∂xi

¶ei − (G · ei)

∂F

∂xi

¸¾=

Xi

ei

µF · ∂G

∂xi+G · ∂F

∂xi

¶=

Xi

ei∂

∂xi(F ·G) = ∇ (F ·G) .

To prove the second identity, and recalling the symmetries of the scalar triple product, we note

∇ · (F ∧G) =Xi

ei ·∂ (F ∧G)

∂xi

=Xi

ei ·µ∂F

∂xi∧G+ F ∧ ∂G

∂xi

¶=

Xi

G ·µei ∧

∂F

∂xi

¶−Xi

F ·µei ∧

∂G

∂xi

= G ·ÃX

i

ei ∧∂F

∂xi

!− F ·

ÃXi

ei ∧∂G

∂xi

!= G · (∇∧ F)− F · (∇∧G) .

To prove the fourth identity recall again that u ∧ (v ∧w) = (u ·w)v− (u · v)w and then

∇∧ (∇∧ F) =Xi

ei ∧∂

∂xi

ÃXj

ej ∧∂F

∂xj

!

=Xi

Xj

ei ∧µej ∧

∂2F

∂xi∂xj

¶=

Xi

Xj

∙µei ·

∂2F

∂xi∂xj

¶ej

¸−Xi

Xj

∙(ei · ej)

∂2F

∂xi∂xj

¸

=Xj

ej∂

∂xj

"Xi

ei ·∂F

∂xi

#−Xi

Xj

∙δij

∂2F

∂xi∂xj

¸

=Xj

ej∂

∂xj

"Xi

ei ·∂F

∂xi

#−Xi

∂2F

∂x2i= ∇ (∇ · F)−∇2F

12 DIV, GRAD AND CURL

Page 13: Calculus in Three Dimensions and Applications

1.2 Physical Interpretation

Unsurprisingly, when trying to appreciate the physical meanings of grad, div and curl, it ismost informative to consider some real world examples. Recall from the Hilary Term course onPDEs that Fourier’s Law states:

Example 30 (Fourier’s Law) In an isotropic medium with constant thermal conductivity k,with temperature T (x, t) at position x and at time t, Fourier’s Law states that

q = −k∇T

where q is the heat flux — that is the amount of energy that flows through a particular surfaceper unit area per unit time.

This law contains much of the essence of grad . Recall from Michaelmas Calculus that, fora given scalar function φ and a unit vector v, the directional derivative of φ in the direction vis ∇φ · v. In particular, φ increases fastest in the direction of ∇φ and decreases fastest in thedirection −∇φ. So Fourier’s law, loosely put, states that at each point the heat energy movestowards the coolest nearby points.How about the physical motivation behind divergence?

Example 31 Consider fluid particles in the xy-plane flowing according to the steady flow

u (x, y) = (x, y) . ε = 0.5, t = 0, 0.5, 1, 1.5, 2

Note how we have a source at (0, 0) from which the fluid emanates. However we have, at every(x, y) , that

divu =∂x

∂x+

∂y

∂y= 2.

Suppose a particle starts off at (x0, y0); then the particle’s position (x (t) , y (t)) at time t isdetermined by the differential equations

dx

dt= x,

dy

dt= y, x (0) = x0, y (0) = y0

PHYSICAL INTERPRETATION 13

Page 14: Calculus in Three Dimensions and Applications

and hence(x (t) , y (t)) =

¡x0e

t, y0et¢.

If we consider the blob of fluid of area πε2 which at t = 0 occupies

(x− 1)2 + y2 < ε2,

then where will the particles which make up this blob have moved by time t? Initially theparticles were at x0 = 1 + r cos θ, y = r sin θ where r < ε and they have moved to

(x (t) , y (t)) =¡et + ret cos θ, ret sin θ

¢r < ε,

which comprise a disc with centre (et, 0) and area A (t) = πε2e2t. So throughout the motion wehave had

dA

dt= (divu)A.

This particular result is down to the uniformity of the flow in this example. More generally itis the case that

divu (x) = limε→0

d

dt

area (Flow image of B (x, ε))πε2

.

In physical terms, then, the divergence of a vector field is a measure of the flow’s source density,the extent to which the vector field flow behaves like a source or a sink at a given point.

If you choose to take the second year option in fluid dynamics you will meet:

Example 32 Euler’s Equations for an ideal fluid (Second year course in Fluid Dynamics)Euler’s equations for an incompressible, inviscid fluid state that

∂u

∂t+ (u ·∇)u = −∇p

ρ+ g, ∇ · u = 0,

where u (x, t) is the flow velocity, p is the pressure, ρ is the density and g is acceleration dueto gravity. It is the equation

∇ · u = 0which encodes the incompressibility of the fluid.

Roughly speaking the curl of a vector field relates to the rotation of the vector field, butvery much in a local sense.

u (x, y) = (−y, x)

14 DIV, GRAD AND CURL

Page 15: Calculus in Three Dimensions and Applications

Example 33 (Rotation of a rigid body) Recall from the Michaelmas Dynamics course thatif r = rer then

r = rer + rθeθ.

In particular, if a rigid body is rotating with constant angular velocity ω about the z-axis thenthe distance of a point r from the z-axis will remain constant and θ = ω so that

r = rωeθ = ωk∧ (rer) = ωk ∧ r.

We have already seen from Example 11 that

curl r = curl (ωk ∧ r) = 2ωk.

Example 34 It is important to stress though that curl is very subtly a measure of local rotation.Consider the following two examples:

u1 (x, y) =³

yx2+y2

, −xx2+y2

´u2 (x, y) = (cy, 0)

A simple calculation shows that curlu2 = −ck yet there appears to be no sense of global rotation,whilst in Exercise 5 on Sheet 1 you are asked to show that curlu1 = 0, yet there appears tobe a clear sense of global rotation. Despite particles moving in circles in the flow u1 differentcircles are moving around the origin with different angular velocities and with a greater angularvelocity towards the origin; in fact are moving just in such a way that the individual particlesare not spinning as they move around the their circles. On the other hand with the shear flowu2, whilst the particles are moving in lines they are spinning as they do so because particleswith greater y are moving faster. In general, the axis of this spinning is in the direction of curl .

PHYSICAL INTERPRETATION 15

Page 16: Calculus in Three Dimensions and Applications

In the third year you may also meet div and curl as part of the Electromagnetism option.

Example 35 Maxwell’s Equations in vacuo (Third year course in Electromagnetism)

divB = 0; divE = 0;

∇∧E = −∂B∂t; ∇∧B = 1

c2∂E

∂t;

where E is the electric field and B is the magnetic field. Recall that

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

so that

−∇2E = ∇ (∇ ·E)−∇2E =∇∧ (∇∧E) = ∇∧µ−∂B

∂t

¶= − ∂

∂t(∇∧B) = −1

c2∂2E

∂t2,

−∇2B = ∇ (∇ ·B)−∇2B =∇∧ (∇∧B) = ∇∧µ1

c2∂E

∂t

¶=1

c2∂

∂t(∇∧E) = −1

c2∂2B

∂t2,

so that both E and B satisfy the wave equation

c2∇2F = ∂2F

∂t2.

16 DIV, GRAD AND CURL

Page 17: Calculus in Three Dimensions and Applications

2. LINE INTEGRALS&CONSERVATIVEFIELDS

2.1 Curves

Definition 36 By a curve we shall mean a piecewise smooth function γ : I → R3 defined onan interval I of R. Notice that order on I also gives the curve γ an orientation.We shall also use the term curve to describe the images of such maps γ. Given such an image

then it will be the image of more than one such map γ and we will talk about parametrisationsγ1 and γ2 of the curve. These parametrisations of the image come in two different possibleorientations.

Definition 37 We say a curve γ : [a, b] → R3 is simple if γ is 1-1, with the one possibleexception that γ (a) = γ (b) may be true; this means that the curve does not cross itself exceptpossibly by its endpoints meeting.

Definition 38 We say a curve γ : [a, b]→ R3 is closed if γ (a) = γ (b) .

Example 39 The line through points p and q can be parametrised as

γ (t) = p+ t (q− p) .

When 0 < t < 1 then γ (t) lies between p and q, for t > 1 beyond q and for t < 0 before p.

Example 40 A curve of the form

γ (t) = (a cos t, a sin t, ct) (2.1)

is known as a circular helix.

Exercise 41 The curve Γ is parametrised by

Γ (u) =³u+√3 sinu, 2 cosu,

√3u− sinu

´.

Find a circular helix of the form (2.1) and an isometry T such that Tγ = Γ.

Example 42 Parametrise the parabola formed by intersecting the plane 3x+4y+5z = 1 withthe cone x2 + y2 = z2, z > 0.

Solution. A general point on the cone can be written as r (θ, z) = (z cos θ, z sin θ, z) wherez > 0 and 0 6 θ < 2π. If this point also lies in the plane 3x+ 4y + 5z = 1 then

z (3 cos θ + 4 sin θ + 5) = 1

LINE INTEGRALS & CONSERVATIVE FIELDS 17

Page 18: Calculus in Three Dimensions and Applications

and so we see

γ (θ) =

µcos θ

3 cos θ + 4 sin θ + 5,

sin θ

3 cos θ + 4 sin θ + 5,

1

3 cos θ + 4 sin θ + 5

¶lies on the parabola. What values should θ range through? We need

0 6= 3cos θ + 4 sin θ + 5 = 5 cos (θ − α) + 5

where α = tan−1 43. Hence

γ (θ) =1

5

µcos θ

cos (θ − α) + 1,

sin θ

cos (θ − α) + 1,

1

cos (θ − α) + 1

¶α− π < θ < α+ π

is a parametrisation.

Example 43 Show that the plane with equation Aa+Bb+ Cc = D intersects the unit spherex2 + y2 + z2 = 1 in a circle if and only if A2 +B2 +C2 > D2. Parametrise the intersection ofx+ y + z = 1 with the unit sphere.

Solution. The plane Aa+Bb+ Cc = D has normal (A,B,C) and so the point closest to theorigin is the point with position vector λ (A,B,C) which lies on the plane; by substituting thisin we see λ = D/ (A2 +B2 + C2). This point is within unit distance of the origin if and only if

1 >

¯D

A2 +B2 + C2(A,B,C)

¯=|D|√A2 +B2 + C2

A2 +B2 + C2

i.e. if and only if A2 +B2 + C2 > D2.By this criterion the plane x+ y + z = 1 intersects with the unit sphere. The centre of the

circle which makes the intersection is at

1

12 + 12 + 12(1, 1, 1) =

(1, 1, 1)

3.

By Pythagoras’ Theorem the radius r of the circle satisfies

r2 +

¯(1, 1, 1)

3

¯2= 1 =⇒ r =

r2

3.

As e1 = (1,−1, 0) /√2 and e2 = (1, 1,−2) /

√6 are two orthonormal vectors parallel to the

plane then every point of the circle can be written in the form γ (t) for 0 6 t < 2π where

γ (t) =(1, 1, 1)

3+ e1

r2

3cos t+ e2

r2

3sin t

=

µ1

3+1√3cos t+

1

3sin t,

1

3− 1√

3cos t+

1

3sin t,

1

3− 23sin t

¶.

18 LINE INTEGRALS & CONSERVATIVE FIELDS

Page 19: Calculus in Three Dimensions and Applications

2.2 Line Integrals

Definition 44 Let C be a curve in R3 parametrised by γ : [a, b] → R3, and let F be a vectorfield, whose domain includes C. Then we define the line integral of F along C asZ

C

F · dr =Z b

a

F (γ (t)) · γ0 (t) dt,

where · denotes the scalar product.

Proposition 45 If oriented the same, the line integralRCf · dr is independent of the choice

of parametrisation.

Proof. Suppose that γ1 : [a1, b1] → R3 and γ2 : [a2, b2] → R3 be two parametrisations of Cwith γ1 (a1) = γ2 (a2) and γ1 (b1) = γ2 (b2), so that γ1 and γ2 give C the same orientation.Then γ2 = γ1 ψ where ψ : [a2, b2]→ [a1, b1] associates the γ2 co-ordinates of points on C withtheir γ1 co-ordinate.We now define I : [a1, b1]→ R and J : [a2, b2]→ R by

I (t) =

Z t

a1

F (γ1 (t)) · γ01 (t) dt, J (t) =

Z t

a2

F (γ2 (t)) · γ02 (t) dt.

By the Fundamental Theorem of Calculus

I 0 (t) = F (γ1 (t)) · γ01 (t) , J 0 (t) = F (γ2 (t)) · γ02 (t) .

Further, by the chain rule

d

dtI (ψ (t)) = ψ0 (t) I 0 (ψ (t))

= ψ0 (t) F (γ1 (ψ (t))) · γ01 (ψ (t))= F (γ2 (t)) · (γ01 (ψ (t))ψ0 (t))= F (γ2 (t)) · γ02 (t) = J 0 (t) .

It follows that I (ψ (t)) and J (t) differ by a constant and, as they agree at t = a2 (when theyare both zero), then I (ψ (t)) = J (t) and in particular when t = b2 we haveZ b1

a1

F (γ1 (t)) · γ01 (t) dt =Z b2

a2

F (γ2 (t)) · γ02 (t) dt.

Remark 46 If we parametrised C in the reverse orientation then the integralRCF · dr would

give negative what had been previously calculated.

LINE INTEGRALS 19

Page 20: Calculus in Three Dimensions and Applications

Example 47 Let F = c ∧ r where c is a constant vector and let C be the circular helixparametrised by

r (t) = (cos t, sin t, t) , 0 6 t 6 2π.

Then

ZC

F · dr =

Z 2π

0

¯¯ i j k

c1 c2 c3cos t sin t t

¯¯ · (− sin t, cos t, 1) dt

=

Z 2π

0

¯¯ − sin t cos t 1

c1 c2 c3cos t sin t t

¯¯ dt

=

Z 2π

0

¡−c2t sin t+ c3 cos

2 t+ c1 sin t− c2 cos t+ c3 sin2 t− c1t cos t

¢dt

=

Z 2π

0

(−c2t sin t+ c3 − c1t cos t) dt

= 2πc3 − c1 [t sin t+ cos t]2π0 − c2 [−t cos t+ sin t]2π0

= 2π (c2 + c3) .

Definition 48 If φ is a scalar field defined on a curve C with parametrisation γ : [a, b]→ R3then we also define the line integralZ

C

φds =

Z b

a

φ (γ (t)) |γ0 (t)| dt.

If F = (f1, f2, f3) is a vector field defined on the curve C then we defineZC

Fds =

µZC

f1 ds,

ZC

f2 ds,

ZC

f3 ds

¶.

Remark 49 Note that if t is the unit tangent vector field along C, in the same direction asthe parametrisation, then Z

C

φds =

ZC

(φt) · dr

and so we see that these line integrals also do not depend on the choice of parametrisation.Note further that the two types of integral defined above are also independent of the choice

of orientation of C.

Definition 50 If C is a curve with parametrisation γ : [a, b]→ R3 then the arc length of thecurve is Z

C

ds =

Z b

a

|γ0 (t)| dt.

20 LINE INTEGRALS & CONSERVATIVE FIELDS

Page 21: Calculus in Three Dimensions and Applications

Example 51 Find the arc length of the circular helix r (t) = (cos t, sin t, t) where 0 6 t 6 2π.

Solution. We have

s =

Z 2π

0

|(− sin t, cos t, 1)| dt =Z 2π

0

p1 + sin2 t+ cos2 t dt =

Z 2π

0

√2 dt = 2

√2π.

We could also parametrise the helix "in reverse" by setting s (t) = r (2π − t) = (cos t,− sin t, 2π − t)where 0 6 t 6 2π. We would still find

s =

Z 2π

0

|(− sin t,− cos t,−1)| dt =Z 2π

0

p1 + sin2 t+ cos2 t dt =

Z 2π

0

√2 dt = 2

√2π.

Notation 52 We will standardly use the notation

dr = (dx,dy,dz) and ds = |dr| ,

even though this may seem a little non-rigorous and any analysis course would insist on suchdifferentials only appearing as part of a limit or within an integral. Rest assured that thesedifferentials can be rigorously defined, though doing so is not a primary concern of this course.

Definition 53 With notation as in the Definition 44, if the vector field F represents a forceon a particle then Z

C

F · dr (2.2)

is the work done by the force in moving the particle along C.

This is a generalization of the formula

Work = Force×Distance

which applies to constant forces acting parallel to the direction of the motion. More generally,we have

Work = Component of force in direction of travel×Distanceif the force and movement are not parallel. The work integral (2.2) is just an integral of suchinfinitesimal contributions of work.

Example 54 Show that the work done by gravity, F = −mgk, in moving a particle along astraight line from (x1, y1, z1) to (x2, y2, z2) equals mg (z1 − z2).

Solution. We can parametrise the line segment as

r (t) = (x1, y1, z1) + t (x2 − x1, y2 − y1, z2 − z1) , 0 6 t 6 1,

so thatdr =(x2 − x1, y2 − y1, z2 − z1) dt.

LINE INTEGRALS 21

Page 22: Calculus in Three Dimensions and Applications

Then ZC

F · dr =

Z 1

0

−mgk · (x2 − x1, y2 − y1, z2 − z1) dt

=

Z 1

0

−mg (z2 − z1) dt

= mg (z1 − z2) .

In fact it’s the case that the work done by gravity — which is positive if z1 > z2, i.e.the particle has dropped — is the loss in gravitational potential energy which, commonly, willhave been converted into kinetic energy. The work done is dependent only on the endpoints(x1, y1, z1) and (x2, y2, z2) and is independent of the path taken between these endpoints. Thisis common to certain types of field which are known as conservative.

2.3 Conservative Fields

Proposition 55 If F = ∇φ and γ : [a, b]→ S is any curve such that γ (a) = p, γ (b) = q thenZγ

F (r) · dr = φ (q)− φ (p) .

In particular, the integralRγF (r) · dr depends only on the endpoints of the curve γ.

Proof. If γ (t) = (x (t) , y (t) , z (t)) thenZγ

F (r) · dr =

Z b

a

F (γ (t)) · γ0 (t) dt

=

Z b

a

∇φ (γ (t)) · γ0 (t) dt

=

Z b

a

µ∂φ

∂x

dx

dt+

∂φ

∂y

dy

dt+

∂φ

∂z

dz

dt

¶dt

=

Z b

a

∙d

dt(φ (γ (t)))

¸dt [by the chain rule]

= φ (γ (b))− φ (γ (a))

= φ (q)− φ (p) .

Definition 56 Let S be an open subset of R3. A vector field F : S → R3 is said to beconservative if there exists a scalar field φ : S → R such that F = ∇φ.

22 LINE INTEGRALS & CONSERVATIVE FIELDS

Page 23: Calculus in Three Dimensions and Applications

Definition 57 If F = ∇φ then φ is said to be a potential (or scalar potential) for F.

Example 58 The gravitational force F = −mgk from Example 54 is conservative with poten-tial φ = −mgz. Friction is an example of a force which is not conservative — if we push a coinacross a table and back then work would be done against friction in both directions.

Definition 59 A subset S of R3 is said to be path-connected if for any points p,q ∈ S thereexists a curve γ : [a, b]→ S such that γ (a) = p and γ (b) = q.

Corollary 60 If ∇φ = 0 on a path-connected set S then φ is constant. In particular, if φ andψ are potentials of the conservative field F, defined on S, then φ and ψ differ by a constant.

Proof. If ∇φ = 0 then for any curve, with endpoints p, q, we have

φ (q)− φ (p) =

∇φ · dr = 0.

Given a fixed point p in S, any q in S is connected to p by a curve, and so φ is constant. IfF = ∇φ = ∇ψ then ∇ (φ− ψ) = 0 and the result follows.

Theorem 61 Let S be an open subset of R3 and let F : S → R3 be a vector field. Then thefollowing three statements are equivalent.(i) F is conservative — i.e. F = ∇φ for some scalar field φ : S → R.(ii) Given any two points p,q ∈ S and curve γ in S, starting at p and ending at q, then

the integral Zγ

F (r) · dr

is independent of the choice of curve γ.(iii) For any simple closed curve γ thenZ

γ

F (r) · dr = 0.

Further (iv) is a necessary consequence of each of (i), (ii), (iii):(iv) curlF = 0.But this is not generally equivalent — for example,

F =

µy

x2 + y2,−x

x2 + y2

¶(x, y) 6= (0, 0)

satisfies curlF = 0 but there is no φ on R2− (0, 0) such that F = ∇φ. See Exercise Sheet 1,Question 5.

CONSERVATIVE FIELDS 23

Page 24: Calculus in Three Dimensions and Applications

Proof. (i) =⇒ (ii) : This was just proved in Proposition 55 as φ (q) − φ (p) is dependentonly on the endpoints p and q and not on the path taken.(ii) =⇒ (i) : Let p ∈ S be a fixed point and define for any q ∈ S

φ (q) =

Z q

p

F (r) · dr

which, by assumption, is independent of the curve taken and is a function only of q. As S isopen there is an r > 0 small enough that q+ ti is in S for 0 6 t 6 r. Then

φ (q+ ti)− φ (q) =

Z q+ti

q

F (r) · dr

where the curve from q to q+ ti can be taken to be a straight line. So

φ (q+ ti)− φ (q) =

Z s=t

s=0

F (q+ si) · (i ds) =Z s=t

s=0

F1 (q+ si) ds

where F = (F1, F2, F3). Hence

∂φ

∂x(q) = lim

t→0

φ (q+ ti)− φ (q)

t= lim

t→0

1

t

Z s=t

s=0

F1 (q+ si) ds = F1 (q)

by the continuity of F1 at q. Similarly

∂φ

∂y(q) = F2 (q) ,

∂φ

∂z(q) = F3 (q)

and so ∇φ = F as required.(ii) =⇒ (iii) : Suppose now that for any two points p and q the line integral

R qpF (r) · dr

is independent of the curve taken. Let γ be a simple closed curve in S and let p and q be twodistinct points on γ. Then p and q split γ into two curves γ1 and γ2, with γ1 running from pto q and γ2 running from q to p. So, by (ii) and Remark 46,Z

γ

F (r) · dr =Zγ1

F (r) · dr+Zγ2

F (r) · dr =Z q

p

F (r) · dr−Z q

p

F (r) · dr = 0

(iii) =⇒ (ii) :Let p,q ∈ S and let γ1, γ2 be two curves in S, starting at p and ending atq. If γ is the curve which follows γ1 and comes back around γ2, so that we have returned to pthen, by assumption and Remark 46,

0 =

F (r) · dr =Zγ1

F (r) · dr−Zγ2

F (r) · dr =⇒Zγ1

F (r) · dr =Zγ2

F (r) · dr

and the line integral of F from p to q is independent of the choice of path taken.(i) =⇒ (iv) : If F = ∇φ then curlF = ∇∧∇φ = 0 by Proposition 24 as required.

24 LINE INTEGRALS & CONSERVATIVE FIELDS

Page 25: Calculus in Three Dimensions and Applications

However curlF = 0 is not in general a sufficient condition for vector fields to be conservative.It is, however, sufficient for vector fields on R3. Theorems 62 and 65 are consequences of aresult known as Poincaré’s Lemma, that holds generally about n-dimensional Euclidean space.

Theorem 62 Let F : R3 → R3 be such that curlF = 0. Then there exists φ : R3 → R suchthat F = ∇φ. (NB an easier and more general proof of this follows from Stokes’ Theorem.)

Proof. For now we set

φ (r) =

Z 1

0

F (tr) · rdt.

Note that this integral is simply the line integral of F along a line segment connecting the originto r. Then

∂φ

∂x(r)

=∂

∂x

Z 1

0

F (tr) · rdt

=∂

∂x

Z 1

0

(F1 (tx, ty, tz) , F2 (tx, ty, tz) , F3 (tx, ty, tz)) · (x, y, z) dt

=∂

∂x

Z 1

0

xF1 (tx, ty, tz) + yF2 (tx, ty, tz) + zF3 (tx, ty, tz) dt

=

Z 1

0

½F1 (tx, ty, tz) + tx

∂F1∂x

(tx, ty, tz) + ty∂F2∂x

(tx, ty, tz) + tz∂F3∂x

(tx, ty, tz)

¾dt

=

Z 1

0

½F1 (tx, ty, tz) + tx

∂F1∂x

(tx, ty, tz) + ty∂F1∂y

(tx, ty, tz) + tz∂F1∂z

(tx, ty, tz)

¾dt [as curlF = 0]

=

Z 1

0

d

dt[tF1 (tx, ty, tz)] dt [by the chain rule]

= [tF1 (tx, ty, tz)]t=1t=0

= F1 (x, y, z) .

By similar calculations it also follows that

∂φ

∂y(r) = F2 (x, y, z) ,

∂φ

∂z(r) = F3 (x, y, z) .

CONSERVATIVE FIELDS 25

Page 26: Calculus in Three Dimensions and Applications

Example 63 If we set

F (x, y, z) =¡2xy + z cos (zx) , x2 + ey−z, x cos (zx)− ey−z

¢it is not hard to check curlF = 0 or to see by inspection that F = ∇ψ where

ψ (x, y, z) = x2y + sin (zx) + ey−z,

or we could have determined a potential φ by calculating

φ (p) =

Z 1

0

F (tp) · p dt.

=

Z 1

0

©£2t2xy + tz cos

¡t2zx

¢¤x+

£t2x2 + et(y−z)

¤y +

£tx cos

¡t2zx

¢− et(y−z)

¤zªdt

=

∙2t3

3x2y +

1

2sin¡t2zx

¢+

t3

3x2y +

yet(y−z)

y − z+1

2sin¡t2zx

¢− zet(y−z)

y − z

¸10

= x2y + sin (zx) + ey−z.

Remark 64 Looking at the proof of Theorem 62 it might not be clear how the proof wouldbreakdown if we were considering a vector field on a proper subset of R3. Implicit in the proofis the fact that we can draw a straight line from some fixed point (the origin in this case) toa general point; we then generated a potential by considering the work done by the field alongthis line. Obviously if the domain of the field isn’t convex then we have to adapt the proof. Ifthe domain is still path-connected then we might consider the work done along some curve froma fixed point to a general point. The problem that arises, for some domains, is that differentwork will be done along different curves — even though the endpoints are the same — and so ourcandidate function for a potential will not solely be a function of the general point. We shallreturn to this problem when we meet Stokes’ Theorem and we will see that the work done to apoint will be independent of the path taken when the domain is simply connected.

We have shown

for a vector field F on R3: curlF = 0 ⇐⇒ F = ∇φ for some potential φ,

but have seen that this does not generally hold for some regions. The remainder of thissection is a somewhat off-syllabus discussion, but the following question is natural to askgiven the previous results: as div curlF = 0 for any vector field we have the implication

divF = 0 ⇐= F = curl f for some vector potential f .

It is natural to ask again whether the converse is true. There is a positive answer to this forR3 but again there are regions for which the converse is not true — see Example 66.

26 LINE INTEGRALS & CONSERVATIVE FIELDS

Page 27: Calculus in Three Dimensions and Applications

Theorem 65 (Off-syllabus) Let F : R3 → R3 be such that ∇ · F = 0. Then there exists avector potential f : R3 → R3 such that F = ∇∧ f .

Proof. We set

f (r) =

Z 1

0

F (tx, ty, tz) ∧ (tx, ty, tz) dt

=

Z 1

0

t (zF2 − yF3, xF3 − zF1, yF1 − xF2) dt.

So

f1 (x, y, z) =

Z 1

0

t (zF2 (tx, ty, tz)− yF3 (tx, ty, tz)) dt,

f2 (x, y, z) =

Z 1

0

t (xF3 (tx, ty, tz)− zF1 (tx, ty, tz)) dt,

f3 (x, y, z) =

Z 1

0

t (yF1 (tx, ty, tz)− xF2 (tx, ty, tz)) dt.

We need to show that

∂f3∂y− ∂f2

∂z= F1,

∂f1∂z− ∂f3

∂x= F2,

∂f2∂x− ∂f1

∂z= F3. (2.3)

Note that

∂f3∂y− ∂f2

∂z

=∂

∂y

Z 1

0

t (yF1 (tx, ty, tz)− xF2 (tx, ty, tz)) dt−∂

∂z

Z 1

0

t (xF3 (tx, ty, tz)− zF1 (tx, ty, tz)) dt

=

Z 1

0

½tF1 (tx, ty, tz) + t2y ∂F1

∂y(tx, ty, tz)− t2x∂F2

∂y(tx, ty, tz)

−t2x∂F3∂z(tx, ty, tz) + tF1 (tx, ty, tz) + t2z ∂F1

∂z(tx, ty, tz)

¾dt

=

Z 1

0

(2tF1 (tx, ty, tz) + t2y ∂F1

∂y(tx, ty, tz) + t2z ∂F1

∂z(tx, ty, tz)

−t2xh∂F2∂y(tx, ty, tz) + ∂F3

∂z(tx, ty, tz)

i )dt

As divF = 0 the above equalsZ 1

0

½2tF1 (tx, ty, tz) + t2y

∂F1∂y

(tx, ty, tz) + t2z∂F1∂z

(tx, ty, tz) + t2x∂F1∂x

(tx, ty, tz)

¾dt

=

Z 1

0

d

dt

£t2F1 (tx, ty, tz)

¤dt [by the chain rule]

= F1 (x, y, z) .

Similar calculations show also that

∂f1∂z− ∂f3

∂x= F2,

∂f2∂x− ∂f1

∂z= F3.

CONSERVATIVE FIELDS 27

Page 28: Calculus in Three Dimensions and Applications

Example 66 Suppose now we consider punctured three-dimensional space, that is the regionR3 − 0 and consider the vector field given in spherical polar co-ordinates as

F =r

r3=1

r2er.

So Fr = r−2 and Fφ = Fθ = 0. Using the formulae from Proposition 23 we can see

∇ · F =1

r2 sin θ

∙∂

∂r

¡r2 sin θFr

¢+

∂φ(rFφ) +

∂θ(r sin θFθ)

¸=

1

r2 sin θ

∙∂

∂r(sin θ)

¸= 0.

We can also note that if

f =cot θ

reφ

then

∇∧ f =1

r2 sin θ

¯¯ er r sin θeφ reθ

∂∂r

∂∂φ

∂∂θ

Fr r sin θFφ rFθ

¯¯

=1

r2 sin θ

¯¯ er r sin θeφ reθ

∂∂r

∂∂φ

∂∂θ

0 cos θ 0

¯¯

=1

r2 sin θ(sin θer) = F.

If g is a second function such that curlg = F then we have

curl (f − g) = F− F = 0,

and so, by a theorem for R3−0 , similar to Theorem 62, we have f−g = ∇ψ for some scalarpotential ψ. Hence the most general solution of curlg = F is

g =cot θ

reφ −∇ψ.

It seems, then, that there are lots of vector potentials for F. However, on closer inspection, wesee that f is not defined on the whole of R3 − 0 as cot θ is infinite on the z-axis; in fact wesee that none of the functions g is defined on the whole of R3 − 0. Each of the functions gis a perfectly valid vector potential for f on the restricted domain (x, y, z) : x2 + y2 6= 0 , butcannot be extended to R3 − 0. Hence divF = 0 in R3 − 0 is not sufficient to guarantee avector potential; the subtle reason behind this again relates to the topology of the region R3−0.

28 LINE INTEGRALS & CONSERVATIVE FIELDS

Page 29: Calculus in Three Dimensions and Applications

3. SURFACE AND VOLUME INTEGRALS

3.1 Volume Integrals

Let φ be a scalar field on a subset S of R3. We wish to define the volume integralZZZS

φdV.

For example, if φ is the density of a material inside S then the integral represents the total mass.For the regions S and functions φ we shall meet there will never be any issue as to whetherthe integral might exist or not and we will usually determine such integrals by calculatingthree definite integrals separately over co-ordinates x, y, z (and sometimes using other moreappropriate co-ordinates). However there are sophisticated theories about what functions φand what subsets S are measurable in three-dimensions. Doubters of this need only looktowards the Banach-Tarski Paradox1 for a sense of the subtleties involved.

Example 67 A cone of height h occupies the region

x2 + y2 6 z2, 0 6 z 6 h.

and has density ρ (x, y, z) = (x2 + y2) z at each point. Find the mass of the cone using Cartesianco-ordinates.

Solution. Our first problem is in dividing up the cone properly and finding the correct limits.There are many different ways we might begin to take cross-sections of the cones, breaking thecone into two- and then one-dimensional sections, but poorly chosen co-ordinates, whilst theycould be used in principle to determine the mass, are likely to lead to a very complicated setof integrals to calculate along the way.If we use z as our first variable to divide up the cone, then we see the cross-section of the

cone with a plane z = z0 gives a disc x2 + y2 6 (z0)2 , z = z0 (at least if 0 6 z0 6 h). We canthen, say, take cross-sections of such discs with the line y = y0 to produce horizontal slithers

x2 6 (z0)2 − (y0)2 , y = y0, z = z0 (at least if |y0| 6 z0)

and calculating their contribution to the mass is a simple one-dimensional integral.

1Banach and Tarski, two Polish mathematicians, proved in 1924, that it is possible to partition a solid sphereinto as few as five pieces, move these pieces around using rigid motions (so no stretching going on) and thenreassemble the pieces to form two solid spheres of the same size as the original. One of the reasons that this ispossible is because the pieces involved are so pathological that is impossible to assign them any sensible volume— so volume need not be an invariant of the process. Perhaps surprisingly no such paradoxical decompositionsof the disc are possible in two dimensions.

SURFACE AND VOLUME INTEGRALS 29

Page 30: Calculus in Three Dimensions and Applications

So the mass M is given by the triple integral

M =

Z h

z=0

Z z

y=−z

Z √z2−y2

x=−√

z2−y2ρ (x, y, z) dxdy dz

=

Z h

z=0

Z z

y=−z

Z √z2−y2

x=−√

z2−y2

¡x2 + y2

¢z dxdy dz.

We need to calculate the internal integrals first. We haveZ √z2−y2

x=−√

z2−y2

¡x2 + y2

¢z dx =

∙z

µx3

3+ y2x

¶¸√z2−y2

−√

z2−y2

= 2z

Ã(z2 − y2)

3/2

3+ y2

pz2 − y2

!=

2z

3

¡z2 + 2y2

¢pz2 − y2.

The next internal integral is thenZ z

y=−z

2z

3

¡z2 + 2y2

¢pz2 − y2 dy.

It very much seems like a substitution y = z sin t, where −π/2 6 t 6 π/2, will help here. Inwhich case the integral becomesZ π/2

t=−π/2

2z

3

¡z2 + 2z2 sin2 t

¢pz2 − z2 sin2 t (z cos tdt)

=

Z π/2

t=−π/2

2z3

3

¡1 + 2 sin2 t

¢|z cos t| (z cos tdt)

=2z5

3

Z π/2

t=−π/2

¡1 + 2 sin2 t

¢cos2 t dt.

Now Z π/2

t=−π/2cos2 t+ 2 sin2 t cos2 tdt =

Z π/2

t=−π/2

1

2(1 + cos 2t) +

1

2sin2 2t dt

=

Z π/2

t=−π/2

1

2(1 + cos 2t) +

1

4(1− cos 4t) dt =

∙3t

4+1

4sin 2t− 1

8sin 4t

¸π/2−π/2

=3π

4.

Finally then we have the external integralZ h

z=0

2z5

3× 3π4dz =

π

2

∙z6

6

¸h0

=πh6

12.

30 SURFACE AND VOLUME INTEGRALS

Page 31: Calculus in Three Dimensions and Applications

Solution. (Alternative method with planar polars) The massM we just calculated could havebeen rewritten as

M =

Z h

z=0

ZZx2+y26z2

ρ (x, y, z) dxdy dz =

Z h

z=0

ZZx2+y26z2

¡x2 + y2

¢z dxdy dz.

We have already met in the MT calculus course how to change from Cartesian co-ordinates x, yto planar polar co-ordinates r, θ. The change of variable rule isZZ

φdA =

ZZφdxdy =

ZZφ (r dr dθ)

where the r appears as it is the Jacobian ∂ (x, y) /∂ (r, θ) . So instead we could have determinedZZx2+y26z2

¡x2 + y2

¢z dxdy =

Z z

r=0

Z 2π

θ=0

r2z (r dθ dr) = 2πz

Z z

r=0

r3 dr = 2πz

∙r4

4

¸z0

=πz5

2.

Finally

M =

Z h

z=0

πz5

2dz =

∙πz6

12

¸h0

=πh6

12.

This change of variable makes the calculation substantially simpler!

Remark 68 In the above we essentially used cylindrical polar co-ordinates appreciating thatthe volume element dV is given by

dV = dxdy dz = r dr dθ dz.

The equivalent expression for spherical polar co-ordinates is

dV = r2 sin θ dr dθ dφ.

We postpone a proof and discussion of this till later — see Example 90 — but make use of thisin the following example.

Definition 69 The centre of mass of a body occupying a region R and with density ρ (r) atthe point with position vector r is

r = (x, y, z) =1

M

ZZZR

r ρ (r) dV

where M is the total mass of the body.

VOLUME INTEGRALS 31

Page 32: Calculus in Three Dimensions and Applications

Example 70 Find the centre of mass of a uniform hemisphere©(x, y, z) : x2 + y2 + z2 < a2, z > 0

ª.

Solution. By symmetry, the centre of mass lies at a point (0, 0, z) on the z-axis. Say ρ is thedensity of the hemisphere, so that its mass is 2

3πa3ρ. Then

z =3

2πa3ρ

Z a

r=0

Z 2π

φ=0

Z θ=π/2

θ=0

(r cos θ)¡ρr2 sin θ

¢dθ dφdr

=3

2πa3ρ× 2πρ

Z a

r=0

r3 dr

Z θ=π/2

θ=0

cos θ sin θ dθ

=3

a3×∙r4

4

¸a0

×∙− cos 2θ4

¸π/20

=3

a3× a4

4× 12

=3a

8.

Example 71 Find the volume of the cone and centre of mass of a uniform cone of height hand with base radius a.

Solution. Cylindrical polar co-ordinates seem to be the most natural co-ordinate system forthis problem. If we consider the cone to be pointing down the z-axis with its apex at the originthen we see that the cross-section of the cone with the plane z = z0 (where 0 6 z0 6 h) is thedisc r 6 z0 (a/h) . So

V =

Z z=h

z=0

Z r=az/h

r=0

Z 2π

θ=0

r dθ dr dz = 2π

Z z=h

z=0

Z r=az/h

r=0

r dr dz = 2π

Z z=h

z=0

∙r2

2

¸az/h0

dz

= π

Z z=h

z=0

a2z2

h2dz = π

∙a2z3

3h2

¸z=hz=0

=πa2h

3.

By symmetry we have x = y = 0. So we only need to calculate

z =1

M

Z z=h

z=0

Z r=az/h

r=0

Z 2π

θ=0

z ρ r dθ dr dz =2πρ

13πa2hρ

Z z=h

z=0

Z r=az/h

r=0

z r dr dz =6

a2h

Z z=h

z=0

∙zr2

2

¸az/h0

dz

=3

a2h

Z z=h

z=0

a2z3

h2dz =

3

a2h× a2

h2

∙z4

4

¸h0

=3

a2h× a2

h2× h4

4=3h

4.

Hence

r =3h

4k.

32 SURFACE AND VOLUME INTEGRALS

Page 33: Calculus in Three Dimensions and Applications

Example 72 Find ZZZx2+y2+z261

¡x2n + y2n + z2n

¢dV.

Solution. By symmetryZZZx2+y2+z261

x2n dV =

ZZZx2+y2+z261

y2n dV =

ZZZx2+y2+z261

z2n dV

and so ZZZx2+y2+z261

¡x2n + y2n + z2n

¢dV = 3

ZZZx2+y2+z261

z2n dV.

The choice of co-ordinate z here is because the formula for z in standard spherical polar co-ordinates is much easier than the formulae for x and y. So, making this change, we seeZZZ

x2+y2+z261

z2n dV =

Z 1

r=0

Z π

θ=0

Z 2π

φ=0

(r cos θ)2n r2 sin θ dφdθ dr

= 2π

Z 1

r=0

Z π

θ=0

r2n+2 cos2n θ sin θ dθ dr

= 2π

∙r2n+3

2n+ 3

¸10

∙− cos2n+1 θ2n+ 1

¸π0

= 2π × 1

2n+ 3ס1− (−1)2n+1

¢2n+ 1

=4π

(2n+ 3) (2n+ 1).

Example 73 Find the volume of the region R that lies above the paraboloid z = x2 + y2 andbeneath the plane x+ y + z = 1.

Solution. The x, y co-ordinates of a point (x, y, z) on the top planar surface of R satisfy

1− x− y 6 x2 + y2

and so the top planar surface projects vertically down to the set

W =©(x, y) ∈ R2 : x+ y + x2 + y2 6 1

ª=

((x, y) ∈ R2 :

µx+

1

2

¶2+

µy +

1

2

¶26 3

2

)

VOLUME INTEGRALS 33

Page 34: Calculus in Three Dimensions and Applications

which is a disc, centre (−1/2,−1/2) and radiusp3/2. Hence we can determine the volume of

the region R as

V =

ZZ(x,y)∈W

µZ 1−x−y

z=x2+y2dz

¶dA

=

ZZ(x,y)∈W

¡1− x− y − x2 − y2

¢dA

=

ZZ(x,y)∈W

Ã3

2−µx+

1

2

¶2−µy +

1

2

¶2!dA

Natural co-ordinates for parametrising W are r, θ where

x = −12+ r cos θ, y = −1

2+ r sin θ, 0 6 θ < 2π, 0 6 r 6

p3/2.

Hence we have

V =

Z √3/2r=0

Z 2π

θ=0

µ3

2− r2 cos2 θ − r2 sin2 θ

¶(r dθ dr)

= 2π

Z √3/2r=0

µ3r

2− r3

¶dr

= 2π

∙3r2

4− r4

4

¸√3/20

= 2π

µ9

8− 9

16

¶=

8.

34 SURFACE AND VOLUME INTEGRALS

Page 35: Calculus in Three Dimensions and Applications

3.2 Parametrised Surfaces

We likely all feel we know a smooth surface in R3 when we see one, and this instinct for whata surface is will largely be satisfactory for the purposes of this course. For example:

Example 74 (Examples of Quadrics) The standard equations of quadrics are

• Sphere: x2 + y2 + z2 = a2 ;

• Ellipsoid: x2/a2 + y2/b2 + z2/c2 = 1;

• Hyperboloid of One Sheet: x2/a2 + y2/b2 − z2/c2 = 1;

• Hyperboloid of Two Sheets: x2/a2 − y2/b2 − z2/c2 = 1;

• Paraboloid: z = x2 + y2;

• Hyperbolic Paraboloid: z = x2 − y2;

• Cone: x2 + y2 = z2.

one sheet hyperboloid hyperbolic paraboloid

We recognise all the examples above as smooth surfaces, with the exception of the cone at(0, 0, 0) and should be comfortable working out their tangent planes and normals — they areall level surfaces and the level surface f (x, y, z) = c at (p, q, r) has normal ∇f (p, q, r). In themain we will be happy to work with surfaces without a formal definition, but for those seeking amore rigorous treatment of the topic, the following might provide a suitable working definition.

Definition 75 A smooth parametrised surface is a map r, known as the parametrisation

r : U → R3 : (u, v) 7→ (x (u, v) , y (u, v) , z (u, v))

from a subset U ⊆ R2 to R3 such that

PARAMETRISED SURFACES 35

Page 36: Calculus in Three Dimensions and Applications

• x, y, z have continuous partial derivatives with respect to u and v of all orders

• r is a bijection with both r and r−1 being continuous

• at each point the vectors∂r

∂uand

∂r

∂v

are linearly independent (i.e. are not scalar multiples of one another). Equivalently

∂r

∂u∧ ∂r

∂v6= 0.

We will not be looking to treat this definition with any generality. Rather we shall just lookto parametrise some of the "standard" surfaces previously described. We define:

Definition 76 Let r : U → R3 be a smooth parametrised surface and let p be a point on thesurface. The plane containing p and which is parallel to the vectors

∂r

∂u(p) and

∂r

∂v(p)

is called the tangent plane to r (U) at p. Because these vectors are independent the tangentplane is well-defined.

Definition 77 Any vector in the direction

∂r

∂u(p) ∧ ∂r

∂v(p)

is said to be normal to the surface at p. There are two unit normals of length one which wedenote as n and −n.

3.3 Surface Integrals

Let r : U → R3 be a smooth parametrised surface with

r (u, v) = (x (u, v) , y (u, v) , z (u, v))

and consider the small element of the plane that is bounded by the co-ordinate lines u = u0and u = u0+ δu and v = v0 and v = v0+ δv. Then r maps this to a small region of the surfacer (U) and we are interested in calculating the surface area of this small region. Note

r (u+ δu, v)− r (u, v) ≈ ∂r

∂u(u, v) δu,

r (u, v + δv)− r (u, v) ≈ ∂r

∂v(u, v) δv.

36 SURFACE AND VOLUME INTEGRALS

Page 37: Calculus in Three Dimensions and Applications

Recall that the area of a parallelogram with sides a and b is |a ∧ b| . So the element of surfacearea we are considering is approximately¯

∂r

∂uδu ∧ ∂r

∂vδv

¯=

¯∂r

∂u∧ ∂r

∂v

¯δu δv.

This motivates the following definitions:

Definition 78 Let r : U → R3 be a smooth parametrised surface. Then the surface area (orsimply area) of r (U) is defined to beZZ

U

¯∂r

∂u∧ ∂r

∂v

¯dudv.

Definition 79 We will often write

dS =

¯∂r

∂u∧ ∂r

∂v

¯dudv

to denote an infinitesimal part of surface area. We will also write

dS =∂r

∂u∧ ∂r

∂vdudv.

This is also commonly written as n dS.

Proposition 80 The surface area of r (U) is independent of the choice of parametrisation.

Proof. Let Σ = r (U) = s (W ) be two different parametrisations of a surface X; take u, v asthe co-ordinates on U and p, q as the co-ordinates on W . Let f = (f1, f2) : U → W be theco-ordinate change map — i.e. for any (u, v) ∈ U we have

r (u, v) = s (f (u, v)) = s (f1 (u, v) , f2 (u, v)) .

Then∂r

∂u=

∂s

∂p

∂f1∂u

+∂s

∂q

∂f2∂u

,∂r

∂v=

∂s

∂p

∂f1∂v

+∂s

∂q

∂f2∂v

.

Hence

∂r

∂u∧ ∂r

∂v=

∂s

∂p

∂f1∂u∧ ∂s

∂q

∂f2∂v

+∂s

∂q

∂f2∂u∧ ∂s

∂p

∂f1∂v

=

µ∂f1∂u

∂f2∂v− ∂f1

∂v

∂f2∂u

¶∂s

∂p∧ ∂s

∂q

=∂ (p, q)

∂ (u, v)

∂s

∂p∧ ∂s

∂q.

SURFACE INTEGRALS 37

Page 38: Calculus in Three Dimensions and Applications

Finally ZZU

¯∂r

∂u∧ ∂r

∂v

¯dudv =

ZZU

¯∂ (p, q)

∂ (u, v)

∂s

∂p∧ ∂s

∂q

¯dudv

=

ZZU

¯∂s

∂p∧ ∂s

∂q

¯ ¯∂ (p, q)

∂ (u, v)

¯dudv

=

ZZW

¯∂s

∂p∧ ∂s

∂q

¯dpdq

by the two-dimensional substitution rule from MT. (Theorem 130 in the Institute notes ModsCalculus.)

Example 81 Let 0 < a < b. Find the area of the torus obtained by revolving the circle(x− b)2 + z2 = a2 in the xz-plane about the z-axis.

Solution. We can parametrise the torus as

r (θ, φ) = ((b+ a sin θ) cosφ, (b+ a sin θ) sinφ, a cos θ) 0 6 θ, φ 6 2π.

We have

rθ = (a cos θ cosφ, a cos θ sinφ,−a sin θ) , rφ = (− (b+ a sin θ) sinφ, (b+ a sin θ) cosφ, 0)

and

rθ ∧ rφ =

¯¯ i j k

a cos θ cosφ a cos θ sinφ −a sin θ− (b+ a sin θ) sinφ (b+ a sin θ) cosφ 0

¯¯

= a (b+ a sin θ)

¯¯ i j kcos θ cosφ cos θ sinφ − sin θ− sinφ cosφ 0

¯¯

= a (b+ a sin θ) (sin θ cosφ, sin θ sinφ, cos θ) .

The surface area of the torus isZ 2π

θ=0

Z 2π

φ=0

a (b+ a sin θ)

qsin2 θ cos2 φ+ sin2 θ sin2 φ+ cos2 θ dφdθ

= 2πa

Z 2π

θ=0

(b+ a sin θ) dθ

= 4π2ab.

38 SURFACE AND VOLUME INTEGRALS

Page 39: Calculus in Three Dimensions and Applications

Example 82 Let z = f (x, y) denote the graph of a function f defined on a subset S of thexy-plane. Show that the graph has surface areaZZ

S

q1 + (fx)

2 + (fy)2 dxdy.

Deduce that a sphere of radius a has surface area 4πa2.

Solution. We can parametrise the surface as

r (x, y) = (x, y, f (x, y)) (x, y) ∈ S.

Then

rx ∧ ry =

¯¯ i j k1 0 fx0 1 fy

¯¯ = (−fx,−fy, 1) .

Hence the graph has surface areaZZS

|rx ∧ ry| dxdy =ZZS

q1 + (fx)

2 + (fy)2 dxdy.

We can calculate the area of a hemisphere of radius a by setting

f (x, y) =pa2 − x2 − y2 x2 + y2 < a2.

We then havefx =

−xpa2 − x2 − y2

, fy =−yp

a2 − x2 − y2

and so the hemisphere’s area is Z Zx2+y2<a2

s1 +

x2 + y2

a2 − x2 − y2dxdy

=

Z Zx2+y2<a2

apa2 − x2 − y2

dxdy

=

Z a

r=0

Z 2π

θ=0

a√a2 − r2

r dθ dr

= 2πh−a√a2 − r2

ia0

= 2πa2.

Hence the area of the whole sphere is 4πa2.

Example 83 Calculate the area of a sphere of radius a using spherical polar co-ordinates.

SURFACE INTEGRALS 39

Page 40: Calculus in Three Dimensions and Applications

Solution. We can parametrise the sphere by

r (θ, φ) = (a sin θ cosφ, a sin θ sinφ, a cos θ) 0 6 θ 6 π, 0 6 φ 6 2π.

Then

∂r

∂θ∧ ∂r

∂φ=

¯¯ i j k

∂x∂θ

∂y∂θ

∂z∂θ

∂x∂φ

∂y∂φ

∂z∂φ

¯¯

=

¯¯ i j ka cos θ cosφ a cos θ sinφ −a sin θ−a sin θ sinφ a sin θ cosφ 0

¯¯

= a2¡sin2 θ cosφ, sin2 θ sinφ, sin θ cos θ

¢= a2 sin θ (sin θ cosφ, sin θ sinφ, cos θ) .

HencedS =

¯a2 sin θ (− sin θ cosφ, sin θ sinφ, cos θ)

¯dθ dφ = a2 |sin θ| dθ dφ.

Finally

A =

Z π

θ=0

Z 2π

φ=0

a2 |sin θ| dφdθ

= 2πa2Z π

θ=0

|sin θ| dθ

= 4πa2.

Definition 84 If F and φ are a vector field and scalar field defined on a surface Σ, parametrisedas r (U), then we may define the follow surface integrals:ZZ

Σ

F · dS =

ZZU

F (r (u, v)) ·µ∂r

∂u∧ ∂r

∂v

¶dudv;

ZZΣ

FdS =

ZZU

F (r (u, v))

¯∂r

∂u∧ ∂r

∂v

¯dudv;

ZZΣ

φdS =

ZZU

φ (r (u, v))

µ∂r

∂u∧ ∂r

∂v

¶dudv;

ZZΣ

φdS =

ZZU

φ (r (u, v))

¯∂r

∂u∧ ∂r

∂v

¯dudv.

We will most commonly meet integrals of the first typeZZΣ

F · dS which are known as flux

integrals.

40 SURFACE AND VOLUME INTEGRALS

Page 41: Calculus in Three Dimensions and Applications

Definition 85 The solid angle is the angle an object subtends at a point in three-dimensionalspace. More precisely, half-lines from a fixed point (or observer) will either intersect with theobject in question or not; those lines of sight that are blocked by the object represent a subsetof the unit sphere centred on the observer. The area of that subset is the solid angle. The unitof solid angle is the steradian. Given that the surface area of a sphere is 4π (radius)2 then awhole solid angle is 4π steradian.If Σ is a surface then the solid angle Ω subtended at O by Σ equals, by definition,

Ω =

ZZΣ

r · dSr3

=

ZZΣ

er · dSr2

where r = |r|.

Example 86 Find the solid angle at the apex of a right pyramid with square base of side 2dand height h.

Solution. Consider placing the apex of the pyramid at the origin and orientating the axisof the pyramid along the positive z-axis so that the square base of the pyramid has vertices(±d,±d, h) . By symmetry the solid angle at the apex is 4 times the solid angle subtended bythe smaller square with vertices

(0, 0, h) , (0, d, h) , (d, d, h) (0, d, h) .

Hence the solid angle is

Ω = 4

Z d

y=0

Z d

x=0

(x, y, h) · k dxdy(x2 + y2 + h2)3/2

= 4h

Z d

y=0

Z d

x=0

dxdy

(x2 + y2 + h2)3/2.

If we set x =py2 + h2 tan t and tan τ = d/

³py2 + h2

´then we have

Ω = 4h

Z d

y=0

Z τ

t=0

py2 + h2 sec2 t dt dy

((y2 + h2) tan2 t+ y2 + h2)3/2

= 4h

Z d

y=0

Z τ

t=0

py2 + h2 sec2 t dt dy

(y2 + h2)3/2 (tan2 t+ 1)3/2

= 4h

Z d

y=0

Z τ

t=0

cos t dt dy

(y2 + h2)

= 4h

Z d

y=0

sin τ dy

(y2 + h2)

= 4h

Z d

y=0

dy

(y2 + h2)py2 + h2 + d2

SURFACE INTEGRALS 41

Page 42: Calculus in Three Dimensions and Applications

as sin τ = d (y2 + h2 + d2)−1/2. If we make a similar substitution again, namely y =

√h2 + d2 tanφ

and tanα = d/√h2 + d2 then we see that

Ω = 4h

Z α

φ=0

√h2 + d2 sec2 φdφ

((h2 + d2) tan2 φ+ h2)√h2 + d2 secφ

= 4h

Z α

φ=0

cosφdφ¡(h2 + d2) sin2 φ+ h2 cos2 φ

¢= 4h

Z α

φ=0

cosφdφ¡(h2 + d2) sin2 φ+ h2 cos2 φ

¢= 4h

Z α

φ=0

cosφdφ

d2 sin2 φ+ h2.

Our final substitution is u = sinφ so that sin−1 α = d/√h2 + 2d2 and

Ω = 4h

Z sin−1 α

u=0

du

d2u2 + h2=4h

d

∙d

htan−1

µdu

h

¶¸sin−1 α0

= 4 tan−1µ

d2

h√h2 + 2d2

¶.

Example 87 Evaluate the integral ZZΣ

F ∧ dS

where in each case Σ is the closed hemispherical surface made up of points (x, y, z) such thateither x2 + y2 + z2 = 1 and z > 0, or x2 + y2 6 1 and z = 0;. orient Σ so that dS is in thedirection of the outward-pointing normal and F = (zx, zy, z2).

Solution. We could proceed to parametrise the two parts of Σ, the upper part of the hemi-spherical surface Σ1 and the planar disc Σ2. These can be respectively parametrised as

r1 (θ, φ) = (sin θ cosφ, sin θ sinφ, cos θ) 0 6 φ 6 2π, 0 6 θ 6 π/2;

r2 (r, θ) = (r cos θ, r sin θ, 0) 0 6 θ 6 2π, 0 6 r 6 1.

With some further calculation we would find

∂r1∂θ∧ ∂r1

∂φ= sin θ (sin θ cosφ, sin θ sinφ, cos θ) ,

∂r1∂r∧ ∂r1

∂θ= (0, 0, r) .

In order to get the correct outward-pointing direction we need to set

dS = sin θ (sin θ cosφ, sin θ sinφ, cos θ) dθ dφ, dS = −rk,

respectively.However if we stop to think a little we can straight away see that on Σ1 we have F = zr

and n = r so that F ∧ dS = zr ∧ ndS = zr ∧ rdS = 0 on all of Σ1, and further as z = 0 onall of Σ2 then it’s also true that F = 0 on all of Σ2.Moral of the story: take some brief time to consider the nature of your function

and the region, what integrals actually need calculating and what co-ordinates arebest.

42 SURFACE AND VOLUME INTEGRALS

Page 43: Calculus in Three Dimensions and Applications

Remark 88 Two points of notation in relation to sheet 2. In question 2 ∂Σ refers to theboundary of Σ, which is formed from three curves which can be parametrised

C1 = (z, 0, z) : 0 6 z 6 2 ,C2 = (2 cos t, 2 sin t, 2) : 0 6 t 6 π ,C3 = (z, 0,−z) : 0 6 z 6 2 .

Be sure to orient the curves consistently in a loop to findR∂Σ

f dr (which is defined only up tosign).In question 5 ∂R refers to the boundary of R, which is formed from three surfaces namely

Σ1 =©(x, y, z) : x2 + y2 6 4, z = 0

ª,

Σ2 =©(x, y, z) : x2 + y2 = 4, 0 6 z 6 4

ª,

Σ3 =©(x, y, z) : x2 + y2 6 4, z = x2 + y2

ª.

To ensure equality, when calculatingZZ∂R

F ·dS then dS should be in the direction of the outward

pointing normal.

3.4 Changing Co-ordinates in Volume Integrals

Recall the one and two-dimensional substitution rules you have already met, namely:

• if f : [c, d]→ [a, b] is an increasing differentiable bijection and g is a continuous functionon [a, b] then Z b

a

g (x) dx =

Z d

c

g (f (t)) f 0 (t) dt;

notice that the one-dimensional Jacobian associated with the change of variable x = f (t)is

∂ (x)

∂ (t)=dx

dt= f 0 (t) .

• if f : W → U is a bijection between subsets of R2 which is differentiable and has dif-ferentiable inverse then the substitution formula associated with the change of variable(u1, u2) = f (w1, w2) is given byZZ

U

g (u1, u2) du1 du2 =

ZZW

g (f (w1, w2))

¯∂ (u1, u2)

∂ (w1, w2)

¯dw1 dw2,

where g is a continuous function on U .

CHANGING CO-ORDINATES IN VOLUME INTEGRALS 43

Page 44: Calculus in Three Dimensions and Applications

Does the pattern continue for changes of variable in a volume integral? Let f : W → U bea bijection between subsets of R3 which is differentiable and has differentiable inverse. Furthertake co-ordinates ui on U and wi on W related by the formula (u1, u2, u3) = f (w1, w2, w3).Consider a small cuboid

[w1, w1 + δw1]× [w2, w2 + δw2]× [w3, w3 + δw3] ⊆W

which has volume δw1 δw2 δw3. Under the map f this small volume maps to a deformedparallelepiped with sides

f (w1 + δw1, w2, w3)− f (w1, w2, w3) ≈∂f

∂w1δw1;

f (w1, w2 + δw2, w3)− f (w1, w2, w3) ≈∂f

∂w2δw2;

f (w1, w2, w3 + δw3)− f (w1, w2, w3) ≈∂f

∂w3δw3.

The volume of a parallelepiped with sides a,b, c is [a,b, c] = a · (b ∧ c) and so, as a firstapproximation,

δu1 δu2 δu3 =

∙∂f

∂w1,∂f

∂w2,∂f

∂w3

¸δw1 δw2 δw3

=

¯∂ (u1, u2, u3)

∂ (w1, w2, w3)

¯δw1 δw2 δw3.

Hence we also have for a change in three variablesZZU

g (u1, u2, u3) du1 du2 du3 =

ZZW

g (f (w1, w2, w3))

¯∂ (u1, u2, u3)

∂ (w1, w2, w3)

¯dw1 dw2 dw3.

If the previous motivation for this formula seems somewhat non-rigorous do note that the chainrule for Jacobians does ensure that it is impossible that we might ever determine two differentanswers for a volume integral by using different sets of variables.

Example 89 (Cylindrical Polar Co-ordinates)

x = r cos θ, y = r sin θ, z = z.

Then

∂ (x, y, z)

∂ (r, θ, z)=

¯¯

∂x∂r

∂x∂θ

∂x∂z

∂y∂r

∂y∂θ

∂y∂z

∂z∂r

∂z∂θ

∂z∂r

¯¯ =

¯¯ cos θ −r sin θ 0sin θ r cos θ 00 0 1

¯¯ = ¯ cos θ −r sin θsin θ r cos θ

¯= r.

Example 90 (Spherical Polar Co-ordinates)

x = r sin θ cosφ, y = r sin θ sinφ, z = r cos θ.

44 SURFACE AND VOLUME INTEGRALS

Page 45: Calculus in Three Dimensions and Applications

Then

∂ (x, y, z)

∂ (r, φ, θ)=

¯¯ ∂x

∂r∂x∂θ

∂x∂φ

∂y∂r

∂y∂θ

∂y∂φ

∂z∂r

∂z∂θ

∂z∂φ

¯¯

=

¯¯ sin θ cosφ r cos θ cosφ −r sin θ sinφsin θ sinφ r cos θ sinφ r sin θ cosφcos θ −r sin θ 0

¯¯

= cos θ

¯r cos θ cosφ −r sin θ sinφr cos θ sinφ r sin θ cosφ

¯+ r sin θ

¯sin θ cosφ −r sin θ sinφsin θ sinφ r sin θ cosφ

¯= cos θ r2 sin θ cos θ

¡cos2 φ+ sin2 φ

¢+ r2 sin3 θ

¡cos2 φ+ sin2 φ

¢= r2 sin θ

¡cos2 θ + sin2 θ

¢= r2 sin θ.

Example 91 Notice that if co-ordinates (X,Y, Z) are related to (x, y, z) by the matrix trans-formation (X,Y,Z)T = A (x, y, z) then

∂ (X,Y, Z)

∂ (x, y, z)= detA.

In particular, when A is an orthogonal matrix, then¯∂ (X,Y,Z)

∂ (x, y, z)

¯= 1.

Example 92 Evaluate the integral ZZZR

xdV

over the intersection of the unit ball x2 + y2 + z2 6 1 with the half-space x+ y > 3√2/5.

Solution. If we take as an orthonormal basis

e1 =1√2(1,−1, 0) , e2 = (0, 0, 1) , e3 =

1√2(1, 1, 0) ,

with corresponding co-ordinates X,Y,Z so that

Xe1 + Y e2 + Ze3 = xi+ yj+ zk,

then we have x = (X + Y ) /√2 and x+ y = Z

√2. So we are left considering the integralZZZ

X2+Y 2+Z261Z > 3/5

µX + Z√

2

¶dV.

CHANGING CO-ORDINATES IN VOLUME INTEGRALS 45

Page 46: Calculus in Three Dimensions and Applications

By symmetry ZZZX2+Y 2+Z261

Z > 3/5

X dV = 0,

so we are left to calculate

1√2

ZZZX2+Y 2+Z261

Z > 3/5

Z dV =1√2

Z 2π

φ=0

Z cos−1(3/5)

θ=0

Z 1

r=3/5 sec θ

(r cos θ) r2 sin θ dr dθ dφ

=2π√2

Z cos−1(3/5)

θ=0

Z 1

r=3/5 sec θ

r3 cos θ sin θ dr dθ

= π√2

Z cos−1(3/5)

θ=0

∙r4

4

¸13/5 sec θ

cos θ sin θ dθ

=π√2

4

Z cos−1(3/5)

θ=0

µ1− 81

625sec4 θ

¶cos θ sin θ dθ

=π√2

4

Z cos−1(3/5)

θ=0

µcos θ sin θ − 81

625

sin θ

cos3 θ

¶dθ

=π√2

4

∙−12cos2 θ − 81

1250

1

cos2 θ

¸cos−1(3/5)0

=π√2

4

∙−12× 9

25− 81

1250× 259+1

2+

81

1250

¸=

π√2

4

∙128

625

¸=32π√2

625.

Example 93 By a suitable rotation of co-ordinates, or otherwise, evaluateZZZ(ax+ by + cz)4 dV

taken over the region x2 + y2 + z2 6 1, where a, b, c are positive constants.

Solution. Consider instead this integral asZZZx2+y2+z261

((a, b, c) · r)4 dV.

We can rotate the axes to create new co-ordinates X,Y, Z in such a way that the Z axis pointsin the direction of vector (a, b, c) and under this change of co-ordinates the integral becomesZZZ

X2+Y 2+Z261

³√a2 + b2 + c2 e3 · r

´4dV =

ZZZX2+Y 2+Z261

¡a2 + b2 + c2

¢2Z4 dV

46 SURFACE AND VOLUME INTEGRALS

Page 47: Calculus in Three Dimensions and Applications

where e3 is the unit vector pointing down the Z-axis; notice that we are still integrating overthe unit sphere as we have simply rotated the axes about the origin.Now, by a change to spherical polar co-ordinates,ZZZ

X2+Y 2+Z261

¡a2 + b2 + c2

¢2Z4 dV

=¡a2 + b2 + c2

¢2 Z 1

r=0

Z 2π

φ=0

Z π

θ=0

(r cos θ)4¡r2 sin θ

¢dθ dφdr

= 2π¡a2 + b2 + c2

¢2 ∙r77

¸10

∙−cos

5 θ

5

¸π0

= 2π¡a2 + b2 + c2

¢2 × 17× 25

=4π

35

¡a2 + b2 + c2

¢2.

Example 94 Let a, b, c ∈ R. Determine

I =

ZZZx2+y2+z261

cos (ax+ by + cz) dxdy dz.

Deduce that the volume of the unit sphere is 4π/3.

Solution. We can rewrite the integral as

I =

ZZZx2+y2+z261

cos (a · r) dx dy dz

where a = (a, b, c) . The vector

e3 =a

|a| =(a, b, c)√

a2 + b2 + c2

is of unit length and so we can extend it to an orthonormal basis e1, e2, e3 with associatedco-ordinates X,Y,Z. In terms of these co-ordinates

a · r = (0, 0, |a|) · (X,Y, Z) = |a| Z.

The unit sphere x2+y2+z2 6 1 is still given asX2+Y 2+Z2 6 1 as e1, e2, e3 are an orthonormalbasis and dV = dX dY dZ. So

I =

ZZ ZX2+Y 2+Z261

cos (|a| Z) dX dY dZ.

CHANGING CO-ORDINATES IN VOLUME INTEGRALS 47

Page 48: Calculus in Three Dimensions and Applications

If we now change to spherical polar co-ordinates r, θ, φ associated with X,Y,Z we have

I =

Z 1

r=0

Z π

θ=0

Z 2π

φ=0

cos (|a| r cos θ) r2 sin θ dφdθ dr

= 2π

Z 1

r=0

Z π

θ=0

cos (|a| r cos θ) r2 sin θ dθ dr

= 2π

Z 1

r=0

∙− sin (|a| r cos θ)

|a| r r2¸π0

dr

= 2π

Z 1

r=0

r

|a| (2 sin (|a| r)) dr

=4π

|a|

(∙−r cos (|a| r)

|a|

¸1r=0

+

Z 1

r=0

cos (|a| r)|a| dr

)

=4π

|a|

∙−r cos (|a| r)

|a| +sin (|a| r)|a|2

¸1r=0

=4π

|a|

∙− cos |a||a| +

sin (|a|)|a|2

¸=

|a|3(sin |a|− |a| cos |a|) .

If we wish to determine the volume of the unit sphere we need to set a = b = c = 0. So letting|a|→ 0 we see

|a|3(sin |a|− |a| cos |a|) =

|a|3

ÃÃ|a|− |a|

3

6+O

¡|a|3¢!− |a|

Ã1− |a|

2

2+O

¡|a|4¢!!

=4π

|a|3

Ã|a|3

3+O

¡|a|4¢!

=4π

3+O (|a|)→ 4π

3as |a|→ 0.

48 SURFACE AND VOLUME INTEGRALS

Page 49: Calculus in Three Dimensions and Applications

4. STOKES’ AND DIVERGENCE THEOREMS

4.1 Stokes’ Theorem

Recall Green’s Theorem from the Hilary Term course which states that:

Theorem 95 (Green’s Theorem) Let C be a simple closed positive-oriented curve in R2which bounds a region R. Further let L and M be differentiable scalar fields defined in and onC. Then Z

C

Ldx+M dy =

ZZR

µ∂M

∂x− ∂L

∂y

¶dA.

If we wish to rewrite this in the language of line and surface integrals then we might setF = (L,M, 0) in which case the LHS becomes

RCF · dr and we further see

curlF =

¯¯ i j k

∂∂x

∂∂y

∂∂z

L (x, y) M (x, y) 0

¯¯ = µ∂M∂x − ∂L

∂y

¶k,

and so the RHS of Green’s Theorem can be rephrased asZZR

µ∂M

∂x− ∂L

∂y

¶dA =

ZZR

curlF · (k dA) =ZZR

curlF · dS.

Note that we need to take the normal in the direction of the positive z-axis if equality is to hold.If we’d taken the reverse orientation on R then the two sides would be negative one another.The identity Z

C

F · dr =ZZR

curlF · dS,

for regions of the plane, is purely a rewriting of Green’s Theorem, but it is part of a larger iden-tity known as Stokes’ Theorem which applies more generally to surfaces in R3 with boundary.Before we can properly understand the identity in its fullest generality, we need to appreciate

how to consistently orient a curve C which bounds a surface Σ.

Definition 96 At each point of a smooth surface there are two unit normal vectors ±n. Givena smooth surface Σ, then by an orientation of Σ we shall mean a continuous choice of unitnormal n for the whole surface.For the bounding curve, which we shall denote as ∂Σ, there are two possible orientations.

Given a certain orientation of ∂Σ and an oriented tangent vector t along ∂Σ then the vector

STOKES’ AND DIVERGENCE THEOREMS 49

Page 50: Calculus in Three Dimensions and Applications

t ∧ n lies in the tangent plane of Σ at the boundary point and is normal to the bounding curve∂Σ. So t ∧ n points either towards the surface Σ or away from Σ.We shall always choose to orient a surface Σ and its boundary ∂Σ in such a way that t∧n

points away from Σ. Note that this is consistent in the plane with taking positively orientedcurves and normal k.

In practice it is fairly clear how to consistently orient a surface and its boundary. If oneimagines an observer moving along the boundary ∂Σ (in the direction of the orientation) andupright (in the sense of the surface normal n) then the surface Σ will be to his/her left.

Example 97 Given the hemisphere Σ = (x, y, z) : x2 + y2 + z2 = 1, z > 0 with boundary∂Σ = (x, y, 0) : x2 + y2 = 1 then we can either orient Σ as

n (x, y, z) = (x, y, z) or − n (x, y, z) = (−x,−y,−z) .

We can parametrise ∂Σ as (cos θ, sin θ, 0). So one choice of unit tangent is

t = (− sin θ, cos θ, 0) .

At (cos θ, sin θ, 0) we have

t ∧ n = (− sin θ, cos θ, 0) ∧ (cos θ, sin θ, 0) = (0, 0,−1)

which points down, away from the hemisphere. The two consistent ways to orient the surfaceand boundary are

(n on Σ and t on ∂Σ) or (−n on Σ and − t on ∂Σ) .

Example 98 Not all surfaces have an orientation, such surfaces being called non-orientable.Examples of non-orientable surfaces are the Möbius strip and the Klein bottle. We shallonly be interested in orientable surfaces though.

Möbius Strip Klein Bottle

Theorem 99 (Stokes’ Theorem c. 1850. The first known appearance of this result thoughis in fact in a letter from Kelvin to Stokes.) Let Σ be a smooth oriented surface in R3 whoseboundary is the curve ∂Σ. Let F be a smooth vector field defined on Σ ∪ ∂Σ. ThenZ

∂Σ

F · dr =ZZΣ

curlF · dS. (4.1)

50 STOKES’ AND DIVERGENCE THEOREMS

Page 51: Calculus in Three Dimensions and Applications

Remark 100 The following proof applies only to patches of surface — we shall see in laterExamples (106 and 108) that Stokes’ Theorem applies generally to more complicated surfacesand their boundaries. In any event the proof of Stokes’ Theorem is not examinable.

Proof. Suppose that Σ is parametrised as r (u, v) where (u, v) ranges over some S ⊆ R2, with∂Σ being the image of ∂S under r. We shall first prove Stokes Theorem for the vector fieldF = (F, 0, 0), noting that similar proofs apply for fields (0, F, 0) and (0, 0, F ) and then the moregeneral (4.1) follows by linearity.So, if F = (F, 0, 0), then (4.1) reads asZ

∂Σ

F dx =

ZZΣ

(0, Fz,−Fy) · dS. (4.2)

Now using the parametrisation r (u, v) we haveZZΣ

(0, Fz,−Fy) · dS =

ZZS

(0, Fz,−Fy) · (ru ∧ rv) dudv

=

ZZS

(0, Fz,−Fy) ·

¯¯ i j kxu yu zuxv yv zv

¯¯ dudv

=

ZZS

[Fz (zuxv − xuzv)− Fy (xuyv − yuxv)] dudv.

On the other hand if we apply Green’s Theorem to the LHS of (4.2) we haveZ∂Σ

F dx =

Z∂S

F (xudu+ xvdv)

=

ZZS

[(Fxv)u − (Fxu)v] dudv

=

ZZS

[Fuxv + Fxvu − Fvxu − Fxuv] dudv

=

ZZS

[Fuxv − Fvxu] dudv

=

ZZS

[(Fxxu + Fyyu + Fzzu)xv − (Fxxv + Fyyv + Fzzv)xu] du dv

=

ZZS

[Fz (zuxv − xuzv)− Fy (xuyv − yuxv)] dudv.

The result follows.

STOKES’ THEOREM 51

Page 52: Calculus in Three Dimensions and Applications

Remark 101 For an intuitive appreciation of why Stokes’ Theorem is true, recall that curlF,when physically interpreted, is a measure of the local spin of the field F. So one might envisagesumming up all the curl over the surface Σ with most contributions to this total spin cancellingout, in a manner akin to intermeshing cogs. The only contributions that wouldn’t be cancelledout are those at the boundary, these remaining contributions making up the work integral aroundthe boundary.

Note that Stokes’ Theorem is a scalar identity, that is both sides of the identity are scalarquantities. There is also a vector identity related to Stokes’ Theorem. But firstly we note:

Lemma 102 Ifc · v = c ·w for all c ∈ R3

then v = w.

Proof. We have c · (v−w) = 0 for all c and so in particular this is true when c = v −w, sothat

(v−w) · (v−w) = 0,=⇒ |v−w|2 = 0,=⇒ |v−w| = 0,=⇒ v−w = 0,=⇒ v = w.

Corollary 103 Let Σ be a smooth oriented surface in R3 whose boundary is the curve ∂Σ. Letψ be a smooth scalar field defined on Σ ∪ ∂Σ. ThenZZ

Σ

∇ψ ∧ dS = −Z∂Σ

ψ dr.

Proof. Let c be an arbitrary constant vector and set F = ψc. In this case, and using the curlproduct rule, Stokes Theorem readsZZ

Σ

curl (ψc) · dS =ZZ

Σ

(ψ curl c+∇ψ ∧ c) · dS =Z∂Σ

ψc · dr.

As c is constant then curl c = 0 and we have

c ·µ−ZZ

Σ

∇ψ ∧ dS¶=

ZZΣ

∇ψ ∧ c · dS = c ·µZ

∂Σ

ψ dr

¶.

As c is arbitrary then by Lemma 102 we have

−ZZ

Σ

∇ψ ∧ dS =Z∂Σ

ψ dr

and the result follows.

52 STOKES’ AND DIVERGENCE THEOREMS

Page 53: Calculus in Three Dimensions and Applications

Example 104 Verify Stokes’ Theorem when F = (y, z, x) on the hemisphere

Σ =©(x, y, z) : x2 + y2 + z2 = a2, z > 0

ª.

Solution. We can parametrise the sphere as

r (θ, φ) = (a sin θ cosφ, a sin θ sinφ, a cos θ) 0 6 θ 6 π, 0 6 φ 6 2π.Then

∂r

∂θ∧ ∂r

∂φ=

¯¯ i j ka cos θ cosφ a cos θ sinφ −a sin θ−a sin θ sinφ a sin θ cosφ 0

¯¯ = a2 sin θ (sin θ cosφ, sin θ sinφ, cos θ) .

Now curlF = (−1,−1,−1) and henceZZΣ

curlF · dS =

Z π/2

θ=0

Z 2π

φ=0

(−1,−1,−1) · a2 sin θ (sin θ cosφ, sin θ sinφ, cos θ) dφdθ

= −a2Z π/2

θ=0

Z 2π

φ=0

sin θ (sin θ cosφ+ sin θ sinφ+ cos θ) dφdθ

= −2πa2Z π/2

θ=0

sin θ cos θ dθ

= −2πa2∙sin2 θ

2

¸π/20

= −πa2.On the other hand, once we parametrise and orient ∂Σ as r (θ) = (a cos θ, a sin θ, 0), we haveZ

∂Σ

F · dr =

Z 2π

0

(a sin θ, 0, a cos θ) · (−a sin θ, a cos θ, 0) dθ

= −a2Z 2π

0

sin2 θ dθ

= −πa2.

Example 105 Verify Corollary 103 when ψ = x and Σ is the upper hemisphere of the unitsphere.

Solution. The bounding curve ∂Σ is the circle x2 + y2 = a2 in the z = 0 plane. So

−Z∂Σ

ψ dr = −Z 2π

θ=0

a cos θ (−a sin θ, a cos θ, 0) dθ

= a2Z 2π

θ=0

¡sin θ cos θ,− cos2 θ, 0

¢dθ

= a2∙µ1

2sin2 θ,

−θ2− sin 2θ

4, 0

¶¸2π0

= −πa2j.

STOKES’ THEOREM 53

Page 54: Calculus in Three Dimensions and Applications

On the other hand

dS = a2 sin θ (sin θ cosφ, sin θ sinφ, cos θ) dθ dφ, ∇ψ = ∇x = i,

and ZZΣ

∇ψ ∧ dS =

Z π/2

θ=0

Z 2π

φ=0

i ∧ a2 sin θ (sin θ cosφ, sin θ sinφ, cos θ) dθ dφ

= a2Z π/2

θ=0

Z 2π

φ=0

¡0,− sin θ cos θ, sin2 θ sinφ

¢dθ dφ

= 2πa2Z π/2

θ=0

(0,− sin θ cos θ, 0) dθ

= 2πa2∙µ0,− sin2 θ2

, 0

¶¸π/20

= −πa2j.

Example 106 Let 0 < a < b. Verify Stokes’ Theorem when F = (y, z, x) and Σ is the top halfof the torus generated by rotating the circle (x− b)2 + z2 = a2 about the z-axis.

Solution. The boundary ∂Σ consists of two circles in the z = 0 plane with equations

x2 + y2 = (b− a)2 , x2 + y2 = (b+ a)2 .

If we take the upward pointing normal to Σ then we need to orient the outer circle anti-clockwiseand the inner circle clockwise. SoZ

∂Σ

F · dr =

Z 2π

0

((b+ a) sin t, 0, (b+ a) cos t) · (− (b+ a) sin t, (b+ a) cos t, 0) dt

−Z 2π

0

((b− a) sin t, 0, (b− a) cos t) · (− (b− a) sin t, (b− a) cos t, 0) dt

= − (b+ a)2Z 2π

0

sin2 t dt+ (b− a)2Z 2π

0

sin2 tdt

= π¡(b− a)2 − (b+ a)2

¢= −4πab.

On the other hand curlF =(−1,−1,−1) , and we can parametrise the torus as

r (θ, φ) = ((b+ a sin θ) cosφ, (b+ a sin θ) sinφ, a cos θ) 0 6 φ 6 2π, −π/2 6 θ 6 π/2.

Then

rθ ∧ rφ =

¯¯ i j k

a cos θ cosφ a cos θ sinφ −a sin θ− (b+ a sin θ) sinφ (b+ a sin θ) cosφ 0

¯¯

= a (b+ a sin θ) (sin θ cosφ, sin θ sinφ, cos θ) .

54 STOKES’ AND DIVERGENCE THEOREMS

Page 55: Calculus in Three Dimensions and Applications

Hence ZZΣ

curlF · dS

=

Z π/2

θ=−π/2

Z 2π

φ=0

(−1,−1,−1) · a (b+ a sin θ) (sin θ cosφ, sin θ sinφ, cos θ) dφdθ

= a

Z π/2

θ=−π/2

Z 2π

φ=0

(b+ a sin θ) (− sin θ cosφ− sin θ sinφ− cos θ) dφdθ

= a

Z π/2

θ=−π/2

Z 2π

φ=0

b (− cos θ) + a (− sin θ cos θ) dφdθ

= 2πa

Z π/2

θ=−π/2b (− cos θ) + a (− sin θ cos θ) dθ

= 2πah−b sin θ + a

4cos 2θ

iπ/2−π/2

= −4πab.

Example 107 Verify Stokes’ Theorem when F = (2y, 3x, x2 + y2 + z2) and Σ is the lower halfof the ellipsoid x2/4 + y2/9 + z2/27 = 1.

Solution. Here ∂Σ is the ellipse x2/4+y2/9 = 1 in the xy-plane. If ∂Σ is oriented anti-clockwisethen we need to take the upward pointing normal on Σ.We may parametrise ∂Σ by r (t) = (2 cos t, 3 sin t, 0) and soZ

∂Σ

F · dr =

Z 2π

0

¡6 sin t, 6 cos t, 4 cos2 t+ 9 sin2 t

¢· (−2 sin t, 3 cos t, 0) dt

=

Z 2π

0

¡−12 sin2 t+ 18 cos2 t

¢dt

=

Z 2π

0

((−6− 6 cos 2t) + (9 + 9 cos 2t)) dt

= 6π.

On the other hand we can parametrise the lower half of the ellipsoid as

r (θ, φ) =³2 sin θ cosφ, 3 sin θ sinφ, 3

√3 cos θ

´.

So

rθ ∧ rφ =

¯¯ i j k

2 cos θ cosφ 3 cos θ sinφ −3√3 sin θ

−2 sin θ sinφ 3 sin θ cosφ 0

¯¯

=³9√3 sin2 θ cosφ, 6

√3 sin2 θ sinφ, 6 sin θ cos θ

´,

STOKES’ THEOREM 55

Page 56: Calculus in Three Dimensions and Applications

but this points downwards, so we will take its negative. Also

curlF =

¯¯ i j k

∂∂x

∂∂y

∂∂z

2y 3x x2 + y2 + z2

¯¯ = (2y,−2x, 1) .

Finally, thenZZΣ

curlF · dS

=

Z π

θ=π/2

Z 2π

φ=0

(6 sin θ sinφ,−4 sin θ cosφ, 1) ·³−9√3 sin2 θ cosφ,−6

√3 sin2 θ sinφ,−6 sin θ cos θ

´dφdθ

=

Z π

θ=π/2

Z 2π

φ=0

³−54√3 sin2 θ sinφ cosφ+ 24

√3 sin3 θ cosφ sinφ− 6 sin θ cos θ

´dφdθ

= −2πZ π

θ=π/2

6 sin θ cos θ dθ

= 2π

∙3 cos 2θ

2

¸ππ/2

= 3π (1 + 1) = 6π.

Example 108 Verify Stokes’ Theorem for F = (x2 + 3yz,−2xz, 7y) on Σ, where Σ is that partof the cylindrical surface x2 + y2 = a2 between the planes x + y + z = 0 and x + y + z = h,where h > 0.

Solution. We may parametrise the cylinder as

r (θ, z) = (a cos θ, a sin θ, z)

and orient it with outward pointing normal dS = (cos θ, sin θ, 0) adθ dz. So

curlF =

¯¯ i j k

∂∂x

∂∂y

∂∂z

x2 + 3yz −2xz 7y

¯¯ = (7 + 2x, 3y,−5z) .

ZZΣ

curlF · dS =

Z 2π

θ=0

Z h−a cos θ−a sin θ

z=−a cos θ−a sin θ(7 + 2a cos θ, 3a sin θ,−5z) · (cos θ, sin θ, 0) adz dθ

=

Z 2π

θ=0

Z h−a cos θ−a sin θ

z=−a cos θ−a sin θ

¡7 cos θ + 2a cos2 θ + 3a sin2 θ

¢adz dθ

=

Z 2π

θ=0

¡7 cos θ + 2a cos2 θ + 3a sin2 θ

¢ah dθ

= (2aπ + 3aπ) ah

= 5πa2h.

56 STOKES’ AND DIVERGENCE THEOREMS

Page 57: Calculus in Three Dimensions and Applications

On the other side, we have a disconnected boundary ∂Σ made up of

C1 = (a cos θ, a sin θ,−a cos θ − a sin θ) : 0 6 θ 6 2π ;C2 = (a cos θ, a sin θ, h− a cos θ − a sin θ) : 0 6 θ 6 2π .

As we used the outward pointing normal to orient Σ then we need to orient C1 in the directionof increasing θ but orient C2 in the direction of decreasing θ.If we write x (θ) = a cos θ, y (θ) = a sin θ, z (θ) = −a cos θ − a sin θ then we haveZ

C1

F · dr =

Z 2π

0

¡x (θ)2 + 3y (θ) z (θ) ,−2x (θ) z (θ) , 7y (θ)

¢· dr (θ)Z

C2

F · dr = −Z 2π

0

¡x (θ)2 + 3y (θ) [z (θ) + h] ,−2x (θ) [z (θ) + h] , 7y (θ)

¢· dr (θ) .

Hence Z∂Σ

F · dr =

Z 2π

0

(−3hy (θ) , 2hx (θ) , 0) · dr (θ)

= ah

Z 2π

0

(−3a sin θ, 2a cos θ, 0) · (− sin θ, cos θ, sin θ − cos θ) dθ

= a2h

Z 2π

0

¡3 sin2 θ + 2cos2 θ

¢dθ

= 5πa2h.

Example 109 Let C be a closed curve bounding a smooth surface Σ. Show thatZC

r ∧ dr = 2ZZΣ

dS.

Hence, or otherwise, evaluateZZΣ

dS where Σ is the surface

Σ =

½(x, y, z) : z =

x2

a2+

y2

b2, x2 + y2 < 1

¾.

[You may assume that ∇∧ (u ∧ v) = (v ·∇)u− (∇ · u)v + (∇ · v)u− (u ·∇)v.]

Solution. If we set F = c ∧ r where c is an arbitrary constant vector, then we have

∇∧ (c ∧ r) = (r ·∇) c− (∇ · c) r+ (∇ · r) c− (c ·∇) r= (∇ · r) c− (c ·∇) r [as c is constant]

= 3c− c= 2c

STOKES’ THEOREM 57

Page 58: Calculus in Three Dimensions and Applications

as

(c ·∇) r =µc1

∂x+ c2

∂y+ c3

∂z

¶(x, y, z) = (c1, c2, c3) = c.

So, by Stokes’ Theorem, ZC

(c ∧ r) · dr =ZZΣ

2c · dS

=⇒ c·µZ

C

r ∧ dr¶= c·

⎛⎝ZZΣ

2dS

⎞⎠ .

As c is arbitrary then by Lemma 102ZC

r ∧ dr = 2ZZΣ

dS. (4.3)

The bounding curve of the given surface Σ is

z =x2

a2+

y2

b2, x2 + y2 = 1

which can naturally be parametrised as

r (θ) =

µcos θ, sin θ,

cos2 θ

a2+sin2 θ

b2

¶, 0 6 θ 6 2π.

By (4.3) we have (writing c = cos θ, s = sin θ)

ZZΣ

dS =1

2

Z 2π

0

µc, s,

c2

a2+

s2

b2

¶∧µ−s, c,

µ−1a2+1

b2

¶2cs

¶dθ

=1

2

Z 2π

0

µcs2

b2+(−2cs2 − c3)

a2,c2s

a2+(−s3 − 2c2s)

b2, 1

¶dθ

=1

2

Z 2π

0

µcs2

b2+(−cs2 − c)

a2,c2s

a2+(−s− c2s)

b2, 1

¶dθ

=1

2

∙µs3

3b2+(−s3/3− s)

a2,

¶,−c33a2

+(c+ c3/3)

b2, θ

¸2π0

=1

2[(0, 0, 2π)]

= πk.

58 STOKES’ AND DIVERGENCE THEOREMS

Page 59: Calculus in Three Dimensions and Applications

4.2 The Divergence Theorem

Theorem 110 (Divergence Theorem — Lagrange 1762, Gauss 1813, Green 1825) Let R bea region of R3 with a piecewise smooth boundary ∂R, and let F be a differentiable vector fieldon R. Then ZZZ

R

divF dV =

ZZ∂R

F · dS,

where dS is oriented in the direction of the outward pointing normal from R.

Definition 111 We say that a region R is convex if for any p,q ∈ R the line segmentconnecting p and q is contained in R.

We will only prove the Divergence Theorem for convex regions, though the proof extendswith very little extra work to any region that can be decomposed into convex regions.

Proof. (Not examinable.) Let W be a subset of the xy-plane and α, β continuous functionson W . Let

R =©(x, y, z) ∈ R3 : (x, y) ∈W, α (x, y) 6 z 6 β (x, y)

ªand F =Fk is a differentiable vector field on R. (That is R is z-convex in the sense that theintersection of R with any vertical line z = c is an interval.) The Divergence Theorem in thiscase reads as ZZZ

R

∂F

∂zdV =

ZZ∂R

Fk · dS.

Note that ∂R is made up of three surfaces:

Σ+ =©(x, y, z) ∈ R3 : (x, y) ∈W, z = β (x, y)

ª,

Σ =©(x, y, z) ∈ R3 : (x, y) ∈ ∂W, α (x, y) 6 z 6 β (x, y)

ª,

Σ− =©(x, y, z) ∈ R3 : (x, y) ∈W, z = α (x, y)

ª.

ThenZZZR

∂F

∂zdV =

ZZW

Z β(x,y)

α(x,y)

∂F

∂zdz dA =

ZZW

(F (x, y, β (x, y))− F (x, y, α (x, y))) dA.

Regarding the boundary integral:

on Σ+ : dS =

¯¯ i j k1 0 βx0 1 βy

¯¯ dxdy = ¡−βx,−βy, 1¢ dxdy;

on Σ− : dS = −

¯¯ i j k1 0 αx

0 1 αy

¯¯ dxdy = (αx, αy,−1) dxdy;

on Σ : k · dS = 0.

THE DIVERGENCE THEOREM 59

Page 60: Calculus in Three Dimensions and Applications

Hence we have ZZΣ+

Fk · dS =

ZZW

F (x, y, β (x, y)) dxdy;

ZZΣ−

Fk · dS = −ZZW

F (x, y, α (x, y)) dxdy;

ZZΣ

Fk · dS = 0;

and we have shown ZZZR

∂F

∂zdV =

ZZ∂R

Fk · dS

for the given region R. However, any convex body has the property of being in the form of Rwhen viewed from each of the x, y, z directions. Hence we have shownZZZ

R

divFdV =

ZZ∂R

F · dS

for any convex body.

Remark 112 Stokes’ Theorem and the Divergence Theorem are in fact statements of a moregeneral theorem, also known as Stokes Theorem, which applies in all dimensions. It moregenerally reads: Z

M

dω =

Z∂M

ω

where M is a (compact) oriented n-dimensional manifold (i.e. the n-dimensional equivalent ofa surface) with boundary ∂M and ω is a differential form of degree n−1. A proper appreciationof this result is approximately at fourth year undergraduate level. Note, though, that when n = 1Stokes’ Theorem reads Z b

a

f 0 (x) dx = f (b)− f (a) ,

whenM = [a, b] and ∂M = a, b oriented to sum positively the contribution at b and negativelyat a.

Corollary 113 Let φ be a smooth scalar field defined on a region R ⊆ R3 with a piecewisesmooth boundary. Then ZZZ

R

∇φdV =ZZ∂R

φdS.

60 STOKES’ AND DIVERGENCE THEOREMS

Page 61: Calculus in Three Dimensions and Applications

Proof. Let c be a constant vector and F = cφ. Then

div (cφ) = c ·∇φ+ φdiv c = c ·∇φ

as c is constant. By the Divergence TheoremZZZR

c ·∇φdV =ZZ∂R

cφ · dS, =⇒ c ·

⎛⎝ZZZR

∇φdV

⎞⎠ = c ·

⎛⎝ZZ∂R

φdS

⎞⎠ .

As c is an arbitrary vector then ZZZR

∇φdV =ZZ∂R

φdS

by Lemma 102.

Example 114 Verify the Divergence Theorem when R is the finite region bounded by theparaboloid z = x2 + y2 and the plane x+ y + z = 1, and F = (x, y, z) .

Solution. We already met this region in Example 73. We showed that the top surface of Rprojects vertically down to the set

W =©(x, y) ∈ R2 : (x+ 1/2)2 + (y + 1/2)2 6 3/2

ªwhich is a disc, centre (−1/2,−1/2) and radius

p3/2. Further we calculated the volume of

the region to be 9π/8. As divF = 3 thenZZZR

divF dV = 3Vol (R) =27π

8.

The boundary ∂R is made up of two surfaces

Σ1 =©(x, y, z) : z > x2 + y2, x+ y + z = 1

ª= (x, y, z) : (x, y) ∈W, x+ y + z = 1 ;

Σ2 =©(x, y, z) : z = x2 + y2, x+ y + z 6 1

ª=©(x, y, z) : (x, y) ∈W, z = x2 + y2

ª.

We can parametrise Σ1 and Σ2 as

r1 (u, v) = (u, v, 1− u− v) ; r2 (u, v) =¡u, v, u2 + v2

¢.

Note

(r1)u ∧ (r1)v =

¯¯ i j k1 0 −10 1 −1

¯¯ = (1, 1, 1)

which is outward-pointing from R, and

(r1)u ∧ (r1)v =

¯¯ i j k1 0 2u0 1 2v

¯¯ = (−2u,−2v, 1)

THE DIVERGENCE THEOREM 61

Page 62: Calculus in Three Dimensions and Applications

which is inward-pointing and so we will take its negative. SoZZΣ1

F · dS =ZZW

(u, v, 1− u− v) · (1, 1, 1) dudv =ZZW

dudv = π³p

3/2´2= 3π/2.

For the second surfaceZZΣ2

F · dS =

ZZW

¡u, v, u2 + v2

¢· (2u, 2v,−1) dA

=

ZZW

¡u2 + v2

¢dA

=

Z √3/2

r=0

Z 2π

θ=0

©(−1/2 + r cos θ)2 + (−1/2 + r sin θ)2

ªr dθ dr

=

Z √3/2

r=0

Z 2π

θ=0

©r2 − r cos θ − r sin θ + 1/2

ªr dθ dr

= 2π

Z √3/2

r=0

nr3 +

r

2

odθ dr

= 2π

∙r4

4+

r2

4

¸√3/20

= 2π (9/16 + 3/8) =15π

8.

Hence, in total, we have ZZ∂R

F · dS = 3π

2+15π

8=12π

8+15π

8=27π

8.

Example 115 The twice continuously differentiable function f (x, y, z) is homogeneous of de-gree n, so that

f (tx, ty, tz) = tnf (x, y, z) for all t ∈ R. (4.4)

Prove Euler’s Theorem, which states that

r ·∇f = nf.

Let B be the unit ball x2 + y2 + z2 < 1 and let ∂B be its boundary. Show thatZZZB

f dV =1

n (n+ 3)

ZZZB

∇2f dV,

and hence show that ZZZB

(x− y + z)4 dV =36π

35.

62 STOKES’ AND DIVERGENCE THEOREMS

Page 63: Calculus in Three Dimensions and Applications

Solution. If we differentiate the identity (4.4) with respect to t then we find

x∂f

∂x(tx, ty, tz) + y

∂f

∂y(tx, ty, tz) + z

∂f

∂z(tx, ty, tz) = ntn−1f (x, y, z) .

If we set t = 1 then we arrive at Euler’s Theorem r ·∇f = nf.By the Divergence Theorem, with B as the unit ball, and ∂B its boundary, thenZZZ

B

∇2f dV =ZZZ

B

∇ ·∇f dV =ZZ∂B

∇f · ndS =ZZ∂B

∇f · rdS = n

ZZ∂B

f dS

as n = r on ∂B. On the other hand

∇ · (fr) = (∇f) · r+ f (∇ · r) = nf + 3f = (n+ 3) f.

and so, by the Divergence Theorem again,

(n+ 3)

ZZZB

f dV =

ZZZB

∇ · (fr) dV =ZZ∂B

fr · ndS =ZZ∂B

f dS

as ∂B is the unit sphere. HenceZZZB

f dV =1

n (n+ 3)

ZZZB

∇2f dV,

The function (x− y + z)4 is homogeneous of degree 4 in x, y, z and so thatZZZB

(x− y + z)4 dV

=1

4× 7

ZZZB

∇2 (x− y + z)4 dV

=1

4× 7

ZZZB

36 (x− y + z)2 dV [which is again homogeneous]

=36

4× 7 ×1

2× 5

ZZZB

∇2 (x− y + z)2 dV

=36

4× 7 ×1

2× 5

ZZZB

6 dV

=36

4× 7 ×6

2× 5 ×4π

3

=36π

35.

THE DIVERGENCE THEOREM 63

Page 64: Calculus in Three Dimensions and Applications

Example 116 The vector field F (R) is defined by

F (R) =

ZC

|r−R|2 dr

where r lies on the simple closed curve C. Show that there are constant vectors A and B suchthat F (R) = R ∧A+B. Deduce that

∇∧ F = −4ZZS

dS

where S is any smooth surface spanning C.

Solution. We have from Corollary 103ZZS

∇φ ∧ dS = −ZC

φdr.

So

F (R) =

ZC

|r−R|2 dr = −ZZS

∇¡|r−R|2

¢∧ dS,

where ∇ refers to the variable r and we think of R as a constant vector. Now

∇¡|r−R|2

¢= ∇ ((r−R) · (r−R)) = ∇ (r · r)− 2∇ (r ·R)

but

∇ (r · r) = ∇¡x2 + y2 + z2

¢= (2x, 2y, 2z) = 2r,

∇ (r ·R) = ∇ (R1x+R2y +R3z) = (R1, R2, R3) = R,

so that

F (R) = −ZZS

∇¡|r−R|2

¢∧ dS = −

ZZS

(2r− 2R) ∧ dS = R ∧A+B,

where

A = 2

ZZS

dS, B = −2ZZS

r ∧ dS.

Now, with R as the variable of F, we have

∇∧ F = ∇∧ (R ∧A+B) = ∇∧ (R ∧A) .Recall that

∇∧ (R ∧A) = R (∇ ·A)−A (∇ ·R) + (A ·∇)R− (R ·∇)A = −A (∇ ·R) + (A ·∇)Ras A is constant. Further ∇ ·R = 3 and (A ·∇)R = A, so that

∇∧ F = −3A+A = −2A = −4ZZS

dS.

64 STOKES’ AND DIVERGENCE THEOREMS

Page 65: Calculus in Three Dimensions and Applications

4.3 Applications

Definition 117 A region R ⊆ R3 is said to be simply connected if every simple closed curveC can be continuously deformed to a single point.Specifically, if r : [0, 1] → R is a simple closed curve beginning and ending in p then there

exists a map H : [0, 1]× [0, 1]→ R such that H (t, 1) = r (t) and H (t, 0) = p.Equivalently any continuous map from the unit circle S1 to R can be extended to a map

from the unit disc D to R.

Example 118 R3 is simply connected, as is any plane or line. R2−0 is not simply connected,nor is the cylinder x2 + y2 = a2, nor a torus. R3 − 0 is simply connected though.

Corollary 119 (Existence of a Potential) Let R be a simply connected region and let F bea smooth vector field on R for which curlF = 0. Then there exists a potential φ on R such thatF = ∇φ.

Remark 120 Note that this corollary extends Theorem 62 to a much more general collectionof domains.

Proof. Let p be a fixed point in R and define for any q ∈ R,

φ (q) =

ZC1

F · dr

where C1 is a curve in S from p to q. If C2 is a second such curve then there is a simple closedcurve C formed by C1 followed by C2 in reverse orientation. As R is simply connected then Cis the boundary of a surface Σ. By Stokes’ Theorem thenZ

C

F · dr =ZZΣ

curlF · dS = 0.

This means that

φ (q) =

ZC1

F · dr =ZC2

F · dr

and so φ is a well-defined function on R, dependent only on the variable q and not on thechoice of curve from p to q. Further, arguing as in Theorem 61, we can show that ∇φ = F.

The Divergence Theorem also has important implications for certain boundary-value prob-lems.

Corollary 121 (Uniqueness of the Dirichlet Problem) Let R ⊆ R3 be a path-connectedregion with piecewise smooth boundary ∂R and let f be a continuous function defined on ∂R.Suppose that φ1 and φ2 are such that

∇2φ1 = 0 = ∇2φ2 in R;

φ1 = f = φ2 on ∂R.

Then φ1 = φ2 in R.

APPLICATIONS 65

Page 66: Calculus in Three Dimensions and Applications

Proof. Let ψ = φ1 − φ2, so that

∇2ψ = 0 in R, ψ = 0 on ∂R.

If we consider the function ψ2 then, by the Divergence Theorem and as ∇2 = ∇ ·∇,ZZ∂R

∇¡ψ2¢· dS =

ZZZR

∇2¡ψ2¢dV.

Looking at the LHS,ZZ∂R

∇¡ψ2¢· dS =

ZZ∂R

2ψ∇ψ · dS = 0 as ψ = 0 on ∂R.

On the RHS we have

∇2¡ψ2¢= 2ψ∇2ψ + 2∇ψ ·∇ψ = 2 |∇ψ|2 as ∇2ψ = 0 in R.

Hence ZZZR

2 |∇ψ|2 dV = 0 =⇒ ∇ψ = 0 in R.

As ∇ψ = 0 in R and R is path-connected then ψ is constant throughout R. But ψ = 0 on ∂Rand so by continuity ψ = 0 throughout R.

Corollary 122 (Uniqueness, up to a constant, of the Neumann Problem) Let R ⊆ R3be a path-connected region with piecewise smooth boundary ∂R and let f be a continuous functiondefined on ∂R. Suppose that φ1 and φ2 are such that

∇2φ1 = 0 = ∇2φ2 in R;

∂φ1∂n

= f =∂φ2∂n

on ∂R.

Then φ1 − φ2 is constant in R.

Proof. Let ψ = φ1 − φ2, so that

∇2ψ = 0 in R,∂ψ

∂n= ∇ψ · n = 0 on ∂R.

If we consider the function ψ2, then by the Divergence Theorem and as ∇2 = ∇ ·∇,ZZ∂R

∇¡ψ2¢· dS =

ZZZR

∇2¡ψ2¢dV.

Looking at the LHS,ZZ∂R

∇¡ψ2¢· dS =

ZZ∂R

2ψ∇ψ · ndS = 0 as ∇ψ · n = 0 on ∂R.

66 STOKES’ AND DIVERGENCE THEOREMS

Page 67: Calculus in Three Dimensions and Applications

On the RHS we have

∇2¡ψ2¢= 2ψ∇2ψ + 2∇ψ ·∇ψ = 2 |∇ψ|2 as ∇2ψ = 0 in R.

Hence ZZZR

2 |∇ψ|2 dV = 0 =⇒ ∇ψ = 0 in R.

As ∇ψ = 0 in R then ψ is constant throughout R.

Corollary 123 (Robin (or Mixed) Boundary Problem) Let R ⊆ R3 be a path-connectedregion with piecewise smooth boundary ∂R and let f be a continuous function defined on ∂R.Further let β be a real constant. Suppose that φ1 and φ2 are such that

∇2φ1 = 0 = ∇2φ2 in R;

βφ1 +∂φ1∂n

= f = βφ2 +∂φ2∂n

on ∂R.

(i) If β > 0 then φ1 = φ2 in R.(ii) If β = 0 then φ1 − φ2 is constant in R.(iii) If β < 0 then the solution need not be unique, even up to a constant.

Proof. Let ψ = φ1 − φ2, so that

∇2ψ = 0 in R, βψ +∂ψ

∂n= βψ +∇ψ · n = 0 on ∂R.

If we consider the function ψ2 then, by the Divergence Theorem and as ∇2 = ∇ ·∇,ZZ∂R

∇¡ψ2¢· dS =

ZZZR

∇2¡ψ2¢dV.

Looking at the LHS and noting ψ + β∇ψ · n = 0 on ∂R we haveZZ∂R

∇¡ψ2¢· dS =

ZZ∂R

2ψ (∇ψ · n) dS =ZZ∂R

2ψ (−βψ) dS = −2βZZ∂R

ψ2 dS.

On the RHS we have as before

∇2¡ψ2¢= 2ψ∇2ψ + 2∇ψ ·∇ψ = 2 |∇ψ|2 as ∇2ψ = 0 in R.

Hence

−2βZZ∂R

ψ2 dS =

ZZZR

2 |∇ψ|2 dV.

If β > 0 then the LHS is non-positive and the RHS is non-negative — consequently both arezero and ∇ψ = 0 in R and ψ = 0 on ∂R. Hence ψ = 0 throughout R.If β = 0 then the Robin Boundary Problem is just the Neumann Problem, with which we

have already dealt.The following example shows that solutions need not be unique if β < 0.

APPLICATIONS 67

Page 68: Calculus in Three Dimensions and Applications

Example 124 Let R be the interior of the cylinder x2 + y2 = 1. Find two solutions to theRobin Boundary Problem

∇2ψ = 0 in R, ψ =∂ψ

∂non ∂R.

Solution. Laplace’s equation in cylindrical polars reads

∇2ψ = 1

r

∂r

µr∂ψ

∂r

¶+1

r2∂2ψ

∂θ2+

∂2ψ

∂z2= 0.

We know for ψ = rn sinnθ, where n is a non-negative integer, that ∇2ψ = 0 and on theboundary r = 1 we have

∂ψ

∂n=

∂ψ

∂r= nrn−1 sinnθ = n sinnθ; ψ = sinnθ.

Hence when n = 1, we see r sin θ satisfies the given boundary problem. Other solutions are 0,r cos θ and r sin (θ − α) for arbitrary α so we see this solution is far from unique.

Finally, as a last application, we use the Divergence Theorem to rederive the heat equation.We need to following lemma first.

Lemma 125 If φ : R3 → R is a continuous scalar field such thatZZZR

φdV = 0

for all bounded subsets R, then φ ≡ 0.

Proof. Suppose, for a contradiction that φ (p) 6= 0 for some point p. Without any loss ofgenerality let’s suppose φ (p) > 0. Let ε = 1

2φ (p) > 0. Then, by the continuity of φ at p, there

exists δ > 0 such that|φ (x)− φ (p)| < ε when |x− p| < δ.

In particular, φ (x) > 12φ (p) on all of B (p, δ) = x ∈ R3 : |x− p| < δ and soZZ Z

B(p,δ)

φdV >1

2φ (p)×Vol (B (p, δ)) > 0

which is a contradiction.

Theorem 126 Let T (x, t) denote the temperature at position x and at time t in an isotropicmedium R with thermal conductivity k, density ρ, specific heat c with heat flow determined byFourier’s Law which states that

q = −k∇Twhere q is the heat flux. Then T satisfies the heat equation

∂T

∂t=

k

ρc∇2T.

68 STOKES’ AND DIVERGENCE THEOREMS

Page 69: Calculus in Three Dimensions and Applications

Proof. Let S ⊆ R be an arbitrary subset of R. The total heat energy in S equalsZZZS

ρcT dV.

The amount of heat flowing out of S is given by the flux integralZZ∂S

q · dS.

So if no heat is generated within S then the only heat loss or gain is via the boundary ∂S.Hence we have

d

dt

ZZZS

ρcT dV = −ZZ∂S

q · dS

=

ZZ∂S

k∇T · dS [by Fourier’s Law]

=

ZZZS

∇ · (k∇T ) dV [by the Divergence Theorem]

=

ZZZS

k∇2T dV.

So ZZZS

ρc∂T

∂tdV =

ZZZS

k∇2T dV,

=⇒ZZZ

S

µρc∂T

∂t− k∇2T

¶dV = 0.

As this is true for an arbitrary subset S of R then it follows, from Lemma 125, that

ρc∂T

∂t− k∇2T = 0 throughout R.

APPLICATIONS 69

Page 70: Calculus in Three Dimensions and Applications

5. GRAVITY

Definition 127 (Newton’s Law of Gravity) The gravitational field associated with amass M at the origin O is

f = −GMr3r = −GM

r2er.

The gravitational force on a particle of mass m at position vector r is

F = mf = −GMm

r2er.

Here G is the gravitational constant 6.67300× 10−11m3kg−1s−2.

Proposition 128 The gravitational field f is conservative with gravitational potential

φ =GM

r.

Recall that potentials are determined by the field only up to a constant. This choice of potentialis such that φ→ 0 as r →∞.

Proof. For a spherically symmetric function f (r) then ∇f = f 0 (r) er and so we have

∇φ = ∇µGM

r

¶= −GM

r2er

as required.

So we have that curl f = 0, but it is also the case that

div f = ∇2φ = 1

r2d

dr

µr2dφ

dr

¶=1

r2d

dr

µr2µ−GMr2

¶¶= 0, r 6= 0,

and∇2φ = 0 for gravitational potential in vacuo.

This is physically intuitive as, aside from at the origin, there is no other mass contributing tothe gravitational field.

Proposition 129 The gravitational potential φ = GM/r is the amount of work gravity doesto bring a unit mass from ∞ to r.

Proof. The work done by gravity bring a unit mass from ∞ to r isZ r

∞F · dr =

Z r

∞1f · dr = φ (r)− φ (∞) = φ (r) .

GRAVITY 71

Page 71: Calculus in Three Dimensions and Applications

Definition 130 The gravitational potential energy of a mass m at r equals −mφ (r).

Remark 131 In some texts, particularly older texts, gravitational potential Φ is defined to bethe gravitational energy per unit mass; in such texts then Φ = −φ and f = −∇Φ.

Example 132 A particle of massM is placed at the origin (and stays there). A second particleof mass m is free to move along the x-axis and is released from rest at distance a from O. Findthe time that it takes to hit the origin.

Solution. The force on the second mass is F = mx = −GMm/x2 and so we have thedifferential equation

d2x

dt2=−GMx2

If we multiply both sides by dx/dt then we have

d2x

dt2dx

dt=−GMx2

dx

dt

and integrate this with respect to t then we have

1

2

µdx

dt

¶2=

GM

x+ constant.

Notice that this is essentially the energy equation

1

2m

µdx

dt

¶2| z +kinetic energy

−GMm

x| z potential energy

= E.

As the particle starts out at rest from x = a then we have

1

2

µdx

dt

¶2=

GM

x− GM

a=

GM (a− x)

ax.

So we havedx

dt= −

r2GM (a− x)

ax,

taking the negative square root as the particle moves in the direction of decreasing x. Thisgives

−r

a

2GM

Z x=0

x=a

rx

a− xdx =

Z t=T

t=0

dt = T.

So

T =

ra

2GM

Z a

x=0

rx

a− xdx

=

ra

2GM

Z a

x=0

ra sin2 θ

a cos2 θ(2a sin θ cos θ) dθ [setting x = a sin2 θ]

= 2a

ra

2GM

Z π/2

0

sin2 θ dθ =πa

2

ra

2GM.

72 GRAVITY

Page 72: Calculus in Three Dimensions and Applications

If we were now faced with n particles of massMi at points with position vectors ri then thegravitational potential φ and field f would be given by

φ (p) =nXi=1

GMi

|p− ri|, f (p) = −

nXi=1

GMi (p− ri)|p− ri|3

.

Suppose instead, in the continuous case, we have matter of density ρ (r) occupying a region R;then the potential φ and field f are given by

φ (p) =

ZZZR

Gρ (r) dV

|p− r| , f (p) = −ZZZ

R

Gρ (r) (p− r) dV|p− r|3

.

Example 133 A uniform wire of mass M occupies (x, 0, 0) : −a 6 x 6 a. Find the gravita-tional potential and field at (x, 0, 0) where a < x.

Solution. The gravitational potential φ (x) is given by the integral

φ (x) =

Z a

−a

Gρ ds

|(x, 0, 0)− (s, 0, 0)| =Z a

−a

Gρ ds

|x− s| =Z a

−a

Gρds

x− s,

where M = 2ρa. So

φ (x) = [−Gρ log (x− s)]a−a= Gρ (log (x+ a)− log (x− a))

=GM

2alog

µx+ a

x− a

¶.

Then the field f (x) = φ0 (x) equals

f (x) =GM

2a

½1

x+ a− 1

x− a

¾=

GM

2a

µ−2a

x2 − a2

¶=−GMx2 − a2

.

Example 134 A uniform disc of massM and radius a occupies (x, y, 0) : x2 + y2 6 a2 . Findthe gravitational field at (0, 0, z).

Solution. Let the density of the disc be σ per unit area so that M = πa2σ. Then

f (z) = f (0, 0, z) = −Z a

r=0

Z 2π

θ=0

Gσ ((0, 0, z)− (r cos θ, r sin θ, 0))|(0, 0, z)− (r cos θ, r sin θ, 0)|3

r dθ dr

= Gσ

Z a

r=0

Z 2π

θ=0

((r cos θ, r sin θ,−z))(r2 + z2)3/2

r dθ dr

= −2πGσzkZ a

r=0

r dr

(r2 + z2)3/2

= −2πGσzkh−¡r2 + z2

¢−1/2ia0

= −2πGσzkµ1

z− 1√

a2 + z2

¶.

GRAVITY 73

Page 73: Calculus in Three Dimensions and Applications

Example 135 A uniform ball mass M occupies (x, y, z) : x2 + y2 + z2 6 a2. Find the grav-itational potential at (0, 0, z) where a < z. What is the gravitational potential at the point(0, 0, z) where 0 < z < a?

Solution. Let ρ denote the density of the ball so that M = 4πa3ρ/3. Using spherical polarco-ordinates we see that the potential is given by

φ (p) =

Z a

r=0

Z 2π

φ=0

Z π

θ=0

Gρ r2 sin θ

|(0, 0, z)− (r sin θ cosφ, r sin θ sinφ, r cos θ)| dθ dφdr

=

Z a

r=0

Z 2π

φ=0

Z π

θ=0

Gρ r2 sin θqr2 sin2 θ + (z − r cos θ)2

dθ dφdr

= 2πGρ

Z a

r=0

Z π

θ=0

r2 sin θ√r2 − 2zr cos θ + z2

dθ dr

= 2πGρ

Z a

r=0

r2∙√

r2 − 2zr cos θ + z2

zr

¸πθ=0

dr

=2πGρ

z

Z a

r=0

r√r2 + 2zr + z2 − r

√r2 − 2zr + z2 dr

=2πGρ

z

Z a

r=0

r (r + z)− r |r − z| dr

=2πGρ

z

Z a

r=0

r (r + z)− r (z − r) dr [as z > a > r]

=2πGρ

z

Z a

r=0

2r2 dr

=2πGρ

z

∙2r3

3

¸a0

=4πGρa3

3z=

GM

z.

If we are inside the sphere at (0, 0, z) then much of the above calculation applies, until we arriveat the line

φ (p) =2πGρ

z

Z a

r=0

r (r + z)− r |r − z| dr

=2πGρ

z

½Z a

r=0

r (r + z) dr −Z z

r=0

r |r − z| dr −Z a

r=z

r |r − z| dr¾

=2πGρ

z

½Z a

r=0

r (r + z) dr −Z z

r=0

r (z − r) dr −Z a

r=z

r (r − z) dr

¾=

2πGρ

z

½∙−r

3

3− r2z

2

¸a0

−∙r2z

2− r3

3

¸z0

−∙r3

3− r2z

2

¸az

¾=

2πGρ

z

½−a

3

3− a2z

2− z3

2+

z3

3− a3

3+

a2z

2+

z3

3− z3

2

¾=

2πGρ

3

©3a2 − z2

ª=

GM

2a

½3− z2

a2

¾.

74 GRAVITY

Page 74: Calculus in Three Dimensions and Applications

By symmetry, then, for a uniform sphere of radius a, we have

φ (r) =

(2πGρ33a2 − r2 = GM

2a

n3− r2

a2

o. r 6 a

4πGρa3

3r= GM

rr > a

where r = |r| .

In particular we have shown:

Proposition 136 The gravitational potential (and similarly the gravitational field) outside auniform sphere of mass M and radius a are equal to the gravitational potential (respectivelyfield) of a point mass M placed at the centre of the sphere.

In the previous example note that

φ (a+) =4πGρa3

3a=4πGρa2

3,

φ (a−) =2πGρ

3

©3a2 − a2

ª=4πGρa2

3,

so we have continuity in the potential φ across the boundary r = a. Further

f (r) = ∇φ = ∂φ

∂r=

½−4πGρr

3r 6 a

−4πGρa33r2

r > a

and so

f (a+) = −4πGρa

3, f (a−) = −

4πGρa3

3a2= −4πGρa

3,

and we likewise have continuity in the field f across the boundary r = a.Note also

∇2φ = 1

r2d

dr

µr2dφ

dr

¶=

⎧⎨⎩1r2

ddr

³−4πGρr3

3

´r 6 a

1r2

ddr

³−4πGρa3

3

´r > a

=

½−4πGρ r 6 a0 r > a.

This is our first view of Poisson’s Equation

∇2φ = −4πGρ

which applies in both regions r < a and r > a.

What follows is a somewhat informal (and off-syllabus) motivation for the more generalPoisson equation.

Note that, for a ball B radius a centred at the origin, and with f (r) = r/r3 = er/r2,ZZ∂B

f · dS =ZZ∂B

era2· (er dS) =

1

a2

ZZ∂B

dS =4πa2

a2= 4π.

GRAVITY 75

Page 75: Calculus in Three Dimensions and Applications

A direct calculation shows that

∇ ·³ rr3

´= 0 for r 6= 0,

but the Divergence Theorem (improperly applied to a discontinuous function) "should" giveZZZB

∇ ·³ rr3

´dV =

ZZ∂B

r

r3· dS = 4π,

and this would be true for any size sphere (or indeed region) containing the origin. So, for ageneral region R, we have thatZZZ

R

∇ ·³ rr3

´dV =

½4π if 0 ∈ R,0 if 0 6∈ R.

The shorthand for this is to write

∇ ·³ rr3

´= 4πδ (r)

where δ is theDirac Delta Function. This function has the important filtering property thatZZZR

φ (r) δ (r− a) dV = φ (a) .

(All the above can, in fact, be made rigorous as part of the theory of distributions or gener-alized functions which were developed by Schwartz in the 1940s.)

Theorem 137 (Poisson’s Equation) Let φ be the gravitational potential associated with anon-uniform material of density ρ (r) occupying a region R. Then

∇2φ = −4πGρ (r) .

Proof. (Non-examinable for the general case.) The gravitational field associated withthis matter is given by

f (p) = ∇φ (p) = −ZZZ

R

Gρ (r) (p− r)|p− r|3

dV.

Then ∇2φ (p) equals

∇ · f (p) = −ZZZ

R

Gρ (r) ∇ ·µ(p− r)|p− r|3

¶dV = −

ZZZR

Gρ (r) δ (r− p) dV = −4πGρ (p) .

76 GRAVITY

Page 76: Calculus in Three Dimensions and Applications

Example 138 A spherical shell, centred at O and with internal and external radii a and brespectively, has matter distribution with density ρ given by

ρ (r) =

½1/r 0 < a 6 r 6 b,0 otherwise.

Find the gravitational potential at all points in space.[You may assume that the spherically symmetric form of Laplace’s equation is such that

∇2φ (r) = 1r2

ddr

¡r2 dφdr

¢.]

Solution. Method One — Poisson’s Equation.By Poisson’s equation gravitational potential φ satisfies

∇2φ = 1

r2d

dr

µr2dφ

dr

¶=

⎧⎨⎩ 0 r < a,−4πG/r a < r < b,

0 b < r.

Solving ∇2φ = 0 in the region r < a we get

1

r2d

dr

µr2dφ

dr

¶= 0,

=⇒ r2dφ

dr= −A,

=⇒ dφ

dr=−Ar2

,

=⇒ φ =A

r+B.

Similarly φ = E/r +B in the region r > b for constants E and F .

In the middle region a < r < b we have

1

r2d

dr

µr2dφ

dr

¶=−4πG

r

=⇒ d

dr

µr2dφ

dr

¶− 4πGr

=⇒ r2dφ

dr= −2πGr2 − C

=⇒ dφ

dr= −2πG− C

r2

=⇒ φ = −2πGr + C

r+D.

So, for constants A,B,C,D,E, F, we have

φ (r) =

⎧⎨⎩Ar+B r < a,

−2πGr + Cr+D a < r < b,

Er+ F b < r.

GRAVITY 77

Page 77: Calculus in Three Dimensions and Applications

We can use certain conditions now to determine these constants:(i) because of physical considerations φ is finite at r = 0,(ii) φ is both continuous and differentiable at both r = a and at r = b,(iii) φ is unique only up to addition by a constant — to specify φ uniquely we typically

stipulate that φ (r)→ 0 as r →∞.

From condition (i) we have that A = 0 and from (iii) that F = 0. The two boundaryconditions at r = a, namely that φ (a−) = φ (a+) and φ0 (a−) = φ0 (a+) , tell us that

B = −2πGa+ C

a+D,

0 = −2πG− C

a2.

Similar conditions at r = b give us that

−2πGb+ C

b+D =

E

b,

−2πG− C

b2= −E

b2.

The second equation shows C = −2πGa2 and the fourth then shows E = 2πG (b2 − a2) . Thethird equation then yields

D =2πG (b2 − a2)

b+ 2πGb+

2πGa2

b= 4πGb.

Finally the first equation gives

B = −2πGa− 2πGa+ 4πGb = 4πG (b− a) .

Hence we have

φ (r) =

⎧⎪⎨⎪⎩4πG (b− a) r < a,

−2πGr − 2πGa2

r+ 4πGb a < r < b,

2πG(b2−a2)r

b < r.

Because of the symmetry of the above problem, we can take another approach using Gauss’Flux Theorem.

Theorem 139 (Gauss’ Flux Theorem) For a smooth and bounded region R, which containsmatter of total mass M , then ZZ

∂R

f · dS = −4πGM.

This result is in fact equivalent to Poisson’s equation.

78 GRAVITY

Page 78: Calculus in Three Dimensions and Applications

Proof. Poisson’s equation gives us that

∇2φ = −4πGρ

where ρ (r) is the density of the matter. Applying the Divergence Theorem we haveZZ∂R

f · dS =ZZZ

R

∇ · f dV =ZZZ

R

∇2φdV = −4πGZZZ

R

ρdV = −4πGM.

Conversely suppose that we know ZZ∂R

f · dS = −4πGM

for any bounded region R. ThenZZZR

∇2φdV = −4πGZZZ

R

ρdV

and so ZZZR

¡∇2φ+ 4πGρ

¢dV = 0 for any bounded region R.

Hence (at least if ∇2φ and ρ are piecewise continuous) we have

∇2φ+ 4πGρ ≡ 0.

Solution. (to Example 138) Method Two - Gauss’ Flux Theorem.Alternatively we may use Gauss’ Flux Theorem applied to concentric spheres centred on

the shell’s centre. Now φ is only dependent on r and so constant on the sphere r = R, whichhas surface area 4πR2. So if we apply the flux theorem to the region r 6 R we haveZ Z

r=R

∇φ · dS =Z Zr=R

φ0 (R) er · dS =Z Zr=R

φ0 (R) dS = 4πR2φ0 (R) = −4πGM (R)

where M (R) is the total mass within the region r 6 R and as the . For a 6 R 6 b we have

M (R) =

Z R

r=a

Z π

θ=0

Z 2π

α=0

1

rr2 sin θ dα dθ dr

= 2π × [− cos θ]π0 ×Z R

r=a

r dr

= 2π¡R2 − a2

¢.

GRAVITY 79

Page 79: Calculus in Three Dimensions and Applications

Hence

φ0 (R) =

⎧⎪⎪⎨⎪⎪⎩0 R < a,

2πG³

a2

R2− 1´

a < R < b,

2πG(a2−b2)R2

b < R.

If we integrate we have

φ (R) =

⎧⎪⎪⎨⎪⎪⎩A R < a,

B − 2πG³a2

R+R

´a < R < b,

2πG(b2−a2)R

+ C b < R.

As φ (∞) = 0 then C = 0. As φ (b−) = φ (b+) then

B − 2πGµa2

b+ b

¶=2πG (b2 − a2)

b=⇒ B = 4πGb.

Finally as φ (a−) = φ (a+) then

A = 4πGb− 2πGµa2

a+ a

¶= 4πG (b− a) ,

and we have the same expressions for φ as were achieved by the previous method.

Example 140 (i) A thin disc of uniform mass per unit area σ has radius R. Find the gravita-tional potential at a height z directly above the centre of the disc. Hence, or otherwise, calculatethe gravitational field at this point due to the disc.(ii) Deduce that the gravitational field at the apex of a cone of uniform density ρ, height h

and semiangle α has magnitude 2πGρh (1− cosα).(iii) Consider the Earth to be a sphere of uniform density ρ, mass M0 and radius R0. A

mountain on the surface of the Earth is modelled by a cone of height h, density 2ρ and semiangleα. Take h to be small compared to R0 and show that to first order in h the gravitational fieldat the top of the mountain has magnitude

F =GM0

R20− 2GM0

R30

µ1− 3

2(1− cosα)

¶h.

As h increases does F become stronger or weaker? [You may assume without proof that thegravitational field external to a uniform sphere is as if all the mass were concentrated at thecentre of the sphere.]

Solution. (i) The distance from (0, 0, z) to an infinitesimal piece of mass σr dr dθ at (r, θ) inthe disc is

√r2 + z2. Hence the gravitational potential at (0, 0, z) is

φ (0, 0, z) =

Z R

r=0

Z 2π

θ=0

G (σr dθ dr)√r2 + z2

= 2πGσ

Z R

r=0

r dr√r2 + z2

= 2πGσh√

r2 + z2ir=Rr=0

= 2πGσ³√

R2 + z2 − z´.

80 GRAVITY

Page 80: Calculus in Three Dimensions and Applications

The gravitational field at this point is ∇φ, but as ∂φ/∂x = ∂φ/∂y = 0 due to the symmetry ofthe disc, then

f = ∇φ = ∂φ

∂zk = 2πGσ

µz√

R2 + z2− 1¶k.

(ii) The field at the apex of the cone (uniform density ρ, height h and semiangle α) canbe found by considering the infinitesimal contribution from the horizontal cross-sections atdistance z away (0 6 z 6 h) of radius z tanα. Hence the field equals

k

Z h

z=0

2πGρ

⎛⎝ zq(z tanα)2 + z2

− 1

⎞⎠ dz

= 2πGρk

Z h

z=0

µ1√

tan2 α+ 1− 1¶dz

= 2πGρhk

µ1√sec2 α

− 1¶

= 2πGρh (1− cosα) (−k) .

So the magnitude of the field is 2πGρh (1− cosα) in a vertically downward direction.(iii) The strength of the field associated with the mountain is 4πGρh (1− cosα). The field

strength associated with the rest of the planet is

GM0

(R0 + h)2,

as it can be considered as a single point mass at distance R0+h away. So the combined field is

f =GM0

(R0 + h)2+ 4πGρh (1− cosα)

=GM0

R20

µ1 +

h

R0

¶−2+ 4πG

µ3M0

4πR30

¶h (1− cosα) [as

4πρR303

=M0]

=GM0

R20

µ1− 2h

R0

¶+G

µ3M0

R30

¶h (1− cosα) +O

õh

R0

¶2!

=GM0

R20− 2GM0

R30

µ1− 3

2(1− cosα)

¶h+O

õh

R0

¶2!,

as required.Note

df

dh= −2GM0

R30

µ1− 3

2(1− cosα)

¶< 0

provided α < cos−1 13≈ 70, (this not being the case is unrealistic for a mountain), and so the

field at the summit is less for higher mountains.

GRAVITY 81

Page 81: Calculus in Three Dimensions and Applications

Example 141 A solid hemisphere, radius a, has density λr where λ is a positive constant andr is the distance from the centre, O, of its plane face. Taking the z-axis along the line joiningO to a point on the rim, find the gravitational potential at the point (0, 0, c), where c > a. Findalso the potential if 0 < c < a.Find the gravitational field in the direction of the z-axis at the point (0, 0, 2a) .

Solution. Assume, without loss of generality, the sphere to be in the half-space x > 0. Thedistance from (0, 0, c) to an infinitesimal piece of mass (λr) r2 sin θ dr dθ dφ at (r, θ, φ) in thehemisphere is q

(r sin θ cosφ)2 + (r sin θ sinφ)2 + (c− r cos θ)2

=pr2 sin2 θ + c2 − 2rc cos θ + r2 cos2 θ

=√r2 − 2rc cos θ + c2.

Hence the gravitational potential at (0, 0, c) isZ r=a

r=0

Z θ=π

θ=0

Z φ=π/2

φ=−π/2

G (λr) r2 sin θ dφdθ dr√r2 − 2rc cos θ + c2

= πGλ

Z r=a

r=0

Z θ=π

θ=0

r3 sin θ dθ dr√r2 − 2rc cos θ + c2

= πGλ

Z r=a

r=0

∙1

rc

√r2 − 2rc cos θ + c2

¸θ=πθ=0

r3 dr

=πGλ

c

Z r=a

r=0

³√r2 + 2rc+ c2 −

√r2 − 2rc+ c2

´r2 dr

=πGλ

c

Z r=a

r=0

(r + c− |r − c|) r2 dr.

If c > a > r then |r − c| = c− r and so the potential at (0, 0, c) equals

πGλ

c

Z r=a

r=0

((r + c)− (c− r)) r2 dr

=πGλ

c

Z r=a

r=0

((r + c)− (c− r)) r2 dr

=πGλ

c

Z r=a

r=0

2r3 dr

=πGλa4

2c.

82 GRAVITY

Page 82: Calculus in Three Dimensions and Applications

If a > c > 0 then |r − c| = c − r for 0 6 r 6 c and |r − c| = r − c for c 6 r 6 a. So thepotential at (0, 0, c) equals

πGλ

c

Z r=a

r=0

(r + c− |r − c|) r2 dr

=πGλ

c

½Z r=c

r=0

(r + c− (c− r)) r2 dr +

Z r=a

r=c

(r + c− (r − c)) r2 dr

¾=

πGλ

c

½Z r=c

r=0

2r3 dr +

Z r=a

r=c

2cr2 dr

¾=

πGλ

c

µc4

2−µ2ca3

3− 2c

4

3

¶¶= πGλ

µ7c3

6− 2ca

3

3

¶.

The z-component of the field equals ∇φ · k = ∂φ/∂c. For the range c > a this is given by

∂φ

∂c=d

dc

µπGλa4

2c

¶=−πGλa42c2

.

When c = 2a this equals−πGλa2

8.

GRAVITY 83

Page 83: Calculus in Three Dimensions and Applications

CALCULUS IN THREE DIMENSIONS AND APPLICATIONSSHEET 1 (for week 2 tutorials) — Div, Grad and Curl. Line Integrals.

1. (a) Show directly that ∇2(φψ) = φ∇2ψ + 2∇φ ·∇ψ + ψ∇2φ for scalar fields φ and ψ.(b) Using the formulae from Remark 29 show ∇∧(f ∧ g) = f (∇ · g)−g (∇ · f)+(g ·∇) f−(f ·∇)g.

2. Let φ (x, y, z) = y2 − xz and f (x, y, z) = (z2, x2, y2) . Find ∇φ, ∇∧ f and ∇ · f .For the orthonormal basis e1 = (0,−1, 0) , e2 = (1, 0,−1) /

√2, e3 = (1, 0, 1) /

√2, and create new

co-ordinates X,Y,Z such that

Xe1 + Y e2 + Ze3 = xi+ yj+ zk.

Determine x, y, z in terms of X,Y, Z. Find also Φ, F1, F2, F3 such that Φ (X,Y, Z) = φ (x, y, z) andF1e1 + F2e2 + F3e3 = f1i+ f2j+ f3k. Verify, by direct calculation, Corollary 19 for the given φ, f .

3. Let r and θ denote plane polar co-ordinates and set er = (cos θ, sin θ, 0) and eθ = (− sin θ, cos θ, 0) .Let F (r, θ) = Frer + Fθeθ be a vector field. Prove that

∇ · F = 1

r

∂r(rFr) +

1

r

∂Fθ

∂θ.

4. (a) Calculate the arc length of the parametrised curve r (t) = (log t, 2t, t2) where 1 6 t 6 e.(b) Let C be the ellipse formed by intersecting the cylinder x2 + y2 = 1 and the plane z = 2y + 1,and let f (x, y, z) = (y, z, x). Calculate

RCf · dr.

5.Let f(x, y, z) = (y/ (x2 + y2) ,−x/ (x2 + y2) , 0) where (x, y) 6= (0, 0).(a) Show that curl f = 0.(b) Find

RCf · dr for each of the following closed curves C.

(i) C is parametrised by r (t) = (cos t, sin t, 0) for 0 6 t 6 2π.(ii) C is parametrised by

r (t) =

½(cos t, sin t, t) 0 6 t 6 4π,(1, 0, 8π − t) 4π 6 t 6 8π.

(iii) C is the square with vertices (0, 1) , (1, 1) , (1, 2) , (0, 2) with an anticlockwise orientation.(c) Find a scalar field φ such that f = ∇φ on R1 = (x, y, z) : y > 0. How does the existence of φrelate to your answer to 5(b)(iii)?(d) Show that there does not exist ψ such that f = ∇ψ on R2 = (x, y, z) : (x, y) 6= (0, 0).

6. (a) With f as in question 5, show that div f = 0.(b) Suppose that a particle (x (t) , y (t)) moves according to the flow

dx/dt = y/¡x2 + y2

¢, dy/dt = −x/

¡x2 + y2

¢.

Show that, on changing to polar co-ordinates (r, θ) these differential equations become

dr/dt = 0, dθ/dt = −1/r2.

(c) Suppose that particles initially occupy the region R0 = (r, θ) : 0 < a < r < b, 0 < θ < α < π/2.If the particles move according to the above flow, describe the region Rt which they occupy a shorttime t afterwards. Sketch R0 and Rt, and show that the regions have the same area.

Page 84: Calculus in Three Dimensions and Applications

CALCULUS IN THREE DIMENSIONS AND APPLICATIONSSHEET 2 (for week 3 tutorials) — Potentials. Line, Surface and Volume Integrals.

1. (a) Let F (x, y, z) = 3x2y2zi+ 2x3yzj+ x3y2k. Show that ∇∧F = 0 and find a potential φ suchthat F = ∇φ. To what extent is φ unique?

Verify by direct calculation that ZC

F · dr = φ (q)− φ (p)

where p = (0, 0, 0) , q = (1, 1, 1) and C is the twisted cubic r (t) = (t, t2, t3) with 0 6 t 6 1.

(b) Let F (x, y, z) = (xy − 1) j+ (y − xz)k. Show that ∇ · F = 0 and find a vector potential f suchthat F = ∇∧ f . To what extent is f unique?

2. Calculate the surface integralsRR

Σf dS and

RRΣf dS where

f(x, y, z) = (x2 + y2 + z2)2

andΣ =

©(x, y, z) ∈ R3 : x2 + y2 = z2, y > 0, 0 6 z 6 2

ª.

Parametrise the various parts of the boundary ∂Σ and determineR∂Σ

f ds andR∂Σ

f dr.

3. Determine ZZZD

e−x−y−z dV

where D is the tetrahedron with vertices 0, 2i, 2j and 2k.

4. Show (i) using Cartesian co-ordinates, (ii) using spherical polar co-ordinates, thatZZZdV

(1 + x2 + y2 + z2)2= π2,

the integral being taken over all of the x, y, z-space.

5. Show that ZZZR

divFdV =

ZZ∂R

F · dS

where F (x, y, z) = (y, xy,−z), R is the region volume enclosed by the cylinder x2+y2 = 4, the planez = 0 and the paraboloid z = x2 + y2, and ∂R is the boundary of R.

6. Show that the solid angle at the apex of a cone with semiangle α is 2π (1− cosα) .

If a sphere has radius R and its centre at distance D from an observer, with DÀ R, show that thesphere occupies, as a fraction

1

2

µ1−√D2 −R2

D

¶≈ R2

4D2

of the observer’s view.

Use this to explain how the sun (at radius 7 × 105 km and distance 1.5 × 108 km) and moon (atradius 1.8× 103 km and distance 3.8× 105 km) occupy roughly the same amount of the sky.

Page 85: Calculus in Three Dimensions and Applications

CALCULUS IN THREE DIMENSIONS AND APPLICATIONSSHEET 3 (for week 4 tutorials) — Volume Integrals. Stokes and Divergence Theorems.

1. Find the simple closed curve C in the xy-plane that maximises the integralZC

y3 dx+¡3x− x3

¢dy,

and determine this maximum.

2. Verify the divergence theorem for unit cubeR = [0, 1]3 whereF =¡(x− 1)x2y, (y − 1)2 xy, z2 − 1

¢.

3. The mean value of a function f defined on a region R is given by the formula

μ =1

Vol(R)

ZZZR

f dV .

Find the mean value of the function x2 + y2 + z2 in the region R given by

R = (x, y, z) ∈ R3 : x2 + y2 6 1, 0 6 x 6 y, −1 6 z 6 1.

Find the median of the function f ; this is defined to be the value h such that

Vol ((x, y, z) ∈ R : f (x, y, z) 6 h) = 1

2Vol (R) .

4. Find the volume of the region which lies in the octant x > 0, y > 0, z > 0 and for which

a 6 √yz 6 b, a 6√zx 6 b, a 6 √xy 6 b, where 0 < a < b.

5. Let R be the region 1 < a < r < b, where r is the distance from the origin in R3. Find a solutionof the boundary-value problem

∇2f + 1 = 0 in R,∂f

∂n+ f = 0 on ∂R,

which is a function of r only. Show that this is the only solution, even within the class of notnecessarily radial functions.

6. Let Σ denote that part of the cone x2 + y2 = z2, z > 0 which lies beneath the plane x+ 2z = 1.Let F (x, y, z) = xj.

Show that the projection of ∂Σ vertically to the xy-plane is an ellipse. Parametrise ∂Σ and determineR∂ΣF · dr.

Show that dS · k = dxdy on Σ and verify Stokes’ Theorem for F on Σ.

7. Bymeans of a change to plane polar co-ordinates, or otherwise, determineZZR2

exp (−x2 − y2) dxdy

and hence findR∞−∞ e−t

2dt.

By a suitable change of variables, deduce thatZZZR3

exp¡2xy + 2yz + 2zx− 3x2 − 3y2 − 3z2

¢dxdy dz =

π√π

4.

Page 86: Calculus in Three Dimensions and Applications

CALCULUS IN THREE DIMENSIONS AND APPLICATIONSSHEET 4 (for week 5 tutorials) — Gravity

1. Two planets, modelled as particles of equal mass M , are situated at the points (a, 0, 0) and(−a, 0, 0) and remain there. Show that the gravitational potential at the point (x, 0, 0), where−a < x < a, is

2GMa

a2 − x2,

and find the gravitational field at (x, 0, 0). A space-craft moves along the segment −a < x < a ofthe x-axis under the gravitational attraction of the planets. Write down the equation of motion forthe space-craft and show that x = 0 is a point of unstable equilibrium.

At x = 0 the space-craft fires its motor briefly so as to acquire a speed u(> 0) and heads towardsx = a. By using energy considerations show that the time taken to reach x = a is

T =

Z a

0

sa2 − x2

u2(a2 − x2) + 4GMa

x2dx.

(You are not required to evaluate the integral.)

2. A homogeneous straight wire of mass M lies along the x-axis from (−a, 0, 0) to (a, 0, 0). Showthat the gravitational potential at the point (x, y, 0), where y 6= 0, is

GM

2a

∙sinh−1

µa− x

|y|

¶+ sinh−1

µa+ x

|y|

¶¸and that the x-component of the gravitational field is

GM

2a

µ1

d1− 1

d2

¶,

where d1 and d2 are the distances from (x, y, 0) to the ends of the wire.

3. Show that the gravitational field at the vertex of a homogeneous circular cone is12GM

a2sin2

α

2,

where M is the mass of the cone, a is the radius of the base and α is the semi-vertical angle.

4. A hollow spherical shell has internal radius a and external radius b, and is made of material ofuniform density ρ. Find the gravitational field and the gravitational potential in the three regions0 < r < a, a < r < b, r > b by using (1) the Flux Theorem, and (2) Poisson’s equation.

5. A solid hemisphere of uniform density ρ occupies the region

x2 + y2 + z2 6 a2, z 6 0.Find the gravitational potential due to the hemisphere at the point (0, 0, s) where s > 0. A uniformrod of density m per unit length lies on the z-axis between (0, 0, c) and (0, 0, d) where d > c > 0.Show that the force exerted on the rod by the hemisphere is

ψ (c)− ψ (d)

where

ψ (λ) =2πGmρ

3

Ãa3 + λ3 −

¡a2 + λ2

¢3/2λ

!.