Course
Course
8 Lectures MT 2013
Rev Oct 2013
Course Page
Stephen Roberts
[email protected]
www.robots.ox.ac.uk/sjrob/Teaching/Vectors
Overview
Many of you will know a good deal already about Vector Algebra how to add and subtract
vectors, how to take scalar and vector products of vectors, and something of how to describe
geometric and physical entities using vectors. This course will remind you about that good stuff,
but goes on to introduce you to the subject of Vector Calculus which, like it says on the can,
combines vector algebra with calculus.
To give you a feeling for the issues, suppose you were interested in the temperature T of water in
a river. Temperature T is a scalar, and will certainly be a function of a position vector x = (x , y , z )
and may also be a function of time t: T = T (x, t). It is a scalar field.
Suppose now that you kept y , z , t constant, and asked what is the change in temperature as you
move a small amount in x ? No doubt youd be interested in calculating T /x. Similarly if you
kept the point fixed, and asked how does the temperature change of time, you would be interested
in T /t.
But why restrict ourselves to movements up-down, left-right, etc? Suppose you wanted to know
what the change in temperature along an arbitrary direction. You would be interested in
T
,
x
but how would you calculate that? Is T /x a vector or a scalar?
Now lets dive into the flow. At each point x in the stream, at each time t, there will be a stream
velocity v(x, t). The local stream velocity can be viewed directly using modern techniques such
as laser Doppler anemometry, or traditional techniques such as throwing twigs in. The point now
is that v is a function that has the same four input variables as temperature did, but its output
result is a vector. We may be interested in places x where the stream suddenly accelerates, or
vortices where the stream curls around dangerously. That is, we will be interested in finding the
acceleration of the stream, the gradient of its velocity. We may be interested in the magnitude of
the acceleration (a scalar). Equally, we may be interested in the acceleration as a vector, so that
we can apply Newtons law and figure out the force.
This is the stuff of vector calculus.
Grey book
Vector algebra: scalar and vector products; scalar and vector triple products; geometric applications. Differentiation of a vector function; scalar and vector fields. Gradient, divergence and
curl - definitions and physical interpretations; product formulae; curvilinear coordinates. Gauss
and Stokes theorems and evaluation of integrals over lines, surfaces and volumes. Derivation
of continuity equations and Laplaces equation in Cartesian, cylindrical and spherical coordinate
systems.
Course Content
Introduction and revision of elementary concepts, scalar product, vector product.
Triple products, multiple products, applications to geometry.
Learning Outcomes
You should be comfortable with expressing systems (especially those in 2 and 3 dimensions) using
vector quantities and manipulating these vectors without necessarily going back to some underlying
coordinates.
You should have a sound grasp of the concept of a vector field, and be able to link this idea to
descriptions of various physical phenomena.
You should have a good intuition of the physical meaning of the various vector calculus operators
and the important related theorems. You should be able to interpret the formulae describing
physical systems in terms of this intuition.
References
Although these notes cover the material you need to know you should, wider reading is essential. Different explanations and different diagrams in books will give you the perspective to glue
everything together, and further worked examples give you the confidence to tackle the tute sheets.
J Heading, Mathematical Methods in Science and Engineering, 2nd ed., Ch.13, (Arnold).
G Stephenson, Mathematical Methods for Science Students, 2nd ed., Ch.19, (Longman).
E Kreyszig, Advanced Engineering Mathematics, 6th ed., Ch.6, (Wiley).
K F Riley, M. P. Hobson and S. J. Bence, Mathematical Methods for the Physics and
Engineering Chs.6, 8 and 9, (CUP).
A J M Spencer, et. al. Engineering Mathematics, Vol.1, Ch.6, (Van Nostrand Reinhold).
H M Schey, Div, Grad, Curl and all that, Norton
www.robots.ox.ac.uk/sjrob/Teaching/Vectors
Lecture 1
Vector Algebra
1.1
Vectors
Many physical quantities, such a mass, time, temperature are fully specified by one
number or magnitude. They are scalars. But other quantities require more than
one number to describe them. They are vectors. You have already met vectors in
their more pure mathematical sense in your course on linear algebra (matrices and
vectors), but often in the physical world, these numbers specify a magnitude and
a direction a total of two numbers in a 2D planar world, and three numbers in
3D.
Obvious examples are velocity, acceleration, electric field, and force. Below, probably all our examples will be of these magnitude and direction vectors, but we
should not forget that many of the results extend to the wider realm of vectors.
There are three slightly different types of vectors:
Free vectors: In many situtations only the magnitude and direction of a
vector are important, and we can translate them at will (with 3 degrees of
freedom for a vector in 3-dimensions).
Sliding vectors: In mechanics the line of action of a force is often important
for deriving moments. The force vector can slide with 1 degree of freedom.
Bound or position vectors: When describing lines, curves etc in space, it is
obviously important that the origin and head of the vector are not translated
about arbitrarily. The origins of position vectors all coincide at an overall
origin O.
One the advantages of using vectors is that it frees much of the analysis from
the restriction of arbitrarily imposed coordinate frames. For example, if two free
vectors are equal we need only say that their magnitudes and directions are equal,
and that can be done with a drawing that is independent of any coordinate system.
However, coordinate systems are ultimately useful, so it useful to introduce the
idea of vector components. Try to spot things in the notes that are independent
5
O
Free vectors
Sliding vectors
Position vectors
Figure 1.1:
of coordinate system.
1.1.1
k
x
a3
a
x
a2
i
a1
or
a = [ax , ay , az ]
1.1. VECTORS
a+b
k
ab
c
c
b
b+c
b
a+b
a
(a)
(b)
Figure 1.3: (a) Addition of two vectors is commutative, but subtraction isnt. Note that the
coordinate frame is irrelevant. (b) Addition of three vectors is associative.
Vector equality
Two free vectors are said to be equal iff their lengths and directions are the same.
If we use a coordinate frame, we might say that corresponding components of
the two vectors must be equal. This definition of equality will also do for position
vectors, but for sliding vectors we must add that the line of action must be identical
too.
1.1.3
a=
|a|
1.1.4
a2 + b2 ,
a3 + b3 ]
Just as for matrices, multiplication of a vector a by a scalar c is defined as multiplication of each component by c, so that
ca = [ca1, ca2, ca3].
It follows that:
p
|ca| = (ca1)2 + (ca2)2 + (ca3)2 = |c||a|.
The direction of the vector will reverse if c is negative, but otherwise is unaffected.
(By the way, a vector where the sign is uncertain is called a director.)
Example
Q. Coulombs law states that the electrostatic force on charged particle Q due
to another charged particle q1 is
Qq1
er
F=K 2
r
where r is the vector from q1 to Q and r is the unit vector in that same
direction. (Note that the rule unlike charges attract, like charges repel is
built into this formula.) The force between two particles is not modified by
the presence of other charged particles.
Hence write down an expression for the force on Q at R due to N charges qi
at ri .
A. The vector from qi to Q is R ri . The unit vector in that direction is
(R ri )/|R ri |, so the resultant force is
F(R) =
N
X
i =1
Qqi
(R ri ) .
|R ri |3
1.2
This is a product of two vectors results in a scalar quantity and is defined as follows
for 3-component vectors:
a b = a1 b1 + a2 b2 + a3 b3 .
Note that
a a = a12 + a22 + a32 = |a|2 = a2.
The following laws of multiplication follow immediately from the definition:
(a) a b = b a
(commutativity)
(b) a (b + c) = a b + a c
1.2.1
b
B
b
ab
(a)
Projection of b onto
direction of a
(b)
Consider the square magnitude of the vector a b. By the rules of the scalar
product, this is
|a b|2 = (a b) (a b)
= a a + b b 2(a b)
= a2 + b2 2(a b)
10
But, by the cosine rule for the triangle OAB (Figure 1.4a), the length AB 2 is given
by
|a b|2 = a2 + b2 2ab cos
where is the angle between the two vectors. It follows that
a b = ab cos ,
which is independent of the co-ordinate system used, and that |a b| ab. Conversely, the cosine of the angle between vectors a and b is given by cos = ab/ab.
1.2.2
Another way of describing the scalar product is as the product of the magnitude
of one vector and the component of the other in the direction of the first, since
b cos is the component of b in the direction of a and vice versa (Figure 1.4b).
Projection is particularly useful when the second vector is a unit vector a is
the component of a in the direction of .
Notice that if we wanted the vector component of b in the direction of a we
would write
(b
a)
a=
(b a)a
.
a2
In the particular case a b = 0, the angle between the two vectors is a right angle
and the vectors are said to be mutually orthogonal or perpendicular neither
vector has any component in the direction of the other.
An orthonormal coordinate system is characterised by = = k k = 1; and
= k = k = 0.
1.2.3
So far we have been writing our vectors as row vectors a = [a1 , a2, a3 ]. This is
convenient because it takes up less room than writing column vectors
a1
a = a2 .
a3
In matrix algebra
M11 M12
M21 M22
M31 M32
v1
a1
M13
M23 a2 = v2
v3
a3
M33
11
and a row vector is written as a . Now for most of our work we can be quite
relaxed about this minor difference, but here let us be fussy.
Why? Simply to point out at that the scalar product is also the inner product
more commonly used in linear algebra. Defined as a b when vectors are column
vectors as
b1
a b = a b = [a1 , a2, a3] b2 = a1b1 + a2b2 + a3b3 .
b3
Here we treat a n-dimensional column vector as an n 1 matrix.
(Remember that if you multiply two matrices Mmn Nnp then M must have the
same columns as N has rows (here denoted by n) and the result has size (rows
columns) of m p. So for n-dimensional column vectors a and b, a is a 1 n
matrix and b is n 1 matrix, so the product a b is a 1 1 matrix, which is (at
last!) a scalar.)
Examples
[1,1,1]
[1,1,1]
[1, 1, 1] [1, 1, 1]
1 1
=
cos
= cos1 2
3
1 + 12 + 12 12 + 12 + 12
j
i
12
Q3. A pinball moving in a plane with velocity s bounces (in a purely elastic impact)
from a baffle whose endpoints are p and q. What is the velocity vector after
the bounce?
A3. Best to refer everything to a coordinate frame with principal directions
u
along and
v perpendicular to the
baffle:
qp
|q p|
v = u = [uy , ux ]
u
=
^u
p
^v
s
safter = (s.
u)
u (s.
v)
v
1.2.4
Direction cosines are commonly used in the field of crystallography. The quantities
a
=
,
a
a
=
,
a
a k
=
a
represent the cosines of the angles which the vector a makes with the co-ordinate
vectors , , k and are known as the direction cosines of the vector a. Since
a = a1 etc, it follows immediately that a = a( + + k ) and 2 + 2 + 2 =
1 2
2
2
a2 [a1 + a2 + a3 ] = 1
1.3
13
j
i
Figure 1.5: The direction cosines are cosines of the angles shown.
It is MUCH more
a b = a1
b1
where the top row consists of the vectors , , k rather than scalars.
Since a determinant with two equal rows has value zero, it follows that a a = 0.
It is also easily verified that (a b) a = (a b) b = 0, so that a b is orthogonal
(perpendicular) to both a and b, as shown in Figure 1.6.
Note that = k , k = , and k = .
The magnitude of the vector product can be obtained by showing that
|a b|2 + (a b)2 = a2 b2
from which it follows that
|a b| = ab sin ,
which is again independent of the co-ordinate system used. This is left as an
exercise.
Unlike the scalar product, the vector product does not satisfy commutativity but
is in fact anti-commutative, in that a b = b a. Moreover the vector product
does not satisfy the associative law of multiplication either since, as we shall see
later a (b c) 6= (a b) c.
Since the vector product is known to be orthogonal to both the vectors which form
the product, it merely remains to specify its sense with respect to these vectors.
Assuming that the co-ordinate vectors form a right-handed set in the order , , k
it can be seen that the sense of the the vector product is also right handed, i.e
14
In practice, figure out the direction from a right-handed screw twisted from the
first to second vector as shown in Figure 1.6(a).
ax b
axb
bsin
b
a
Figure 1.6: (a)The vector product is orthogonal to both a and b. Twist from first to second and
move in the direction of a right-handed screw. (b) Area of parallelogram is ab sin .
1.3.1
The magnitude of the vector product (a b) is equal to the area of the parallelogram whose sides are parallel to, and have lengths equal to the magnitudes of, the
vectors a and b (Figure 1.6b). Its direction is perpendicular to the parallelogram.
Example
= 1 [1, 2, 3]
14
k
1
= 1 [2, 4, 2]
g =
2
2
2
14
14
1 2 3
Hence
1
m
= [2, 4, 2]
24
and
n=
15
16
Lecture 2
Multiple Products. Geometry using Vectors
2.1
Using mixtures of the pairwise scalar product and vector product, it is possible to
derive triple products between three vectors, and indeed n-products between n
vectors.
There is nothing about these that you cannot work out from the definitions of pairwise scalar and vector products already given, but some have interesting geometric
interpretations, so it is worth looking at these.
2.1.1
This is the scalar product of a vector product and a third vector, i.e. a (b c).
Using the pseudo-determinant expression for the vector product, we see that the
scalar triple product can be represented as the true determinant
a1 a2 a3
a (b c) = b1 b2 b3
c1 c2 c3
You will recall that if you swap a pair of rows of a determinant, its
hence if you swap two pairs, its sign stays the same.
c1
c1 c2 c3
a1 a2 a3
b1 b2 b3 1st SWAP b1 b2 b3 2nd SWAP a1
b1
a1 a2 a3
c1 c2 c3
+
sign changes;
c2 c3
a2 a3
b2 b3
+
18
The scalar triple product gives the volume of the parallelopiped whose sides are
represented by the vectors a, b, and c.
We saw earlier that the vector product (a b) has magnitude equal to the area
of the base, and direction perpendicular to the base. The component of c in this
direction is equal to the height of the parallelopiped shown in Figure 2.1(a).
n
c cos
b
a
Figure 2.1: (a) Scalar triple product equals volume of parallelopiped. (b) Coplanarity yields zero
scalar triple product.
2.1.3
then the vectors are linearly dependent. That is, one can be expressed as a linear
combination of the others. For example,
a = b + c
where and are scalar coefficients.
You can see this immediately in two ways:
The determinant would have one row that was a linear combination of the
others. Youll remember that by doing row operations, you could reach a row
of zeros, and so the determinant is zero.
The parallelopiped would have zero volume if squashed flat. In this case all
three vectors lie in a plane, and so any one is a linear combination of the
other two. (Figure 2.1b.)
2.1.4
19
This is defined as the vector product of a vector with a vector product, a (b c).
Now, the vector triple product a (b c) must be perpendicular to (b c), which
in turn is perpendicular to both b and c. Thus a (b c) can have no component
perpendicular to b and c, and hence must be coplanar with them. It follows that
the vector triple product must be expressible as a linear combination of b and c:
a (b c) = b + c .
The values of the coefficients can be obtained by multiplying out in component
form. Only the first component need be evaluated, the others then being obtained
by symmetry. That is
(a (b c))1 =
=
=
=
=
The equivalents must be true for the 2nd and 3rd components, so we arrive at the
identity
a (b c) = (a c)b (a b)c .
bxc
a
In arbitrary direction
c
b
a x (bx c)
Figure 2.2: Vector triple product.
2.1.5
20
k c,
a (b c) = (a c)b (a b)c
k (v k ) = (k k )v (k v)k
= v (v k )k
So v (v k )k = k (v k ).
Many combinations of vector and scalar products are possible, but we consider only
one more, namely the vector quadruple product (a b) (c d). By regarding
a b as a single vector, we see that this vector must be representable as a linear
combination of c and d. On the other hand, regarding c d as a single vector, we
see that it must also be a linear combination of a and b. This provides a means
of expressing one of the vectors, say d, as linear combination of the other three,
as follows:
(a b) (c d) = [(a b) d]c [(a b) c]d
= [(c d) a]b [(c d) b]a
Hence
or
This is not something to remember off by heart, but it is worth remembering that
the projection of a vector on any arbitrary basis set is unique.
Example
Q1 Use the quadruple vector product to express the vector d = [3, 2, 1] in terms
of the vectors a = [1, 2, 3], b = [2, 3, 1] and c = [3, 1, 2].
A1 Grinding away at the determinants, we find
[(ab)c] = 18; [(bc)d] = 6; [(ca)d] = 12; [(ab)d] = 12
So, d = (a + 2b + 2c)/3.
21
a
d
c
b
Figure 2.3: The projection of a (3-)vector onto a set of (3) basis vectors is unique. Ie in d =
a + b + c, the set {, , } is unique.
2.2
2.2.1
The equation of the line passing through the point whose position vector is a and
lying in the direction of vector b is
r = a + b
then will
where is a scalar parameter. If you make b a unit vector, r = a + b
represent metric length.
For a line defined by two points a1 and a2
r = a1 + (a2 a1)
or for the unit version
r = a1 +
(a2 a1)
|a2 a1|
^
b
Point r traces
out line.
a
r
22
2.2.2
Referring to Figure 2.5(a) the vector p from c to any point on the line is p =
c = (a c) + b
which has length squared p 2 = (a c)2 + 2 + 2(a
a + b
. Rather than minimizing length, it is easier to minimize length-squared. The
c) b
minumum is found when d p 2/d = 0, ie when
.
= (a c) b
So the minimum length vector is
b.
p = (a c) ((a c) b)
b
P
a
r
r-c
(a)
(b)
Figure 2.5: (a) Shortest distance point to line. (b) Shortest distance, line to line.
2.2.3
If the shortest distance between a point and a line is along the perpendicular, then
and r = c + d
d|
.
p
= (b
d)/|b
and d
are not orthogonal,
(Yes, dont forget that b
d is NOT a unit vector. b
so there is a sin lurking!)
The minimum length is therefore the component of a c in this direction
d)/|
b
d| .
pmin = (a c) (b
23
Example
Q Two long straight pipes are specified using Cartesian co-ordinates as follows:
Pipe A has diameter 0.8 and its axis passes through points (2, 5, 3) and
(7, 10, 8).
Pipe B has diameter 1.0 and its axis passes through the points (0, 6, 3) and
(12, 0, 9).
Determine whether the pipes need to be realigned to avoid intersection.
A Each pipe axis is defined using two points. The vector equation of the axis
of pipe A is
k
[1, 1, 1] [2, 1, 1] = 1 1 1 = [2, 3, 1] = p
2 1 1
24
^
n
c
b
(a)
(b)
(c)
Figure 2.6: (a) Plane defined using point and two lines. (b) Plane defined using three points. (c)
Plane defined using point and normal. Vector r is the position vector of a general point in the
plane.
2.2.5
The shortest distance from a point d to the plane is along the perpendicular.
Depending on how the plane is defined, this can be written as
D = |(d a) n
|
2.3
or
D=
|(d a) (b c)|
.
|b c|
It is sometimes required to obtain the most general vector which satisfies a given
vector relationship. This is very much like obtaining the locus of a point. The best
method of proceeding in such a case is as follows:
(i) Decide upon a system of three co-ordinate vectors using two non-parallel vectors
appearing in the vector relationship. These might be a, b and their vector product
(a b).
(ii) Express the unknown vector x as a linear combination of these vectors
x = a + b + a b
where , , are scalars to be found.
(iii) Substitute the above expression for x into the vector relationship to determine
the constraints on , and for the relationship to be satisfied.
Example
25
1
1 + a2
1
1 + a2
ab
.
1 + a2
2.4
1
((a b)a + b (a b))
1 + a2
26
d t
dt
Figure 2.7: The angular velocity vector is along the axis of rotation and has magnitude equal to
the rate of rotation.
magnitude equal to the angular speed of rotation of the body and with direction
the same as that of the r-h screw. If r is the vector OP , where the origin O can
be taken to be any point on the axis of rotation, then the velocity v of P due to
the rotation is given, in both magnitude and direction, by the vector product
v = r.
Figure 2.8:
Lecture 3
Differentiating Vector Functions of a Single
Variable
Your experience of differentiation and integration has extended as far as scalar
functions of single and multiple variables functions like f (x ) and f (x , y , t).
It should be no great surprise that we often wish to differentiate vector functions. For example, suppose you were driving along a wiggly road with position
r(t) at time t. Differentiating r(t) wrt time should yield your velocity v(t), and
differentiating v(t) should yield your acceleration. Lets see how to do this.
3.1
Differentiation of a vector
a (p) = lim
27
28
Note that d a/d p has a different direction and a different magnitude from a.
Likewise, as you might expect, the chain rule still applies. If a = a(u) and u = u(t),
say:
da du
d
a=
dt
du dt
Examples
Q A 3D vector a of constant magnitude is varying over time. What can you say
about the direction of a?
A Using intuition: if only the direction is changing, then the vector must be
tracing out points on the surface of a sphere. We would guess that the
derivative a is orthogonal to a.
To prove this write
d
da da
da
(a a) = a
+
a = 2a
.
dt
dt
dt
dt
But (a a) = a2 which we are told is constant. So
d
(a a) = 0
dt
2a
da
=0
dt
dr du
dr
=
dt
du dt
d dr
d 2r
a=
=
dt dt
d u2
3.1.1
du
dt
2
d r d 2u
d u d t2
Let r(p) be a position vector tracing a space curve as some parameter p varies.
The vector r is a secant to the curve, and r/p lies in the same direction. (See
Fig. 3.1.) In the limit as p tends to zero r/p = d r/d p becomes a tangent to
the space curve. If the magnitude of this vector is 1 (i.e. a unit tangent), then
29
r = a cos( 2
)
+
a
sin(
)
+
k
2
2
2
2
2
a +h
a +h
a +h
where s is arc length and h, a are constants. Show that the tangent d r/d s
to the curve has a constant elevation angle w.r.t the x y -plane, and determine
its magnitude.
A
dr
a
h
a
k
sin () +
cos () +
=
ds
a2 + h 2
a2 + h 2
a2 + h 2
a2 + h2 and in the z
The projection
on
the
x
y
plane
has
magnitude
a/
3.1.2
It might seem that we can be completely relaxed about saying that any old parameter p is arc length, but this is not the case. Why not? The reason is that arc
length is special is that, whatever the parameter p,
Z p
dr
dp .
s=
p0 d p
Perhaps another way to grasp the significance of this is using Pythagoras theorem
on a short piece of curve: in the limit as d x etc tend to zero,
ds2 = dx2 + dy 2 + dz2 .
30
r (p)
r (p + p)
dr
dp
r (s)
ds
dp
r (s + s)
dr
ds
Figure 3.1: Left: r is a secant to the curve but, in the limit as p 0, becomes a tangent.
Right: if the parameter is arc length s, then |dr| = ds.
3.2
For example the integral of the acceleration vector of a point over an interval of
time is equal to the change in the velocity vector during the same time interval.
However, many other, more interesting and useful, types of integral are possible,
especially when the vector is a function of more than one variable. This requires
the introduction of the concepts of scalar and vector fields. See later!
3.3
31
Curves in 3 dimensions
In the examples above, parameter p has been either arc length s or time t. It
doesnt have to be, but these are the main two of interest. Later we shall look
at some important results when differentiating w.r.t. time, but now let use look
more closely at 3D curves defined in terms of arc length, s.
Take a piece of wire, and bend it into some arbitrary non-planar curve. This is a
space curve. We can specify a point on the wire by specifying r(s) as a function
of distance or arc length s along the wire.
3.3.1
The Fr
enet-Serret relationships
We are now going to introduce a local orthogonal coordinate frame for each point
s along the curve, ie one with its origin at r(s). To specify a coordinate frame we
need three mutually perpendicular directions, and these should be intrinsic to the
curve, not fixed in an external reference frame. The ideas were first suggested by
two French mathematicians, F-J. Frenet and J. A. Serret.
1. Tangent t
There is an obvious choice for the first direction at the point r(s), namely the
unit tangent t. We already know that
t =
d r(s)
ds
2. Principal Normal n
3. The Binormal
b
The local coordinate frame is completed by defining the binormal
b(s) = t(s) n
(s) .
32
t = 0,
Since b
dt
d
b
d
b
t+b
=
t + b
n=0
ds
ds
ds
from which
d
b
t = 0.
ds
But this means that d
b/d s is along the direction of n
, or
b
d
= (s)
n(s)
ds
where is the torsion, and the negative sign is a matter of convention.
= 0, we find
Differentiating n
t = 0 and
nb
dn
= (s)t(s) + (s)b(s).
ds
The Fr
enet-Serret relationships:
dt/d s =
n
d
n/d s = (s)t(s) + (s)b(s)
d
b/d s = (s)
n(s)
Example
Differentiation gives
a
s
dt
= 2 cos
,
n=
ds
a
s
2 sin
, 0
a2 + h 2
33
s
sin
, 0 .
k
h
a
s
s
h
= t
b
n = (a/)S (a/)C (h/) =
sin
, cos
,
C
S
0
to find an expression for the torsion
and differentiate b
h
s
s
h
h
d
b
=
cos
,
sin
,
0
=
n
ds
2
so the torsion is
=
h
2
again a constant.
3.4
er
er = cos + sin .
P
r
e = sin + cos
so that
er
er =
e
e = 1 and
er
e = 0.
34
dr
d
er
d
(r
er ) =
er + r
dt
dt
dt
d
dr
er + r ( sin + cos )
=
dt
dt
d
dr
er + r
e
=
dt
dt
= radial + tangential
e
+
e
+
e
+
r
er
r
2
dt dt # dt dt
d t2
dt dt
"d t
2
d
dr d
d 2
d 2r
er +
2
r
+r 2
e
=
d t2
dt
dt dt
dt
3.5
35
Rotating systems
Consider a body which is rotating with constant angular velocity about some
axis passing through the origin. Assume the origin is fixed, and that we are sitting
in a fixed coordinate system Ox y z .
If is a vector of constant magnitude and constant direction in the rotating system,
then its representation r in the fixed system must be a function of t.
r(t) = R(t)
At any instant as observed in the fixed system
dr
+ R
= R
dt
but the second term is zero since we assumed to be constant so we have
dr
r
= RR
dt
Note that:
d r/d t will have fixed magnitude;
d r/d t will always be perpendicular to the axis of rotation;
d r/d t will vary in direction within those constraints;
r(t) will move in a plane in the fixed system.
36
0 z y
= z
0 x
RR
y x
0
Now you can verify for yourself that application of a matrix of this form to an
arbitrary vector has precisely the same effect as the cross product operator, ,
where = [x y z ]. Loh-and-behold, we then we have
r = r
matching the equation at the end of lecture 2, v = r, as we would hope/expect.
3.5.1
Rotation: Part 2
Now suppose is the position vector of a point P which moves in the rotating
frame. There will be two contributions to motion with respect to the fixed frame,
one due to its motion within the rotating frame, and one due to the rotation itself.
So, returning to the equations we derived earlier:
r(t) = R(t)(t)
and the instantaenous differential with respect to time:
dr
+ R = RR
r + R
= R
dt
Now is not constant, so its differential is not zero; hence rewriting this last
equations we have that
The instantaneous velocity of P in the fixed frame is
dr
= R + r
dt
The second term of course, is the contribution from the rotating frame which we
saw previously. The first is the linear velocity measured in the rotating frame ,
referred to the fixed frame (via the rotation matrix R which aligns the two frames)
37
P at t+ t
r
P at t
( r) t
r= at t
3.5.2
Our previous result is a general one relating the time derivatives of any vector in
rotating and non-rotating frames. Let us now consider the second differential:
r = r + r + R + R
We shall assume that the angular acceleration is zero, which kills off the first term,
and so now, substituting for r we have
r =
=
=
=
r + R ) + R + R
(
r) + R + R + R
(
R) + R
r) + R + R(R
(
(
r) + 2
(R ) + R
38
= m
The middle term is an extra term which arises because of the velocity of P
in the rotating frame. It is known as the Coriolis acceleration, named after
the French engineer who first identified it.
Because of the rotation of the earth, the Coriolis acceleration is of great importance in meteorology and accounts for the occurrence of high pressure anticyclones and low pressure cyclones in the northern hemisphere, in which the Coriolis
acceleration is produced by a pressure gradient. It is also a very important component of the acceleration (hence the force exerted) by a rapidly moving robot arm,
whose links whirl rapidly about rotary joints.
Example
Q Find the instantaneous acceleration of a projectile fired along a line of longitude (with angular velocity of constant relative to the sphere) if the sphere
is rotating with angular velocity .
A Consider a coordinate frame defined by mutually orthogonal unit vectors,
, m
and n
, as shown in Fig. 3.2. We shall assume, without loss of generality,
that the fixed and rotating frames are instantaneously aligned at the moment
shown in the diagram, so that R = I, the identity, and hence r = .
In the rotating frame
=
and
)
= = (
So the in the fixed reference frame, because these two frames are instantaneously aligned
) + 2
(
) + (
r) .
r = (
The first term is the centripetal acceleration due to the projectile moving
around the sphere which it does because of the gravitational force. The
39
last term is the centripetal acceleration resulting from the rotation of the
sphere. The middle term is the Coriolis acceleration.
Using Fig. 3.2, at some instant t
r(t) = (t) = r cos(t)m
+ r sin(t)
n
and
=
Then
) = (
)
2 = 2 = 2 r,
(
Check the direction the negative sign means it points towards the centre
of the sphere, which is as expected.
Likewise the last term can be obtained as
r) = 2 r sin(t)
(
n
Note that it is perpendicular to the axis of rotation m,
and because of the
minus sign, directed towards the axis)
The Coriolis term is derived as:
= 2
(
)
2
0
= 2 0 r cos t
0
0
r sin t
= 2r cos t
Instead of a projectile, now consider a rocket on rails which stretch north
from the equator. As the rocket travels north it experiences the Coriolis force
(exerted by the rails):
2
R cos t
+ve -ve +ve
+ve
Hence the coriolis force is in the direction opposed to (i.e. in the opposite
direction to the earths rotation). In the absence of the rails (or atmosphere)
the rockets tangetial speed (relative to the surface of the earth) is greater
than the speed of the surface of the earth underneath it (since the radius
of successive lines of latitude decreases) so it would (to an observer on the
earth) appear to deflect to the east. The rails provide a coriolis force keeping
it on the same meridian.
Revised Oct 2013
40
41
42
Lecture 4
Line, Surface and Volume Integrals.
Curvilinear coordinates.
We started off the course 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 much of the rest of the course, we will be concerned with scalars and vectors
which are defined over regions in space scalar and vector fields
In this lecture we introduce line, surface and volume integrals, and consider how
these are defined in non-Cartesian, curvilinear coordinates
4.1
N
X
i =1
qi
(r ri ) .
|r ri |3
(K =
1
)
4r 0
For example; you could work out the velocity field, in plane polars, at any point on
43
(a)
(b)
Figure 4.1: Examples of (a) a scalar field (pressure); (b) avector field (wind velocity)
4.2
Line integrals are concerned with measuring the integrated interaction with a field
as you move through it on some defined path. Eg, given a map showing the
pollution density field in Oxford, you may wish to work out how much pollution
you breathe in when cycling from college to the Department via different routes.
First recall the definition of an integral for a scalar function f (x ) of a single scalar
variable x . One assumes a set of n samples fi = f (xi ) spaced by xi . One forms
the limit of the sum of the products f (xi )xi as the number of samples tends to
infinity
Z
n
X
fi xi .
f (x )d x =
lim
n i =1
xi 0
For a smooth function, it is irrelevant how the function is subdivided.
4.2.1
In a vector line integral, the path L along which the integral is to be evaluated
is split into a large number of vector segments ri . Each line segment is then
45
F(r)
r
Figure 4.2: Line integral. In the diagram F(r) is a vector field, but it could be replaced with scalar
field U(r).
multiplied by the quantity associated with that point in space, the products are
then summed and the limit taken as the lengths of the segments tend to zero.
There are three types of integral we have to think about, depending on the nature
of the product:
1. Integrand U(r) is a scalar field, hence the integral is a vector.
!
Z
X
Ui r i .
I = U(r)d r
= lim
L
ri 0
2. Integrand a(r) is a vector field dotted with d r hence the integral is a scalar:
!
Z
X
I = a(r) d r
= lim
ai r i .
L
ri 0
ri 0
Note immediately that unlike an integral in a single scalar variable, there are many
paths L from start point rA to end point rB , and the integral will in general depend
on the path taken.
Physical examples of line integrals
Note that the expressions above are beautifully compact in vector notation, and are
all independent of coordinate system. Of course when evaluating them we need
to choose a coordinate system: often this is the standard Cartesian coordinate
system (as in the worked examples below), but need not be, as we shall see in
section 4.6.
Examples
x=0
x=0
47
1,1
1
2 3
0,0
0,1
(1,1)
2
(x y d x + x y d y ) =
(0,0)
x=1
(x n+2d x + nx n1.x .x 2n d x )
x=0
x=1
(x n+2d x + nx 3n d x )
x=0
n
1
+
n + 3 3n + 1
3. This path is not smooth, so break it into two. Along the first section,
y = 0 and d y = 0, and on the second x = 1 and d x = 0, so
Z
B
2
(x y d x +x y d y ) =
A
x=1
x=0
(x 0d x )+
y =1
y =0
y =1
1y 2d y = 0+ y 3/3y =0 = 1/3 .
So in general the integral depends on the path taken. Notice that answer (1)
is the same as answer (2) when n = 1, and that answer (3) is the limiting
value of answer (2) as n .
(1,1)
2
(y x d x + y x d y ) =
(0,0)
x=1
x=0
x=1
(x 2n+1d x + nx 2n+1d x )
x=0
n
1
+
2n + 2 2n + 2
1
independent of n
=
2
4.3
In the second example, the line integral has the same value for the whole range
of paths. In fact it is wholly independent of path. This is easy to see if we write
g(x , y ) = x 2y 2/2. Then using the definition of the perfect differential
dg =
g
g
dx +
dy
x
y
we find that
Z
B
2
(y x d x + y x d y ) =
A
A
gB
dg
gA
which depends solely on the value of g at the start and end points, and not at all
on the path used to get from A to B. Such a vector field is called conservative.
One sort of line integral performs the integration around a complete loop and is
denoted with a ring. If E is a conservative field, determine the value of
I
E dr .
In electrostatics, if E is the electric field then the potential function is
Z
= E dr .
Do you think E is conservative?
4.3.1
49
Line integrals are often defined in terms of scalar arc length. They dont appear
to involve vectors (but actually they are another form of type 2 defined earlier).
The integrals usually appear as follows
Z
I = F (x , y , z )d s
L
and most often the path L is along a curve defined parametrically as x = x (p),
y = y (p), z = z (p) where p is some parameter. Convert the function to F (p),
writing
Z pend
ds
dp
I=
F (p)
dp
pstart
where
ds
=
dp
"
dx
dp
2
dy
dp
2
dz
dp
2#1/2
Note that the parameter p could be arc-length s itself, in which case d s/d p = 1
of course! Another possibility is that the parameter p is x that is we are told
y = y (x ) and z = z (x ). Then
"
2 2 #1/2
Z xend
dz
dy
I=
dx .
+
F (x ) 1 +
dx
dx
xstart
4.4
Surface integrals
R
Evaluate F d S over the x = 1 side of
the cube shown in the figure when F =
y + z + x k .
d S is perpendicular to the surface. Its
direction actually depends on the nature
of the problem. More often than not,
the surface will enclose a volume, and the
surface direction is taken as everywhere
emanating from the interior.
Hence for the x = 1 face of the cube
d S = d y d z
and
Z
F dS =
=
4.5
Z Z
z
1
1
11111
00000
00000
11111
00000
11111
00000
11111
00000
11111
y 11111
00000
00000
11111
00000
11111
dS = dydz i
00000
11111
00000
11111
00000
11111
00000
11111
1 x
ydydz
1 21 1 1
y 0 z |0 =
.
2
2
Volume integrals
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 (how could you define a direction with an
infinitesimal volume element?). The possibilities are:
51
You have covered these (more or less) in your first year course, so not much more
to say here. The next section considers these again in the context of a change of
coordinates.
4.6
Up to now we have been concerned with Cartesian coordinates x , y , z with coordinate axes , , k . When performing a line integral in Cartesian coordinates, you
write
r = x + y + z k
and
d r = d x + d y + d z k
and can be sure that length scales are properly handled because as we saw in
Lecture 3
p
|d r| = d s = d x 2 + d y 2 + d z 2 .
The reason for using the basis , , k rather than any other orthonormal basis set is
that represents a direction in which x is increasing while the other two coordinates
remain constant (and likewise for and k with y and z respectively), simplifying
the representation and resulting mathematics.
Often the symmetry of the problem strongly hints at using another coordinate
system:
likely to be plane, cylindrical, or spherical polars,
but can be something more exotic
Lines of
constant r
Lines of
constant z
^
k
^
j
r
^i
Lines of
constant
(a)
(b)
Figure 4.4: Cylindrical polars: (a) coordinate definition; (b) iso lines in r , and z .
r
= cos + sin
r
r
=
= r sin + r cos
r
= k
=
z
er =
e
ez
z
= d r er + d e + d z ez
= d r
er + r d
e + d z
ez
dr =
Now here is the important thing to note. In cartesian coordinates, a small change
53
d s = |d r| = d r.d r = d x 2 + 0 + 0 = d x
H
Q Evaluate C a d l , where a = x 3 y 3 + x 2y k and C is the circle of radius r
in the z = 0 plane, centred on the origin.
A Consider figure 4.5. In this case our cylindrical coordinates effectively reduce
to plane polars since the path of integration is a circle in the z = 0 plane, but
lets persist with the full set of coordinates anyway; the k component of a
will play no role (it is normal to the path of integration and therefore cancels
as seen below).
On the circle of interest
a = r 3 ( sin3 + cos3 + cos2 sin k )
and (since dz = dr = 0 on the path)
dr = r d
e
= r d ( sin + cos )
so that
I
since
Z
a dr =
r 4 (sin4 + cos4 )d =
sin d =
cos4 d =
0
3
4
3 4
r
2
From above
y
dR = r d
e
d
y
dR = r d
e
where the equality on the right-hand side follows from the definitions of
er = rr =
x
y z
r + r + r k , etc. This is the explanation for the magical appearance of the
determinant in change-of-variables integration that you encountered in your first
year maths!
55
z
dV = dx dy dz
dV = r dr ddz
dz
ez
r d
e
dy
dr
er
dz k
dx
x
z
(a)
r d
(b)
Figure 4.6: Volume elements dV in (a) Cartesian coordinates; (b) Cylindrical polar coordinates
Surface integrals in cylindrical polars
Recall from section 4.4 that for a surface element with normal along we have:
d S = d y d z
More explicitly this comes from finding normal to the plane that is tangent to the
surface of constant x and from finding the area of an infinitessimal area element
on the plane. In this case the plane is spanned by the vectors and k and the area
of the element given by (see section 1.3):
d S = d y d z k
Thus
d S = d y d z k = d S = d y d z
In cylindrical polars, surface area elements (see figure 4.7) are given by:
d S = d r
er r d
e = r d r d
ez
d S = r d
e d z
ez = r d d z
er
Similarly we can find d S for surfaces of constant , though since these arent as
common this is left as a (relatively easy) exercise.
er
r d
e dr
dz
ez
dSr = r ddz
er
dz
ez
r d
e
dr
er
dS = dr dz
e
x
Figure 4.7: Surface elements in cylindrical polar coordinates
4.6.2
Spherical polars
Much of the development for spherical polars is similar to that for cylindrical polars.
As shown in figure 4.6.2 a point in space P having cartesian coordinates x , y , z
can be expressed in terms of spherical polar coordinates, r, , as follows:
r = x + y + z k
= r sin cos + r sin sin + r cos k
The basis set in spherical polars is obtained in an analogous fashion: we find unit
z
Lines of
constant
(longitude)
er
Lines of
constant r
Lines of
constant
(latitude)
57
r
e =
=
r sin sin + r sin cos
= r sin
e
er =
= d r er + d e + d e
= d r
er + r d
e + r sin d
e
dr =
The most (the only?) useful surface elements in spherical polars are those tangent
to surfaces of constant r (see figure 4.9). The surface direction (unnormalised) is
given by
e
e =
er and the area of an infinitessimal surface element is given by
|r d
e r sin d
e | = r 2 sin d d .
Thus a surface element d S in spherical polars is given by
d S = r d
e r sin d
e = r 2 sin
er
dV = r 2 sin dr dd
r
y
x
r sin d
R
Q Evaluate S a d S, where a = z 3k
and S is the sphere of radius A centred on the origin.
A On the surface of the sphere:
a = A3 cos 3 k
d S = A2 sin d d
er
Hence
Z
Z
a dS =
S
A3cos 3 A2 sin [
er k ] d d
=0 =0
Z 2
Z
5
= A
d
cos 3 sin [cos ] d
0
1
= 2A5 cos5 0
5
5
4A
=
5
59
z
r sin d
e
dSr = r 2 sin dd
er
r d
e
x
Figure 4.9: Surface element dS in spherical polar coordinates
4.6.3
Cylindrical and spherical polar coordinates are two (useful) examples of general
curvilinear coordinates. In general a point P with Cartesian coordinates x , y , z can
be expressed in terms of the curvilinear coordinates u, v , w where
x = x (u, v , w ),
y = y (u, v , w ),
z = z (u, v , w )
Thus
r = x (u, v , w ) + y (u, v , w ) + z (u, v , w )k
and
y
z
x
r
= + +
k
u
u
u
u
and similarly for partials with respect to v and w , so
r
r
r
du +
dv +
dw
dr =
u
v
w
We now define the local coordinate system as before by considering the directions
in which each coordinate unilaterally (and instantaneously) increases:
r
r
eu =
=
eu = hu
eu
u
u
r
r
=
ev =
ev = hv
ev
v
v
r
r
=
ew =
ew = hw
ew
w
w
d V = hu d u
eu .(hv d v
ev hw d w
ew )
Summary
To summarise:
General curvilinear coordinates
x = x (u, v , w ),
y = y (u, v , w ),
z = z (u, v , w )
r = x (u, v , w ) + y (u, v , w ) + z (u, v , w )k
r
r
r
hv = ,
hw =
hu = ,
u
v
w
1 r
1 r
1 r
,
v=
ev =
,
w
=
ew =
hu u
hv v
hw w
d r = hu d u
u + hv d v
v + hw d w w
d V = hu hv hw d ud v d w u
.(
v w)
d S = hu hv d ud v
u
v (for surface element tangent to constant w )
u =
eu =
er
dr
dS
=
=
=
=
=
=
r cos ,
y = r sin
r cos + r sin
1,
h = r
cos + sin ,
e = sin + cos
d r
er + r d
e
r d r d k
61
er
dr
dS
dS
dV
=
=
=
=
=
=
=
=
r cos ,
y = r sin ,
z =z
r cos + r sin + z k
1,
h = r,
hz = 1
cos + sin ,
e = sin + cos ,
d r
er + r d
e + d z
ez
r d r d k (on the flat ends)
r d d z
er (on the curved sides)
r d r d d z
ez = k
er
e
dr
dS
dV
=
=
=
=
=
=
=
=
=
r sin cos ,
y = r sin sin ,
z = r cos
r sin cos + r sin sin + r cos k
1,
h = r,
h = r sin
sin cos + sin sin + cos k
cos cos + cos sin + sin k
sin + cos
d r
er + r d
e + r sin d
e
r 2 sin d r d d
er (on a spherical surface)
2
r sin d r d d
Lecture 5
Vector Operators: Grad, Div and Curl
In the first lecture of the second part of this course we move more to consider
properties of fields. We introduce three field operators which reveal interesting
collective field properties, viz.
the gradient of a scalar field,
5.1
=
+
+ k
.
x
y
z
63
64
Then
gradU U .
U =
+
+
k
x
y
z
x 2 = 2x .
2. U = r 2
r 2 = x2 + y 2 + z 2
+
+
k (x 2 + y 2 + z 2 )
U =
x
y
z
= 2x + 2y + 2z k = 2 r .
3. U = c r, where c is constant.
U =
+
+ k
(c1x + c2y + c3z ) = c1 +c2 +c3 k = c .
x
y
z
p
4. U = f (r ), where r = (x 2 + y 2 + z 2 )
U is a function of r alone so df /d r exists. As U = f (x , y , z ) also,
df r
f
=
x
d r x
f
df r
=
y
d r y
f
df r
=
.
z
d r z
r
r
df r
+ +
=
k
d r x
y
z
f
f
f
U = + +
k
x
y
z
p
But r = x 2 + y 2 + z 2 , so r /x = x /r and similarly for y , z .
!
df x + y + z k
df r
U =
.
=
dr
r
dr r
65
gradU
r
U(r)
dr
r + dr
U(r + dr)
5.2
If our current position is r in some scalar field U (Fig. 5.1), and we move an
infinitesimal distance d r, we know that the change in U is
dU =
U
U
U
dx +
dy +
dz .
x
y
z
66
0.08
0.06
0.04
0.02
0
4
4
2
2
0
0
2
2
4
dr
= 0.
ds
gradU
Surface of constant U
These are called Level Surfaces
Surface of constant U
5.3
67
a1 a2 a3
+
+
x
y
z
We can write this in a simplified notation using a scalar product with the vector
differential operator:
diva =
+
+ k
a= a
x
y
z
Notice that the divergence of a vector field is a scalar field.
Examples of divergence evaluation
a
1) x
2) r(= x + y + z k )
3) r/r 3
4) r c, for c constant
We work through example 3).
diva
1
3
0
(r c)/r
3 2
x .(x 2 + y 2 + z 2)3/2 = 1.(x 2 + y 2 + z 2)3/2 + x
(x + y 2 + z 2)5/2.2x
x
2
3
2 2
= r
1 3x r
.
div(r/r 3 ) = r 3 3 3(x 2 + y 2 + z 2)r 2 = r 3 (3 3)
= 0
5.4
Consider a typical vector field, water flow, and denote it by a(r). This vector has
magnitude equal to the mass of water crossing a unit area perpendicular to the
direction of a per unit time.
Now take an infinitesimal volume element d V and figure out the balance of the
flow of a in and out of d V .
68
To be specific, consider the volume element d V = d x d y d z in Cartesian coordinates, and think first about the face of area d x d z perpendicular to the y axis
and facing outwards in the negative y direction. (That is, the one with surface
area d S = d x d z .)
dz
dS = -dxdz j
dS = +dxdz j
y
dx
dy
x
Figure 5.2: Elemental volume for calculating divergence.
ay (y )d z d x ,
where ay (y ) means that ay is a function of y . (By the way, flux here denotes mass
per unit time.)
A similar contribution, but of opposite sign, will arise from the opposite face, but
we must remember that we have moved along y by an amount d y , so that this
OUTWARD amount is
ay
dy dxdz
ay (y + d y )d z d x = ay +
y
The total outward amount from these two faces is
ay
ay
dydxdz =
dV
y
y
Summing the other faces gives a total outward flux of
ax ay az
+
+
dV = a dV
x
y
z
So we see that
5.5.
69
The divergence of a vector field represents the flux generation per unit
volume at each point of the field. (Divergence because it is an efflux not
an influx.)
Interestingly we also saw that the total efflux from the infinitesimal volume was
equal to the flux integrated over the surface of the volume.
(NB: The above does not constitute a rigorous proof of the assertion because we
have not proved that the quantity calculated is independent of the co-ordinate
system used, but it will suffice for our purposes.)
5.5
Recall that gradU of any scalar field U is a vector field. Recall also that we
can compute the divergence of any vector field. So we can certainly compute
div(gradU), even if we dont know what it means yet.
Here is where the operator starts to be really handy.
U) =
+
+ k
+
+ k
U
(
x
y
z
x
y
z
+
+ k
+
+ k
U
=
x
y
z
x
y
z
2
2
2
=
+
+
U
x 2 y 2 z 2
2
U 2U 2U
=
+
+
x 2
y 2
z 2
This last expression occurs frequently in engineering science (you will meet it next
in solving Laplaces Equation in partial differential equations). For this reason, the
operator 2 is called the Laplacian
2
2
2
+
+
U
2 U =
x 2 y 2 z 2
Laplaces equation itself is
2 U = 0
70
Examples of 2 U evaluation
U
2 U
1) r 2 (= x 2 + y 2 + z 2 ) 6
2) x y 2z 3
2x z 3 + 6x y 2z
3) 1/r
0
Lets prove example (3) (which is particularly significant can you guess why?).
1/r = (x 2 + y 2 + z 2)1/2
2
(x + y 2 + z 2)1/2 =
x .(x 2 + y 2 + z 2)3/2
x x
x
= (x 2 + y 2 + z 2 )3/2 + 3x .x .(x 2 + y 2 + z 2)5/2
= (1/r 3)(1 + 3x 2/r 2 )
Adding up similar terms for y and z
2
2
2
1
1
(x
+
y
+
x
)
2 = 3 3 + 3
=0
r
r
r2
5.6
So far we have seen the operator applied to a scalar field U; and dotted with
a vector field a.
We are now overwhelmed by an irrestible temptation to
cross it with a vector field a
This gives the curl of a vector field
a curl(a)
We can follow the pseudo-determinant recipe for vector products, so that
k
(remember it this way)
a = x
y z
a a a
x
y
z
az ay
ax az
ay
ax
+
+
=
k
y
z
z
x
x
y
71
1) y + x
2k
2) x 2y 2k
2x 2y 2x y 2
5.7
ax (y+dy)
y+dy
dy
ay (x)
ay (x+dx)
dx
x+dx
x
ax (y)
(a)
(b)
Figure 5.3: (a) A rough sketch of the vector field y + x . (b) An element in which to calculate
curl.
The
circulation of a vector a round any closed curve C is defined to be
H
C a dr
and the curl of the vector field a represents the vorticity, or circulation
per unit area, of the field.
72
Our proof uses the small rectangular element d x by d y shown in Figure 5.3(b).
Consider the circulation round the perimeter of a rectangular element.
The fields in the x direction at the bottom and top are
ax (y )
and
ax (y + d y ) = ax (y ) +
ax
dy,
y
and
ay (x + d x ) = ay (x ) +
ay
dx
x
Starting at the bottom and working round in the anticlockwise sense, the four
contributions to the circulation d C are therefore as follows, where the minus signs
take account of the path being opposed to the field:
d C = + [ax (y ) d x ] + [ay (x + d x ) d y ] [ax (y + d y ) d x ] [ay (x ) d y ]
ay
ax
= + [ax (y ) d x ] + ay (x ) +
d x d y ax (y ) +
d y d x [ay (x ) d y ]
x
y
ax
ay
dx dy
=
x
y
a) d S
= (
where d S = d x d y k .
NB: Again, this is not a completely rigorous proof as we have not shown that the
result is independent of the co-ordinate system used.
5.8
Lecture 6
Vector Operator Identities
In this lecture we look at more complicated identities involving vector operators.
The main thing to appreciate it that the operators behave both as vectors and
as differential operators, so that the usual rules of taking the derivative of, say, a
product must be observed.
There could be a cottage industry inventing vector identities. HLT contains a lot
of them. So why not leave it at that?
First, since grad, div and curl describe key aspects of vectors fields, they arise often
in practice, and so the identities can save you a lot of time and hacking of partial
derivatives, as we will see when we consider Maxwells equation as an example
later.
Secondly, they help to identify other practically important vector operators. So,
although this material is a bit dry, the relevance of the identities should become
clear later in other Engineering courses.
6.1
k
U = /x /y
/z
U/x U/y U/z
2
U
2U
=
+ () + k ()
y z z y
= 0 ,
as 2/y z = 2/z y .
Note that the output is a null vector.
73
74
6.2
+
+
x y x z y x y z z x z y
= 0
6.3
Suppose that U(r) is a scalar field and that a(r) is a vector field and we are interested in the product Ua. This is a vector field, so we can compute its divergence
and curl. For example the density (r) of a fluid is a scalar field, and the instantaneous velocity of the fluid v(r) is a vector field, and we are probably interested
in mass flow rates for which we will be interested in (r)v(r).
The divergence (a scalar) of the product Ua is given by:
(Ua) = U(
a) + (
U) a
= Udiva + (gradU) a
In a similar way, we can take the curl of the vector field Ua, and the result should
be a vector field:
(Ua) = U
a + (
U) a .
6.4
Identity 4: div of a b
Life quickly gets trickier when vector or scalar products are involved: For example,
it is not that obvious that
div(a b) = curla b a curlb
To show this, use the determinant:
/xi /xj /xk
ax
= [ay bz az by ] + [az bx ax bz ] + [ax by ay bx ]
a
a
y
z
x
y
z
bx
by
bz
= . . . bash out the products . . .
= curla b a (curl b)
6.5
75
Identity 5: curl(a b)
k
curl(a b) =
/x
/y
/z
ay bz az by az bx ax bz ax by ay bx
so the component is
(ax by ay bx )
(az bx ax bz )
y
z
which can be written as the sum of four terms:
by bz
ay az
ax
+
bx
+
+ by
+ bz
ax ay
+ az
bx
y
z
y
z
y
z
y
z
Adding ax (bx /x) to the first of these, and subtracting it from the last, and
doing the same with bx (ax /x) to the other two terms, we find that (you should
of course check this):
(a b) = (
b)a (
a)b + [b ]a [a ]b
where [a ] can be regarded as new, and very useful, scalar differential operator.
6.6
This is a scalar operator, but it can obviously can be applied to a scalar field,
resulting in a scalar field, or to a vector field resulting in a vector field:
[a ] ax
+ ay
+ az
.
x
y
z
6.7
76
Q: James Clerk Maxwell established a set of four vector equations which are fundamental to working out how electromagnetic waves propagate. The entire
telecommunications industry is built on these.
divD =
divB = 0
B
t
curlH = J + D
t
curlE =
In addition, we can assume the following, which should all be familiar to you:
B = r 0 H,
J = E,
D = r 0E,
where all the scalars are constants.
Now show that in a material with zero free charge density, = 0, and with
zero conductivity, = 0, the electric field E must be a solution of the wave
equation
2 E = r 0 r 0 ( 2E/t 2 ) .
A: First, a bit of respect. Imagine you are the first to do this this is a tingle
moment.
divD
divB
curlE
curlH
=
=
=
=
(a)
(b)
(c)
(d )
But we know (or rather you worked out in Identity 6) that curlcurl = graddiv
2 , and using (c)
curlcurlE = graddivE 2E = curl (r 0 (H/t))
so interchanging the order of partial differentation, and using (a) divE = 0:
(curlH)
t
E
r 0
= r 0
t
t
2E
2
E = r 0r 0 2
t
2E = r 0
77
6.8
It is possible to obtain general expressions for grad, div and curl in any orthogonal
curvilinear co-ordinate system by making use of the h factors which were introduced
in Lecture 4.
We recall that the unit vector in the direction of increasing u, with v and w being
kept constant, is
u
=
1 r
hu u
is the metric coefficient. Similar expressions apply for the other co-ordinate directions. Then
d r = hu u
d u + hv
vd v + hw wd
w .
6.9
Noting that U = U(r) and U = U(u, v , w ), and using the properties of the gradient
of a scalar field obtained previously
U d r = d U =
U
U
U
du +
dv +
dw
u
v
w
It follows that
U (hu u
d u + hv
vd v + hw wd
w) =
U
U
U
du +
dv +
dw
u
v
w
1 U
1 U
1 U
u+
v+
w
hu u
hv v
hw w
78
6.10
h (v) dw
w
h (v+dv) dw
w
h (v) du
h (v+dv) du
h v dv
The scale params are
functions of u,v,w
Figure 6.1: Elemental volume for calculating divergence in orthogonal curvilinear coordinates
79
So, finally,
1
diva =
hu hv hw
6.11
(av hu hw )
(aw hu hv )
(au hv hw )
+
+
u
v
w
Recall from Lecture 5 that we computed the z component of curl as the circulation
per unit area from
ay ax
dC =
dx dy
x
y
By analogy with our derivation of divergence, you will realize that for an orthogonal
curvilinear coordinate system we can write the area as hu hv d ud w . But the opposite
sides are no longer quite of the same length. The lower of the pair in Figure 6.2
is length hu (v )d u, but the upper is of length hu (v + d v )d u
y
au (v+dv)
v+dv
h u(v+dv) du
dv
hu (v) du
y
u+du
u
au (v)
Figure 6.2: Elemental loop for calculating curl in orthogonal curvilinear coordinates
(hu au )
dvdu
v
80
hu hv d ud v
hu hv
u
v
and hence curl is
(hw aw ) (hv av )
u
+
v
w
1
(hu au ) (hw aw )
v +
hw hu
w
u
(hv av ) (hu au )
1
hu hv
u
v
1
curla(u, v , w ) =
hv hw
1 u
curla(u, v , w ) =
v
w
hu hv hw u
hu au hv av hw aw
6.12
Substitution of the components of gradU into the expression for diva immediately
(!*?) gives the following expression for the Laplacian in general orthogonal coordinates:
1
hw hu U
hv hw U
hu hv U
2
U=
+
+
.
hu hv hw u
hu u
v
hv v
w
hw w
6.13
(cos2 + si n2) = 1,
h =
(r 2 sin2 + r 2 cos2 ) = r,
hz = 1
81
U
1 U
U
er +
e +
k
r
r
z
az
1 (r ar ) a
+
+
diva =
r
r
z
1 (r a) ar
1 az a
ar az
curla =
er +
e +
k
r
z
z
r
r
r
2U = Tutorial Exercise
gradU =
6.14
Here (u, v , w ) (r, , ). The position vector is r = r sin cos + r sin sin +
r cos k .
q
(sin2 (cos2 + sin2 ) + cos2 ) = 1
hr =
q
(r 2 cos2 (cos2 + sin2 ) + r 2 sin2 ) = r
h =
q
h =
(r 2 sin2 (sin2 + cos2 ) = r sin
U
1 U
1 U
er +
e +
e
r
r
r sin
1 (r 2ar )
1 (a sin )
1 a
diva = 2
+
+
r
r
r sin
r sin
er
(a sin )
(a ) +
(ar ) (ar sin ) +
curla =
r sin
r sin
r
(a r ) (ar )
r r
2
U = Tutorial Exercise
gradU =
Examples
k
curla = /x /y /z = z + y k .
x2
xy
xz
82
a = 0;
a = 0 .
Hence as
er
curla =
r sin
(a sin )
(a ) +
(ar ) (a r sin ) +
(a r ) (ar )
r sin
r
r
r
e
2
e
2
curla =
(r sin cos ) +
(r sin cos )
r sin
r
e
(r 2 sin sin ) +
r 2 cos cos )
=
r sin
r
=
e (r sin ) +
e (r cos cos )
Checking: these two results should be the same, but to check we need expressions for
e ,
e in terms of etc.
Remember that we can work out the unit vectors
er and so on in terms of
etc using
er =
1 r
;
h1 d r
e =
1 r
;
h2 d
e =
1 r
h3 d
where r = x +y +z k .
er
e
sin
cos
0
k
= [R]
k
Dont be shocked to see a rotation matrix [R]: we are after all rotating one
right-handed orthogonal coord system into another.
So the result in spherical polars is
curla = (cos cos + cos sin sin k )(r sin ) + ( sin + cos )(r cos cos
= r cos + r sin sin k
= z + y k
which is exactly the result in Cartesians.
Q2 Find the divergence of the vector field a = r c where c is a constant vector
(i) using Cartesian coordinates and (ii) using Spherical Polar coordinates.
83
diva =
er
e
k
k
Now the point is the same point in space whatever the coordinate system, so
ar
er + a
e + a
e = ax + ay + az k
and using the inner product
er
ar
a
e
e
a
ar
a [R]
a
k
ar
a [R]
a
ar
a
a
ar
a
a
ax
= ay
az
k
ax
= ay
az
k
ax
= ay
az
ax
= ay [R]
az
ax
= [R] ay
az
84
1 (a sin )
1 a
1 (r 2 ar )
+
+
r 2 r
r sin
r sin
Lecture 7
Gauss and Stokes Theorems
This section finally begins to deliver on why we introduced div grad and curl. Two
theorems, both of them over two hundred years old, are explained:
Gauss Theorem enables an integral taken over a volume to be replaced by
one taken over the surface bounding that volume, and vice versa. Why would
we want to do that? Computational efficiency and/or numerical accuracy!
Stokes Law enables an integral taken around a closed curve to be replaced
by one taken over any surface bounded by that curve.
7.1
Gauss Theorem
Suppose that a(r) is a vector field and we want to compute the total flux of the
field across the surface S that bounds a volume V . That is, we are interested in
calculating:
Z
a dS
S
dS
dS
dS
dS
dS
Figure 7.1: The surface element dS must stick out of the surface.
85
86
where recall that d S is normal to the locally planar surface element and must
everywhere point out of the volume as shown in Figure 7.1.
Gauss Theorem tells us that we can do this by considering the total flux generated
inside the volume V :
Gauss Theorem
Z
Z
a dS =
div a d V
S
7.2
Informal proof
= dE = a dS .
If we sum over the volume elements, this results in a sum over the surface elements.
But if two elemental surface touch, their d S vectors are in opposing direction and
cancel as shown in Figure 7.2. Thus the sum over surface elements gives the
overall bounding surface.
Figure 7.2: When two elements touch, the dS vectors at the common surface cancel out. One
can imagine building the entire volume up from the infinitesimal units.
87
3
z k
2
R sin d d r
R
dz
z
R
Figure 7.3:
a dS =
=0 =0
S
Z 2 Z
=
R3 cos3 . R2 sin d d . cos
=0 =0
Z
= 2R5
cos4 sin d
0
4R5
2R5
5
=
cos 0 =
5
5
(2) To apply Gauss Theorem, we need to figure out div a and decide how to
compute the volume integral. The first is easy:
diva = 3z 2
88
For the second, because diva involves just z , we can divide the sphere into
discs of constant z and thickness d z , as shown in Fig. 7.3. Then
d V = (R2 z 2)d z
and
Z
7.3
div ad V = 3
V
z 2(R2 z 2)d z
R
2 3
z5
R z
= 3
3
5
4R5
=
5
R
At first sight, it might seem that with a computer performing surface integrals
might be better than a volume integral, perhaps because there are, somehow,
fewer elements. However, this is not the case. Imagine doing a surface integral
over a wrinkly surface, say that of the moon. All the elements involved in the
integration are difficult and must be modelled correctly. With a volume integral,
most of the elements are not at the surface, and so the bulk of the integral is
done without accurate modelling. The computation is easier, faster, and better
conditioned numerically.
7.4
Suppose the vector field a(r) is of the form a = U(r)c, where U(r) as scalar field
and c is a constant vector. Then, as we showed in the previous lecture,
div a = gradU c + Udiv c
= gradU c
since divc = 0 because c is constant.
Gauss Theorem becomes
Z
Z
grad U cd V
Uc d S =
S
89
This is still a scalar equation but we now note that the vector c is arbitrary so
that the result must be true for any vector c. This can be true only if the vector
equation
Z
Z
Ud S =
grad Ud V
S
is satisfied.
If you think this is fishy, just write c =R , then c = , and c = k in turn, and you
must obtain the three components of S Ud S in turn.
Further extensions can be obtained of course. For example one might be able
to write the vector field of interest as
a(r) = b(r) c
where c is a constant vector.
Example of extension to Gauss Theorem
Q U = x 2 + y 2 + z 2 is a scalar field,
and volume V is the cylinder x 2 +
y 2 a2, 0 z h. Compute the
surface integral
Z
Ud S
dS
z=h
z=0
dS
U = x 2 + y 2 + z 2 = r 2 + h2 and d S = r d r d k
so
Z
a
1
1
Ud S =
(h2 + r 2 )2r d r
d k = k h2 r 2 + r 4 = [h2 a2 + a4]k
2 0
2
r =0
=0
Z
90
Bottom face:
U = r 2 and d S = r d r d k
4
The contribution from this face is thus a2 k , and the total integral is h2 a2 k .
On the other hand, using Gauss Theorem we have to compute
Z
grad Ud V
The integrations over x and y are zero by symmetry, so that the only remaining
part is
Z h
Z a
Z 2
2
zdz
r dr
d k = a2 h2 k
z=0
7.5
r =0
=0
Stokes Theorem
Stokes Theorem relates a line integral around a closed path to a surface integral
over what is called a capping surface of the path.
7.6
91
Informal proof
You will recall that in Lecture 5 that we defined curl as the circulation per unit
area, and showed that
X
a) d S .
a d l = d C = (
around elemental loop
Now if we add these little loops together, the internal line sections cancel out
because the d ls are in opposite direction but the field a is not. This gives the
larger surface and the larger bounding contour as shown in Fig. 7.4.
y
ay (x)
dy
ay (x+dx)
ax (y+dy)
y+dy
dx
x+dx
x
ax (y)
Figure 7.4: An example of an elementary loop, and how they combine together.
For a given contour, the capping surface can be ANY surface bound by
the contour. The only requirement is that the surface element vectors point in
the general direction of a right-handed screw with respect to the sense of the
contour integral. See Fig. 7.5.
Back
Front
Back
Front
Figure 7.5: For a given contour, the bounding surface can be any shape. dSs must have a positive
component in the sense of a r-h screw wrt the contour sense.
92
directly and (ii) using Stokes theorem where the surface is the planar surface
bounded by the contour.
A(i) Directly. On the circle of radius R
a = R3 ( sin3 + cos3 )
and
d l = Rd ( sin + cos )
so that:
I
Z
a dl =
C
since
Z
2
0
sin d =
0
R4 (sin4 + cos4 )d =
cos4 d =
curl a = x y
z
y 3 x 3 0
3 4
R ,
2
3
4
= 3(x 2 + y 2 )k = 3r 2 k
7.7
93
or, rearranging the triple scalar products and taking the constant c out of the
integrals gives
Z
I
c Ud l = c gradU d S .
C
7.8
H
Q Derive C Ud r (i) directly and (ii) using Stokes,
where U = x 2 + y 2 + z 2 and the line integral is taken
around C the circle (x a)2 + y 2 = a2 and z = 0.
Note that, for no special reason, we have used d r
here not d l.
r
a
d r = d
94
k
d SgradU = 2 d d
0
0
1 = 2[ sin +(a+ cos ) ] d d
(a + cos ) sin 0
R 2
R 2
Both 0 sin d = 0 and 0 cos d = 0, so we are left with
Z a Z 2
Z
d S gradU =
2a d d = 2a3
S
=0
=0
Lecture 8
Engineering applications
In Lecture 6 we saw one classic example of the application of vector calculus to
Maxwells equation.
In this lecture we explore a few more examples from fluid mechanics and heat
transfer. As with Maxwells eqations, the examples show how vector calculus
provides a powerful way of representing underlying physics.
The power come from the fact that div, grad and curl have a significance or
meaning which is more immediate than a collection of partial derivatives. Vector
calculus will, with practice, become a convenient shorthand for you.
Electricity Amp`eres Law
Fluid Mechanics - The Continuity Equation
Thermo: The Heat Conduction Equation
Mechanics/Electrostatics - Conservative fields
The Inverse Square Law of force
Gravitational field due to distributed mass
Gravitational field inside body
Pressure forces in non-uniform flows
95
96
8.1
Electricity Amp`
eres Law
curlH d S =
or
H dl =
J dS
J dS
R
where S J d S is total current through the surface.
Now consider the H around a straight wire carrying current I. Symmetry tells us
the H is in the
e direction, in a rhs screw sense with respect to the current. (You
might check this against Biot-Savarts law.)
Suppose we asked what is the magnitude of H?
I
Current
1111
0000
Back
C
H
H
Front
a
Top view
for r<a
r
In wire
Outside wire
Inside the wire, the bounding contour only encloses a fraction (r 2 )/(a2 ) of the
current, and so
Z
H2r =
J d S = I(r 2 /A2)
H = Ir /2A2
8.2
97
dS
Control Volume V
Figure 8.1:
(r)d V = q d S.
t V
S
dV =
q d S .
V t
S
Now we use Gauss Theorem to transform the RHS into a volume integral
Z
Z
dV =
div (q)d V .
V
V t
The two volume integrals can be equal for any control volume V only if the two
integrands are equal at each point of the flow. This leads to the mathematical
formulation of
98
t
Notice that if the density doesnt vary with time, div (q) = 0, and if the density
doesnt vary with position then
div (q) =
8.3
Flow of heat is very similar to flow of fluid, and heat flow satisfies a similar continuity equation. The flow is characterized by the heat current density q(r) (heat
flow per unit area and time), sometimes misleadingly called heat flux.
Assuming that there is no mass flow across the boundary of the control volume and
no source of heat inside it, the rate of flow of heat out of the control volume by
conduction must equal the rate of decrease of internal energy (constant volume)
or enthalpy (constant pressure) within it. This leads to the equation
div q = c
T
,
t
where is the density of the conducting medium, c its specific heat (both are
assumed constant) and T is the temperature.
In order to solve for the temperature field another equation is required, linking q
to the temperature gradient. This is
q = grad T,
where is the thermal conductivity of the medium. Combining the two equations
gives the heat conduction equation:
div q = div grad T = 2 T = c
T
t
where it has been assumed that is a constant. In steady flow the temperature
field satisfies Laplaces Equation 2T = 0.
8.4
99
100
8.5
Radial forces are found in electrostatics and gravitation so they are certainly
irrotational and conservative.
But in nature these radial forces are also inverse square laws. One reason why this
may be so is that it turns out to be the only central force field which is solenoidal,
i.e. has zero divergence.
If F = f (r )r,
div F = 3f (r ) + r f (r ).
For div F = 0 we conclude
df
+ 3f = 0
r
dr
or
dr
df
+3
= 0.
f
r
Integrating with respect to r gives f r 3 = const = A, so that
F=
Ar
A
, |F| = 2 .
3
r
r
The condition of zero divergence of the inverse square force field applies everywhere
except at r = 0, where the divergence is infinite.
To show this, calculate the outward normal flux out of a sphere of radius R centered
on the origin when F = Fr. This is
Z
Z
Z
F dS = F
r d S = F
d = F 4R2 = 4A = Constant.
S
Sphere
Sphere
where we have done the volume integral as a summation over thin shells of surface
area 4r 2 and thickness d r .
But for all finite r , divF = 0, so divF must be infinite at the origin.
The flux integral is thus
zero for any volume which does not contain the origin
4A for any volume which does contain it.
8.6
If one tried the same approach as 8.4 for the gravitational field, A = Gm, where
m is the mass at the origin and G the universal gravitational constant, one would
run into the problem that there is no such thing as point mass.
We can make progress though by considering distributed mass.
The mass contained in each small volume element d V is d V and this will make a
contribution 4Gd V to the flux integral from the control volume. Mass outside
the control volume makes no contribution, so that we obtain the equation
Z
Z
F d S = 4G d V.
S
Using the integral form of Poissons equation, it is possible to calculate the gravitational field inside a spherical body whose density is a function of radius only. We
have
Z R
4R2 F = 4G
4r 2 d r,
0
where F = |F|, or
Z R
G
MG
|F | = 2
4r 2 d r = 2 ,
R 0
R
where M is the total mass inside radius R. For the case of uniform density, this is
equal to M = 34 R3 and |F | = 43 GR.
102
8.7
where S is the surface of the body. If the pressure p is non-uniform, this integral
is not zero. The integral can be transformed using Gauss Theorem to give the
alternative expression
Z
Fp = grad p d V,
V
V
Revised Oct 2013