Chapter 4 - Lecture Notes 4
Chapter 4 - Lecture Notes 4
Chapter 4
Rb
In ordinary calculus, the expression a f (x)dx means “the integral of f (x) from x = a along
the x-axis to x = b.”
In vector calculus this concept can be generalised. Instead of integrating along the x-axis,
we can integrate along any curve.
An integral along a curve is called a line integral (or path integral, or curve integral, or
contour integral).
For a scalar field f (x, y, z), the line integral along a curve C is
Z
f ds (4.1)
C
where ds is an element of arc length along C. For example, Fig. 4.1 shows a curve C that
starts at a point A and ends at a point B, with P a general point on the curve. If arc length
is measured from point A, and sB is the arc length from A and B along C then
Z Z s=sB
f ds = f (P (s))ds, (4.2)
C s=0
43
about:blank 1/22
1/30/24, 4:21 PM Chapter 4 - Lecture notes 4
Figure 4.1: A scalar field line integral along a curve from A to B can be defined in terms of
the arc length from A but can be evaluated using a more convenient parameterisation of
the curve.
where points P (s) on C are parameterised by the arc length s and f (P (s)) denotes the
scalar field evaluated at the point P (s).
In general, arc length need not be measured from an endpoint of C. If arc length is mea-
sured from some other point D, then a line integral from A to B could be written as
Z s= sB
f (P (s))ds (4.3)
s=sA
where sA is the arc length from D to A and sB is the arc length from D to B. Choice of the
point from which arc length is measured does not influence the value of the line integral.
In practice, the curve is usually defined in terms of a parameter other than arc length. Sup-
pose that C is parameterised by t as r(t) = [x(t), y(t), z(t)] with A = P (tA ) and B = P (tB ).
For points on C, f (r(t)) is now a function of t only.
We have seen (section 2.1.4) that the arc length s along a curve C from a specified point
D where t = tD to a general point where t = t is
Z t
dr(τ ) dτ.
s(t) = dτ
tD
Then
ds dr(t) dr(t)
= ) ds = dt.
dt dt dt
Hence the line integral along C from A to B can be written:
Z sB Z tB Z tB
dr(t)
ds
Z
f ds = f (P (s)) ds = f (P (t)) dt = f (P (t)) dt. (4.4)
C sA tA dt tA dt
Special case:
R R
If f (P ) = 1, then C f (P )ds = C ds is the arc length (or length) of the curve C .
44
about:blank 2/22
1/30/24, 4:21 PM Chapter 4 - Lecture notes 4
45
about:blank 3/22
1/30/24, 4:21 PM Chapter 4 - Lecture notes 4
Example 4.1. Evaluate the integral C x2 + y 2 ds where C is the shorter arc of the circle
R
2 2
(x, y, z) : x + y = 1, z = 0
from (1, 0, 0) to (0, 1, 0).
Solution. We integrate along C as depicted in figure 4.2, from A (1, 0, 0) to B (0, 1, 0).
π
Parameterise C by r = [x, y, z] = [cos t, sin t, 0]. Then at A, t = 0, and at B, t = 2. Also
dr
dt = [ sin t, cos t, 0], so that
p
dr
= sin2 t + cos2 t = 1.
dt
Hence:
Z
Z Z
ds dr
x2 + y 2 ds = x2 + y 2 x2 + y 2 dt
I = dt =
C C dt C dt
Z π Z π
2 2 π
π
cos2 t + sin2 t (1)dt =
= 1dt = [t]02 = .
0 0 2
RExample 4.2. If C is a curve in the x-y plane, and z = f (x, y) > 0 along C, then
C f (x, y)ds is the area of the “curtain” between C and f (x, y) along C (see figure 4.3).
Remark 4.1. A curve C is simple if it does not intersect itself. It is closed if by travelling
along it we can end up back we started. Figure 4.4 shows an example of a simple closed
curve.
Remark 4.2. When C is a simple closed curve, we use the following notation for a line
integral around C : I
f ds.
C
The orientation of C (direction we go round it) is important, in the same way that the order
of the lower and upper limits is important for ordinary integration. This remark applies to
all types of line integral.
Figure 4.4: The value of a (non-zero) line integral around a closed curve C is dependent
on the direction around which we traverse it.
Remark 4.3. If a curve C can be decomposed into several smaller curves then we can
integrate over each smaller curve separately. For example, if C = C1 [ C2 [ C3 , then
Z Z Z Z
f ds = f ds + f ds + f ds.
C C1 C2 C3
This remark applies to all types of line integral.
46
about:blank 4/22
1/30/24, 4:21 PM Chapter 4 - Lecture notes 4
An important class of line integral arises when the scalar function to be integrated is the
component of a vector field locally tangent (i.e. parallel) to the curve, i.e. f = F · û where
û is a unit vector locally tangent to the curve.
Suppose that the curve C is parameterised by t as r(t) and has endpoints A = r(tA ) and
B = r(tB ). We recall from Chapter 2 that dr/dt is tangent to C. Writing this vector as the
product of a magnitude and a unit vector,
dr dr
= û .
dt dt
Substituting f = F · û into the formula for the line integral of a scalar field (equation 4.4),
we obtain
dr dr
Z Z Z
f ds = F · û dt = F· dt
C C dt C dt
47
about:blank 5/22
1/30/24, 4:21 PM Chapter 4 - Lecture notes 4
Consider a particle moving along a curve C through space (its trajectory ) parameterised
by time t, so that the position of the particle at any time is r(t). If the particle experiences
a force F(r(t)) then the work done on the particle by that force is
Z
W = F · dr.
C
Work has units of energy. Examples of work include the work that gravity does to accelerate
a falling object and the work that air resistance does to slow the object or resist gravity; if
the object starts from rest and there are no other forces, then the final kinetic energy is the
difference between these works.
(x, y, z) : x2 + y 2 = a2 , z = 0
in the first quadrant of the x-y plane from A (a, 0, 0) to B (0, a, 0). Find the work done W
by the force on the particle.
dr
= [a sin t, a cos t, 0].
dt
48
about:blank 6/22
1/30/24, 4:21 PM Chapter 4 - Lecture notes 4
Hence,
t= π2
dr
Z Z
W = F · dr = F· dt
C t=0 dt
Z π
2
= F0 [2, 3, 0] · [a sin t, a cos t, 0]dt
0
Z π
2
= F0 (2a sin t + 3a cos t) dt
0
π
= F0 [2a cos t + 3a sin t]02
= F0 [(3a) (2a)] = 5aF0 .
The Solar MHD group at Dundee have pioneered the use of line integrals to quantify the
topology of magnetic fields. When A is a vector potential for a magnetic field B = r ⇥ A,
the integral I
A= A · dr
C
measures the amount of magnetic flux linking linking the closed curve C. This result comes
from Stokes’ theorem, which we will encounter in a later chapter.
The line integrals seen so far in this course produced a scalar result. Some other types of
line integral produce a vector result, and we consider two of these.
First, consider a curve C that starts at a point A and ends at a point B. Having introduced
dr as the infinitesimal displacement along a curve, the line integral
Z
dr = r(B) r(A)
C
gives the vector from point A to point B. If the curve is parameterised by t this can be
evaluated as
dr
Z Z
dr = dt.
C C dt
for a vector field F defined along a curve C . If the curve is parameterised by t this can be
evaluated as
dr
Z Z
F ⇥ dr = F⇥ dt
C C dt
49
about:blank 7/22
1/30/24, 4:21 PM Chapter 4 - Lecture notes 4
Solution. The curve C is shown in figure 4.7 and it is given by y = 1 x (and z = 0) from
(1, 0, 0) to (0, 1, 0). We can parameterise C as
dr(t)
Now F = [x, xyz, xz] = [t, 0, 0] and dt = [1, 1, 0]. Then:
ex ey ez
dr(t)
F⇥ = t 0 0 = ex (0) ey (0) + ez (t).
dt 1 1 0
Then:
0
1 0
Z 0 Z 0
dr(t)
Z
I = F⇥ dt = (tez ) dt = ez tdt = ez t2
1 dt 1 1 2 1
✓ ◆
1 1
1
= ez 0 = ez = 0 , 0 , .
2 2 2
50
about:blank 8/22
1/30/24, 4:21 PM Chapter 4 - Lecture notes 4
Figure 4.8: We can integrate a scalar field over a surface S with general point P .
In section 4.1 we saw that a line integral generalises the idea of integrating along the x-
axis. In this section we generalise the ideaRRof integrating over a planar region, such as a
region D in the x-y plane as in the integral D f (x, y)dxdy, to any surface S .
Consider a surface S described in terms of parameters u and v, that is, a general point P
in the surface can be written as
denotes a surface integral over S, where dS is an element of surface and denotes integra-
tion with respect to surface area (see figure 4.8).
We can evaluate a surface integral by splitting the surface into small surface elements.
If we hold one parameter fixed then the surface equation r(u, v) describes a curve; for
example, if u = u0 = constant, then r(u, v) = r(u0 , v) is a curve.
Let P = r(u0 , v0 ) be a general fixed point in S. Here u0 and v0 are constants. Consider the
region ABCP on S (see figure 4.9) bounded by the curves u = u0 , u = u0 + δu, v = v0 ,
v = v0 + δv, i.e., the curves r(u0 , v), r(u0 + δu, v), r(u, v0 ), and r(u, v0 + δv).
We seek to approximate this surface area element ABCP . We call the element dS and
depict it in figure 4.10. As we see in figure 4.11, we can approximate dS by two triangles:
51
about:blank 9/22
1/30/24, 4:21 PM Chapter 4 - Lecture notes 4
52
about:blank 10/22
1/30/24, 4:21 PM Chapter 4 - Lecture notes 4
Figure 4.12: The area of a triangle with sides a and b is 12 |a||b| sin θ where θ is the angle
1
between a and b. Hence, using the definition of the cross product, the area is |a ⇥ b|.
2
53
about:blank 11/22
1/30/24, 4:21 PM Chapter 4 - Lecture notes 4
where O((δu)2 ) denotes terms in (δu)2 or higher powers in δu. In other words, we have:
∂r
rA rP = δ u + O((δ u)2 ),
∂u
∂r
where ∂u is evaluated at P where u = u0 and v = v0 .
Similarly,
∂r ∂r
rB rP = δu + δ v + O((δ u)2 ) + O((δ v)2 ) + O(δ uδ v),
∂u ∂v
∂r
rC rP = δ v + O((δ v)2 ),
∂v
∂r ∂r
where ∂u and ∂v are evaluated at P .
∂r ∂r ∂r ∂r
Therefore, since ∂u ⇥ ∂u = 0 and ∂v ⇥ ∂v = 0, we find:
✓ ◆
1 ∂r
∂r
dS ⇡ ⇥ δ uδ v + (terms in δu, δv of cubic or higher order)
2 ∂u ∂v
✓ ◆
1 ∂r ∂r
+ ⇥ δ uδ v + (terms in δu, δv of cubic or higher order) .
2 ∂u ∂v
Therefore: u2
v2
∂r
ZZ Z Z
∂r
f dS = f (u, v) ⇥ dudv, (4.5)
S v1 u1 ∂u ∂v
where u1 (v) u u2 (v), v1 v v2 defines S .
54
about:blank 12/22
1/30/24, 4:21 PM Chapter 4 - Lecture notes 4
Remark 4.4. If u and v are coordinates of an orthogonal coordinate system and the surface
S is a coordinate surface (defined by the remaining coordinate w = constant on S), then
∂r/∂ u and ∂r/∂ v are parallel to the coordinate directions (see derivation of unit vectors)
and they are therefore orthogonal. In this special case,
∂r ∂r ∂r ∂r
∂u ⇥ ∂v = ∂u ∂v = hu hv .
Note that this simplification relies on the third coordinate being constant: it doesn’t work
when a surface is parameterised using a pair of orthogonal coordinates u, v and the re-
maining coordinate w(u, v) is not constant, e.g. the paraboloid r(x, y) = [x, y, x2 + y 2 ] has
dS 6= 1 (try it).
RR RR
If f (P ) ⌘ 1, then S f (P ) dS = S dS = surface area of S .
Solution. One parameterisation of this surface (c.f. standard spherical polar coordinates)
is:
r = [x, y, z] = [a cos u sin v, a sin u sin v, a cos v], u 2 [0, 2π), v 2 [0, π].
Then:
∂r
= [a sin u sin v, a cos u sin v, 0],
∂u
∂r
= [a cos u cos v, a sin u cos v, a sin v].
∂v
Hence
ex ey ez
∂r ∂r
⇥ = a sin u sin v a cos u sin v 0
∂u ∂v a cos u cos v a sin u cos v a sin v
= ex a2 cos u sin2 v ey a2 sin u sin2 v
2 2 2 2
+ ez a sin u sin v cos v a cos u sin v cos v
= a2 sin v[cos u sin v, sin u sin v, cos v].
∂r ∂r
= a2 sin v.
Then ⇥
∂u ∂v
Thus:
ZZ Z π Z 2π Z π
dS = a2 sin vdudv = 2πa2 sin vdv
S 0 0 0
= 2πa 2
[ cos v]π0 = 2π a [(1) (1)] = 4π a2 .
2
55
about:blank 13/22
1/30/24, 4:21 PM Chapter 4 - Lecture notes 4
For this example, the solution from first principles can be shortened by noting that u ⌘ φ
and v ⌘ θ are coordinates of an orthogonal coordinate system, and we integrate over a
RR r = constant.
coordinate surface R π R 2π The scale factors are hu = r sin θ ⌘ a sin v and hv = r ⌘
a, which gives S dS = 0 0 a2 sin vdudv, from which the final answer is obtained as
before.
Example 4.6. Find the surface area of the paraboloid of revolution z = x2 + y 2 between
z = 0 and z = 9.
Then:
∂r ∂r
= [cos φ, sin φ, 2r], = [r sin φ, r cos φ, 0].
∂r ∂φ
Hence
ex ey ez
∂r ∂r
⇥ = cos φ sin φ 2r
∂r ∂φ
r sin φ r cos φ 0
Z 2π Z 3 1
r 4r2 + 1 2 drdφ
surface area =
0 0
3 3
✓ ◆ ✓ ◆
1 2 2
= 2π 4r + 1 2
8 3 0
π h 2 3 i3 πn 3
o
= 4r + 1 2 = (37) 2 1 .
6 0 6
For this example, the surface isn’t a coordinate surface because z depends on x and y ,
so we can’t replace ∂r ∂r
∂r ⇥ ∂φ
with scale factors. We can, however, reduce the amount
∂r ∂r
of calculation by noticing that ∂r · ∂φ = 0, i.e. the tangent vectors are orthogonal, which
means
∂r ∂r ∂r ∂r
∂r ⇥ ∂φ = ∂r ∂φ
in this example. Using this, we can swap evaluating a cross product and simplifying its
magnitude (standard working) for taking an extra magnitude (usually a good exchange).
56
about:blank 14/22
1/30/24, 4:21 PM Chapter 4 - Lecture notes 4
In applications, the integrand f (P ) is often the component of a vector field v normal to the
surface S, i.e., f (P ) = v · n where n is a unit normal to S. Then:
ZZ ZZ
f (P ) dS = v · n dS
S
Z vS2 Z u2
∂r ∂r
= v · n ⇥ dudv
v1 u1 ∂u ∂v
Z v 2 Z u2 ◆
∂r
✓
∂r
= v· ± ⇥ dudv,
v1 u1 ∂u ∂v
∂r ∂r
where the sign is chosen so that ± ∂u ⇥ ∂v is in the same direction as n.
RR RR
Remark 4.5. Sometimes S v · dS is used to denote S v · n dS.
Definition 4.2. The integral
ZZ
F = v · n dS
S
is called the flux of the vector field v through the surface S. For example, if v = ρu where
ρ is the density of a fluid and u its velocity, then F is the “mass flux”: the mass per unit time
transported through S by the flow.
RR
Example 4.7. Evaluate S r·n dS where n is the outward unit vector normal to the surface
S, which is composed of a hemisphere S1 given by
(x, y, z) : x2 + y 2 + z 2 = a2 , z > 0 ,
(x, y, z) : x2 + y 2 a2 ,
z=0 .
To take the surface integral, we need to parameterise S1 . One option (c.f. spherical coor-
dinates) is
h πi
x = a cos φ sin θ, y = a sin φ sin θ, z = a cos θ, φ 2 [0, 2π), θ 2 0, ,
2
57
about:blank 15/22
1/30/24, 4:21 PM Chapter 4 - Lecture notes 4
from which
∂r
= [a sin φ sin θ, a cos φ sin θ, 0],
∂φ
∂r
= [a cos φ cos θ, a sin φ cos θ, a sin θ],
∂θ
and so (by the same working as for Example 4.5)
∂r
⇥ ∂r = a2 sin θ.
∂θ ∂φ
Thus:
π
2π
ZZ
∂r
Z Z
2 ∂r
r · n dS = r · n ⇥ dφdθ
S1 0 0 ∂θ ∂φ
Z π Z 2π
2 2
= a a sin θ dφdθ
0 0
Z π
2 π
= 2πa3 sin θdθ = 2πa3 [ cos θ] 02 = 2πa3 .
0
For the flat base S2 , a unit outward normal is n = [0, 0, 1] and a parameterisation of S2 is
r = [x, y, 0] (with x and y the two parameters). Hence r · n = [x, y, 0] · [0, 0, 1] = 0. Thus,
ZZ ZZ
r · n dS = 0 dS = 0.
S2 S2
58
about:blank 16/22
1/30/24, 4:21 PM Chapter 4 - Lecture notes 4
∂r
∂r
In this case there is no need to calculate ∂r ⇥ ∂θ because the integrand is zero.
We can integrate vector fields as surface integrals. The result is a vector. For example, if
v(P ) = v1 (P )ex + v2 (P )ey + v3 (P )ez is a vector field defined over points P in a surface S ,
then ZZ ZZ ZZ ZZ
v(P ) dS = ex v1 (P ) dS + ey v2 (P ) dS + ez v3 (P ) dS.
S S S S
Applications include the vector field v representing the electric field at each point on an
electronically charged surface or gravity at each point in a sheet of material.
RRR RRR
P ∈V f (P )dV or, more concisely, V f dV denotes the volume integral of f (P ) over all
points P in a volume V . Here dV denotes integration with respect to volume.
In Cartesian coordinates we can use small cuboid boxes as our volume elements (see
figure 4.14): volume element dV = dxdydz. Then:
X Z z 2 Z y2 Z x2
lim f (P )dV = f (x, y, z)dxdydz.
dV →0 z1 y1 x1
59
about:blank 17/22
1/30/24, 4:21 PM Chapter 4 - Lecture notes 4
Application 1
RRR RRR
If f (P ) ⌘ 1 then P ∈V f (P )dV = V dV is simply the volume of V .
RRR R z 2 R y2 R x2
Solution. The volume is V dV = z1 y1 x1 dxdydz for appropriate limits.
Using figure 4.15, we can assume 0 z h. Also, for each fixed value of z, the limits for x
and y are determined by a circle (shown in figure 4.16). Using figure 4.16, we
pcan assume
y is from a to a. Then, for a fixed value Y of y, we see that x is from (ap 2 Y 2 ) to
p
(a 2 2 2 2
p Y ). Hence the limits for x corresponding to a general value y of y are (a y )
2 2
to (a y ). Hence:
Z h Z a Z p(a2 −y2 )
volume = p dxdy dz
0 −a − (a2 −y 2 )
Z a p
= 2h (a2 y 2 )dy = πa2 h. (4.6)
−a
The last step of the calculation is left as an exercise. (Hint: use psubstitution y = a sin θ
R athe
and the identity cos2 θ = 12 (1 + cos 2θ) to evaluate the integral −a (a2 y 2 )dy.)
60
about:blank 18/22
1/30/24, 4:21 PM Chapter 4 - Lecture notes 4
Figure 4.16: Cross section of the cylinder in figure 4.15 in the x-y plane.
It is often easier to evaluate a volume integral if we use a coordinate system other than
Cartesian coordinates. Suppose we use coordinates u, v, w related to Cartesian coordi-
nates x, y , z by the paramerisation:
Consider a general point P with position vector r(u, v, w) in a volume V . Define points A,
B, C near P by increasing some or all of the coordinates u, v, w by small amounts δu, δv ,
δw, as in figure 4.17.
We can use the distorted cuboid thus obtained as our volume element dV . For suitably
small δu, δv, δw, this volume element will be approximately a parallelepiped, as in fig-
ure 4.18.
We can write:
! ! !
⇣ ⌘
volume dV ⇡ volume of parallelepiped = P A · P B ⇥ P C .
61
about:blank 19/22
1/30/24, 4:21 PM Chapter 4 - Lecture notes 4
62
about:blank 20/22
1/30/24, 4:21 PM Chapter 4 - Lecture notes 4
Then:
⌘ ✓ ◆
! ! ! ∂r ∂r ∂r
⇣
dV ⇡ P A · P B ⇥ P C = · ⇥ δ uδ v δ w
∂u ∂v ∂w
+ terms in δu, δv, δw of fourth or higher order. (4.7)
In the limit as δu, δv , δw ! 0, this approximation becomes accurate with the terms of fourth
or higher order becoming negligible. Then the volume element is
◆
∂r ✓ ∂r ∂r
dV = · ⇥ dudv dw,
∂u ∂v ∂w
and we can write:
w2 Z v 2 u2
◆
ZZZ Z Z ∂r ✓ ∂r ∂r
f (P )dV = f (P ) · ⇥ dudvdw,
P ∈V w1 v1 u1 ∂u ∂v ∂w
where P in f (P ) is written in terms of u, v, w (P has position vector r(u, v, w)), and where
V is the region such that u1 u u2 , v1 v v2 , w1 w w2 .
(recalling for the last step that the determinant of a 3x3 matrix, det(A), is the same as the
determinant of the matrix’s transpose, det(AT )).
Therefore: ZZZ Z w2 Z v 2 Z u2
f (P )dV = f (P )|J|dudvdw.
P ∈V w1 v1 u1
A final comment is that if ∂r/∂u, ∂r/∂v and ∂r/∂w are all orthogonal, i.e. (u, v, w) make
an orthogonal coordinate system, then (and only then)
◆
∂r ✓ ∂r ∂r ∂r ∂r ∂r
· ⇥ = = hu hv hw ,
∂u ∂v ∂w ∂u ∂v ∂w
making |J| the product of the scale factors.
Example 4.9. Find the volume of a cylinder, radius a, height h, using cylindrical polar
coordinates.
63
about:blank 21/22
1/30/24, 4:21 PM Chapter 4 - Lecture notes 4
Hence |J| = r.
Then: Z h Z 2π Z a
✓
1 2
◆
volume = rdrdθdz = (h)(2π) a = πa2 h.
0 0 0 2
Application 2
RRR
If f (P ) = div v for some vector field v representing flow of a liquid, gas, etc., then
RRR V f (P )dV =
V div vdV is the net outflow of material from the volume V (recall the physical meaning
of divergence, chapter 3).
64
about:blank 22/22