You are on page 1of 68

Maths Methods 2

Spring 2017

Contents
1 Useful Mathematical Results 3
1.1 Trigonometric Identities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.2 Trigonometric functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.3 Determinants of Matrices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.4 Vectors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.4.1 The scalar (or dot) product . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.4.2 The vector (or cross) product . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.5 Differentiation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.5.1 The product rule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.5.2 The quotient rule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.5.3 The chain rule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.6 Integration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
1.7 Integration by parts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
1.7.1 Integration using substitution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
1.8 Polar coordinates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
1.9 3-D coordinate systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
1.9.1 Cylindrical polar coordinates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
1.9.2 Spherical polar coordinates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

2 2D Surface Integrals 13
2.1 Cartesian coordinates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
2.1.1 Polar coordinates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
2.2 Calculating mass and charge density . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
2.3 General Formulas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
2.4 Double integrals from a mathematical point of view . . . . . . . . . . . . . . . . . . . . . 19

3 Surface Areas in 3D 20
3.1 Cartesian coordinates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
3.2 Cylindrical polar coordinates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
3.3 Spherical polar coordinates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
3.4 Scalar and vector fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
3.5 Flux of a vector field . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

4 Volume Integrals 26
4.1 Cartesian, cylindrical polar and spherical polar coordinates . . . . . . . . . . . . . . . . . 26
4.2 Moment of Inertia . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

1
5 Line Integrals 29
5.1 Work done by a force . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
5.2 Line integrals in the x-y plane . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
5.3 Parametric Equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
5.4 Path dependence/independence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
5.5 Closed curves (loops) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
5.6 Conservative fields (or forces) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36

6 Partial derivatives 38
6.1 The chain rule for partial derivatives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
6.2 Higher order partial derivatives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
6.3 Some PDE’s in physics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39

7 Directional derivatives 40
7.1 Directional derivative at a point . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
7.2 The gradient vector, grad . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
7.3 Gradient and physical laws . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
7.4 Differential operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
7.5 Other coordinate systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44

8 The divergence of a vector field 45


8.1 Mathematical approach to divergence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
8.2 Physical approach to divergence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
8.3 Equivalence of the two definitions of divergence . . . . . . . . . . . . . . . . . . . . . . . . 46
8.4 Interpretation of divergence in terms of sources and sinks . . . . . . . . . . . . . . . . . . 47
8.5 The divergence and physical laws . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
8.6 Other coordinate systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
8.7 The scalar operator del squared . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50

9 The curl of a vector field 51


9.1 Mathematical definition of curl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
9.2 Physical definition of curl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
9.3 Local rotation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
9.4 Equivalence of the physical and mathematical definitions of curl . . . . . . . . . . . . . . . 52
9.5 Conservative fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
9.5.1 Operator identities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
9.5.2 The product rule for ∇ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
9.5.3 Repeated use of ∇ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
9.6 Other coordinate systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55

10 Maxwells’ equations 55
10.1 Maxwell’s equations in differential form . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
10.2 Consequences of Maxwells’ equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56

11 Stokes’s and Gauss’s theorems 58


11.1 Stokes’s theorem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
11.2 Gauss’s theorem (divergence theorem) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
11.3 Potential Theory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64

12 The calculus of variations 66


12.1 The shortest distance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
12.2 Euler’s Equation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
12.3 The Brachistochrone Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
12.4 Hamilton’s Principle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
12.5 Noether’s Theorem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67

2
1 Useful Mathematical Results
1.1 Trigonometric Identities
We recall the following useful trigonometric identities:


   

   
   
 H
O

q
A

Figure 1:

sin θ 1 1 1 cos θ
tan θ = , cosecθ = , sec θ = , cot θ = = .
cos θ sin θ cos θ tan θ sin θ
From the well known identity
cos2 θ + sin2 θ = 1 (1.1)
we have
1 + tan2 θ = sec2 θ
and
cot2 θ + 1 = cosec2 θ.
Addition and subtraction formulae:

sin (α ± β) = sin α cos β ± cos α sin β

and
cos (α ± β) = cos α cos β ∓ sin α sin β
If α = β then from the above addition and subtraction formulae we have

sin 2α = 2 sin α cos α

and
cos 2α = cos2 α − sin2 α. (1.2)
Using (1.1) in (1.2) we have
cos 2α = 1 − 2 sin2 α

⇒ sin2 α = 1
2 (1 − cos 2α) . (1.3)
Alternatively we have

cos 2α = 2 cos2 α − 1

⇒ cos2 α = 1
2 (1 + cos 2α) . (1.4)
2 2
The formulas (1.3) and (1.4) are useful when trying to integrate cos θ or sin θ.

3
1.2 Trigonometric functions
In Figure 2 we display graphs of the trigonometric functions sin θ, cos θ, tan θ, csc θ, sec θ and cot θ.

cos(q) sin(q) tan(q)


1 1 10

2p
0 p q 0 p p q 0
p 3p 3p
2 2
2p
2 2
p p 3p 2p q
2 2

-1 -1 -10

csc(q) sec(q) cot(q)


10 10 10

3p
2 p
0 q 0 p 3p 2p q 0 q
p p 2p p p 3p 2p
2 2 2 2 2

-10 -10 -10

Figure 2:

1.3 Determinants of Matrices

For a 2 × 2 matrix we have  


a b
A=
c d

det A = |A| = ad − bc.

For a 3 × 3 matrix we have


 
a b c
A= d
 e f 
g h i


e f
− b d f
d e
det A = |A| = a + c
h i g i g h
= a (ei − hf ) − b (di − gf ) + c (dh − ge) .

1.4 Vectors
Vectors have magnitude and direction.
The vector i has magnitude 1 and points in the increasing x direction. The vector j has magnitude 1
and points in the increasing y direction. The vector k has magnitude 1 and points in the increasing z
direction.
The vectors i, j and k are unit vectors. All unit vectors have magnitude 1 and usually they are written
with hats, e.g. û or v̂.

4
A standard vector

F = Fx i + Fy j + Fz k
has 3 components, Fx , Fy and Fz that are all scalars. Fx is the x component of F, Fy is the y component
of F and Fz is the z component of F.

The magnitude of the vector F is denoted by |F| and is defined by


q
|F| = Fx2 + Fy2 + Fz2 .

A unit vector in the direction of F has magnitude 1 and points in the same direction as F, it is denoted
by
1 1
F̂ = F= (Fx i + Fy j + Fz k) .
|F| |F|

Example 1.1 For the vector


G = 3i + 2j
find the three components Gx , Gy and Gz , then determine the magnitude of G and the unit vector that
points in the same direction as G.

Solution:
The three components Gx , Gy and Gz are

Gx = 3, Gy = 2 and Gz = 0.

Hence the magnitude of G is


q p √
|G| = G2x + G2y + G2z = 32 + 22 + 02 = 13

and the unit vector that points in the same direction as G is


1 1
Ĝ = G = √ (3i + 2j) .
|G| 13
Example 1.2 For the vector
F = 2yi − 3zj + 9z 2 k
find the three components Fx , Fy and Fz and then determine the magnitude of F.

Solution:
The three components Fx , Fy and Fz are

Fx = 2y, Fy = −3z, and Fz = 9z 2

and hence the magnitude of F is


q
2 2 2
|F| = (2y) + (−3z) + (9z 2 )
p
= 4y 2 + 9z 2 + 81z 4 .

5
1.4.1 The scalar (or dot) product

Multiplying vectors is meaningless unless we say what sort of product we are forming. Thus, AB has no
meaning. We must either use the scalar product or the vector product.
The scalar product of 2 vectors A and B is given by

A · B = |A| |B| cos θ


where θ is the angle between the two vectors.

Since cos 0 = 1 and cos π2 = 0 we have

i · i = |i| |i| cos 0 = 1 × 1 × 1 = 1, j·j=1 and k · k = 1.


Furthermore
π
i · j = |i| |j| cos = 1 · 1 · 0 = 0, i·k=0 and j · k = 0.
2

If
A = Ax i + Ay j + Az k and B = Bx i + By j + Bz k

A·B = (Ax i + Ay j + Az k) · (Bx i + By j + Bz k)


= Ax i·Bx i+Ax i·By i+Ax i·Bz i
+Ay i·Bx i+Ay i·By i+Ay i·Bz i
+Az i·Bx i+Az i·By i+Az i·Bz i
= Ax Bx (i · i) + Ax By (i · j) + Ax Bz (i · k)
+Ay Bx (j · i) + Ay By (j · j) + Ay Bz (j · k)
+Az Bx (k · i) + Az By (k · j) + Az Bz (k · k)
= Ax Bx + Ay By + Az Bz .

Example 1.3 For


F = 3yi − 2xk and G = i + 2zj − 3k
calculate F · G.

Solution: We have

F·G = 3y · 1 + 0 · 2z + (−2x) (−3)


= 3y + 6x.

1.4.2 The vector (or cross) product

The vector product of 2 vectors A and B is given by

A × B = |A| |B| sin θn


where n is a unit vector perpendicular to A and B, pointing in the direction given by the right hand
screw rule (i.e. the direction in which a screw would advance if it were turned from A through the angle
θ to B. The cross product can be evaluated by calculating the determinant of the 3 × 3 matrix

6

i j k

A × B = Ax Ay Az
Bx By Bz

Ay Az A Az A Ay
= i − j x + k x
By Bz Bx Bz Bx By
= i (Ay Bz − By Az ) − j (Ax Bz − Bx Az ) + k (Ax By − Bx Ay ) .

Example 1.4 For


A = 3xi − 4k and B = 2i − 9xj + k
evaluate A × B.

Solution: We have

i j k

= i 0
−4 3x −4
+ k 3x
0
A×B = 3x 0 −4 −9x − j

2 −9x 1
1 2 1 2 −9x

= i ((0) (1) − (−9x) (−4)) − j ((3x) (1) − (2) (−4)) + k ((3x) (−9x) − (2) (0))
i (−36x) − j (3x + 8) + k −27x2

=
= −36xi − (8 + 3x) j − 27x2 k.

Remark: A × B 6= B × A

1.5 Differentiation

Given a function f (x), (or f (t)) of a single variable x (or t), we denote the derivative of f (x) by f 0 (x)
df
or dx (or the derivative of f (t) by f˙(t) or df
dt ) The following table gives the derivatives of some common
functions.

f (x) f 0 (x)
xn nxn−1
sin x cos x
cos x − sin x
tan x sec2 x
1
ln |x| x
ex ex

1.5.1 The product rule


If u = u(x) and v = v(x) then

d (uv) du dv
= v+u = u0 v + uv 0 .
dx dx dx

1.5.2 The quotient rule


If u = u(x) and v = v(x) then
d  u  u0 v − uv 0
= .
dx v v2

7
1.5.3 The chain rule

If f = f (u(x)) then
df df du
= .
dx du dx

Example 1.5 For


f (x) = x3 cos x
calculate f 0 (x).

Solution: Sincef (x) = x3 cos x we set

u = x3 and v = cos x

and hence
du dv
= 3x2 and = − sin x
dx dx
so from the product rule we have

df d (uv) du dv
= = v+u
dx dx dx dx
= 3x2 cos x + x3 (− sin x)
= 3x2 cos x − x3 sin x.

Example 1.6 For


ex
f (x) =
sin x
calculate f 0 (x).

Solution: Setting
u = ex and v = sin x
we have
du dv
= ex and = cos x.
dx dx
Hence from the quotient rule we have
u du dv

df d v − u dx
dx v
= =
dx dx v2
ex sin x − ex cos x
= .
sin2 x

Example 1.7 For


f (x) = cos 3x2
calculate f 0 (x).

8
Solution: Setting u = 3x2 we have f (x) = cos 3x2 = cos u and hence

du df d cos u
= 6x and = = − sin u.
dx du du
Thus from the chain rule we have
df df du
= = − sin u · 6x = −6x sin u = −6x sin 3x2 .
dx du dx
Remarks
We note the following useful identities
b
ea+b = ea eb , eab = (ea )
and for a, b > 0 a
ln(ab) = ln a + ln b, ln = ln a − ln b and ln ba = a ln b.
b

1.6 Integration
The following table gives the integrals of some common functions.

R
f (x) f (x)dx
k
kxn n+1 x
n+1
+ c, n 6= −1
1
sin kx - k cos kx + c
1
cos kx k sin kx + c
1 kx
ekx ke +c
k
x k ln |x| + c

1.7 Integration by parts


Recalling the product rule we have
d
(f g) = f 0 g + f g 0
dx
and hence by integration we obtain
Z b Z b Z b
d
(f g) dx = f 0 gdx + f g 0 dx
a dx a a

Z b Z b
b
⇒ [f g]a = f 0 gdx + f g 0 dx.
a a
Manipulating the above equation gives the standard form of integration by parts formula
Z b Z b
b
f 0 gdx = [f g]a − f g 0 dx.
a a

Example 1.8 Use integration by parts to integrate


Z 2
xex dx.
1

9
Solution: We have
Z 2 Z 2
2
xex dx = [xex ]1 − ex dx, g = x ⇒ g 0 = 1, f 0 = ex ⇒ f = ex
1 1
2 2
= [xex ]1 − [ex ]1
2e2 − e − e − 1 2

=
= e2 .

1.7.1 Integration using substitution

Z b Z u(b) Z u(b)  
dx dx
f (x)dx = f (u)du = f (u) du.
a u(a) du u(a) du

Example 1.9 Use integration using substitution to evaluate the following integral
Z 1
3
x 1 + x2 dx.
0

Solution: Setting u = 1 + x2 we have


du dx 1
= 2x ⇒ = , u(0) = 1 + 02 = 1 and u (1) = 1 + 12 = 2
dx du 2x
and hence
Z 1 Z u(1)
2 3 dx
xu3

x 1+x dx = du,
0 u(0) du
Z 2
1
= xu3 du
1 2x
Z 2
1
= u3 du
2 1
 2
1 u4
=
2 4 1
1 4
2 − 14

=
8
15
= .
8

1.8 Polar coordinates

There are two unit vectors associated with polar coordinates: eρ and eφ . They have magnitude 1 and
point in the directions of increasing ρ and φ respectively, also they are perpendicular so that

eρ ⊥ eφ .

Remark 1 We note that eρ and eφ are position dependent unlike i, j and k (i.e. the direction in which
they point depends on where they are in the (x, y) plane).
It is easily shown that eρ = i cos φ + j sin φ and eφ = i sin φ + j cos φ. These can be inverted to give i, j in
terms of eρ and eφ .

Example 1.10 The velocity of a rigid rod rotating with angular speed ω is given by v = ωρeφ .

10
y     

    


r     
j


  
f 
i x

Figure 3:

1.9 3-D coordinate systems

In 3-d there are three commonly used coordinate systems:

coordinate system variables unit vectors


Cartesian (x, y, z) (i, j, k)
Cylindrical (ρ, φ, z) (eρ , eφ , ez (= k))
Spherical (r, θ, φ) (er , eθ , eφ )

    

P(r,f,z)     


z
f


  
r 

y     

Figure 4:

1.9.1 Cylindrical polar coordinates


A point P (x, y, z) can be written in terms of the cylindrical polar coordinates ρ, φ, z such that P (x, y, z) =
P (ρ, φ, z). One can think of P (ρ, φ, z) as being a point on the surface of a cylinder with radius ρ, see
Figure 4.

11
Remark 2 The unit vector ez points in the increasing z-direction (and is in fact k !).

eg glacier flow around a helix v = ueφ + wez .

1.9.2 Spherical polar coordinates


A point P (x, y, z) can be written in terms of the spherical polar coordinates r, θ, φ such that P (x, y, z) =
P (r, θ, φ). One can think of P (r, θ, φ) as being a point on the surface of a sphere with radius r, see Figure
5.
z

P(r,q,f)
      
q r r cosq       
r sinq
    
f

r sinq cosf
r sinq sinf
y

Figure 5:

Remark 3 The unit vectors are such that er points in the increasing r-direction, eθ points in the in-
creasing θ-direction, eφ points in the increasing φ-direction.

eg rocket velocity v = uer ,


eg hurricane air flow v = ueφ + weθ . .

12
2 2D Surface Integrals
2.1 Cartesian coordinates
The area A under a graph y = f (x) between two points x = a and x = b (see Figure 6) can be calculated
by evaluating the integral
Z b
A= f (x)dx.
a
The area A can be approximated by the sum of the areas of N thin strips Si centred at xi with width
∆x and height f (xi ) (see Figure 6)) hence we have

X N
X
A' area of strips Si = f (xi )∆x.
i=1

In the limit as the ∆x → 0 i.e. as the number of strips tends to infinity we have
N
X Z b
f (xi )∆x → f (x)dx = A.
i=1 a

Alternatively we could divide each strip into blocks with centre (xi , yj ), width ∆x and height ∆y
N
X
A' (area of Si )
i=1

where
Mi
X
area of Si = (area of Bj ).
j=1

Hence
N
X
A ' (area of Si )
i=1
Mi
N X
X
= (area of Bj )
i=1 j=1
Mi
N X
X
= ∆y∆x .
| {z }
i=1 j=1
area of Bj

Note that the number of blocks Mi , depends on the height of Si , i.e. the value of f (xi ). In the limit as
f(x i)

y=f(x)
y=f(x)
A
a b
x
a b i

Figure 6:

13
the number of blocks tends to infinity and ∆x and ∆y tend to zero we have

X Mi
N X Z b Z f (x)
∆y∆x → dydx = A.
i=1 j=1
| {z } a 0
area of Bj

In general the area of a 2D surface S can be approximated by

X
A = (area of the surface elements)
X
= dA.

In the limit as the area of the surface element tends to zero we have
Z
A= dA.
S
R RR
Here the integral S
is a double integral i.e. , and the dA is a double integrand i.e. dxdy

(0,1)

(0,0)
(1,0)

Figure 7:

Example 2.1 Calculate the area of the triangle T bounded by the lines x = 0, y = 0 and y = 1 − x.

Solution:
First we draw the triangle T , see Figure 7. We have that
Z Z Z 
area of T = dA = dy dx
T

The inner integral relates to the area of a strip with width ∆x. The base of this strip is at y = 0, the top
varies depending on the position that the strip is along the x-axis (i.e. it is a function of x).

From Figure 7 we see that the top of the strip is 1 − x, so the limits on the inner integral are
Z Z 1−x 
area of T = dy dx.
0
For the limits on the outer integral we recall that this integral is associated with the sum of the strips.
The left hand strip is centred at x = 0 and the right hand one is at x = 1, so we have
Z 1 Z 1−x
area of T = dydx.
0 0
To evaluate a double integral we first evaluate the inner integral and then we evaluate the resulting
integral

14
Z 1 Z 1−x  Z 1  1−x
A= dy dx = y 0 dx
0 0 0
Z 1
= [(1 − x) − 0] dx
0
1 1
x2
Z 
= (1 − x)dx = x −
0 2 0
1
= .
2

2.1.1 Polar coordinates

Dr

rDf

Df
r

Figure 8:

If we want to find the area of a circular or part circular surface we use surface elements derived from
polar coordinates.

The area of a surface element can be approximated by (see Figure 8)

∆A ' ρ∆ρ∆φ.
Thus the area of the surface

X
A ' (area of the surface elements)
XX
' ρ∆ρ∆φ.

In the limit as the area of each surface element tends to zero we have
Z Z Z
A= dA = ρdρdφ.
S | {z }
| {z } dA
S

The limits on the integrals depend on the surface that you are integrating over.

15
Example 2.2 Calculate the area of the annular region S by 0 ≤ φ ≤ π/2 and 1 ≤ ρ ≤ 2.

Solution: First we draw the annular region S, see Figure 9.

(0,2)

(0,1) S

(1,0) (2,0)

Figure 9:

We see that Z Z Z 
area of S = dA = ρdρ dφ
S

From Figure 9 we see that the limits for the ρ integral are 1 and 2, while the limits for the φ integral are
−π/2 and π/2. Thus
π
Z 2
Z 2
area of S = ρdρdφ
0 1
π
Z 2
Z 2 
= ρdρ dφ
0 1
π
2 2
Z  
2 ρ
= dφ
0 2 1
Z π  
2 1
= 2− dφ
0 2
Z π
2 3
= dφ
0 2
3 π
= [φ]02
2
3
= (π − 0)
2

= .
4

2.2 Calculating mass and charge density


The techniques that we have used to calculate the area of surfaces can be applied to calculate the mass
of a 2D object or the charge on a 2D object.

16
If the density of the rectangular plate S bounded by 0 ≤ x ≤ 2 and 0 ≤ y ≤ 1 is given by f (x, y) =
(1 + x2 )(1 + y) kgm−2 we can approximate the mass of S by dividing it up into small surface elements
and summing the masses of each of these elements.
Since for an object with constant density, mass = area x density, we can approximate the mass of a
surface element by its area multiplied by the density at its mid-point

i.e. (mass of S.E.)' ∆x∆yf (xi , yj )


Thus we have Z Z
X X
S= (mass of S.E.) = ∆x∆yf (xi , yj ) → f (x, y)dydx.
i,j

Adding the required limits for x and y gives


Z 2 Z 1
Mass of S = (1 + x2 )(1 + y)dydx
0 0
Z 2 Z 1 
2
= (1 + x )(1 + y)dy dx
0 0
Z 2  Z 1 
2
= (1 + x ) (1 + y)dy dx
0 0
2 1
y2
Z 
= (1 + x2 ) y + dx
0 2 0
Z 2   
2 1
= (1 + x ) 1+ − 0 dx
0 2
Z 2
3
= (1 + x2 )dx
0 2
2
x3

3
= x+
2 3 0
= 7 kg.

Example 2.3 If the charge density on the semi circular disc S in Figure 10 is f (ρ, φ) = 3ρ Cm−2 ,
calculate the total electric charge on S.

Solution: We have X
total charge onS = charge on S.E.
i

charge on S.E. ' area of S.E. × charge density at the mid-point of S.E.(ρi , φj )
= f (ρi , φj )ρ∆ρ∆φ.

So

17
(0,1)

S
(1,0)

(0,−1)

Figure 10:

π
Z 2
Z 1
total charge onS = f (ρ, φ)ρdρdφ
−π
2 0
π
Z 2
Z 1
= 3ρρdρdφ
−π
2 0
π
Z 2
Z 1 
2
= 3ρ dρ dφ
−π
2 0
Z π
2  3 1
= ρ 0 dφ
−π2
Z π
2
= dφ
−π
2
π
= [φ] −π
2

= π C.

2.3 General Formulas


We recall the following useful formulas.

Z
Area of S = dA,
S
Z
Mass of S = f dA where f = density,
S
Z
charge on S = f dA where f = charge density .
S

18
2.4 Double integrals from a mathematical point of view
So far we have been looking at things from a physical point of view. We could have asked the previous
questions in the following mathematical ways:

Example 2.4 Evaluate the integral of the function f (x, y) = (1 + x2 )(1 + y) over the two dimensional
rectangular region with 0 6 x 6 2, 0 6 y 6 1.

Solution:
Z 2 Z 1 Z 2 Z 1
f (x, y)dydx = (1 + x2 )(1 + y)dydx = 7.
0 0 0 0

−π π
Example 2.5 Find the integral of f (ρ, φ) = 3ρ over the semi-circular region 0 6 ρ 6 1, 2 6φ6 2.

Solution:
π
Z 2
Z 1
3ρρdρdφ = π.
−π
2 0

19
3 Surface Areas in 3D
To evaluate the area of a 3D surface we use
Z
A= dA.
S

R RR
As in the case of 2D surface integrals S
is a double integral i.e. , and dA is a double integrand i.e.
dxdy.

3.1 Cartesian coordinates


If we wish to evaluate the surface area (or the mass, or the charge) of the hollow block 0 ≤ x ≤ 7,
0 ≤ y ≤ 5 and 1 ≤ z ≤ 3, we need to break the block up into six 2D surfaces, i.e. its six faces.

On the top and bottom faces of the block x and y vary, and z is constant, so we have
Z 5 Z 7 Z 5 Z 7
area of top = dxdyand area of bottom = dxdy.
0 0 0 0

On the left and right hand faces x and z vary and y is constant, so we have
Z 3 Z 7 Z 3 Z 7
area of left hand face = dxdzand area of right hand face = dxdz.
1 0 1 0

On the remaining two faces y and z vary, and x is constant, so


Z 3 Z 5 Z 3 Z 5
area of front = dydzand area of back = dydz.
1 0 1 0

Example 3.1 Find the integral of f (x, y, z) = 1 + x + y + z over the surface of the hollow block S.

20
Solution: We have
Z Z Z Z Z Z Z
f dA = f dA + f dA + f dA + f dA + f dA + f dA
S top bottom lef t side right side f ront back
Z 5 Z 7   Z 5 Z 7  
= 1+x+y+ z dxdy + 1+x+y+ z dxdy
0 0 (=1) 0 0 (=3)
! !
Z 3 Z 7 Z 3 Z 7
+ 1+x+ y +z dxdz + 1+x+ y +z dxdz
1 0 (=0) 1 0 (=5)
Z 3 Z 5   Z 3 Z 5  
+ 1 + x + y + z dydz + 1 + x + y + z dydz
1 0 (=0) 1 0 (=7)
Z 5 Z 7 Z 5 Z 7
= (1 + x + y + 1) dxdy + (1 + x + y + 3) dxdy
0 0 0 0
Z 3Z 7 Z 3Z 7
+ (1 + x + z) dxdz + (1 + x + 5 + z) dxdz
1 0 1 0
Z 3Z 5 Z 3 Z 5
+ (1 + y + z) dydz + (1 + 7 + y + z) dydz
1 0 1 0
Z 5 Z 7 Z 3 Z 7 Z 3 Z 5
= (6 + 2x + 2y) dxdy + (7 + 2x + 2z) dxdz + (9 + 2y + 2z) dydz
0 0 1 0 1 0
Z 5 7
Z 3 7
Z 3 5
6x + x2 + 2yx 0 dy + 7x + x2 + 2zx 0 dz + 9y + y 2 + 2zy
  
= 0
dz
0 1 1
Z 5 Z 3 Z 3
= (91 + 14y) dy + (98 + 14z) dz + (70 + 10z) dz
0 1 1
5 3  3
91y + 7y 2 + 91z + 7z 2 1 + 70z + 5z 2 1
 
= 0
= 630 + 336 − 98 + 255 − 75 = 1048.

3.2 Cylindrical polar coordinates


z

a
4

0
y

Figure 11:

What about if we wish to find the mass of a hollow cylinder S in Figure 11 whose surface density is
f (ρ, φ, z) = 1 + z 2 ?
R
We use M ass = f dA, but what is dA? First we split the surface of the cylinder into three parts; the
S
top, the base and the curved surface (C.S.), so
Z Z Z
mass = f dA + f dA + f dA.
top base C.S.

21
The top and the base are 2D surfaces, so as in Section 2 we have (see Figure 12)
Z Z 2π Z a Z Z 2π Z a
f dA = f ρdρdφ and f dA = f ρdρdφ
0 0 0 0
top base

with z constant on both surfaces.

On the curved surface we have ρ is constant, and in fact ρ = a where a is the radius of the cylinder.
z

DA1 = (r Df) (Dz)


dA1 = r df dz
Df

r Df

DA1

Dz

DA2 y
Dr
r Df
x

DA2 = (r Df) (Dr)


dA2 = r df dr

Figure 12:

We know that dA is related to the area of a surface element on the curved surface of the cylinder see
figure 12.

So area = a∆φ∆z and hence dA = adφdz.

Thus Z Z 4 Z 2π
f dA = f adφdz.
0 0
C.S.
So Z 2π Z a Z 2π Z a Z 4 Z 2π
mass = f ρdρdφ + f ρdρdφ + f adφdz.
0 0 0 0 0 0
Since f = 1 + z 2 we have

Z 2π Z a   Z 2π Z a   Z 4 Z 2π
2 2
1 + z 2 adφdz

mass = 1+ z ρdρdφ + 1+ z ρdρdφ +
0 0 (=16) 0 0 (=0) 0 0
Z 2π Z a Z 2π Z a Z 4 Z 2π
2

= 17ρdρdφ + ρdρdφ + 1+z adφdz
0 0 0 0 0 0
Z 2π Z 4Z 2π 2
17 2 a
2πa 1 + z 2 dz

= 2 a dφ dφ ++
0 0 2 0
3 4
 
z
= 17πa2 + πa2 + 2πa z +
3 0
= 18πa2 + 50 32 πa.

22
Summary of areas in 2-d:
dA = dxdy
or
dA = ρdρdφ.

3.3 Spherical polar coordinates

z
DA= (r sinq Df) (r Dq)
dA= r2 sinq dq df

r sinq Df
Df

Dq r Dq

Figure 13:

If we want to evaluate the integral of f (r, θ, φ) over the surface of a sphere with radius R we note that
since r is constant (= R) and θ and φ vary on the surface of the sphere we have (see Figure 13)

area of S.E. = R∆θ · R sin θ∆φ


= R2 sin θ∆φ∆θ

and hence
dA = R2 sin θdθdφ.

Remark 4 The angle θ only varies from 0 to π, while the angle φ varies from 0 to 2π (for the whole
surface of a sphere).

Example 3.2 Given a hollow sphere with centre at the origin, radius 2, with charge density f (R, θ, φ) =
sin2 θ + cos2 θ, calculate the total charge on the surface of the sphere.

23
Solution: We have
Z
total charge = f dA (f is charge density)
S
Z π Z 2π
sin2 θ + cos2 θ R2 sin θdφdθ

=
0 0
Z π Z 2π
= 1  22 sin θdφdθ
0 0
Z π Z 2π

= 4 sin θ [φ]0 dθ
0 0
Z π
= 8π sin θdθ
0
= 16π.

Summary of areas in 3-d:


dA = dxdy or dxdz or dydz
or
dA = ρdρdφ
or
dA = R2 sin θdθdφ.

3.4 Scalar and vector fields


A scalar (vector) field is a distribution of scalar values (vector values) on/in a specified surface/region in
space, such that there is a unique scalar (vector) associated with each point on/in the surface/region.

Examples of scalar fields are temperature in a room or pressure in a room.


Examples of vector fields are magnetic flux around a bar magnet or water velocity on the surface of a
river.

3.5 Flux of a vector field


The flux of a vector field F = Fx i+Fy j+Fz k (F = Fρ eρ + Fφ eφ + Fz ez , F = Fr er + Fθ eθ + Fφ eφ ),
through a surface S is equal to the surface integral of the component of F normal to the surface.

Mathematically we have that Z Z


Flux = Φ = Fn dA = F · ndA
S S
where Fn denotes the component of F that points in the direction of n.
If n points out of the surface we have outward flux, if n point in to the surface we have the inward
flux.

Example 3.3 Evaluate the outward flux of F = 3eρ − 2ez through the base of a cylinder centred at the
origin, with height H and radius R.

Solution:
On the base of the cylinder n = − ez and hence

F · n = (3eρ − 2ez ) · (−ez )


= (3)(0) + (0)(0) + (−2)(−1) = 2

24
Since Z
Flux = Φ = F · ndA
S
we have Z
Φ= 2dA.
S
But what is dA? On the base of a cylinder ρ and φ vary and we have dA = ρdρdφ so,
Z 2π Z R Z 2π  2 R
ρ
Φ= 2ρdρdφ = 2 dφ = 2πR2 .
0 0 0 2 0
dA, we have Φ = 2× area of S = 2πR2 .
R
Alternatively, since we know that the area of S = S

If we want to calculate the outward flux of G = 2ρzeρ + cos(φ)eφ − ez through the curved surface of the
cylinder in Example 3.3, we have n = eρ and so

G·n = (2ρzeρ + cos(φ)eφ − ez ) · eρ


= (2ρz)(1) + cos(φ)(0) + (−1)(0)
= 2ρz

and hence the outward flux


Z
Φ = 2ρzdA
S
H
Z 2
Z 2π
= 2ρzRdφdz
−H
2 0
H
Z 2
Z 2π
= 2RzRdφdz
−H
2 0
H
Z 2
Z 2π
= 2R2 zdφdz
−H
2 0
Z H
2  2 2π
= 2R zφ 0 dz
−H2
Z H
2
= 4πR2 zdz
−H
2
 H2
z2

= 4πR2
2 −H
2

= 0.

25
4 Volume Integrals
4.1 Cartesian, cylindrical polar and spherical polar coordinates
z
DV= (r Df) (Dr) (Dz)
dV= rdr df dz

Df
r Df

Dr

Dz

Figure 14:

The integral of a function g(x, y, z), or g(ρ, φ, z) or g(r, θ, φ), over a 3D object is given by
Z
gdV
object

where dV is the limit of the volume of a small volume element in the object.

In Cartesian coordinates dV = dxdydz.

In cylindrical polar coordinates dV = ρdρdφdz (see Figure 14).

In spherical polar coordinates dV = r2 sin(θ)dθdφdr (see Figure 15).

26
Df r sinq Df

Dr

Dq r Dq

Figure 15:

Volume integrals can be used to calculate the volume of 3D objects, or the mass or charge of/in a 3D
object. Also they can be used to calculate the moment of inertia of a 3D object. For the objects in Figure
16 we have:

z z
a z
c
H

0 b 0 R
y y
a 0
y
x x
x

Figure 16:

In cartesian coordinates
Z Z c Z b Z a
gdV = gdxdydz.
V 0 0 0
In cylindrical polar coordinates
Z Z H Z 2π Z a
gdV = gρdρdφdz.
V 0 0 0
In spherical polar coordinates
Z Z 2π Z π Z R
gdV = gr2 sin(θ)drdθdφ.
V 0 0 0

Example 4.1 Evaluate the volume integral of g(r, θ, φ) = 4r cos(φ/8) over a sphere centred at the origin
with radius 2.

Solution: We have
Z Z 2 Z π Z 2π
f (ρ, φ, z)dV = g(r, θ, φ)r2 sin(θ)drdθdφ
sphere 0 0 0

27
with g(r, θ, φ) = 4r cos(φ/8). Thus
Z Z 2π Z π Z 2
f (ρ, φ, z)dV = 4r3 cos(φ/8) sin(θ)drdθdφ
sphere 0 0 0
Z 2π  Z π  Z 2 
= cos(φ/8)dφ sin(θ)dθ 4r3 dr
0 0 0
2π π  2
= [8 sin(φ/8)]0 [− cos(θ)]0 r4 0
 
1
= 8 √ − 0 · (−(−1 − 1)) · (16 − 0)
2
256
= √ .
2

4.2 Moment of Inertia


p
The moment of inertia of a mass m about the z-axis is given by I = mρ2 , where ρ = x2 + y 2 is the
distance from the z-axis.
The moment of inertia of a solid object V about the z-axis is equal to the sum of the moments of inertia
of the individual volume elements in the object.

Since the volume elements are small we can approximate their mass by their volume multiplied by the
density at their mid points pi . Also we can approximate their distance from the z-axis by the distance of
their mid points pi from the z-axis.

Hence the moment of inertia of a volume element is approximated by

Ii = ρ2 M ass ' f (pi )∆Vi ρ2i .


Thus we have that the moment of inertia I is such that
N
X N
X Z
I' Ii = f (pi )∆Vi ρ2i → f ρ2 dV.
i=1 i=1 object

Example 4.2 Calculate the moment of inertia of a cylinder with radius 1, height H, centre the origin
and density f = ρz 2 .
Solution: We have
H
Z 2
Z 2π Z 1
I = ρ2 ρz 2 ρdρdφdz
−H2 0 0
H
Z 2
Z 2π Z 1
= ρ4 z 2 dρdφdz
−H2 0 0
H 1
2π 1
ρ5
Z Z Z 
2
= z 2 dφdz
−H
2 0 0 5 0
H
Z Z 2π
2 1 2
= z dφdz
−H2 0 5
Z H
2 2π 2
= z dz
−H
2
5
  H2
2π 3
= z
15 −H
2

πH 3
= .
120

28
5 Line Integrals
5.1 Work done by a force

C B

Figure 17:

Line integrals are used to calculate the work done by a force F (or a vector field) F = Fx i+Fy j+Fz k, on
−−→
a particle in moving it along a curve C = AB see Figure 17.

The work done by a constant force F on a body undergoing linear displacement is given by the distance
|AB| multiplied by the component of F in the direction AB, i,e, in the direction S, see Figure 18.

e
S
F

A S B

Figure 18:

Thus we have
W = F · S = |F| |S| cos(θ)
and since
b⊥
b + Fs⊥ S
F = Fs S
with
Fs = |F| cos(θ)
we have
W = Fs |S| .
For a non-constant force F acting on a particle moving along a non-linear path C we can approximate
the work done by approximating the path C by small linear path segments, and then on each of these

29
Figure 19:

segments we can approximate the force F by the value of F at the start of each linear segment (i.e. by a
constant value).
On the ith segment along the curve that has start point at ri = xi i + yi j + zi k and at end point
ri+1 = xi+1 i + yi+1 j + zi+1 k (see figure 19), we have that the work done by the constant force F(ri ) in
moving a particle along the segment is

Wi = F(ri ) · ∆ri .
So X X
W ≈ Wi = F(ri ) · ∆ri .
i i

In the limit as the size of the line segments tends to zero, we have
Z
W = F(r) · dr.
C
Since F = Fx i+Fy j+Fz k and r = xi + yj + zk we have

F · dr = (Fx i+Fy j+Fz k) · (dxi + dyj + dzk)


= Fx dx + Fy dy + Fz dz.

Hence
Z
W = Fx dx + Fy dy + Fz dz. (5.5)
C

We need to write (5.5) as a definite integral involving a single variable, say x, y, z, t or φ.

5.2 Line integrals in the x-y plane


Example 5.1 Calculate the work done by F = 3yi − 5xj+100xyk on a particle moving along the path
AB shown in Figure 20.
dy
Solution: On the path AB we have y = 21 x and z = 3 and hence dx = 1
2 and dz
dx = 0.
We can write (5.5) as a definite integral in x:
Z Z XB
dx dy dz
W = Fx dx + Fy dy + Fz dz = (Fx (x) + Fy (x) + Fz (x) )dx
C XA dx dx dx

30
y
plane z=3
y=x/2

2 B

A 4 x

Figure 20:

where XA is the x coordinate at the start point A and XB is the x coordinate at the end B.
Thus XA = 0 and XB = 4. Furthermore since
3
Fx (x) = 3y = x, Fy (x) = −5x, Fz (x) = 100xy = 50x
2
and
dx dy 1 dz
= 1, = and =0
dx dx 2 dx
we have
Z 4 
   
3 1
W = x (1) − (5x) + (50x)(0) dx
0 2 2
Z 4  2 4
x
= −xdx = − = −8.
0 2 0

Remark 5
1. The line integral of a vector field F along a path P = P1 + P2 can be written as
Z Z Z
F · dr = F · dr+ F · dr.
P P1 P2

2. Z B Z A
F · dr = − F · dr.
A B

Example 5.2 Calculate the work done by F = 3xi + 5xj − 2k on a particle moving along the path
Ac = AB + BC shown in Figure 21.

Solution: We have
Z C Z B Z C
F · dr = F · dr+ F · dr
A A B
Z B Z C
= Fx dx + Fy dy + Fz dz + Fx dx + Fy dy + Fz dz.
A B

On path P1 we have
dx dz
x = −1, z = 0 ⇒ = 0 and =0
dy dy

31
z
plane x=-1

C(2,1)

P2

A(0,0) P1 B(2,0) y

Figure 21:

and on path P2 we have


dx dy
x = −1, y = 2 ⇒ = 0 and = 0.
dz dz

Thus we have

Z B Z YB
dx dy dz
F · dr = (Fx (y) + Fy (y) + Fz (y) )dy
A YA dy dy dy
Z C Z ZC
dx dy dz
F · dr = + Fy (z) + Fz (z) )dz
(Fx (z)
B ZB dz dz dz
Z B Z 2 Z 2
⇒ F · dr = ((3x)(0) + (5x)(1) − (2)(0))dy = −5dy = −10
A 0 0
Z C Z 1 Z 1
⇒ F · dr = ((3x)(0) + (5x)(0) − (2)(1))dz = −2dz = −2
B 0 0

and hence Z C
F · dr = − 10 − 2 = −12.
A

Example 5.3 Calculate the work done by F = −yi + xj on moving a particle along the path AB shown
in Figure 22.
Solution: The work done is given by
Z B Z B Z XB
dx dy
W = F · dr = Fx dx + Fy dy = (Fx (x) + Fy (x) )dx
A A XA dx dx
and since
1 dy 1 x
y = (4 − x2 ) 2 ⇒ = (4 − x2 )(−2x) = − 1
dx 2 (4 − x2 ) 2
we have
XB   
−x
Z
2 12
W = −(4 − x ) (1) + (x) 1 dx
XA (4 − x2 ) 2
Z 2 
1 1
= −(4 − x2 ) 2 − x2 (4 − x2 )− 2 dx.
0

This is not an easy integral to solve, so hopefully there is a better way of calculating W .

32
y

B(0,2) z=constant

A(2,0) x

Figure 22:

P2 =(x2,y2,z2)

P1 =(x1,y1,z1)

Figure 23:

5.3 Parametric Equations


Any path in 3D may be expressed in terms of three parametric equations x(t), y(t) and z(t) that involve
a parameter t that varies from t1 to t2 such that

x(t1 ) = x1 , y(t1 ) = y1 , z(t1 ) = z1 , x(t2 ) = x2 , y(t2 ) = y2 and z(t2 ) = z2 .

We have (see Figure 23)


Z P2 Z t2
dx dy dz
F · dr = (Fx (t) + Fy (t) + Fz (t) )dt.
P1 t1 dt dt dt
Example 5.3 (continued)
Using polar coordinates we can write the curve C = AB in terms of three parametric equations

x = 2 cos φ, y = 2 sin φ, z = constant


dx dy dz
⇒ = −2 sin φ, = 2 cos φ, = 0.
dφ dφ dφ
π
When φ = 0 x = 2, y = 0 and z = constant and hence we are at point A. While when φ = 2 x = 0,
y = 2 and z = constant hence we are at point B.
Thus we have

33
Z B Z φB
dx dy
F · dr = (−y + x )dφ
A φA dφ dφ
Z π
2
= [(−2 sin φ)(−2 sin φ) + (2 cos φ)(2 cos φ)] dφ
0
Z π
2
= (4 sin2 φ + 4 cos2 φ)dφ
0
Z π
2
= 4dφ = 2π.
0

Example 5.4 Evaluate the integral of F = 2xi + 3zj − 5k along the curve given parametrically by

x(t) = t, y(t) = 2t, z(t) = −t2


where t varies from 0 to 1.

Solution: Since

x(t) = t, y(t) = 2t, z(t) = −t2


dx dy dz
⇒ = 1, = 2, = −2t
dt dt dt
we have
Z Z t2
dx dy dz
F · dr = (Fx (t) + Fy (t) + Fz (t) )dt
C t1 dt dt dt
Z 1
= [(2x)(1) + (3z)(2) + (−5)(−2t)] dt
0
Z 1
= (2t − 6t2 + 10t)dt
0
Z 1
= (12t − 6t2 )dt
0
 2 1
= 6t − 2t3 0 = 4.

5.4 Path dependence/independence


A line integral of a field/force F from a point A to a point B is said to be path dependent if it depends
on the path taken to get from A to B, otherwise it is said to be path independent. If the line integral of
F is path dependent F is non conservative.

Example 5.5 By considering two paths that start from A = (2, 0) and end at B = (0, 2) (see Figure 24),
show that the line integral of the vector field F = −yi + xj is path dependent.

Solution: From Example 5.3 we have that


Z
F · dr = 2π.
P2

While on P2 we have
Z Z B Z XB
dx dy
F · dr = Fx dx + Fy dy = (Fx (x) + Fy (x) )dx.
P2 A XA dx dx

34
y

B(0,2)
P1

P2

A(2,0) x

Figure 24:

dy
Since the path P2 is defined by y = 2 − x we have dx = −1 and hence

Z Z 0
F · dr = [(−y)(1) + (x)(−1)] dx
P2 2
Z 0
= [−(2 − x) − x] dx
2
Z 0
0
= −2dx = − [2x]2 = 4.
2
R R
So P1 F · dr 6= P2
F · dr and hence the integral of F is path dependent which tells us that F is non-
conservative.

5.5 Closed curves (loops)

C2 rB

rA
C1

Figure 25:

For a closed curve C that comprises of the path C1 from rA to rB (see Figure 25) and the path C2 from
rB to rA , we have that the line integral of F around the closed curve (loop) C is given by
I Z Z
F · dr= F · dr+ F · dr.
C C1 C2

The circle around the integral of C indicates that C is a closed curve.

35
5.6 Conservative fields (or forces)
Remark 6 1. The line integral of a conservative field from a point A to a point B is path independent,
i.e. it only depends on the initial point A and the end point B.
2. The line integral of a conservative field around any closed loop is always equal to zero, i.e.
I
F · dr =0 (5.6)
C

for a conservative field F and for any closed curve C.


H
3. If C G · dr 6=0 then G is non conservative.
H
4. If C G · dr =0 then G is might be conservative.

Example 5.6 Show that a conservative force F satisfies (5.6).

Solution:
H R R RB RA R
Since C F · dr= C1 F · dr+ C2 F · dr and A F · dr = − B F · dr, and for a conservative field C1 F ·
R
dr = − C2 F · dr, we have the following for any conservative field.

I Z Z
F · dr = F · dr+ F · dr
C C1 C2
Z Z
= − F · dr+ F · dr = 0.
C2 C2

B(1,1)

C2

P(1,0) x
A(0,0)

Figure 26:

Example 5.7 Calculate the line integral of F = x2 i + yj along the two paths C1 = AP + P B and C2
shown in Figure 26. Say if the field F could be a conservative field.

Solution:
The path C1 consists of the two straight line paths AP and P B. On the first path AP, y = 0 and x
dy
varies from 0 to 1 ⇒ dx = 0.
On the second path P B, x = 1 and y varies from 0 to 1 ⇒ dx
dy = 0.
Hence we have

36
Z Z P Z B
F · dr = F · dr+ F · dr
C1 A P
Z XP Z YB
dx dy dx dy
= (Fx (x) + Fy (x) )dx + (Fx (y) + Fy (y) )dy
XA dx dx YP dy dy
Z 1 Z 1
 2   2 
= (x )(1) + (y)(0) dx + (x )(0) + (y)(1) dy
0 0
Z 1 Z 1
2
= x dx + ydy
0 0
1 1
x3 y2
 
1 1 5
= + = + = .
3 0 2 0 3 2 6
dy
On C2 , y = x ⇒ dx =1

Z Z A
F · dr = Fx dx + Fy dy
C2 B
Z XA
dx dy
= + Fy (x) )dx
(Fx (x)
XB dx dx
Z 0
 2 
= (x )(1) + (y)(1) dx
1
Z 0
= (x2 + x)dx
1
0
x3 x2

5
= + =− .
3 2 1 6

Since the path C1 + C2 is a closed curve with


I Z Z
F · dr = F · dr+ F · dr
C1 +C2 C1 C2
5 5
= − =0
6 6
it follows that F may be conservative.

37
6 Partial derivatives

(x,t) F(x,t)

(x,t+h)

(x+h,t)
x

Figure 27:

The partial derivative of a function F (x, y, z, t, ...) with respect to x is defined by ∂F


∂x and is evaluated by
treating the other variables as constant and differentiating with respect to x. Consider a function of two
variables F (x, t), the partial derivatives ∂F ∂F
∂x and ∂t at a given point (x, t) of a function F (x, t), represent
the slopes of the 3D graph y = F (x, t) in the direction of the x-axis and the t-axis at the given point
(x, t) (see figure 27). We define
∂F F (x + h, t) − F (x, t)
= lim (6.7)
∂x h→0 h
and
∂F F (x, t + h) − F (x, t)
= lim . (6.8)
∂t h→0 h
∂f ∂f ∂f
Example 6.1 Given that f (x, y, t) = 3x2 tey find ∂x , ∂t and ∂y .

Solution: We have
∂f d 2
= 3tey x = (3tey )(2x) = 6tey x
∂x dx
∂f d
= 3x2 ey t = 3x2 ey
∂t dt
∂f d
= 3x2 t ey = 3x2 tey .
∂x dy

6.1 The chain rule for partial derivatives


For a function f (u(x, y, t)) we have

∂ df ∂u ∂ df ∂u ∂ df ∂u
f (u(x, y, t)) = , f (u(x, y, t)) = and f (u(x, y, t)) = . (6.9)
∂x du ∂x ∂y du ∂y ∂t du ∂t
∂f
Example 6.2 For f = cos(3x2 y) find ∂x .

Solution: Setting u = 3x2 y we have


df ∂u
cos(3x2 y) = cos u with = − sin u, and = 6xy.
du ∂x

38
Hence from the chain rule (6.9) we have
∂f
= −6xy sin(3x2 y).
∂x

6.2 Higher order partial derivatives


From the example above we see that partial derivatives of a function F (x, y, t) are also functions of x, y
and t, and so can be partially differentiated themselves.

Second order partial derivatives take the following form

∂2F ∂ ∂F
=
∂x2 ∂x ∂x
∂2F ∂ ∂F
=
∂y∂x ∂y ∂x
∂2F ∂ ∂F
=
∂y 2 ∂y ∂y
∂2F ∂ ∂F
= .
∂x∂y ∂x ∂y
Example 6.3 For F (x, y) = 3ex cos 2y calculate

∂F ∂F ∂ 2 F ∂ 2 F ∂ 2 F ∂2F
, , , , and .
∂x ∂y ∂x2 ∂y∂x ∂y 2 ∂x∂y
Solution: We have
∂F ∂F
= 3ex cos 2y, = −6ex sin 2y
∂x ∂y
and
∂2F ∂ ∂F ∂
= = (3ex cos 2y) = 3ex cos 2y
∂x2 ∂x ∂x ∂x
∂2F ∂ ∂F ∂
= = (3ex cos 2y) = −6ex sin 2y
∂y∂x ∂y ∂x ∂y
∂2F ∂ ∂F ∂
= = (−6ex sin 2y) = −12ex cos 2y
∂y 2 ∂y ∂y ∂y
∂2F ∂ ∂F ∂
= = (−6ex sin 2y) = −6ex sin 2y.
∂x∂y ∂x ∂y ∂x
Remark 7 It is almost always the case that

∂2F ∂2F
= .
∂x∂y ∂y∂x
xy(x2 −y 2 )
The only exceptions are some pathological functions eg F (x, y) = x2 +y 2 at (0, 0).

6.3 Some PDE’s in physics


The Heat Equation:
∂2F ∂F
α =
∂x2 ∂t
which has typical solutions
2
F = A cos(nx)e−n αt

39
The Wave Equation:
∂2F ∂2F
c2 2
= 2
∂x ∂ t
which has typical solutions
F = A cos(x ± ct)
Laplace’s Equation:
∂2F ∂2F ∂2F
2
+ 2
+ =0
∂x ∂y ∂z 2
Schrodinger’s Equation:
∂Ψ ~2 ∂ 2 Ψ ∂ 2 Ψ ∂ 2 Ψ
i~ =− ( + + )+VΨ
∂t 2m ∂x2 ∂y 2 ∂z 2
Dirac’s Equation:
∂Ψ ∂Ψ ∂Ψ ∂Ψ
= α1 + α2 + α3 + iβmΨ
∂t ∂x ∂y ∂z

7 Directional derivatives

o o
20 C 10 C o
0 C

Q
u q
R n P

40 cm 20 cm 0 cm

Figure 28:

The spatial rate of change of a scalar field in a specified direction is known as a directional derivative.

Example 7.1

Consider a 40 cm thick wall that has a temperature of 0◦ C on one side and 20◦ C on the other, with the
temperature varying uniformly within the wall (see Figure 28).
The rate of change of temperature (T ) in the direction specified by u
b is given by

change in T (10 − 5)◦ C 5 cos θ ◦ C ◦


C
= = = 0.5 cos θ . (7.10)
distance in specified direction PQ 10 cm cm
PR 10
Since P R = P Q cos θ we have P Q = cos θ = cos θ cm.
The equation (7.10) is an example of a directional derivative. At any point P there is an infinity of
directional derivatives.

A vector at P with magnitude equal to the largest directional derivative, and pointing in the direction
in which this largest directional derivative occurs, is known as the gradient vector or more commonly as
grad.

40
Remark 8 The directional derivative at P in the direction u
b can be obtained by taking the scalar product
of u
b with the gradient vector.
Example 7.2 What is grad T at P in the previous example? Also show that

C
b · grad T = 0.5
u .
cm
Solution: Since grad T has magnitude equal to the largest directional derivative of T we see that grad
T at P is when cos θ = 1 i.e. when θ = 0 and grad T points in the direction of n. So from (7.10) we have

C
grad T = 0.5n .
cm
Since
b · n = |b
u u| |n| cos θ = cos θ
we have that ◦ ◦
C C
b · grad T = 0.5b
u u·n = 0.5 cos θ .
cm cm

7.1 Directional derivative at a point

Dr

^
u

Q=r+Dr ^
u
r

Figure 29:

The directional derivative of a scalar field φ at a point at r in the direction u


b (see Figure 29) is given by

φ(r + ∆rb u) − φ(r)


φ0u (r) = lim .
∆r→0 ∆r
If we take the limit as ∆r tends to zero we have the directional derivative of φ at the point at r in the
direction u
b.
The directional derivative of φ at a point at r = (x, y, z) in the direction of the x-axis, i.e. in the direction
of i is

φ(x + ∆x, y, z) − φ(x, y, z)


φ0i (r) = lim .
∆x→0 ∆x
This is the partial derivative of φ with respect to x. Hence

∂φ(r)
φ0i (r) =
∂x
Similarly we have
∂φ(r) ∂φ(r)
φ0j (r) = and φ0k (r) =
∂y ∂z

41
7.2 The gradient vector, grad
We recall that any directional derivative in the direction u can be calculated by evaluating

φ0u = u
b · grad φ.
So we have
φ0i = i · grad φ, φ0j = j · grad φ, φ0k = k · grad φ
Since gradφ is a vector we can write it as

grad φ = ai + bj + ck
and hence
∂φ
φ0i = i · (ai + bj + ck) = a =
∂x
∂φ
φ0j = j · (ai + bj + ck) = b =
∂y
∂φ
φ0k = k · (ai + bj + ck) = c = .
∂z
Thus we have
∂φ ∂φ ∂φ
grad φ = i+ j+ k. (7.11)
∂x ∂y ∂z

Example 7.3
1. Find the gradient of the scaler field U = 21 (x2 + y 2 + z 2 ).
2. Evaluate the magnitude of grad U at the point P = (1, 2, 3).
3. Calculate the directional derivative of U at P in the direction s = i + j.

Solution:
1. Using (7.11) we have
∂U ∂U ∂U
grad U = i+ j+ k =xi + yj + zk.
∂x ∂y ∂z
2. p √
|grad U (P )| = 12 + 22 + 32 = 14.

3. The directional derivative of U at P in the direction s = i + j is given by


i+j 1 2 3
Us0 (P ) = grad U (P ) · b
s = (i + 2j + 3k) · √ = √ + √ = √ .
2 2 2 2

42
7.3 Gradient and physical laws
The following physical laws involve the gradient vector.

F = −grad U F - conservative force field U - potential energy field (7.12)

E = −grad V E - electric field V - electric potential (7.13)

h = −k grad T h - heat flow T - temperature k - thermal conductivity (7.14)

Example 7.4 The electric potential V at a point is given by V (x, y, z) = x2 ey (z +1). Find the magnitude
and direction of the electric field vector E at the point (1, 0, 0).

Solution: Since
∂V ∂V ∂V
E = −grad V = − i− j− k
∂x ∂y ∂z
we have
−grad V = −2xey (z + 1)i − x2 ey (z + 1)j − x2 ey k
and hence the direction of the electric field E at the point (1, 0, 0) is

E(1, 0, 0) = −grad V (1, 0, 0) = −2i − j − k

and its magnitude is p √


|E(1, 0, 0)| = (−2)2 + (−1)2 + (−1)2 = 6.

7.4 Differential operators



The differential operator ∂x is an example of a scaler differential operator, it operates on a scalar field T
∂T
to give another scalar field ∂x .

The differential operator i ∂x is an example of a vector differential operator, it operates on a scalar field
∂T
T to give a vector field i ∂x .
The expression for the gradient of a scalar field involves a differential operator.
∂f ∂f ∂f
grad f = i+ j+ k
∂x ∂y ∂z
 
∂ ∂ ∂
= i +j + k f.
∂x ∂y ∂z
| {z }
(1)

 
∂ ∂ ∂
Here (1) = i ∂x + j ∂y + k ∂z is a vector differential operator, it acts on the scalar field f to give a
vector field grad f
The differential operator (1) is commonly known as del or nabla, and is denoted by the symbol ∇
∂f ∂f ∂f
grad f = ∇f = i+ j+ k.
∂x ∂y ∂z
We can write the physical laws (7.12)-(7.14) in terms of differential operator ∇:

h = −k∇T , E = −∇V , F = −∇U.

43
7.5 Other coordinate systems
We have seen that it is often easier to work in coordinate systems other than rectangular Cartesian. We
will, in fact, concentrate on two others, cylindrical polars and spherical polars. We will indicate here,
however, a general approach for finding differential operators in other systems.
Suppose the new system (q1 , q2 , q3 ) has orthogonal vectors e1 , e2 , e3 at each point ( eg eρ , eφ , ez ). Then
we can write a small distance ds as ds2 = dx2 + dy 2 + dz 2 = h21 dq12 + h22 dq22 + h23 dq32 . For example, in
2-d, we have ds2 = dρ2 + ρ2 dφ2 . The coefficients hi are called the ”metric”, and generally in 3-d space
they will form a 3 × 3 matrix. They are a key component of Einstein’s theory of General Relativity, in
which the metric of 4-dimensional space-time is determined by the distribution of matter. Famously, the
metric for the space-time outside a point mass M is called the Schwarzschild metric, given by
2GM 2 2GM −1 2
ds2 = −(1 − )dt + (1 − ) dr + r2 dθ2 + r2 sin2 θdφ2 .
rc2 rc2
Notice that for large r, this reduces to ds2 = −dt2 + dr2 + r2 dθ2 + r2 sin2 θdφ2 , which is the (Minkowski)
metric for flat space-time, in which we can see embedded the familiar 3-d spherical polar distance.

We now use the hi coefficients to find a general definition of the gradient operator. We can write the
∂ψ ∂ψ ∂ψ
small change in any quantity ψ as dψ = ∂q 1
dq1 + ∂q2
dq2 + ∂q3
dq3 , but we also have that
∂ψ
dψ = ∇ψ.(h1 e1 dq1 + h2 e2 dq2 + h3 e3 dq3 ). This shows that h1 ∇ψ.e1 = ∂q1 etc, and hence

1 ∂ψ 1 ∂ψ 1 ∂ψ
∇ψ = h1 ∂q1 e1 + h2 ∂q2 e2 + h3 ∂q3 e3 .

Our two important cases give


∂ψ 1 ∂ψ ∂ψ
i) Cylindrical Polars ∇ψ = ∂ρ eρ + ρ ∂φ eφ + ∂z ez , and
∂ψ 1 ∂ψ 1 ∂ψ
ii) Spherical Polars ∇ψ = ∂r er + r ∂θ eθ + r sin θ ∂φ eφ .

44
8 The divergence of a vector field
So far we have only looked at the spatial variations of scalar fields, what about the spatial variations of
vector fields?

There are two fields that are used to describe spatial variations of vectors fields F, one is a scalar field
known as the divergence of F, and the other is a vector field known as the curl of F.

8.1 Mathematical approach to divergence


The divergence of a vector field F is the scalar field

 
∂ ∂ ∂
div F = ∇·F= i +j +k · (Fx i+Fy j+Fz k)
∂x ∂y ∂z
∂Fx ∂Fy ∂Fz
= + + .
∂x ∂y ∂z
Example 8.1 Calculate the divergence of the vector field F = 3xey i+2yj+z 2 k and evaluate ∇·F(2, 0, 4).
Solution: We have
∂(3xey ) ∂(2y) ∂(z 2 )
div F = ∇·F= + +
∂x ∂y ∂z
= 3ey + 2 + 2z
⇒ ∇ · F(2, 0, 4) = 3 + 2 + 8 = 13.

8.2 Physical approach to divergence


Physically the divergence of a vector field F is related to the flow of energy or matter, e.g. flow of water
in a pipe or flow of heat through some conducting material.

Consider the case of heat flow in a rod. Heat generated (by fission of uranium nuclei say) at a rate λ(r),
flows via conduction to the cooler outer edge of the rod. If we define the heat flow rate by h(r) then the
two fields λ(r) and h(r) are related by conservation of energy.

Consider a very small region R of the rod with volume ∆V and surface S, such that R contains the point
P with position vector rp . Since R is small we can approximate the total rate at which heat is generated
in R by λ(rp )∆V. Since the temperature of the region does not change we must have that the amount of
heat generated in R must be equal to the rate of flow of heat out of R through its surface S.

Thus we have

net outward heat flow rate across S ≈ λ(rp )∆V


net outward heat flow rate across S
⇒ ≈ λ(rp ).
∆V
If we let ∆V tend to zero then the left hand side describes the net outward flow rate per unit volume at
the point P . We define this to be the divergence of h at the point P .
Thus  
net outward heat flow
div h(P ) = lim = λ(rp ).
∆V →0 ∆V
Since this equation holds for all points P we have

div h = λ.

45
8.3 Equivalence of the two definitions of divergence

(5)

(6) Q`
Q j

i
k

Figure 30:
L
If we take the small region R in the heated rod to be a cube with centre C = (X + 2 , Y, Z) and sides of
length L, then we can calculate the net outward heat flow through R by using

Z Z
F lux = Φ = h · ndA = hn dA
R R
6 Z
X 
= h · ndA
i=1 f ace i

where hn denotes the component of h pointing in the direction of n and n is the outward pointing normal
to R.
If we set (1) to be the face of the cube lying in the plane x = X (see Figure 30) and (2) to be the face of
the cube lying in the plane x = X + L, then the outer unit normal to (1) is −i and the outer unit normal
to (2) is i. Also Q = (X, Y, Z) is the mid point of (1) and Q0 = (X + L, Y, Z) is the mid point of (2) and
the volume ∆V = L3 .
Since the cube is small we can approximate the heat flow vector h on each face of the cube by it’s value
at the mid points, hence on face (1) we can approximate h by h(Q) = h(X, Y, Z) and on face (2) we can
approximate h by h(Q0 ) = h(X + L, Y, Z).
Hence on (1) we have h · n = h · (−i) = −h · i = −hx (X, Y, Z) (i.e. minus the x component of h at Q),
and on (2) we have h · n = h · i = hx (X + L, Y, Z).
So Z Z Z
h · ndA ≈ − hx (X, Y, Z)dA = −hx (X, Y, Z) dA = −hx (X, Y, Z)L2
f ace 1 f ace 1 f ace 1
Z Z
h · ndA ≈ hx (X + L, Y, Z)dA = hx (X + L, Y, Z)L2 .
f ace 2 f ace 2

So
net outward heat flow across (1)+(2) L2 [hx (X + L, Y, Z) − hx (X, Y, Z)]
=
∆V L3
hx (X + L, Y, Z) − hx (X, Y, Z)
=
L

   
net outward heat flow across (1)+(2) hx (X + L, Y, Z) − hx (X, Y, Z) ∂hx
⇒ lim = lim = .
∆V →0 ∆V L→0 L ∂x

46
Similarly  
net outward heat flow across (3)+(4) ∂hy
lim =
∆V →0 ∆V ∂y
and  
net outward heat flow across (5)+(6) ∂hz
lim = .
∆V →0 ∆V ∂z
Thus  
net outward heat flow across S ∂hx ∂hy ∂hz
div h = lim = + + .
∆V →0 ∆V ∂x ∂y ∂z

8.4 Interpretation of divergence in terms of sources and sinks

++
++ +
+

Figure 31:

We have seen that the divergence of a steady state heat flow field at any point is the heat source density
at that point. Similar ideas can be applied to other flow fields.

We can regard positive electric charge as being the source of an electric field E
ρ
div E = (one of Maxwell’s equations).
ε0
Here ρ is the electric charge density and ε0 is the permittivity of free space.

The interpretation of divergence in terms of sources can be illustrated in field line diagrams.
For example the field lines in the region outside a positively charged sphere are regularly spaced continuous
(i.e. unbroken) radial lines directed outwards see Figure 31. In 3D the density of these lines represents
the magnitude of the field.
You can only make the association of field magnitude and density of continuous field lines in regions
where the divergence of the vector field is zero.

Field lines have sources (i.e. starting point) in regions of positive divergence, and sinks (end points) in
regions of negative divergence.

If a vector field has zero divergence everywhere, then there are no sources or sinks anywhere and the field
lines are closed loops.
Magnetic fields are examples of divergence free fields see Figure 32.

div B = 0 Maxwell’s equation, B - magnetic field.

47
Figure 32:

8.5 The divergence and physical laws


The following are examples of physical laws that involve the divergence of vector fields:

divh = λ, h − steady state heat flow, λ - heat source density,


ρ
divE = , E − electric field, ρ - electric charge density, ε0 - permittivity of free space,
ε0
and
divB = 0, B − magnetic field.
Such a field, with zero divergence, is called solenoidal .

Example 8.2 Calculate the divergence of the vector field F = y cos2 xi+yz 2 j+ez xk at the point (π, 0, 2).

Solution: We have
∂Fx ∂Fy ∂Fz
div F = ∇·F= + +
∂x ∂y ∂z
2 z
= −2y cos x sin x + z + e x

and hence
div F(π, 0, 2) = −2(0)(cos π sin π) + 22 + e2 π = 4 + πe2 .

Example 8.3 Could either of the following vector fields F or G in principle represent a magnetic field

F = xy 2 i + y 3 j + (x2 y − 4y 2 z)k or G = 2yi − 3xyj − (9 + 5z)k?

Solution: Since
∂Fx ∂Fy ∂Fz
div F = + + = y 2 + 3y 2 − 4y 2 = 0
∂x ∂y ∂z
and
∂Gx ∂Gy ∂Gz
div G = + + = −3x − 5
∂x ∂y ∂z
it follows that F could in principle represent a magnetic field and G could not.

Example 8.4 If the scalar field f is equal to the divergence of the vector field G = x cos yi+x2 ey j+z 2 yk,
calculate H = grad f .

48
Solution: We have
∂Gx ∂Gy ∂Gz
f = divG = + +
∂x ∂y ∂z
= cos y + x2 ey + 2zy
and hence
∂f ∂f ∂f
H = grad f = i+ j+ k
∂x ∂y ∂z
= 2xey i + (− sin y + x2 ey + 2z)j + 2yk
= 2xey i + (x2 ey + 2z − sin y)j + 2yk.
Remark In operator terms the vector field H in the above example takes the form

H = ∇f = ∇(∇ · G).

Example 8.5 If f = 3x2 y + y cos z + y 2 calculate div F, where F = grad f .


Solution: We have
∂f ∂f ∂f
F = grad f = i+ j+ k
∂x ∂y ∂z
and hence
F = 6xyi + (3x2 + cos z + 2y)j − y sin zk

∂Fx ∂Fy ∂Fz


⇒ div F = + +
∂x ∂y ∂z
= 6y + 2 − y cos z.

8.6 Other coordinate systems


Using the same notation as earlier, we can find a general expression for the divergence of a vector field
from the definition above
 
net outward heat flow
div h(P ) = lim .
∆V →0 ∆V
We have ∆V = h1 h2 h3 dq1 dq2 dq3 , and we find, for example, that the flux of a vector field u across two
opposite faces q1 =constant is given by ∂q∂ 1 (u1 h2 h3 )dq1 dq2 dq3 . Then, taking the limit, we get
1 ∂ ∂ ∂
div u = ∇ · u = ( (u1 h2 h3 ) + (u2 h1 h3 ) + (u3 h1 h2 )).
h1 h2 h3 ∂q1 ∂q2 ∂q3
This gives

i) Cylindrical polars

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

1 ∂ 2 1 ∂ 1 ∂Fφ
∇·F= 2
(r Fr ) + (Fθ sin θ) + .
r ∂r r sin θ ∂θ r sin θ ∂φ
1 ∂ρω
Example 8.6 A rigidly rotating rod has v = ωρeφ , so divv = ρ ∂φ = 0. As expected, rigid rotation
does not involve any sources or sinks.

49
8.7 The scalar operator del squared
In operator terms we have div (grad f ) = ∇ · ∇f = ∇2 f , here ∇2 is the scalar operator del squared, such
that

∂2 ∂2 ∂2
∇2 = 2
+ 2+ 2
∂x ∂y ∂z
with
∂2f ∂2f ∂2f
∇2 f = + + .
∂x2 ∂y 2 ∂z 2
We can also have del squared acting on a vector field, such that

∇2 F = ∇2 (Fx i+Fy j+Fz k)


= ∇2 Fx i+∇2 Fy j+∇2 Fz k.

We can use the results from the previous sections to find the expression for the Laplacian operator in
other coordinate systems. We find
1 ∂ h2 h3 ∂ψ  ∂ h3 h1 ∂ψ  ∂ h1 h2 ∂ψ 
∇2 ψ = + + .
h1 h2 h3 ∂q1 h1 ∂q1 ∂q2 h2 ∂q2 ∂q3 h3 ∂q3
This gives

i) Cylindrical polars

1 ∂ ∂ψ  1 ∂2ψ ∂2ψ
∇2 ψ = ρ + 2 +
ρ ∂ρ ∂ρ ρ ∂φ2 ∂z 2

ii) Spherical polars

1 ∂ 2 ∂ψ  ∂ ∂ψ  1 ∂2ψ 
∇2 ψ = sin θ r + sin θ + .
r2 sin θ ∂r ∂r ∂θ ∂θ sin θ ∂φ2

50
9 The curl of a vector field
9.1 Mathematical definition of curl
The mathematical definition of the curl of a vector field F is obtained by taking the cross product of del
(nabla) with F i.e.


i j k
∂ ∂ ∂
curl F = ∇ × F = ∂x ∂y ∂z
Fx Fy Fz
     
∂Fz ∂Fy ∂Fz ∂Fx ∂Fy ∂Fx
= i − −j − +k − .
∂y ∂z ∂x ∂z ∂x ∂y

Example 9.1 Calculate the curl of the vector field F = x2 yi + y 2 zj + z 2 xk and then evaluate curl F at
P = (1, 2, 3)
Solution: We have

i j k
∂ ∂ ∂
curl F = ∂x ∂y ∂z
x2 y y 2 z z 2 x
     
∂ 2
 ∂ 2
 ∂ 2
 ∂ 2
 ∂ 2
 ∂ 2

= i z x − y z −j z x − x y +k y z − x y
∂y ∂z ∂x ∂z ∂x ∂y
= −y 2 i − z 2 j − x2 k.

Hence
curl F(1, 2, 3) = −4i − 9j − k.

9.2 Physical definition of curl


The physical definition of curl F is given in terms of the work done by F during one complete traversal
of a closed loop. The work done depends on the orientation of the loop. Using the right hand screw rule
we can specify the orientation of the loop in terms of a unit vector n at right angles to the plane of the
loop. If we consider a loop that lies in the (x, y) plane like in (Figure 33) then an anti-clockwise traversal
of the loop is associated with n = k, whereas
H a clockwise traversal is associated with n = −k.
Assume that we have calculated W = L F · dr then as the loop gets smaller and smaller so does W .
However, if we divide W by A =area enclosed by L, then we have a quantity that remains finite as the
loop gets smaller. If we define
W
C = lim
A
A→0

then C is in fact the component of curl F in the direction specified by n


i.e.
C = curl F · n.
In our example n = k and hence C is the z-component of curl F with C = curl F · k.

9.3 Local rotation


The curl of a vector field F (or rot F as it is sometimes called) can be thought of in terms of the local
rotation caused by F.

Consider the case of the water velocity on the surface of a river. In fast flowing rivers small floating
objects rotate as they flow downstream (and this rotation is faster nearer the banks than it is near the
middle of the river.) This is because the velocity of the river is greater in the middle of the river than at

51
the edges. If we assume a parabolic profile, for water flowing in the x direction, between banks at y = 0
and y = 2a, then v = cy(2a − y)i. Then curlv = 2c(y − a)k, showing positive ( anticlockwise ) rotation
above the centre line and negative ( clockwise) below.

9.4 Equivalence of the physical and mathematical definitions of curl

D T C

P Q H y
R

x
A S B

Figure 33:

We recall that curl F · n = limA→0 WA where W is the work done by F during one complete traversal of
a closed loop L that encloses an area A. We take L to be a square loop in the (x, y) plane with centre
P = (X, Y, Z) (see Figure 33)). For the loop L we have

I Z Z Z Z
W = F · dr = F · dr+ F · dr+ F · dr+ F · dr.
L AB BC CD DA

Furthermore
Z Z Z x(B)  
dx dy dz
F · dr = Fx dx + Fy dy + Fz dz = Fx + Fy + Fz dx
AB AB x(A) dx dx dx

where x(A) and x(B) respectively denote the x-coordinates of the points A and B. Since y = Y − H2 and
dy dz
z = constant on AB we have dx = dx = 0 and hence
Z Z X+ H
2
F · dr = Fx dx.
AB X− H
2

Since H is small we can approximate the x component of F on AB by its value at the midpoint S and
hence we have Z Z X+ H2
F · dr = Fx dx ≈ HFx (S)
AB X− H
2

Similarly
Z Z x(D)  Z X− H2
dx dy dz
F · dr = Fx + Fy + Fz dx = Fx dx ≈ −HFx (T )
CD x(C) dx dx dx X+ H2
Z Z y(C)   Z Y + H2
dx dy dz
F · dr = Fx + Fy + Fz dy = Fy dy ≈ HFy (Q)
BC y(B) dy dy dy Y −H2
Z Z y(A)   Z Y − H2
dx dy dz
F · dr = Fx + Fy + Fz dy = Fy dy ≈ −HFy (R).
DA y(D) dy dy dy Y +H2

52
Thus we have
I
W = F · dr = HFx (S) − HFx (T ) + HFy (Q) − HFy (R)
L
= H(Fx (S) − Fx (T )) + H(Fy (Q) − Fy (R))

and so
W (H(Fx (S) − Fx (T )) + H(Fy (Q) − Fy (R)))
curl F · n = lim = lim
A→0 A H→0 H2
Fx (X, Y − 2 , Z) − Fx (X, Y + H
H
2 , Z) Fy (X + H2 , Y, Z) − Fy (X − H
2 , Y, Z)
= lim + lim
H→0 H H→0 H
∂Fx ∂Fy
= − + .
∂y ∂x
As we have calculated the work done by traversing the loop in an anti-clockwise direction, from the right
hand
 screw rule we have that n = k and hence we have that the z-component of curl F is given by
∂Fy ∂Fx
∂x − ∂y . For the x and y components of curl F we would need to consider loops in the yz and xz
planes.

9.5 Conservative fields


When the work done by a vector fields F for all possible loops in the domain of F is equal to zero, then
the curl of F equals zero everywhere and we define F to be conservative.
This gives us a test for conservative fields

curl F = 0 for any conservative field. (9.15)


The term conservative is used for any vector field that satisfies (9.15).


Example 9.2 Is the vector field F = x2 − 35 j + 2zk conservative?

Solution: We have

i j k
∂ ∂ ∂
curl F = ∂x ∂y ∂z
0 x2 − 35 2z
     
∂ ∂ ∂ ∂ ∂ ∂
x2 − 35 − j x2 − 35 −
 
= i (2z) − (2z) − (0) + k (0)
∂y ∂z ∂x ∂z ∂x ∂y
= 0i + 0j + 2xk.

Since curl F 6= 0 for all values of x, y, z F is non conservative.

53
9.5.1 Operator identities
Recall the following useful operator identities:
∂ ∂ ∂
∇ = del or nabla = i +j +k
∂x ∂y ∂z
∂f ∂f ∂f
∇f = grad f = i +j +k
∂x ∂y ∂z
∂Fx ∂Fy ∂Fz
div F = ∇ · F = + +
∂x ∂y ∂z

i j k
∂ ∂ ∂

curl F = ∇ × F = ∂x ∂y ∂z
Fx Fy Fz
     
∂Fz ∂Fy ∂Fz ∂Fx ∂Fy ∂Fx
= i − −j − +k −
∂y ∂z ∂x ∂z ∂x ∂y
2 2 2
∂ f ∂ f ∂ f
div (grad f ) = ∇ · ∇f = ∇2 f = + 2 + 2.
∂x2 ∂y ∂z
Also note that for all vector fields F we have

div (curl F) = ∇ · (∇ × F) = 0
curl (grad f ) = ∇ × ∇f = 0.

Example 9.3 Verify that div (curl F) = 0 for the vector field F = aex i − z cos yj + 3xyzk.

Solution: Set


i j k
∂ ∂ ∂
G = curl F = ∂x ∂y ∂z
aex −z cos y 3xyz
= i (3xz + cos y) − j (3yz − 0) + k (0 − 0)
= (3xz + cos y)i − 3yzj

and hence
∂G ∂G ∂G
div G = div(curl F) = + +
∂x ∂y ∂z
= 3z − 3z + 0 = 0.

9.5.2 The product rule for ∇


As a differential operator, ∇ satisfies various product rules, depending on whether it is acting on scalars
or vectors:

1. ∇(f g) = f ∇g + g∇f
2. ∇(u.v) = u × (∇ × v) + v × (∇ × u) + (u.∇)v + (v.∇)u.
3. ∇(f u) = (∇f ).u + f ∇.u
4. ∇.(u × v) = (∇ × u).v − (∇ × v).u.
5. ∇ × (f u) = (∇f ) × u + f ∇ × u
6. ∇ × (u × v) = u(∇.v) + (v.∇)u − (u.∇)v − (v.∇)u.

54
9.5.3 Repeated use of ∇
Using ∇ twice is basically a double differentiation, but again care must be taken regarding whether we
are dealing with scalars or vectors. The various possibilities are:

1. div gradf = ∇2 f , the Laplacian


2. curl gradf = 0, as proved previously
2 ∂ 2 Fy ∂ 2 Fz
3. grad div F = i( ∂∂ 2Fxx + ∂x∂y + ∂x∂z ) + similar terms for j, k.

4. div curl F = 0, as seen previously


5. curl curl F = ∇(∇.F) − ∇2 F, where we interpret ∇2 F = ∇2 Fx i + ∇2 Fy j + ∇2 Fz k.

9.6 Other coordinate systems


We can use Stokes Theorem ( see next section) to find an expression for the curl of a vector field in a
general coordinate system. We find


e1 h1 e2 h2 e3 h3
1 ∂ ∂ ∂
curl F = ∇×F=
∂q1 ∂q2 ∂q3
h1 h2 h3 h1 F1 h2 F2 h3 F3

So we get
i) Cylindrical polars

e ρeφ ez
1 ∂ρ ∂ ∂
curl F = ∇ × F = ∂ρ ∂φ ∂z
ρ
Fρ ρFφ Fz

ii) Spherical polars


er eθ r e3 h3
1 ∂ ∂ ∂
curl F = ∇×F= 2
∂q1 ∂q2 ∂q3
r sin θ h1 F1 h2 F2 h3 F3

10 Maxwells’ equations
10.1 Maxwell’s equations in differential form
Maxwell’s equations involve div and curl:
∂B
curl E = − Faraday’s law for induction
∂t
∂E
curl B = µ0 J + ε0 µ0 Ampere’s law
∂t
div B = 0 Gauss’s law for magnetism
ρ
div E = Gauss’s law for electricity.
ε0
Here E - electric field, B - magnetic field, J - electric current density, µ0 - permeability of free space, ε0
- permittivity of free space, ρ - electric charge density.

55
10.2 Consequences of Maxwells’ equations
∂E
Notice firstly that the displacement current ∂t is required to satisfy the conservation of charge, which
needs
∂ρ
+ divJ = 0.
∂t
1. Taking the curl of Faraday’s law gives curl curl E = −curl( ∂B
∂t ), so that

grad(div E) − ∇2 E = − ∂(curl
∂t
B)
= −ε0 µ0 l ∂ 2 lE
∂t2 , with J = 0 in free space.
Also, in free space, ρ = 0, so divE = 0, and thus we get
∂ 2 lE √
−∇2 E = −ε0 µ0 ∂t2 , which is the wave equation, with speed of the waves = 1/ ε0 µ0 .
It turns out that this gives a speed of about 300,000 km /sec, which enabled light to be identified
as an electromagnetic wave.

2. Since div B = 0, we can take B = curl A, since it is guaranteed that div curl A = 0 for any vector
field A.
Similarly, since curl E = 0 in the stationary case, we can write E = −grad φ, since curl gradφ = 0
∂(curl A)
for any scalar field φ.In the non-stationary case, since curl E = − ∂B
∂t = − ∂t , we can take
E = −grad φ − Ȧ, B = curl A. The fields φ and A are respectively the scalar and vector potentials
of electromagnetism.
There is some latitude in this choice, since φ + ∂χ
∂t and A − grad χ will also satisfy Maxwell’s
equations in the same way. The choice of χ is known as a gauge choice.
3. In electrostatics, Ȧ = 0, so E = −grad φ. In the absence of charges, we have div E = 0, so we end
up with ∇2 φ = 0 - Laplace s equation. We can solve this in various geometries, to find the electric
field:

(a) the field between two infinite parallel planes x = 0, x = h, with φ = 0 on x = 0, and φ = V on
x = h.
2
Laplace’s equation, in one dimension, gives ∂∂xφ2 = 0, which is easily integrated to φ = ax + b.
The conditions give φ = V x/h, so E = −iV /h.
(b) the field between two concentric spheres, r = R1 , r = R2 , R2 > R1 , with potentials V0 , 0
respectively. Laplace’s equation, with only radial dependence of the potential, is
1 ∂ 2 ∂V
(r ) = 0.
r2 ∂r ∂r
This integrates to gove V = −a/r + b, which, using the boundary conditions, becomes
V = RV20−R
R1
1
(1 − R2 /r), which then gives the electric field E = −gradV = (RV2o−R
R1 R2
1 )r
2 er .

(c) the field due to a cylinder, radius a, axis the z-axis, at zero potential, embedded in a constant
field E0 . Laplace’s equation is now

1 ∂ ∂V 1 ∂2V
(ρ )+ 2 = 0.
ρ ∂ρ ∂ρ ρ ∂φ2
For large ρ, we have E = E0 i so that V = −E0 x = −E0 ρ cos φ in cylindrical coordinates.We
df
therefore try a solution of the form V = f (ρ) cos φ.On substitution, this gives ρ1 dρ (ρ dρ )− ρ12 f =
n
0. Trying a solution of the form f = ρ gives n = ±1, so that f = Aρ + B/ρ. Substituting the
conditions on ρ = a gives V = −E0 ρ(1 − a2 /ρ2 ) cos φ which in turn gives

E = E0 (1 + a2 /ρ2 ) cos φ eρ − E0 (1 − a2 /rho2 ) sin φ eφ .

On the surface of the cylinder, this gives E = 2E0 cos φ eρ ie a totally radial field.

56
(d) the field due to a dipole, with charges ±e at z = ±l. The potential at A due to the two charges
is V = e0 (1/r1 −1/r2 ), where r1 is the distance of A from z = l, and similarly for r2 .We can use
the cosine rule to find r12 = l2 + r2 − 2lr cos θ, and expanding we get 1/r1 ≈ 1/r(1 + l/r cos θ),
where we have assumed we are a long way from the origin. With a similar result for 1/r2 , we
find V = e2l0cos θ
r 2 , or
D cos θ D sin θ
E = −gradV = er + eθ ,
0 r 3 20 r3
where D = el is the dipole moment. We thus have a weak force, the inverse cube of the
distance from the dipole. Specific cases of θ = 0, 90 and 180 all give the expected forces and
directions.

57
11 Stokes’s and Gauss’s theorems
11.1 Stokes’s theorem
The surface integral (flux) of curl F across any simple surface S is equal to the line integral of F around
the closed boundary curve C. Z I
curl F · ndA = F · dr.
S C
The sense of the traversal of the line integral is related to the unit normal of the surface by the right
hand screw rule.

11.2 Gauss’s theorem (divergence theorem)


The volume integral of div F over a region B is equal to the surface integral (outward flux) of F across
the surface enclosing B.
Z Z
div FdV = F · ndA where n is the outward unit normal to S.
B S

y y y

x x
x
z z

Figure 34:

Remark 9 In Stokes’s theorem we have that


Z I
curl F · ndA = F · dr
S C

where S is the surface enclosed by the closed curve C. For any closed curve C there are infinitely many
surfaces S that are enclosed by C.
If C is the closed curve x2 + y 2 = 1, z = 0, one possible S could be the circular disk x2 + y 2 = 1, z = 0
(see Figure 34). Alternatively S could be the hemisphere x2 + y 2 + z 2 = 1, z ≥ 0. Or S could be the
surface of the cylinder ρ = 1, 0 ≤ φ ≤ 2π, 0 < z ≤ 2 (i.e. the curved surface and top, but not the base).

Example 11.1 (of Gauss’s theorem)


Verify that Gauss’s theorem holds for the vector field F = 3xyi − 2zxk, and the brick B bounded by
1 ≤ x ≤ 3, 0 ≤ y ≤ 2, 2 ≤ z ≤ 5.
R R
Solution: We need to show that B div FdV = S F · ndA where S denotes the surface of the brick B.
For the right hand side we have
Z 6 Z
X
F · ndA = ( F · ndA)
S i=1 f ace i

58
such that

on face 1, x = 1, 0 ≤ y ≤ 2, 2 ≤ z ≤ 5 and n = −i
on face 2, x = 3, 0 ≤ y ≤ 2, 2 ≤ z ≤ 5 and n = i
on face 3, y = 0, 1 ≤ x ≤ 3, 2 ≤ z ≤ 5 and n = −j
on face 4, y = 2, 1 ≤ x ≤ 3, 2 ≤ z ≤ 5 and n = j
on face 5, z = 2, 1 ≤ x ≤ 3, 0 ≤ y ≤ 2 and n = −k
on face 6, z = 5, 1 ≤ x ≤ 3, 0 ≤ y ≤ 2 and n = k.

Hence we have
Z Z2 Z5
F · ndA = (3xyi − 2zxk) · (−i)dzdy
f ace 1
0 2
Z2 Z5
= −3ydzdy
0 2
  5 
Z2 Z
= − 3ydy   dz 
0 2
 2
3 2 5
= − y [z]2 = −18
2 0

Z Z2 Z5
F · ndA = (3xyi − 2zxk) · idzdy
f ace 2
0 2
Z2 Z5
= 3xydzdy
0 2
Z2 Z5
= 9ydzdy
0 2
 2
9 5
= − y2 [z]2 = 54
2 0

Z Z3 Z5
F · ndA = (3xyi − 2zxk) · (−j)dzdx
f ace 3
1 2
Z3 Z5
= 0dzdx = 0
1 2

Z Z3 Z5
F · ndA = (3xyi − 2zxk) · jdzdx = 0
f ace 4
1 2

59
Z Z3 Z2
F · ndA = (3xyi − 2zxk) · (−k)dydx
f ace 5
1 0
Z3 Z2
= 2zxdydx
1 0
Z3 Z2
= 4xdydx
1 0
  2 
Z3 Z
=  xdx  4dy  = 32
1 0

and
Z Z3 Z2
F · ndA = (3xyi − 2zxk) · kdydx
f ace 6
1 0
Z3 Z2
= −2zxdydx
1 0
Z3 Z2
= −10xdydx = −80.
1 0

So Z
F · ndA = −18 + 54 + 0 + 0 + 0 + 32 − 80 = −12.
S
For the left hand side we have
Z
∂Fx ∂Fy ∂Fz
div FdV = + + = 3y − 2x.
B ∂x ∂y ∂z

60
So
Z Z5 Z2 Z3
div FdV = (3y − 2x) dxdydz
B
2 0 1
Z5 Z2
3
3yx − 2x2 1 dydz

=
2 0
Z5 Z2
= [(9y − 9) − (3y − 1)] dydz
2 0
Z5 Z2
= (6y − 8)dydz
2 0
Z5
 2 2
= 3y − 8y 0 dz
2
Z5
= (12 − 16) dz
2
Z5
5
= −4dz = −4 [z]2 = −12.
2

Since the left hand side equals the right hand side, the theorem is verified.

Example 11.2 (of Gauss’s theorem)


Verify that Gauss’s theorem holds for the vector field F = r2 er + r sin θ cos φeφ and the sphere B with
centre the origin and radius 1.
R R
Solution: We need to show that B div FdV = S F · ndA where S denotes the surface of the sphere B.
For the right hand side we have
Z Z Z
F · ndA = F · er dA = r2 dA.
S S S
Since r = 1 on the surface of the sphere and dA = R2 sin θdθdφ = sin θdθdφ we have
Z Z Z 2π Z π
F · ndA = r2 dA = sin θdθdφ
S S 0 0
Z 2π  Z π 
= dφ sin θdθ
0 0
2π π
= [φ]0 [− cos θ]0
= (2π − 0)(−(−1 − 1)) = 4π.
For the left hand side we note that
1 ∂ 2 1 ∂ 1 ∂Fφ
div F = ∇·F= 2
(r Fr ) + (Fθ sin θ) +
r ∂r r sin θ ∂θ r sin θ ∂φ
and hence
1 ∂ 2 2 1 ∂ 1 ∂(r sin θ cos φ)
div (r2 er + r sin θ cos φeφ ) = (r r ) + (0 sin θ) +
r2 ∂r r sin θ ∂θ r sin θ ∂φ
1 ∂ 4 1 ∂ r sin θ ∂(cos φ)
= (r ) + (0) +
r2 ∂r r sin θ ∂θ r sin θ ∂φ
= 4r − sin φ.

61
Thus since dV = r2 sin θdrdθdφ we have
Z Z
divFdV = (4r − sin φ)dV
B B
Z 2π Z π Z 1
= (4r − sin φ)r2 sin θdrdθdφ
0 0 0
Z 2π Z π Z 1
= (4r3 − r2 sin φ) sin θdrdθdφ
0 0 0
Z 2π  Z π 1
4 1 3
= r − r sin φ sin θdθdφ
0 0 3 0
Z 2π Z π  
1
= 1 − sin φ sin θdθdφ
0 0 3
Z 2π   Z π 
1
= 1 − sin φ sin θdθ dφ
0 3 0
Z 2π  
1 π
= 1 − sin φ [− cos θ]0 dφ
0 3
Z 2π  
1
= 2 1 − sin φ dφ
0 3
 2π
1
= 2 φ + cos φ = 4π.
3 0

Example 11.3 (of Stokes’s theorem)


Verify that Stokes’s theorem holds for the vector field F = yzi − xzj + zk and the closed curve C given
by x2 + y 2 = 1, z = 3.

Solution: We need to show that Z I


curl F · ndA = F · dr
S C
where n is related to the direction of traversal of the curve C by the right hand screw rule, and S is a
surface enclosed by C.
We choose our surface S to be the disc x2 + y 2 ≤ 1, z = 3, and we take a clockwise traversal of the curve
C, so that n = −k.
For the right hand side we have
I I
F · dr = Fx dx + Fy dy + Fz dz
C C
Z φ2
dx dy dz
= (Fx + Fy + Fz )dφ
φ1 dφ dφ dφ
dx dy dz
where φ1 = 2π, φ2 = 0, x = cos φ, y = sin φ, z = 3 ⇒ dφ = − sin φ, dφ = − cos φ, dφ = 0.
Hence
I Z0
F · dr = (−yz sin φ − xz cos φ) dφ
C

Z0
−3 sin2 φ − 3 cos2 φ dφ

=

Z0
0
= −3dφ = [−3φ]2π = −3 (0 − 2π) = 6π.

62
For the left hand side we have
Z Z 2π Z 1
curl F · ndA = curl F · nρdρdφ
S 0 0

with

i j k i j k
∂ ∂ ∂
curl F = ∂x ∂y ∂ ∂ ∂
∂z = ∂x ∂y ∂z
Fx Fy Fz yz −xz z
     
∂z ∂ (−xz) ∂z ∂ (yz) ∂ (−xz) ∂ (yz)
= i − −j − +k −
∂y ∂z ∂x ∂z ∂x ∂y
= xi + yj − 2zk.
Hence
curl F · n = (xi + yj − 2zk) · (−k)
= 2z = 6 (since z = 3).
So
Z Z 2π Z 1
curl F · ndA = 6ρdρdφ
S 0 0
Z 1  Z 2π 
= 6ρdρ dφ
0 0
 1 2π
= 3ρ2 0 [φ]0
= 6π.
Since the left hand side equals the right hand side, the theorem is verified.
Example 11.4 (of Stokes’s theorem)
Verify that Stokes’s theorem holds for the vector field F = yzi − xzj + zk and the closed curve C that
lies in the plane x = 1 and consists of the three lines L1 , L2 and L3 where on L1 we have z = 0 and
0 ≤ y ≤ 1, on L2 we have y = 1 and 0 ≤ z ≤ 1 and on L3 we have z = y and 0 ≤ y ≤ 1.
Solution: We need to show that Z I
curl F · ndA = F · dr
S C
where n is related to the direction of traversal of the curve C by the right hand screw rule, and S is a
surface enclosed by C.
We choose our surface S to be the two dimensional triangular surface lying in the plane x = 1 that is
bounded by the three lines L1 , L2 and L3 , and we take an anticlockwise traversal of the curve C, so that
n = i.
For the right hand side we have
Z Z Z Z
F · dr = F · dr + F · dr + F · dr.
C L1 L2 L3

Since x = 1 and z = 0 on L1 we have


dx dz
= =0
dy dy
and since y varies from 0 to 1 we have
Z Z
F · dr = yzdx − xzdy + zdz
L1 L1
Z 1 
dx dy dz
= yz − xz +z dy
0 dy dy dy
Z 1 Z 1
= − xzdy = − 0dy = 0.
0 0

63
Since x = 1 and y = 1 on L2 we have
dx dy
= =0
dz dz
and since z varies from 0 to 1 we have
Z Z
F · dr = yzdx − xzdy + zdz
L2 L2
Z 1 
dx dy dz
= − xz yz+z dz
0 dz dz dz
Z 1  2 1
z
= zdz = = 1/2.
0 2 0

Since x = 1 and z = y on L3 we have


dx dz
=0 and =1
dy dy
and since y varies from 0 to 1 we have
Z Z
F · dr = yzdx − xzdy + zdz
L3 L3
Z 1 
dx dy dz
= yz − xz +z dy
0 dy dy dy
Z 1
= (−xz + z)dy
0
Z 1 Z 1
= (−y + y)dy = 0dy = 0.
0 0

Hence Z Z Z Z
F · dr = F · dr + F · dr + F · dr = 0 + 1/2 + 0 = 1/2.
C L1 L2 L3

From the previous example we have that curlF = xi + yj − 2zk and hence for the left hand side we have
Z Z Z
curl F · ndA = curl F · idA = xdA.
S S S

Since S lies in the plane x = 1 we have


Z Z
xdA = dA = area of S = 1/2.
S S

Since the left hand side equals the right hand side, the theorem is verified.

11.3 Potential Theory


We have seen that sometimes we may represent a vector as the gradient of a scalar, F = ∇φ. In this
case, F is said to be a conservative vector field.We will now investigate the circumstances in which this
is possible.It turns out that there are 3 equivalent statements:

i) A: We may write F = ∇φ
ii) B: ∇ × F = 0 everywhere
H RQ
iii) C: F · dr = 0 for any loop, or, equivalently, P F · dr is path-independent.

We can show that these are logically equivalent as follows:

64
i) A ⇒ B. If F = ∇φ, then ∇ × F = ∇ × ∇φ ≡ 0, as a standard identity.
R
H B ⇒ C. If ∇ × F = 0 everywhere, then
ii) S
∇ × FdA = 0 for any surface S, and so by Stokes’ Theorem,
F · dr = 0 for any loop.
H R
iii) C ⇒ B. If F · dr = 0 for any loop, then by Stokes Theorem, S ∇ × F = 0 for any surface S, so
∇ × F = 0 everywhere.
RQ RQ
iv) C ⇒ A. If P
F · dr is path-independent, then P
F · dr = φ(Q) − φ(P ). Taking Q = P + dr, we get

F · dr = φ(Q + dr) − φ(Q)


= dφ
∂φ ∂φ ∂φ
= dx + dy + dz
∂x ∂y ∂z
= ∇φ · dr,

so that F = ∇φ.

We have thus shown that, starting with any of these three conditions, the other two may be derived, and
thus they are equivalent.

Example 11.5

Show that F = (xy 2 + z)i + (xy 2 + 2)j + xk is a conservative vector field, and find the scalar potential φ
from which it may be derived.
∂φ
Since we have ∂x = xy 2 + z, then φ = x2 y 2 /2 + zx + f (y, z).
∂φ ∂f ∂f
Then ∂y = x2 y + ∂y = xy 2 + 2, so that ∂y = 2.

Thus, f = 2y + g(z), so φ = x2 y 2 /2 + zx + 2y + g(z).


∂φ ∂g ∂g
Then ∂z =x+ ∂z = x, so that ∂z = 0 ie g is a constant, c.

Thus, finally, we have φ = x2 y 2 /2 + zx + 2y + c.

65
12 The calculus of variations
12.1 The shortest distance
Suppose we want to find the shortest distance between two points in 2-d space. If they are (x1 , y1 ), (x2 , y2 ),
then any distance between the two is given by
Z x2 p Z x2 p
I= 2 2
dx + dy = 1 + y 02 dx
x1 x1

where we do the integration along the route y = y(x). We wish to find the route that minimizes the
integral.

Suppose that y(x) is the required answer, and that we write any other curve as Y (x) = y(x) + h(x),
with h(x1 ) = h(x2 ) = 0. Thinking of I as I(), we want to find the minimum value of I, so we want
dI
d = 0 when  = 0.
Z x2
dI 1 1 dY 0
We find = √ 2Y 0 dx. Using Y 0 (x) = y 0 (x) + h0 (x) gives
d 2 1 + Y 02 d
x1 Z x2 0
dY 0 0 dI y (x)h0 (x)
d = h (x), so that = p dx = 0.
d =0 x1 1 + y 02
dI h y 0 h(x) ix2 Z x2 d  y0 
We now integrate by parts, to get = p − h(x) p dx.
d =0 1 + y 02 x1 x1 dx 1 + y 02  0

The first term is zero, because h(x1 ) = h(x2 ) = 0, so to achieve a minimum we need dx d √ y 02 = 0.
1+y
 
√ y0 0
This means that 02
= constant, so y = constant. Thus, the required curve y(x) is a straight line,
1+y
as expected.

12.2 Euler’s Equation


Rx
Suppose we now generalize the problem, to ask which curve y(x) minimizes the integral I = x12 F (x, y, y 0 )dx,
where F is a given function.
As before, consider any curve Y (x) = y(x) + h(x), with h(x1 ) = h(x2 ) = 0. Thinking of I as I(), we
want to find the minimum value of I, so we want dI d = 0 when  = 0.
Z x2 
dI ∂F dY ∂F dY 0 
We find = + 0 d
dx. Using Y 0 (x) = y 0 (x) + h0 (x) again gives
d x1 ∂Y d ∂Y
Z x2 
dY 0 dI ∂F ∂F 
d = h0
(x), so that ( ) =0 = h + 0 h0 dx = 0.
d x ∂y ∂y
Z x2
∂F 0 h ∂F 1ix2 Z x2 d  ∂F 
Using parts 0
h dx = h − hdx. The integrated term is zero, again because
x1 ∂y ∂y 0 x1 x1 dx ∂y
0

of the boundary
Z x2 conditions, so we finally get
 dI  ∂F d ∂F 
= − hdx = 0.
d =0 x1 ∂y dx ∂y 0
Since h is arbitrary, we have
∂F d ∂F
− = 0,
∂y dx ∂y 0
which is the Euler ( sometimes known as Euler-Lagrange) equation.

12.3 The Brachistochrone Problem


This is a famous problem, in which we must find the shape of a smooth wire, joining the points (x1 , y1 )
and (x2 , y2 ), so that a bead will
R slide down the wire in the shortest time.
Clearly, we need to minimize dt.Taking initial speed v = 0, and the reference level for gravitational
potential energy as y = 0, then at the point (x, y) we have that the kinetic energy = 12 mv 2 and the

66
potential energy = −mgy ( we are measuring y√ as positive in the down direction). Conservation of
energy then gives 21 mv 2 − mgy = 0, so that v = 2gy.
Z p
1 + y 02
Z Z Z
ds ds 1
So we need to minimize the integral dt = = √ =√ √ dx.
v 2gy 2g y
It turns out that the easiest way (because F does not explicitly contain x) to √ use the Euler equation is
√ 1 + x02
Z
p 1
by using ds = dx2 + dy 2 = dy 1 + x02 , so that we try to minimize √ √ dy. We now use
2g y
∂F d ∂F
the alternate version of the Euler equation: − = 0, because the integration is with respect to
∂x dy√ ∂x0 √
02 1+x02
∂( 1+x

y ) d ∂( √y )
y, and this, when applied to the y-integral, gives − = 0.
∂x dy ∂x0 √
1+x02
d ∂( √y )
The first term is zero, since F has no explicit dependence on x, so we get 0
= 0. This
dy ∂xr
x0 dx cy
integrates immediately to √ √ = constant, which we can rearrange as = . This
1 + x02 y dy 1 − cy
r
y 1
integrates, by separation of variables, to give x = − − y2 + cos−1 (1 − 2cy) + c0 . If the curve passes
c 2c
through the origin, then we have c0 = 0. This curve is in fact the equation of a cycloid, and it is more
simply written using a parameter θ, when we get
1 1
x= (θ − sin θ), y = (1 − cos θ).
2c 2c
A cycloid is well known as the locus of a point on the circumference of a circle as that circle rolls along
a level surface.

12.4 Hamilton’s Principle


Rx
We may generalize our original question, of minimizing I = x12 F (x, y, y 0 )dx, to the case where F depends
Rx
on several variables y1 , y2 , ..., each of which depend on x, so that we have I = x12 F (x, y1 , y2 , ..., y10 , y20 , ....)dx.
Using the same method as before, we now get a set of Euler equations, of the form
∂F d ∂F
− = 0, i = 1, 2, ....., n.
∂yi dx ∂yi0
This is particularly useful in analyzing systems which depend on several coordinates. If we define the
Lagrangian L of a system as the difference of its kinetic and potential energies, so L = T − V , then
Hamilton’s principle says that a system evolves in such a way that the time integral of the Lagrangian
∂L d ∂L
is a minimum. This leads to the Lagrange equations − = 0, i = 1, 2, ....., n, where now the
∂xi dt ∂x0i
variables are labeled xi , and they all depend on t.
This formulation of mechanics is equivalent to the Newtonian one, but it involves only scalars, and it is
more amenable to choosing different coordinate systems to the usual Cartesian x, y, z. We can easily see
that in one dimension, it reduces to the usual form, since if we take T = 12 mx02 and potential V (x) ( so
∂(−V )
that the force in the x-direction is F = − dV
dx ), we get ∂x
d ∂T
− dt ∂x0 = 0, or F = mẍ, which of course is
just Newton’s’s second law.

12.5 Noether’s Theorem


Hamilton’s principle can be used in non-mechanical contexts, such as electromagnetism, with an appro-
priate definition of the Lagrangian. In general, in known theories, it simply reproduces results already
know, albeit sometimes in a simpler and more elegant way. However, where a theory is incomplete, a
postulated Lagrangian can be a useful way forward. Such an approach has been widely used in particle
physics and string theory.

67
An example of this is Noether’s Theorem, which states that the invariance of the Lagrangian with respect
to a variable ( such as position or time) implies the conservation of a particular quantity (linear momentum
and energy, respectively, for the two examples mentioned). We can see this in the very simplest example,
with L = 12 mx02 − V (x). Applying Euler’s equation gives ∂L d ∂L ∂L d ∂L
∂x − dt ∂x0 = 0, or ∂x = dt ∂x0 .
dL ∂L 0 ∂L 00 ∂L
Now consider = x + x + , using the chain rule of partial differentiation, and assuming
dt ∂x ∂x0 ∂t
0
that L = L(x, x , t). If, in fact, L does not explicitly contain t, then ∂L ∂t = 0. Using the result in the
dL d ∂L 0 ∂L 00
previous paragraph, we then get = ( 0 )x + x , which we can see is the result of the product
dt dt ∂x ∂x0
dL d ∂L
rule = ( 0 x0 ).
dt dt ∂x
d ∂L 0 ∂L 0
Therefore we have (L − x ) = 0, and so L − ∂x 0 x = constant. But
dt ∂x0
L − ∂x0 x = 2 mx − V (x) − mx = − 2 mx − V (x), so we have 12 mx02 + V (x) = constant ie the
∂L 0 1 02 02 1 02

conservation of energy.

68

You might also like