Vector Algebra and Calculus
1. Revision of vector algebra, scalar product, vector product
2. Triple products, multiple products, applications to geometry
3. Differentiation of vector functions, applications to mechanics
4. Scalar and vector fields. Line, surface and volume integrals, curvilinear co-ordinates
5. Vector operators — grad, div and curl
6. Vector Identities, curvilinear co-ordinate systems
7. Gauss’ and Stokes’ Theorems and extensions
8. Engineering Applications
4. Line, Surface and Volume Integrals I
• We started off
– being concerned with individual vectors a, b, c, and so on.
• We went on
– to consider how single vectors vary over time or over some other parameter such as arc length
• In rest of the course, we will be concerned with
– scalars and vectors which are defined over
regions in space
• In this lecture we introduce
– line, surface and volume integrals
– definition in curvilinear coordinates
Reminder about Scalar and vector fields 4.2
If a scalar function u(r) is defined at each r in some region
• u is a scalar field in that region.
Examples: temperature, pressure, altitude, CO2 concen-
tration
Similarly, if a vector function v(r) is defined at each point,
then
• v is a vector field in that region.
Examples: wind velocity, magnetic field, traffic flows, opti-
cal flow, electric fields
In field theory our aim is to derive statements about bulk properties of scalar and vector fields (rather than to deal
with individual scalars or vectors)
Line integrals through fields 4.3
• Line integrals are concerned with measuring
– the integrated interaction with a field as you move through it on some defined path.
MFilutchhee GStreenacthe • Eg, given a map showing the pollution
VdoilpeoOudroouurts density field in Oxford
how much pollution would you breath in
when cycling from college to the
Department on different routes?
Miasma in
ye Turl Streete
Vapours
Vector line integrals 4.4
Path L chopped into vector segments δri . F(r)
Each segment is multiplied by the field value at that point
in space,
Products are summed.
Three types
1: Integrand U(r) is a scalar field. r δr
Integral is a vector.
I = U(r)dr
L
2: Integrand a(r) is a vector field dotted with dr. Integral
is a scalar:
I = a(r) · dr 3: Integrand a(r) is a vector field crossed with dr. Integral
is vector.
L
I = a(r) × dr
L
♣ Examples 4.5
• Total work done by force F as it moves point from A to B along path C.
Infinitessimal work done is dW = F.dr, hence total work is
WC = F.d r
C
• Amp`ere’s law relating magnetic field B to linked current can be written as
B.d r = µ0I
C
• Force on an element of wire carrying current I, placed in a magnetic field of strength B, is dF = Idr × B.
So total force on loop of wire C :
F = I dr × B
C
Note: expressions above are beautifully compact in vector notation, and are all independent of coordinate system
♣ Examples 4.6
Question: A force F = x 2yˆı + x y 2ˆ acts on a body at it moves between (0, 0) and (1, 1).
Find work done when path is 1,1
1. along the line y = x. 1
2. along the curve y = x n. 23
3. along the x axis to the point (1, 0) and then along the
line x = 1
0,0 0,1
Answer:
In planar Cartesians dr = ˆıdx + ˆdy
Then the work done is
F · dr = (x 2yˆı + x y 2ˆ) · (ˆıdx + ˆdy ) = (x 2y dx + x y 2dy ) .
LL L
Example Path 1 4.7
1,1
1
23
0,0 0,1
PATH 1: For the path y = x we find that dy = dx. So it is easiest to convert all y references to x.
(1,1) x =1
(x 2y d x + x y 2d y ) = (x 2x d x + x x 2d x )
(0,0) x =0
= x =1
= 2x 3d x
x =0
x 4/2 x =1 = 1/2 .
x =0
NB! Although x, y involved these are NOT double integrals. Why not?
Example Path 2 4.8
1,1
1 PATH 2: For path y = x n find d y = nx n−1d x
Again convert y references to x.
0,0
23
0,1
(1,1) x =1
(x 2y d x + x y 2d y ) = (x n+2d x + nx n−1.x .x 2nd x )
(0,0) x =0
x =1
= (x n+2d x + nx 3nd x )
x =0
1n
= n + 3 + 3n + 1
Example Path 3 4.9
1 1,1 PATH 3: not smooth, so break into two.
Along the first section, y = 0 and dy = 0,
0,0 23 along second section x = 1 and dx = 0:
0,1
B x =1 y =1
(x 2y d x + x y 2d y ) = (x 20dx ) + 1.y 2d y
A x =0 y =0
= 0+ y 3/3 y =1
y =0
= 1/3 .
Line integral depends on path taken
♣ Example 2 4.10
Question 2: Repeat path (2), but now using the
Force F = x y 2ˆı + x 2yˆ.
Answer 2:
F · (ˆıdx + ˆdy ) = x y 2 dx + x 2y dy .
For the path y = x n we find that dy = nx n−1dx , so
(1,1) x =1
(x y 2d x + x 2y d y ) = (x 2n+1d x + nx n−1x 2x nd x )
(0,0) x =0
x =1
= (x 2n+1d x + nx 2n+1d x )
x =0
1n 1
= 2n + 2 + 2n + 2 = 2
This is independent of n, so
This line is independent of path!
Can we understand why?
Line integrals in Conservative fields 4.11
• Write g(x , y ) = x 2y 2/2
• Then the perfect differential is
dg = ∂g d x + ∂g d y
∂x ∂y
= y2xdx + x2ydy
• So our line integral BB
F · d r = (y 2x d x + y x 2d y ) = d g = gB − gA
AA
• It depends solely on the value of g at the start and end points, and not at all on the path
• A vector field which gives rise to line integrals which are independent of paths is called
a conservative field
Some questions about conservative fields 4.12
One sort of line integral performs the integration around a complete loop. It is denoted
1. If E is a conservative field, what is the value of E · dr ?
2. If E1 and E2 is conservative, is E1 + E2 conservative?
3. Later we will show that the electric field around a point charge q
ˆr K = 1/4πǫr ǫ0
E = Kqr2
is conservative. Are all electric fields conservative?
4. If E is the electric field, the potential function is
φ = − E · dr .
So are all electric fields conservative?
Line integrals involving scalar arc-length 4.13
I = F (x, y , z )ds ,
L
where path L along a curve is defined as x = x(p), y = y (p), z = z (p)
• These integrals don’t appear to involve vectors, but they could be reformulated to!
• First, convert the function to F (p), writing
pend d s
I = pstart F (p)d p d p
where (Lecture 3)
ds dx 2 dy 2 d z 2 1/2
dp = dp + dp + dp .
• Then do the (now straightforward) integral w.r.t. p.
Line integrals involving scalar arc-length: Special cases 4.14
I = F (x, y , z )ds
L
1: If the parameter is arc-length s and the path L is x = x(s), y = y (s), z = z (s).
Convert the function to F (s), writing send
I = F (s) ds
sstart
2: If p is x — so y = y (x) and z = z (x) (or similar for p = y or p = z )
xend dy 2 d z 2 1/2
I = F (x) 1 + + dx .
xstart d x d x
Surface integrals 4.15
Surface S is divided into infinitesimal vector elements of area dS: dS
• the dirn of the vector dS is the surface normal
• its magnitude represents the area of the element.
Again there are three possibilities: 3: S a × dS — vector field a;
vector integral.
1: S UdS — scalar field U;
vector integral.
2: S a · dS — vector field a;
scalar integral.
Physical example of surface integral 4.16
• Physical examples of surface integrals often involve the idea of flux of a
vector field through a surface
a · dS
S
• Mass of fluid crossing a surface element dS at r in time dt is
dM = ρ v · dSdt
Total rate of gain of mass can be expressed as a surface integral:
dM = ρ(r)v(r) · dS
dt S
• Note again that expression is coordinate free.
♣ Example 4.17
Question: Evaluate F · dS over the x = 1 side of the cube shown in the figure when F = yˆı + zˆ + xkˆ.
Answer: dS is perp to the surface. Often, the surface will enclose a volume, and the surface direction is everywhere
out of the volume
For the x = 1 face of the cube z
dS = dy dzˆı dS
F · dS = (yˆı + zˆ + xkˆ) · dy dzˆı 1y
1
S
y =1 z =1
= ydydz
y =0 z =0
= 1 y2 1 z |01 1x
2 0 d S = dy dz i
1
=2.
Volume integrals 4.18
• The definition of the volume integral is again taken as the limit of a sum of products as the size of the volume
element tends to zero.
• One obvious difference though is that the element of volume is a scalar.
• The possibilities are:
1: V U(r)dV — scalar field; scalar integral (1P1 stuff!)
2: V a(r)dV — vector field; vector integral. In this case one can treat each component separately.
adV = a1(x , y , z )ˆıdV + a2(x , y , z )ˆdV + a3(x , y , z )kˆdV
VV V V
= ˆı a1(x , y , z )dV + ˆ a2(x , y , z )dV + kˆ a3(x , y , z )dV
VV V
So, 3× 1P1 stuff.
Changing variables: curvilinear coordinates 4.19
• Before dealing with further examples of line, surface and volume integrals ...
... it is important to understand how to convert an integral from one set of coordinates into another more suited
to the geometry or symmetry of the problem.
• You saw how to do this for scalar volume integrals in 1P1 (and we’ve seen that volume integrals can always be
handled as scalars) ...
... but we need to understand where Jacobians came from, and how we can apply the mechanism more generally.
• You may find the general problem slightly heavy going ...
... the good news is that we will deal with some special cases first that should be at least vaguely familiar
Changing variables: curvilinear coordinates 4.20
• A line integral in Cartesian coordinates used
r = xˆı + yˆ + z kˆ and dr = dxˆı + dyˆ + dz kˆ
• You can be sure that length scales are properly handled because
|d r| = d s = d x 2 + d y 2 + d z 2.
• But often symmetry screams at you to use another coordinate system:
– likely to be plane, cylindrical, or spherical polars,
– but can be something more exotic like “u, v , w ”
• A “u, v , w ”, “r, φ, θ” system is a curvilinear coordinate system
• But here’s the bad news: Length scales are screwed up
r = uuˆ + vˆv + w wˆ
dr = duuˆ + dvˆv + dw wˆ
|d r| = d s = d u2 + d v 2 + d w 2 .
Cylindrical polar coordinates 4.21
z z Lines of
ˆez
constant r
ˆeφ
P
ˆer
Lines of
r constant z
kˆ
ˆ y y
ˆı r
r
xφ
Lines of
x constant φ
r = xˆı + yˆ + z kˆ = r cos φˆı + r sin φˆ + z kˆ
∂r represents direction in which (instantaneously) r changing while other two coords stay const. It is tangent to
∂r
surfaces of constant φ and z
z z Lines of
constant r
ˆez r
y
ˆeφ
P Lines of
ˆer constant φ
Lines of
r constant z
kˆ
ˆ y
ˆı r
xφ x
r = r cos φˆı + r sin φˆ + z ˆk
∂r form a basis set for infinitessimal vector displacements in the posi-
er = ∂r = cos φˆı + sin φˆ tion of P , d r.
∂r
eφ = ∂φ = −r sin φˆı + r cos φˆ
∂r ˆ
Cylindrical polars: scale factors 4.22
• More usual to normalise the basis vectors
ˆer , ˆeφ, ˆez
dr = ∂r d r + ∂r d φ + ∂r dz
∂r ∂φ ∂z
= d r er + d φeφ + d z ez
= d r ˆer + r d φˆeφ + d zˆez
• NOTE: In cylindrical polars, small change dφ keeping r and z constant results in displacement of
ds = |dr| = r 2(dφ)2 = r dφ
THUS: size of (infinitessimal) displacement depends on value of r
• r is scale factor or metric coefficient
• In cylindrical polars scale factors are 1, r and 1.
♣ Example: line integral in cylindrical polars 4.23
Question: Evaluate C a · dl , where a = x 3ˆ − y 3ˆı + x 2y kˆ and C is the circle of radius ρ in the z = 0 plane, centred
on the origin. z
Answer:
a = ρ3(− sin3 φˆı + cos3 φˆ + cos2 φ sin φkˆ)
and (since dz = dr = 0 on the path)
y dl = ρ dφ ˆeφ
so that = ρdφ(− sin φˆı + cos φˆ)
ρ
φ
dl = ρ dφˆeφ a · dl = 2π ρ4(sin4 φ + cos4 φ)d φ = 3π ρ4
0 2
x C
Volume integrals in cylindrical polars 4.24
z
y dxˆı dV = dxdydz dV = r dr dφdz
d yˆ d zˆez r d φˆeφ
x d r ˆer y
dz kˆ
x dφ rdφ
zφ
In Cartesians, volume element given by d V = d xˆı.(d yˆ × d z ˆk) = d x d y d z
In cylindrical polars, volume element given by
d V = d rˆer .(r d φˆeφ × d zˆez ) = r d φd r d z
Note: Volume is scalar triple product, hence can be written as a determinant:
ˆer d r ∂x ∂y ∂z
∂r ∂r ∂r
∂x ∂y ∂z
dV = ˆeφr d φ = ∂φ ∂φ ∂φ dr dφdz
ˆez d z ∂x ∂y ∂z
∂z ∂z ∂z
Surface integrals in cylindrical polars 4.25
d Sz
z
r d φˆeφ d rˆer In Cartesians, for surface element with normal ˆı we have
dS = dyˆ × dz kˆ = dy dzˆı = ˆıdS
dzˆez Cylindrical polars: surface area elements given by:
d zˆez r d φˆeφ d Sr d Sz = d r ˆer × r d φˆeφ = r d r d φˆez
d rˆer d Sr = r d φˆeφ × d zˆez = r d φd zˆer
y
d Sφ
x
Spherical polars 4.26
x z
z Lines of
θ constant φ
ˆer (longitude) Lines of
constant r
kˆ P ˆeφ y
r ˆeθ y
x
ˆı ˆ Lines of
φ constant θ
(latitude)
r = xˆı + yˆ + z kˆ = r sin θ cos φˆı + r sin θ sin φˆ + r cos θkˆ
∂r sin θ cos φˆı + sin θ sin φˆ + cos θkˆ = ˆer
er = ∂r =
eθ = ∂r = r cos θ cos φˆı + r cos θ sin φˆ − r sin θkˆ = rˆeθ
∂θ
∂r −r sin θ sin φˆı + r sin θ cos φˆ = r sin θˆeφ
eφ = ∂φ =
Spherical polars: scale factors 4.27
∂r sin θ cos φˆı + sin θ sin φˆ + cos θkˆ = ˆer
er = ∂r =
∂r
eθ = ∂θ = r cos θ cos φˆı + r cos θ sin φˆ − r sin θkˆ = r ˆeθ
eφ = ∂r = −r sin θ sin φˆı + r sin θ cos φˆ = r sin θˆeφ
∂φ
• Small displacement dr given by:
dr = ∂r d r + ∂r d θ + ∂r d φ
∂r ∂θ ∂φ
= d r er + d θeθ + d φeφ
= d r ˆer + r d θˆeθ + r sin θd φˆeφ
• Thus, metric coefficients are 1, r, r sin θ.
Volume integrals in spherical polars 4.28
z
d r ˆer r sin θ dV = r 2 sin θdr dθdφ
r sin θdφˆeφ
dφ
r d θˆeθ θr
dθ
y
xφ
dφ r sin θdφ
• Volume element given by
dV = dr ˆer .(r dθˆeθ × r sin θdφˆeφ) = r 2 sin θdr dθdφ
• Note again that this volume could be written as a determinant
Surface integrals in spherical polars 4.29
Three possibilities, but most useful are surfaces of constant r
The surface element dSr is given by
d Sr = r d θˆeθ × r sin θd φˆeφ
= r 2 sin θd θd φˆer
z
r sin θdφˆeφ
d Sr = r 2 sin θd θd φˆer
r d θˆeθ
y
x
♣ Example: Surface integral in spherical polars 4.30
Q Evaluate S a · dS, where a = z 3kˆ and S is the sphere of radius A centred on the origin.
A In general:
z = r cos θ d S = r 2 sin θd θd φˆer
On surface of the sphere, r = A, so that
a = A3cos3θkˆ d S = A2 sin θ d θ d φˆer
Hence
2π π A3cos3θ A2 sin θ [ˆer · kˆ] d θd φ
a · dS =
S φ=0 θ=0
2π π
= A5 dφ cos3θ sin θ[cos θ] dθ
00
= 2πA5 1 − cos5 θ π = 4πA5
5 0 5
General curvilinear coordinates 4.31
Suppose
x = x(u, v , w ), y = y (u, v , w ), z = z (u, v , w )
So
r = x(u, v , w )ˆı + y (u, v , w )ˆ + z (u, v , w )kˆ
and ∂r ∂∂uxˆı + ∂∂yuˆ + ∂z
∂u ∂u
= kˆ
[similarly for partials with respect to v and w ]
dr = ∂r du + ∂r dv + ∂r dw
∂u ∂v ∂w
Curvilinear coords /ctd 4.32
Postion vector: r = x(u, v , w )ˆı + y (u, v , w )ˆ + z (u, v , w )kˆ
Infinitessimal displace- dr = ∂r d u + ∂r dv + ∂r dw
ment: ∂u ∂v ∂w
∂r ∂r
eu = ∂u = ∂u ˆeu = huˆeu
Local basis: ∂r ∂r
ev = ∂v = ∂v ˆev = hv ˆev
ew = ∂r ∂r ˆew = hwˆew
∂w = ∂w
Curvilinear coords /ctd 4.33
• Metric coefficients ∂r ∂r ∂r
∂u |∂v | |∂w |
hu = | |, hv = and hw =
• Volume element
d V = hud uˆeu.(hv d v ˆev × hw d w ˆew )
and simplifies if the coordinate system is orthonormal (since ˆeu.(ˆev × ˆew ) = 1) to
d V = huhv hw d ud v d w
• Surface element (normal to constant w , say)
d S = hud uˆeu × hv d v ˆev
and simplifies if the coordinate system is orthogonal to
d S = huhv d ud v ˆew
Summary 4.34
• We introduced line, surface and volume integrals involving vector fields.
• We defined curvilinear coordinates, and realized that metric coefficient were necessary to relate change in an arbitrary
coordinate to a length scale.
• We showed in detail how line, surface and volume elements are derived, and how the results specialized for orthogonal
curvilinear system, in particular plane, cylindrical and spherical polar coordinates.
• The origin of the Jacobian was clarified.