vector calculus prof. peter haynes
TRANSCRIPT
-
8/11/2019 Vector calculus Prof. Peter Haynes
1/44
MSE 201: Mathematics 1
Vector calculusProf. Peter Haynes
1 Motivation
This course combines two topics that were covered in year 1, namely vectors (dealing with quantities that
possess magnitude and direction) andcalculus(differentiation and integration). Sovector calculusincludes
the differentiation and integration of vectors e.g. the velocity of a body is the time derivative of its position
vector:v= r.
However it is a much richer and more powerful topic than that. In year 1 an introduction was also given to
functions of more than one variable, such as functions of three coordinates in space e.g. f(x, y, z) or f(r).
Such functions of position are known asfieldsand they can themselves be scalar or vector in nature. Someexamples are listed in Table 1.
Scalar fields Vector fields
Carrier concentration at a p-n junction Velocity fields in fluid dynamics
Electrostatic potentials Electric fields
Temperature distribution in this room Magnetic fields
Table 1: Examples of scalar and vector fields.
The topic of vector calculus concerns itself with differentiating and integrating scalar and vector fields with
respect to position (or another vector argument). The mathematical framework that will be developed
provides a universal way of describing physical laws very elegantly. In particular it is essential for the study
of fluid dynamics and electromagnetism.
2 Vector algebra
This course assumes knowledge and understanding of the following:
rules for vector addition, subtraction and multiplication by a scalar magnitude of a vector and unit vectors basis vectors and Cartesian coordinates scalar (dot) and vector (cross) products and their geometric interpretation
Unfamiliarity with any of the above should be addressed as a matter of priority by reading the notes fromthe year 1 Vectors course. However a few topics are reviewed below in order to clarify the notation used
in this course.
Department of Materials, Imperial College London
-
8/11/2019 Vector calculus Prof. Peter Haynes
2/44
2 Vector calculus
2.1 Cartesian coordinates
Vectors may be specified by theircomponentswith respect to an underlying set ofbasisvectors, which also
define acoordinate system. The most convenient basis sets consist of orthonormalvectors i.e. vectors that
are bothorthogonal(they intersect at right angles) andnormalised(they are unit vectors).
In three dimensions, the Cartesiansystem is defined by three orthonormal vectors i, j and k which define
thex-,y- andz-axes respectively. (Note that the hat that is sometimes used to denote unit vectors, e.g.
n, is omitted here since the properties of the Cartesian basis are well known). A general vectora may then
be denoted
a=
axay
az
=axi +ayj + azk
z
y
x
axi
ayj
azka
Figure 1: Cartesian coordinates and components of a vector.
2.2 Scalar product
Thescalar ordotproduct of two vectors a and b is defined as:
a b= a bcos whereaandbdenote the magnitudes of the vectorsa andb respectively and is the angle between them.
a
b
Figure 2: Definition of the scalar product.
Department of Materials, Imperial College London
-
8/11/2019 Vector calculus Prof. Peter Haynes
3/44
MSE 201: Mathematics 3
In particular:
aand b are orthogonal a b= 0
a
a= a2, the squared length ofa
a b= b a
and hence
i j= j k= k i= 0 i i= j j= k k= 1
From these results it is straightforward to prove that in terms of Cartesian components:
a b= axbx+ayby+azbzwhich may also be written using matrix notation as:
a b= aTb=(ax ay az)
bxby
bz
=axbx+ayby+azbz
2.3 Vector product
Thevector orcrossproduct of two vectors a and b is defined as:
a b= a bsin n
whereaand bdenote the magnitudes of the vectors a and b respectively, is the angle between them andnis a unit vector orthogonal to botha and b, whose direction is determined in a right-hand sense.
a
b
n
Figure 3: Definition of the vector product.
Department of Materials, Imperial College London
-
8/11/2019 Vector calculus Prof. Peter Haynes
4/44
4 Vector calculus
In particular:
aand b are parallel or antiparallel a b= 0
a
a= 0
a b= b a i j= k , j k= i and k i= j i i= j j= k k= 0
From these results it is straightforward to prove that in terms of Cartesian components:
a b= (aybz azby) i+ (azbx axbz) j+ (axby aybx) k=
aybz azbyazbx axbzaxby aybx
which may also be written as adeterminant:
a b=
i j k
ax ay azbx by bz
2.4 Vector area
Consider the parallelogram shown in Fig. 4, bounded by the vectorsa and b. The area of such a parallel-
ogram is a scalar equal to the magnitude of the vector product of a andb,|a b|. The orientation of theplane may be specified by a unit normal vector i.e. the direction of the vector product of a andb. These two
properties of the area may be combined into a single vector whose magnitude gives the scalar area and
whose direction gives the orientation. Such a vector areaS is given conveniently by
S= a b
a
b
S
Figure 4: Definition of vector area.
Note that the sense of the direction is ambiguous since a plane has two faces i.e. in Fig. 4S could point upor down this uncertainty is usually clarified by the context in which the vector area is used or otherwise
has to be specified explicitly. A formal resolution is given in Sec. 11.5.
Department of Materials, Imperial College London
-
8/11/2019 Vector calculus Prof. Peter Haynes
5/44
MSE 201: Mathematics 5
The concept of vector area is not restricted to plane parallelograms. For example, the unit circle in the
xy-plane has vector area k. In this case the magnitude and direction of the vector area are calculatedseparately. The direction is given by a normalised cross product of any two vectors in the plane of the area
e.g. i j= k.
Vector area permits easy calculation of theprojectionof the area of a surface onto another plane. This issimply achieved using the scalar product i.e. the area of the projection of the vector area S onto a plane
with unit normal nis S n.
Example
On holiday in the tropics I set up my parasol (circular and of 1 m radius) in the morning so it points
straight at the sun, at that time 45 above the horizon. By noon when the sun is straight overhead, how
much shadow is cast?
Set up a Cartesian coordinate system such that the ground lies in thexy-plane and the sun moves in the
zx-plane. The parasol has vector areaS = (i+k)/2 m2
(it will be shown later that this is correct evenif the parasol is curved). The unit normal to the ground is simplyn= k so the area of the shadow at noon
isS n= /2 i.e. about 70% of the maximum shadow it could cast at that time.
Since it is a vector quantity, vector area is additive, and this allows the vector area of a surface that is not
confined to a single plane to be calculated. Consider the three unit squares in the xy-,yz- andzx-planes,
with vector areask, i and j respectively (all pointing into the octant x > 0, y > 0, z > 0 as shown on theleft of Fig. 5). The total vector area of the surface is i +j+k which has magnitude
3 and direction along
the linex=y =z.
x
y
z
ij
kx y
z
Figure 5: Left: three unit squares and associated vector areas; right: the projection of the sum of these vector areasonto the planex+ y+ z= 0.
Note that the magnitude of the vector area does notequal the scalar sum of the individual areas (which
is 3). The interpretation of the magnitude of such a vector area is that it equals the (scalar) area of the
projection of the surfaces onto a plane perpendicular to its direction, as shown on the right of Fig. 5. In this
case the projection is a regular hexagon with sides
2/3 and area
3.
Conversely, the vector area of a general (i.e. non-planar) surface may be found by considering its projectiononto planes perpendicular toi,j and k (ensuring that the senses of the vector areas making up the surface
are taken into account some parts may contribute positively, others negatively).
Department of Materials, Imperial College London
-
8/11/2019 Vector calculus Prof. Peter Haynes
6/44
6 Vector calculus
Examples
Show that the total vector area of the faces of a cube (with vector areas all chosen to point out ofthe cube) is zero. Does this result apply to all closed surfaces?
Find the vector area of a hemisphere of radiusrwhose base is thexy-plane.
3 Coordinate systems
The most convenient and hence commonly used coordinate systems are those that are orthogonali.e. all
the coordinate axes intersect at right angles. The Cartesian coordinate system is the simplest because
the unit vectors i, j andk that define it are constant in space i.e. at every position they point in the same
direction. However, symmetry sometimes dictates that other coordinate systems are more convenient, in
which the unit vectors that point along the coordinate axes vary in direction throughout space. There are
more than ten orthogonal coordinate systems in three dimensions that are used for physical problems:here attention is restricted to the most commonly-used for cylindrical and spherical symmetries. By way of
orientation, the familiar example of plane polar coordinates in two dimensions is considered first.
3.1 Plane polar coordinates
A point in thexy-plane with Cartesian coordinates (x, y) may also be defined by plane-polar coordinatesand defined by:
=
x2 + y2
tan = y/x
x= cos y= sin
where is the distance of the point from the origin and is the angle the vector xi + yj makes with thex-axis (conventionally chosen to lie in the interval 0
-
8/11/2019 Vector calculus Prof. Peter Haynes
7/44
MSE 201: Mathematics 7
i.e.{e,e} are obtained by rotating{i, j} anticlockwise by an angle . Conversely,{i, j} are obtained byrotating {e,e} clockwise by. Transformations of this form were covered in the year 1 Matrices course.
It is often helpful to visualize coordinate systems in terms of the locus of points generated by holding one
coordinate constant and varying all the others. In two dimensions, these loci form lines, whereas in three
dimensions they form surfaces. The loci for plane polar coordinates are shown in Fig. 7: = constant(where the constant is greater than zero) traces out a circle centred on the origin, = constant tracesout a straight line from the origin. Note that the origin itself is a singularity in this coordinate system: it
corresponds to = 0 and is undefined there.
x
y
= constant
= /4
Figure 7: Examples of lines of constant (dashed) and lines of constant (dotted).
A couple of features are worth remarking on: these lines always intersect at right angles. Also at any given
point, e is perpendicular to the tangent to the line of constant and e is perpendicular to the line ofconstant. These are general features of orthogonal coordinate systems.
Example
The pointPhas Cartesian coordinatesx= 4 andy = 3.
Find the plane polar coordiates ofP. Express e and eatPin terms of i and j.
The vector u has Cartesian components ux = uy = 5. Find its components in terms of the basis
{e,e} atP. [Hint: use the scalar product.]In Cartesian coordinates, both x and yhave the same dimensions e.g. length. Thus if a small change is
made in these coordinates e.g.x x+ dx andy y+dy then the position vector1 s = xi+yj changesbyds= dxi +dyj and
ds2 =ds ds= dx2 +dy2.
However the physical dimensions of and are not the same: is a length whereas is an angle andhence dimensionless. Consider the position of a point Pgiven by plane polar coordinates (= 0, = 0),as shown in Fig. 8. If is increased from its initial value 0 whilst is held constant, then the point movesradially outwards along the straight line = 0. If changes from0 to0+ then the point moves by adistance. However, ifis increased from its initial value0whilstis held constant, then the point moves
1In these notess is used to denote a position vector and S to denote vector area.
Department of Materials, Imperial College London
-
8/11/2019 Vector calculus Prof. Peter Haynes
8/44
8 Vector calculus
along the arc of the circle = 0. If changes from 0 to 0+ then the point moves an arc distance0 . In the limit that 0 the arc becomes indistinguishable from a straight line. Thus infinitesimalchanges in the coordinates and of s result in a change ds= de+ de. This definesscale factorsh = 1 andh = for and respectively: these scale factors are the quantities by which the coordinatechanges should be multiplied to convert them into distances. This is quite intuitive: the larger , the greater
the distance caused by a small change in since the lines of constant diverge with radius. Note that thedirections in whichPmoves in response to changes in and are orthogonal, hence the distance movedby a general change + dand + dis
ds2 =d2 + 2d2.
x
y
= 0
= 0+
= 0
= 0+
P
Figure 8: The effect of small changes in plane polar coordinates (, ) on position.
Small changes in two-dimensional coordinates also map out an area of the y-plane. For Cartesians, varying
xandyin the intervalsx0 x x0+dx andy0 y y0+dysweeps out a rectangle of areadA = dx dy.As shown in Fig. 8, varying and in the intervals 0 0 + and0 0+ maps out ashape outlined in bold. However, in the limit of infinitesimal changes, this shape tends to a rectangle with
sidesdand 0 d. In general thendA = d d: note the role again played by the scale factor for.
3.2 Cylindrical polar coordinates
The cylindrical polar coordinate system is essentially a three-dimensional extension of plane polar coor-dinates, with the addition of the z-coordinate from Cartesians. For a point P, z gives its height above
the xy-plane, and its projection onto the xy-plane is described by plane polar coordinates and . Forcompleteness the relationship between Cartesians and cylindrical polars is:
=
x2 +y2
tan = y/xz=z
x= cos y = sin z=z
The unit vectors are related by:
e = cos i + sin je= sin i+ cos j
ez=k
i= cos e sin ej= sin e+ cos ek= ez
Department of Materials, Imperial College London
-
8/11/2019 Vector calculus Prof. Peter Haynes
9/44
MSE 201: Mathematics 9
x
y
z
P
z
s
Figure 9: Cylindrical polar coordinates.
and the scale factors areh = 1,h= and hz = 1.
It is clear from its description that cylindrical polars form an orthogonal coordinate system: the position
vector of P, denoted s in Fig. 9, is s = e + zezwith magnitude s =
2 + z2. Infinitesimal changes incoordinates results inds= de+ de+dzezand thus
ds2 =d2 + 2 d2 +dz2
In three dimensions, the locus of points mapped out when one coordinate is held constant forms a surface.
In this case, the surfaces of constant are cylinders (hence the name) centred on the z-axis. Surfaces ofconstant
are half-planes that contain the z-axis and make an angle
with thezx-plane, and surfaces of
constantzare planes parallel to thexy-plane.
Consider an infinitesimal change in and made while zis held constant. As in plane polar coordinates,this sweeps out an area dAz = d d. However in three dimensions this may now be represented bythe vector area dSz = d dez. Similarly if is held constant while and z vary, a vector area dS = d dze is obtained. Likewise dS = d dze.
Example
Consider a cylindrical surface with its axis parallel to thez-axis.
Write down the equation for a surface of radiusain cylindrical polar coordinates and hence find anequation fordsatisfied by the infinitesimal change of coordinates that remain on this surface.
Write down an expression for dS for this surface and mark it on a sketch. The ends of the cylinder lie in the planes z =h/2. Write down expressions for the vector areas
dSzof the ends of the cylinder.
What is the total vector area of the surface of the cylinder?
Finally consider an infinitesimal change in all three coordinates. This maps out an infinitesimal volume, or
volume element. For infinitesimal changes the shape of this volume tends to a cuboid, with sides of length
d, dand dz(the scale factors come into play again). Thus
dV = d d dz.
Department of Materials, Imperial College London
-
8/11/2019 Vector calculus Prof. Peter Haynes
10/44
10 Vector calculus
3.3 Spherical polar coordinates
Figure 10 is identical to Fig. 9 except that the polar angle has been marked. Spherical polar coordinatesconsist of r =|s|, and . is the same azimuthal angle as in cylindrical polar coordinates. A veryimportant distinction between the two angles is that whereas ranges from 0 to 2, is restricted to therange 0 to.
x
y
z
P
z
sr
Figure 10: Spherical polar coordinates.
From the diagram it is clear that z = rcos and = rsin . From these results the relationship betweenspherical polars and Cartesians may be derived:
r =
x
2
+y
2
+ z
2
cos = z/
x2 +y2 + z2
tan = y/x
x =rsin cos y=rsin sin z=rcos
and the unit vectors are given by:
er= sin cos i + sin sin j+ cos ke = cos cos i+ cos sin j sin k
e= sin i + cos j
i= sin cos er+ cos cos e sin ej= sin sin er+ cos sin e+ cos ek= cos er sin e
Surfaces of constant r are obviously spherical (hence the name) and as before, surfaces of constant
are half-planes containing the z-axis and make an angle with the zx-plane. Surfaces of constant are cones swept out when a line along s is rotated around the z-axis. The curves obtained when thesurfaces of constant and intersect a sphere resemble a map of the world: constant correspondsto constant latitude (although latitude is measured from the equator whereas = 0 at the North Pole;constant corresponds to constant longitude (although the customary range of longitude corresponds to < .)
From the previous examples it has been seen that the scale factors are the key quantities. rhas dimensions
of length, and a small changer movesPa distancer, sohr= 1. A small change sweeps out a smallarc of lengthrand soh =r. From cylindrical polar coordinates it is already known that h = = r sin .
Knowledge of the scale factors enables the expressions for the line, surface and volume elements to be
written down:
ds = hrdrer+ hde+ h de = drer+r d e+ r sin de
Department of Materials, Imperial College London
-
8/11/2019 Vector calculus Prof. Peter Haynes
11/44
MSE 201: Mathematics 11
ds2 = h2r dr2 + h2d2 + h2 d2 =dr2 + r2 d2 +r2 sin2 d2dSr = hh d der =r
2 sin d der
dS = h hrd dre =r sin d dre
dS = hrhdr de=r dr de
dV = hrhh dr d d= r2 sin dr d d
These expressions can be generalized to all orthogonal coordinate systems once the scale factors are
known.
A word of warning: in these notes cylindrical polar coordinates have been denoted {, , z} and sphericalpolar coordinates {r, , }. However it is also fairly common to refer to the cylindrical polar coordinates as{r, , z} i.e. to user instead of and instead of. This is obviously a potential source of great confusion!
Examples
The point Phas Cartesian coordinates (3, 4, 12). Specify its position in terms of:(i) cylindrical polar coordinates;
(ii) spherical polar coordinates.
Two vectors are defined by u = urer +u e +u e and v = vrer +v e +v e in terms of unitvectors associated with spherical polar coordinates at the same point in space.
Show that in this case the scalar productu v= urvr+ uv+u v. Would this result still hold if u and v were defined in terms of unit vectors associated with
spherical polar coordinates at different points in space?
What happens to the three unit vectors:(i) as changes while = /2?
(ii) as changes while = /4?
(iii) asrchanges?
4 Partial differentiation
The notion of a partial derivative was introduced last year for functions of more than one variable. Thiscourse is primarily concerned with fields: functions of spatial position, and hence functions of three vari-
ables which might be Cartesian coordinates e.g.f(x, y, z) or another coordinate system e.g. spherical polar
coordinatesg(r, , ).
Recall the notation of curlys used to denote that a derivative is being taken with respect to one variablewhile the others are held constant. Forf(x, y, z)
f
y
z,x
= limy0
f(x, y+ y, z) f(x, y, z)y
means differentiatefwith respect toyholdingzandxconstant. Sometimes the subscript showing whichvariables are held constant is omitted if it is obvious from the context (e.g. for cylindrical polar coordinates
it would be understood that a partial derivative with respect tozwas taken holding and constant.)
Department of Materials, Imperial College London
-
8/11/2019 Vector calculus Prof. Peter Haynes
12/44
12 Vector calculus
Second and higher derivatives may also be defined and recall that if a function is differentiable then the
second crossed derivatives are equal i.e.
2f
xy
=
2f
yx
Examples
A scalar field V is defined in terms of spherical polar coordinates {r, , } as V(r, , ) =r2 sin2 cos2. Calculate:
V
r
=
V
=
V
=
2V
2
=
2V
r
=
2V
r=
2V
r
=
2V
r
=
ExpressVfrom the previous example in terms of Cartesian coordinates i.e. as a functionV(x, y, z).Verify that the crossed second partial derivatives with respect to x andyare equal.
4.1 Total differentials
The partial derivatives so far give the rate of change of a function when only one of its arguments changes.
However in general, several or all of the arguments may change simultaneously. The total differential gives
the infinitesimal change in a function in response to infinitesimal changes in all of its arguments e.g. for a
functionf(x, y, z) the total differential is
df =
f
xy,zdx+
f
yz,xdy+
f
zx,ydz
This definition extends in an obvious way to different numbers of arguments.
Examples
Find the total differentials of the following functions:
f(x, y) = exp(x+ y)
(x, y, z) =x2 + 3yz
V(, , z) = cos exp(z)
Department of Materials, Imperial College London
-
8/11/2019 Vector calculus Prof. Peter Haynes
13/44
-
8/11/2019 Vector calculus Prof. Peter Haynes
14/44
14 Vector calculus
4.3 Chain rule
The chain rule for partial differentiation was covered in year 1. It is worth revisiting here because of its role
in enabling the changes of variable that occur when moving from one coordinate system to another.
A convenient way of remembering the chain rule is to start from the total differential e.g. for f(x, y, z)
expressed in terms of Cartesian coordinates:
df =
f
x
y,z
dx+
f
y
z,x
dy+
f
z
x,y
dz
Consider transforming to spherical polar coordinates. The required first partial derivatives aref
r
,
,
f
,r
and
f
r,
.
For instance, to obtain the expression for (f/r),, take the expression for the total differential and divide
byrat constant and , i.e.f
r
,
=
f
x
y,z
x
r
,
+
f
y
z,x
y
r
,
+
f
z
x,y
z
r
,
Note the form of the expression: for three variables there are three terms, each the product of two partial
derivatives. In each term, the first partial derivative is taken from the total differential. The second partial
derivative is with respect to the same variable (here r) holding the same variables constant (here and)as the left-hand side.
Examples
Write down the chain rule for the remaining partial derivatives of f: (f/),rand (f/)r,. Eval-uate them for the functionf(x, y, z) =x+ y+z.
For f(x, y, z) = xyz calculate the first partial derivatives with respect to the cylindrical polarcoordinates, and zand express the results in terms of these variables only.
f
,z
=
f
z,
=
f
z
,
=
5 Multidimensional integration
Having discussed how to differentiate functions of more than one variable, the logical next step is to con-sider how to integrate a function with respect to more than one variable. This is a technique that was
introduced briefly in year 1.
Department of Materials, Imperial College London
-
8/11/2019 Vector calculus Prof. Peter Haynes
15/44
MSE 201: Mathematics 15
5.1 Double integrals
Consider adouble integral involving two variables x andy. The limits of integration can usually be repre-
sented by the boundary of some regionRas shown in Fig. 11 and the integral I is denoted
I=
Rf(x, y) dA
where dA denotes an infinitesimal element of area. In Cartesian coordinates, the area element is dA =
dx dyand hence the integral may also be written
I=
R
f(x, y) dx dy
x
y
R
dA= dx dyymax
ymin
xmin(y) xmax(y) x
y
R
ymax(x)
ymin(x)
xmin xmax
Figure 11: Two-dimensional integration.
As indicated in Fig. 11 there are two ways to proceed. In each we consider the integral as the limit of a sum
involving elements of area. The left-hand diagram represents the case where the region Ris split first into
strips of widthdyin thex-direction. The contribution from each strip is obtained by integrating with respect
tox, and then the contributions of the strips are summed by integrating with respect to y:
I=
ymaxy=ymin
xmax(y)x=xmin(y)
f(x, y) dx
dy
yminand ymaxdefine the extent ofRin they-direction whereasxmin(y) andxmax(y) give the limits of the strip
at positiony.
Equivalently, the order of integration may be reversed, as illustrated in the right-hand diagram:
I=
x=xmaxx=xmin
y=ymax(x)y=ymin(x)
f(x, y) dy
dx
This is best explained by way of an example. Consider the double integral
I= R xy2 dx dy
whereRis the triangle bounded by the x-axis, y-axis and the line x+y= 1. The aim is to show that the
order of integration does not matter.
Department of Materials, Imperial College London
-
8/11/2019 Vector calculus Prof. Peter Haynes
16/44
16 Vector calculus
x
y
0 1
1
x+ y = 1
x
y
0 1
1
1. Performxintegration first (left-hand diagram):
I =
1y=0
x=1yx=0
xy2 dx
dy =
1y=0
1
2x2y2
x=1yx=0
dy = 1
2
1y=0
(1 y)2y2 dy
= 1
2
1y=0
y2 2y3 + y4
dy =
1
2
1
3y3 1
2y4 +
1
5y51
y=0
= 1
60
2. Performyintegration first (right-hand diagram):
I = 1
x=0
y=1x
y=0
xy2 dy dx= 1
x=01
3
xy3y=1x
y=0
dx
= 1
3
1x=0
x 3x2 + 3x3 x4
dx=
1
3
1
2x2 x3 +3
4x4 1
5x51
x=0
= 1
60
The result is therefore independent of the order of integration.
Example
Integrate the functionf(x, y) =xy over the rectangular region defined by the points (0, 0),(a, 0),(0, b) and
(a, b).
5.2 Triple integrals
Thetriple integralinvolves a function integrated over a three-dimensional regionRi.e.
I=
R
f(x, y, z) dV =
R
f(x, y, z) dx dy dz
As with the double integral, the order of integration does not matter and the limits are determined by the
boundary ofR.
Again consider an example. Calculate the volume bounded by the four planes x = 0, y = 0, z = 0 and
x/a+ y/b+ z/c= 1.
Department of Materials, Imperial College London
-
8/11/2019 Vector calculus Prof. Peter Haynes
17/44
MSE 201: Mathematics 17
x
a
yb
z
c
Perform the integration first along columns parallel to z, then combine these columns into vertical slabs by
integrating along yand then finally integrate along x. So the limits onx are simply 0 x a. The linex/a+y/b= 1 defines the upper limit on the y-integration, and the column height is defined byx/a+y/b+z/c= 1.
V =
ax=0
b(1x/a)y=0
c(1x/ay/b)z=0
dz
dy
dx
= c
ax=0
b(1x/a)y=0
1 x
a y
b
dy
dx
= c a
x=0
yxya y
2
2bb(1x/a)
y=0
dx
= bc
ax=0
1 x
a
x
a
1 x
a
1
2
1 x
a
2dx
= bc
ax=0
1
2 x
a+
x2
2a2
dx
= bc
x
2 x
2
2a+
x3
6a2
ax=0
= abc
6
5.3 Changing variables
The concept of asubstitutionor change of variables to make one-dimensional integrals more tractable was
covered in year 1 e.g. consider substituting x= sin to calculate
1x=0
1 x2 dx =
/2=0
1 sin2 dx
dd=
/2=0
cos2 d
= 1
2 /2
=0[1 + cos(2)] d=
1
2 +
1
2sin(2)
/2
=0=
4
In this case, dx has been replaced by (dx/d) d. For similar reasons it is desirable to be able to makesubstitutions or changes of variable in multidimensional integrals e.g. to change coordinate system.
Department of Materials, Imperial College London
-
8/11/2019 Vector calculus Prof. Peter Haynes
18/44
18 Vector calculus
First consider a two-dimensional integral in terms of Cartesian coordinates
R
f(x, y) dx dy
that is to be transformed to plane polar coordinates and . Define theJacobian
ofx
andy
with respectto and as
J=(x, y)
(, ) =
x
y
x
y
which may also be written as the determinant:
J=(x, y)
(, ) =
(x/) (y/)(x/) (y/)
The change of variables then involves the replacement
dx dy= |J|d d=(x, y)(, )
d dFor the transformation from Cartesian to plane polar coordinates:
J= (x, y)
(, ) =
cos sin sin cos =
cos2 + sin2
=
Thus this change of variables involves the replacement:
dx dy = d d
which of course simply replaces the expression for an area element dA in Cartesians with that for plane
polar coordinates. The Jacobian is simply a formal device for manipulating the scale factors, and the same
result could be obtained from physical reasoning.
Hence R
f(x, y) dx dy=
R
g(, )
(x, y)(, ) d d
where R is a region of integration with respect to and that corresponds to Rand g(, ) =f( cos , sin )is the function that results whenf(x, y) is re-written in terms of and .
Examples
Consider the integralI=
R
y
x2 +y2 dx dy
whereRis the top right quadrant of the unit circle.
CalculateIdirectly using Cartesian coordinates.
I = 1
x=0
1x2
y=0
yx2 + y2 dx dy= 1
x=0
1
3 x2 + y2
3/2
1x2
y=0
dx
= 1
3
1x=0
1 x3
dx =
1
3
x1
4x41
x=0
= 1
4
Department of Materials, Imperial College London
-
8/11/2019 Vector calculus Prof. Peter Haynes
19/44
MSE 201: Mathematics 19
Change variables to plane polar coordinates and repeat the calculation.
Since =
x2 + y2 and y = sin the function being integrated transforms to 2 sin .The Jacobian for this transformation is and so
I= 1=0
/2=0
3 sin d d
which is separable and much more straightforward to evaluate:
I=
1
441=0
[ cos ]/2=0 = 1
4
Calculate the following integral where Ris the unit circle:
I= R1
x
2
+ y
2dx dy
EvaluateIwhereRis the unit semicircle in the upper-half plane (y>0):
I=
R
exp
x2 + y2
dx dy
5.4 Properties of Jacobians
The definition of the Jacobian as a determinant generalises to more than two dimensions. For example in
three dimensions, the Jacobian for transforming from x,yandzto a new set of variables u,v andw is
(x, y, z)
(u, v, w) =
(x/u)v,w (y/u)v,w (z/u)v,w(x/v)w,u (y/v)w,u (z/v)w,u(x/w)u,v (y/w)u,v (z/w)u,v
and
dV =dx dy dz=
(x, y, z)(u, v, w) du dv dw
A property of Jacobians (stated in three dimensions for illustration but completely general) is
(x, y, z)
(u, v, w) =
(x, y, z)
(p, q, r)
(p, q, r)
(u, v, w)Settingu x,v yandw zthen yields the useful result
1 =(x, y, z)
(p, q, r)
(p, q, r)
(x, y, z) or
(p, q, r)
(x, y, z) = 1
(x, y, z)
(p, q, r)
Examples
Evaluate the Jacobian for transforming from Cartesian coordinates x, y and z to cylindrical polarcoordinates, and z. Hence confirm the expression for the volume elementdVin section 3.2.
Evaluate the Jacobian for transforming from plane polar to Cartesian coordinates. Show that
(x, y)
(, )
(, )
(x, y) = 1
Department of Materials, Imperial College London
-
8/11/2019 Vector calculus Prof. Peter Haynes
20/44
20 Vector calculus
6 Derivatives of vectors
Consider a vectorv that is a function of a scalar variable te.g. this might be the velocity as a function of
time. This function maps the scalar tonto a vectorv(t). The vector may be expressed in terms of a set of
scalar functions e.g. in terms of Cartesian componentsv = vx(t) i+vy(t) j+ vz(t) k.
The derivative ofv(t) (which is also a vector) may be defined as a limit in the same way as the derivative of
a scalar function:dv
dt = lim
t0
v(t+ t) v(t)t
For this limit to exist (and therefore for the function to be differentiable) the individual components must also
be differentiable.
Since the Cartesian unit vectorsi,j and k are constant,
dv
dt =
dvx
dt i+
dvy
dt j +
dvz
dt k.
Example
A particle moving in a helix has position vector r(t) = cos(t) i+ sin(t) j+ utk where and u areconstants. Calculate the velocity v(t) and acceleration a(t) of the particle and show that at all times
a r= 22.
The situation is not so straightforward when using non-Cartesian coordinates, as not only the components
but also the basis vectors change with position. Consider cylindrical polar coordinates
e = cos i + sin je = sin i + cos jez = k
These expressions can be differentiated:
de
dt = sin d
dt i+ cos
d
dt j=
d
dt e
dedt
= cos ddt
i sin ddt
j= ddt
e
dez
dt = 0
6.1 Product rule
The product rule for differentiation is familiar when two scalar functions are involved. However it generalises
readily to the products involving vector functions. Iff(t) is a scalar function of a single variablet, anda(t)
andb(t) are both vector functions of t, then
d
dt (fa) = f
da
dt +
df
dt a
d
dt (a b) = a db
dt +
da
dt bd
dt (a b) = a db
dt +
da
dt b
Department of Materials, Imperial College London
-
8/11/2019 Vector calculus Prof. Peter Haynes
21/44
MSE 201: Mathematics 21
Note that it is important to maintain the order of the vectors in the cross product sincea b =b a. Theseresults are straightforward (if a little tedious) to prove by expanding in terms of Cartesian components.
Examples
Reconsider the previous example, but now in cylindrical polars where r(t) = e +utk and theazimuthal angle = t. Calculate the velocityv(t) and acceleration a(t) of the particle and showthata r= 22 still holds why is this not a surprise?
Angular momentum is defined as L = r mv for a particle of mass mwith velocity v at positionr.Find an expression for the rate of change of angular momentum (with respect to time) L.
6.2 Partial derivatives
As the rules for standard derivatives of scalar functions readily generalise to vector functions, so do the
rules for partial derivatives e.g. for a vector field. In terms of Cartesian components of the vector functiona(x, y, z) a(r) i.e.ax(x, y, z),ay(x, y, z) andaz(x, y, z):
a
x
y,z
=
axx
y,z
i+
ayx
y,z
j+
azx
y,z
k
and so on.
The total derivative can therefore be written
da=
a
xy,zdx+
a
yz,xdy+
a
zx,ydz
which, if expanded in terms of Cartesian components of a, involves nine different partial derivatives since
in general each component depends on all three coordinates.
Finally the chain rule for partial differentiation also applies e.g.a
r
,
=
a
x
y,z
x
r
,
+
a
y
z,x
y
r
,
+
a
z
x,y
z
r
,
Example
The vector fieldF = exp(x) exp(y)cos zk. Calculate the partial derivatives of F with respect to the Cartesian coordinatesx,yandz. Hence write down an expression for the total derivativedF.
Department of Materials, Imperial College London
-
8/11/2019 Vector calculus Prof. Peter Haynes
22/44
22 Vector calculus
7 Gradient
Consider a scalar field f(r) expressed in terms of the Cartesian coordinates of r i.e. f(x, y, z). The total
differential is
df =
fx
y,z
dx+
fy
z,x
dy+
fz
x,y
dz
This can be written as the scalar product between the total differential of the position vector r:
dr= dxi +dyj+ dzk
and the vector fieldg(r) defined by
g=
f
x
y,z
i+
f
y
z,x
j+
f
z
x,y
k
gis called the gradient off. It contains all of the information about the rate of change of fwith respect to
position in any direction (i.e. for an arbitrarydr.)
df =g dr
Examples
Calculate the gradients of the following scalar fields:
f(x, y, z) = 1/x2 + y2 +z2 (x, y, z) = (x2 y2)z
7.1 Notation
The gradient of a functionfmay be denoted
g= grad f
but a more compact notation involves introducing the vector differential operator known as del ornabla. It
is denoted by an upside-down capital Greek letter delta and in Cartesian coordinates is
=i x
+j
y +k
z
Using this notation
g= grad f f
Since possesses the properties of both a vector and a differential operator, it does not obey all the rulesof vector algebra. For example a =a .
Department of Materials, Imperial College London
-
8/11/2019 Vector calculus Prof. Peter Haynes
23/44
MSE 201: Mathematics 23
7.2 Geometric interpretation
The gradient was introduced as a scalar product
df =
f
dr=|
f|dr cos
where is the angle between f anddr. Moving a fixed distancedr = |dr| therefore produces the largestchange df if = 0 i.e. dr is parallel tof. Hencef points in the direction of steepest ascent i.e. thedirection in whichfincreases most rapidly.
The equation f = constant defines a surface in three dimensions. If dr lies along this surface (i.e. is tan-
gential to it) thenfcannot change anddf= 0. From above this implies that = /2 i.e. f is perpendicularto the surfaces of constantf.
Figure 12: Field lines (solid) and contours (dashed) intersect at right angles.
A scalar field may be represented bycontours, lines along which the field is constant, shown by the dashed
lines in Fig. 12. A vector field may be represented byfield lines, shown by the solid lines in Fig. 12: the
direction of the vector field is tangential to the field line at that point, and the magnitude of the field is
represented by the spacing between the field lines: the more closely spaced the field lines, the stronger the
field. For a vector field that is the gradient of a scalar field, the field lines of the vector field always intersect
the contours of the scalar field at right angles, due to the results above.
7.3 Other coordinate systems
Consider a non-Cartesian coordinate system e.g. cylindrical polar coordinates for illustration. Write the
total differential of a functionV(, , z):
dV =
V
,z
d +
V
z,
d +
V
z
,
dz
In this coordinate system, the total differential of the position vectorr involves the scale factors:
dr= h de+ h de+hzdzez
where of courseh = hz= 1 andh = .
Department of Materials, Imperial College London
-
8/11/2019 Vector calculus Prof. Peter Haynes
24/44
24 Vector calculus
The equationdf =f dr involves vectors and is therefore independent of coordinate system, from whichit is clear that
= eh
+
eh
+
ez
hz
z = e
+
e
+ ez
z
and similarly in spherical polar coordinates
= erhr
r +
eh
+
e
h
= er
r +
er
+
e
rsin
Note that whatever coordinate system is used, the gradient vector of a given scalar field is the same at all
points in space.
Examples
Calculate the gradients of the scalar fields:
V(, , z) = ln (cylindrical polar coordinates)
f(r, , ) = cos /r(spherical polar coordinates)
8 Divergence
The divergenceof a vector field F(r), div F, is itself a scalar field. In terms of Cartesian coordinatesF =
Fxi + Fyj + Fzk, where each of the three componentsFx,Fy andFzis itself a function of three variables x,
yandz:div F=
Fxx
y,z
+
Fyy
z,x
+
Fzz
x,y
This expression is a scalar product between the del operator and the vector field F and is thereforedenoted
div F F
Examples
Calculate the divergence of the following vector fields:
F= axi+ byj+ czk wherea,band care constants.
E= xiy2 +z2
g= exp(xyz)
i
yz +
j
zx +
k
xy
Department of Materials, Imperial College London
-
8/11/2019 Vector calculus Prof. Peter Haynes
25/44
MSE 201: Mathematics 25
8.1 Geometric interpretation
Field lines begin at a sourceand end at a sink. In electrostatics with point charges, electric field lines can
only begin at positive charges (sources) and end at negative charges (sinks), as illustrated in Fig. 13. For
a continuous charge distribution the situation is more complicated, but in general a positive charge densitywill act as a source of field lines and a negative charge density will act as a sink. The strength of the source
or sink is determined by the magnitude of the charge density.
+
Figure 13: Electric field lines begin on positive charges (sources) and end on negative charges (sinks).
The geometric interpretation of the divergence is that it measures the rate at which electric field lines arebegin created or destroyed at a point in other words, it is proportional to the density of sources or sinks
at a point in space.
In free space there are no sources or sinks, and hence the divergence of a field vanishes. A vector field
with zero divergence is said to besolenoidal.
8.2 Other coordinate systems
In other coordinate systems the expressions for the divergence are more complicated, since it is necessary
to take the change in the basis vectors as well as the change in components into account, and so the scale
factors come into play again. Here the results are simply stated.
In cylindrical polar coordinates, the divergence of a vector field F = F e+F e+ Fzeztakes the form
F= 1
(F
)+
1
F
+Fz
z
In spherical polar coordinates whereF = Frer+F e+ F e:
F= 1r2
r
r2Fr
+
1
rsin
(sin F)+
1
rsin
F
Department of Materials, Imperial College London
-
8/11/2019 Vector calculus Prof. Peter Haynes
26/44
26 Vector calculus
Examples
Calculate the divergence of the following vector fields:
r= rer
F= rn erIt is significant that the divergence vanishes for the case n =2 since this corresponds to theinverse square law for electric and gravitational fields.
u= e2
E= exp(id r) k
9 Curl
The divergence of a vector field was defined in terms of the scalar product betwen the del operator andthe vector field. Another alternative is clearly to take the vector product between del and the vector field,
the result being itself a vector field. This is called thecurl(or sometimes the rotation) of a vector field and
is denoted
curl F FAs a vector product it can be calculated from a determinant. In Cartesian coordinates
F=
i j k
/x /y /z
Fx Fy Fz
=
Fzy
z,x
Fyz
x,y
i +
Fxz
x,y
Fzx
y,z
j +
Fyx
y,z
Fxy
z,x
k
Examples
Calculate the curl of the following vector fields:
F= yzi+ zxj+ xyk
A= 1
2
B0 (xj
yi)
E= exp(id r) k
9.1 Geometric interpretation
As implied by the fact that the curl is also known as the rotation, the geometric interpretation of the curl
has to do with the way in which field lines rotate around a given point. As illustrated in Fig. 14 this can be
visualised in terms of the rate at which a paddle wheel would turn if placed in the field. A field which has
zero curl is said to be irrotational.
The magnitude of the curl at a point is proportional to the speed with which the paddle wheel rotates. The
direction of the curl points along the axis of rotation: in Fig. 14 this points out of the plane of the paper.
Department of Materials, Imperial College London
-
8/11/2019 Vector calculus Prof. Peter Haynes
27/44
MSE 201: Mathematics 27
Figure 14: Geometric interpretation of the curl of a vector field as the rate at which a paddle wheel would turn.
9.2 Other coordinate systems
As with the divergence, the expressions for the curl are more complicated in non-Cartesian coordinate
systems and involve the scale factors. In cylindrical polar coordinates
F= 1
e e ez
/ / /zF F Fz
and in spherical polar coordinates
F= 1r2 sin
er re rsin e
/r / /Fr rF rsin F
The whole determinant is divided by the product of the scale factors, and in the top and bottom rows of
each column the scale factor for that coordinate appears.
Examples
Calculate the curl of the following vector fields:
F= rn
er
g= er2
u= e2
B= e2
+vez
Department of Materials, Imperial College London
-
8/11/2019 Vector calculus Prof. Peter Haynes
28/44
28 Vector calculus
10 Combinations of grad, div and curl
The gradient, divergence and curl are the three building blocks of vector calculus, all based upon the
del vector differential operator. However they are often combined or modified to create other vectoroperators, for example consider a wherea is a vector field. As mentioned earlier, although the scalarproduct is usuallycommutative(a b= b a) this does not hold when vector operators are involved. In termsof Cartesian coordinates
a =ax x
+ay
y +az
z
which is a scalar differential operator.
10.1 Laplacian
The most commonly encountered combination is theLaplacian, a second order scalar differential operator
that can in fact operate on either a scalar or vector field. When operating on a scalar field it is equivalent
to taking the gradient to obtain a vector field whose divergence is then taken to obtain the result, a scalar
field i.e.
div grad f (f) 2f fwhere the 2 notation has been introduced (as well as the capital delta symbol that is less common). InCartesians i /x+ j /y+ k /zso
(f) =
i
x +j
y +k
z
if
x + j
f
y +k
f
z
= 2f
x2 +
2f
y2+
2f
z2
and therefore
2 2
x2+
2
y2 +
2
z2
In other coordinate systems the scale factors are involved. In cylindrical polar coordinates
2 1
+
1
22
2+
2
z2
and in spherical polar coordinates
2 1r2
r
r2
r
+
1
r2 sin
sin
+
1
r2 sin2
2
2
The Laplacian occurs in many physical equations, including those listed in Table 2.
Examples
Calculate the Laplacian of the following scalar fields:
(x, y, z) = sin
x
a
cos
y
b
exp (kz)
V(r, , ) =rsin cos f(, , z) =2 cos(2) +z2
Department of Materials, Imperial College London
-
8/11/2019 Vector calculus Prof. Peter Haynes
29/44
MSE 201: Mathematics 29
2= 0 Laplace equation
2= (r) Poisson equation
2+ k2 = 0 Helmholtz equation
D2c= ct
Diffusion equation
2 = 1c2
2
t2 Wave equation
h2
2m2+ V(r) = E Schrodinger equation
Table 2: Physical equations involving the Laplacian operator.
10.2 Vector operator identities
A number of identities involving can be derived, including the following, whereuandvare scalar fields,anda and b are vector fields:
(uv) = u
v+ v
u
(a b) = a ( b) +b ( a) + (a )b + (b )a (ua) = u a +a u
(a b) = b ( a) a ( b) (ua) = u a + u a
(a b) = a( b) b( a) + (b )a (a )b
These identities (and more) may be proved using Cartesian coordinates: as the identity involves physical
quantities (scalars, vectors and operators) without reference to a particular coordinate system they are valid
whichever coordinate system is employed.
As an example consider ( F) whereF = Fxi +Fyj + Fzk is a vector field.
F=
Fzy
z,x
Fyz
x,y
i+
Fxz
x,y
Fzx
y,z
j+
Fyx
y,z
Fxy
z,x
k
Consider thex-component of ( F) i.e.
i [ ( F)] = y
[k ( F)] z
[j ( F)]
=
y
Fy
x
y,z Fx
y
z,x
z
Fx
z
x,y Fz
x
y,z
= 2Fy
yx +
2Fzzx
2Fx
y2
2Fxz2
Department of Materials, Imperial College London
-
8/11/2019 Vector calculus Prof. Peter Haynes
30/44
30 Vector calculus
Adding and subtracting2Fx/x2, and using the property of second crossed derivatives:
i [ ( F)] = 2Fx
x2 +
2Fyxy
+ 2Fzxz
2Fx
x2
2Fxy2
2Fx
z2
=
xFx
x
y,z
+ Fyy
z,x
+ Fzz
x,y
2Fx
x2 +
2Fx
y2 +
2Fx
z2
The term in square brackets is simply the divergence Fwhile the term in curly brackets is the Laplacianof thex-component 2Fx. Therefore
i [ ( F)]= x
( F) 2FxThey- andz-components yield similar results and hence
( F) =
i
x ( F)+ j
y ( F)+k
z( F)
2Fxi + 2Fyj + 2Fzk
The term in square brackets is just the gradient of F while the term in curly brackets while the term incurly brackets defines the Laplacian of a vector field. The identity is therefore
( F) = ( F) 2F
In Cartesian coordinates the Laplacian of a vector field is simply the vector obtained by taking the Laplacian
of each component i.e.
2F=
2Fx2Fy2Fz
However this is not true in a general coordinate system. In this case the Laplacian of a vector field mustbe calculated by manipulating the previous identity:
2F= ( F) ( F)
Examples
Using Cartesian coordinates, prove the following identities:
(uv) =uv+ vuwhereuand vare scalar fields (ua) =u a +a uwhereuis a scalar field anda is a vector field
(u) 0 whereuis any scalar field ( a) 0 wherea is any vector field
11 Line integrals
Aline integralis a one-dimensional integral where the integrand is evaluated along a general path or curve,
as illustrated in Fig. 15. Here the pathC joins the pointsA and Balong a curve that can be split into vector
line elementsdsas shown.
The integrand for a line integral may involve a scalar or vector field, and the result itself may be a scalar or
a vector:
Department of Materials, Imperial College London
-
8/11/2019 Vector calculus Prof. Peter Haynes
31/44
MSE 201: Mathematics 31
x
y
A
B
C
ds
Figure 15: A path for a line integral in two dimensions.
Cf(r) dsis a vector quantity derived from a scalar field f
CF(r) dsis a scalar quantity derived from a vector field F
CF(r) dsis a vector quantity derived from a vector field F
The second of these is the most common. For example, consider the work done when a force moves an
object along a pathC. The work done when a constant forceF causes a displacement s is W =F
s. If the
force is caused by a field, then in general it will vary in space and will not be constant. Split the path up into
line elementsdsalong which the force may be considered constant: the work done for the line element is
dW =F dsand the total work for the whole path is therefore CF ds.An example of the third kind is the Biot-Savart law for calculating magnetic fields there is a problem on
Question Sheet 3 about this.
11.1 Properties
From vector summation it is clear that for a path that runs from point A to pointB
C
ds=
AB
Reversing the sense of the contour involves making the change ds dsand hence
AB
along C... ds=
BA
alongC... ds
If the points A andB coincide, thenC is a closed path, which may be denoted by placing a circle on the
integral sign: C
... ds
Department of Materials, Imperial College London
-
8/11/2019 Vector calculus Prof. Peter Haynes
32/44
32 Vector calculus
11.2 Scalar line integrals
Consider first line integrals of the form
C
F
ds
whereFis a vector field that in three-dimensional Cartesian coordinates may be written F = Fxi + Fyj + Fzk
whereas the line element isds= dxi +dyj+ dzk and hence
C
F ds=
C
(Fxdx+ Fydy+ Fzdz
)
The pathCdefines a relationship between dx,dyanddz. For example, for a straight line defined by
x x0x
1 x
0
= y y0y
1 y
0
= z z0z
1= z
0
that runs between the pointsr0=x0 i+ y0 j +z0 kand r1 =x1 i+y1 j +z1 k:
dy = y1 y0x1 x0 dx and dz=
z1 z0x1 x0 dx
so C
F ds= x1
x=x0
Fx+ Fy
y1 y0x1 x0
+ Fz
z1 z0x1 x0
dx
More generally, if the equation of the path Cbetween r0 and r1 can be written as y = y(x) and z = z(x)
then C
F ds= x1
x=x0
Fx+ Fy
dy
dx +Fz
dz
dx
dx
More generally still, the path Cmay be defined parametrically i.e. the points on the path Care defined by
the equationsx = x(u), y = y(u) and z = z(u) in terms of a parameter uthat varies between u0 and u1.
Then C
F ds= u1
u=u0
Fx
dx
du+Fy
dy
du+ Fz
dz
du
du
In all of the above, the components of the vector field being integrated must be written in terms of theintegration variable alone.
Examples
Calculate the line integrals
CF dswhereF = xi+ yj+zk and:
Cruns along thex-axis fromx= 0 to x= 1.
C is a straight line parallel to the x-axis and hence along C: dy = dz = 0. Also on C,
y=z= 0 and soF = xi in the integral:
C
F ds= 1
x=0x dx=
1
2x21
x=0
= 1
2
Department of Materials, Imperial College London
-
8/11/2019 Vector calculus Prof. Peter Haynes
33/44
MSE 201: Mathematics 33
Cis a straight line from the origin to the point ai +bj+ ck.
The equation of this straight line is x/a = y/b = z/c and hence along C, dy/dx = b/aanddz/dx=c/a. AlongC the fieldF can be written in terms of xonly as
F= xi+ ba
xj+ ca
xk
Putting this all together:
C
F ds = a
x=0
x+
b
a
2x+
c
a
2x
dx=
1 +
b
a
2+
c
a
212
x2a
0
= 1
2
a2 +b2 + c2
Cis a straight line between the pointsr0 = ai+ bjand r1 =ai +bj +ck.
Cis a single turn of a helix defined parametrically by x=acos ,y =asin and z=u.
From the parametric equations, dx/d = asin , dy/d = acos and dz/d = u.Hence
CF ds =
20
[(acos )(asin ) + (asin )(acos ) + (u)u] d
= u2 2
0 d= 22u2
In non-Cartesian coordinates the same ideas apply as above: the vector field F is expanded in the appro-
priate basis vectors and the relevant expression for the line integral involving the scale factors is used. For
cylindrical polar coordinates: C
F ds=
C
F d +F d +Fzdz
and in spherical polar coordinates:
CF ds=
C
Frdr+ Fr d+ Frsin d
Non-Cartesian coordinates are generally chosen when the symmetry of the path Cmay be exploited to
simplify the integration.
Examples
Consider the previous example with the helical path in cylindrical polar coordinates.
First note that F = r and hence F = e +zez. A more long-winded derivation of the aboveuses the expressions from section 3.2:
F = xi+ yj +zk
= ( cos )(cos e sin e) + ( sin )(sin e+ cos e) +zez= (cos2 + sin2 )e+ (sin cos cos sin )e+ zez= e+ zez
The expression for the line element in cylindrical polar coordinates is
ds= de+ de+dzez
Department of Materials, Imperial College London
-
8/11/2019 Vector calculus Prof. Peter Haynes
34/44
34 Vector calculus
and hence C
F ds=[d + zdz]
Along the helical pathC, is a constantaso d= 0. The integral can be performed by making theparametric substitution forz, but in this case this is unnecessary:
C
F ds= 2u
z=0z dz=
1
2z22u
z=0
= 22u2
Consider the line integral
CB dswhereB = I/(2)eand Cis a circle of radiusain thexy-plane.
11.3 Conservative fields
The integrands in the scalar integrals considered previously take the form of differentials Fx(x, y, z) dx+
Fy(x, y, z) dy+ Fz(x, y, z) dz. If the differential is exact then it can be written as the total differential of some
scalar functionf(x, y, z) i.e.df =Fx(x, y, z) dx+Fy(x, y, z) dy+Fz(x, y, z) dz. In this case the line integral
becomes rather simple: C
F ds=
C
Fxdx+ Fydy+Fzdz
=
C
df =f(B) f(A)
whereA and Bare again the beginning and end points, respectively, of the path C. The value of the line
integral is simply the difference in the scalar field f between the end points, and is independent of the
particular pathCtaken betweenA and B.
The conditions for an exact differential involving three variables are
Fxy
= Fyx
, Fyz
= Fzy
and Fzx
= Fxz
Compare the expression for the curl of F:
F=
Fzy
Fyz
i +
Fxz
Fzx
j +
Fyx
Fxy
k
which must vanish if the above conditions are satisfied. Hence a scalar line integral will correspond to an
exact differential (and thus depend only upon its end points) if and only if the curl of the vector field vanishes
at all points. Such a vector field is said to be a conservative fieldand corresponds to many (but not all)
physical fields: electrostatic and gravitational fields are conservative, but magnetic fields are not.
In the previous section it was stated that the curl of the gradient of any scalar field vanishes i.e. f. Indeed since the definition of the gradient of a scalar field f wasdf =f ds then it is clear that aconservative field must be the gradient of some scalar field in physics this scalar field is known as the
potentialand gives the potential energy of a unit test particle at a given point in the field. In summary, if a
vector fieldF is conservative then:
F 0 at all points in space; there exists some scalar field fsuch thatF = f.
For a conservative fieldF, it is also obvious that
C
F ds= 0since any closed pathCstarts and ends at the same point.
Department of Materials, Imperial College London
-
8/11/2019 Vector calculus Prof. Peter Haynes
35/44
MSE 201: Mathematics 35
11.4 Greens theorem in the plane
Consider the two-dimensional case of a simple closed path C in the xy-plane, taken in an anticlockwise
sense as shown in Fig. 16, and the scalar line integral
C
F ds
for a vector fieldF = Fx(x, y) i+ Fy(x, y) j.
x
y
x
y
C C
Figure 16: Closed line integral used for the proof of Greens theorem in the plane.
Note that the line integral may be split into two parts:C
F ds= Ix+ Iy =
CFxdx+
C
Fydy
Now consider the double integral
R
Fyx
Fxy
dx dy
where R is the region bounded by C. As in section 5 the order in which the x and y integrations are
performed is arbitrary. For the first term, perform the xintegration first, as shown on the left of Fig. 16, and
consider the contribution from a single strip located at y:
xmax(y)x=xmin(y)
Fyx
dx =Fyxmax(y)
x=xmin(y)= Fy(xmax(y), y) Fy(xmin(y), y)
Multiplying by the strip height dygives a contribution towards Iy: Fy(xmax(y), y) dyis the contribution from
the right-hand edge of the strip toIy.Fy(xmin(y), y) dyis the left-hand edge where the minus sign accountsfor the fact that Cis in a downward sense on the left-hand side.
For the second term, perform the y integration first, as shown on the right of Fig. 16, and consider the
contribution from a single strip located at x:
ymax(x)
y=ymin(x)
Fxy
dy = [Fx]ymax(x)y=ymin(x) = Fx(x, ymin(x)) Fx(x, ymax(x))
Multiplying by the strip width dx gives a contribution towards Ix: Fx(x, ymin(x)) dx is from the bottom edge
(where the sense of Cis in the positive x-direction) and Fx(x, ymax(x)) dxis from the top edge (whereCis in the negativex-direction).
ThusGreens theorem in the planeis established:C
(Fxdx+ Fydy
)=
R
Fyx
Fxy
dx dy
Department of Materials, Imperial College London
-
8/11/2019 Vector calculus Prof. Peter Haynes
36/44
36 Vector calculus
whereC is the anticlockwise path that bounds the regionR: this sometimes denotedC=R.
Embedding the xy-plane in three-dimensional space as usual, it may be noted that the integrand on the
right-hand side is thez-component of the curl of F. dx dyis the area element dA that may be represented
by an element of vector area dS= dA k. Thus Greens theorem in the plane could be rewritten as
C
F ds=
R( F) dS
whereCandRare restricted to lie in thexy-plane. This is a special case of Stokes theorem.
Note that for a conservative field (for which Fy/x =Fx/yandFxdx+ Fydyis an exact differential) thisconfirms that a line integral around a closed path vanishes.
Example
Confirm Greens theorem in the plane for the field F = 3x dy+y dx integrated anticlockwise around the
unit square in thexy-plane.
This is not a conservative field so the integrals must be evaluated explicitly.
The line integral (starting from the origin) consists of four parts:
C
F ds = 1
x=0Fx(x, 0) dx+
1y=0
Fy(1, y) dy+
0x=1
Fx(x, 1) dx+
0y=1
Fy(0, y) dy
= 0 +
1y=0
3 dy 1
x=0dx 0 = 3 1 = 2
and only the right and top edges contribute.
The integrand for the area integral is Fy/x Fx/y = 3 1 = 2 which is a constant so theintegral is simply
R2 dx dy = 2
from the area of the unit square.
Hence both sides of Greens theorem in the plane equal two.
11.5 Vector line integrals
Consider a line integral of the form C
f(s) ds
wheref is a scalar field. In terms of Cartesian coordinates,
Cf(s) ds= i
Cf(x, y, z) dx
+ j
Cf(x, y, z) dy
+ k
Cf(x, y, z) dz
i.e. a sum involving three scalar line integrals along the same path C, which may be parameterised as
before.
Department of Materials, Imperial College London
-
8/11/2019 Vector calculus Prof. Peter Haynes
37/44
MSE 201: Mathematics 37
Examples
Calculate the following line integrals
C
f dswheref(x, y, z) =x2 +y2 and:
Cis a straight line from the origin to the point 2 i +j 3 k.
This straight line may be parameterised by x = 2, y = and z = 3 where 0 1.dx/d= 2,dy/d= 1 anddz/d= 3. AlongC,f = (2)2 + 2 = 52. Hence
C
fds= i
1=0
102 d + j
1=0
52 d k 1=0
152 d= 5
3(2 i+ j 3 k)
Cis the unit circle in the xy-plane, taken anticlockwise.
At first glance, plane-polar coordinates might seem to be suitable for this. AlongC,f =2 = 1. Thegeneral line element isds= de+ de but since is constant (unity) alongC,d= 0. Thus for
C,ds= de and hence C
f(s) ds=
2=0
e d
However there is a problem: the direction of e changes along C it is not a constant in the
integrand. In fact, for every point on C, the point diametrically opposite has e pointing in exactly
the opposite direction. Thus the integral is in fact zero.
This can be confirmed using Cartesian coordinates (with the azimthual angle as a param-eter to define C) or even more straightforwardly, since f = 1 on Cso this is a constant during the
integration:
C
f ds= fC
ds= 0
since the start and end points are the same for a closed path.
Extra care must be taken when using non-Cartesian coordinate systems in vector line inte-
grals.
Finally consider line integrals of the form C
F(s) dswhich, in terms of Cartesian coordinates, may be written
C
F(s) ds= i C
(Fydz Fzdy) +j
C(Fzdx Fxdz) +k
C
(Fxdy Fydx)
again a sum involving scalar line integrals along the same pathC.
Consider the following special case: C
1
2r dr
illustrated in Fig. 17.
From section 2.4 it is known that 12 r dris the vector area of the triangle with vertices at the origin and thepoints with position vectors r and r +dr. The line integral thus sums up these elements of vector area dS
to obtain the total vector area of a surface bounded by the path C:
S= 1
2
C
r dr
Department of Materials, Imperial College London
-
8/11/2019 Vector calculus Prof. Peter Haynes
38/44
38 Vector calculus
C
r
dr
O
r+ dr
Figure 17: Vector area as a vector line integral.
This confirms the previous result that the vector area of a surface depends only upon the rim bounding it,
and also uniquely defines the direction of the vector area (since the positive sense of the line integral is
whenCis traversed anticlockwise).
12 Surface and volume integrals
12.1 Surface integrals
A surface integral is a double integral where the integrand is evaluated over a general surface whose
orientation as well as area is taken into account by the use of the vector area. As with line integrals, scalar
and vector fields may be involved:
Sf dSis a vector quantity derived from a scalar field f
SF dSis a scalar quantity derived from a vector field F
S F dSis a vector quantity derived from a vector field F
The second these is of primary interest because of its physical interpretation as the flux of the field F
through the surfaceS. For example, in fluid dynamics, an incompressible fluid with density and velocity
fieldv(r) would give rise to a flux (mass per unit time)J =
S
v dS. Attention is restricted to this case inthe following.
The surfaces over which the integral is performed may either be open i.e. bounded by a closed path C
whose anticlockwise circuit defines the positive sense of the vector area associated with the surface, or
closed. In the latter case, the notation is sometimes used. Of course it has already been determined thatthe total vector area of a closed surface vanishes:
dS= 0
Department of Materials, Imperial College London
-
8/11/2019 Vector calculus Prof. Peter Haynes
39/44
MSE 201: Mathematics 39
The calculation of surface integrals is best illustrated by example.
Department of Materials, Imperial College London
-
8/11/2019 Vector calculus Prof. Peter Haynes
40/44
40 Vector calculus
Examples
Calculate the surface integral of the vector field F = sin(x+y) i+ cos(x+y) j+ exp(x y) k overthe quadrantx 0,y 0 of thexy-plane.
In this case an element of vector area is dx dyk so only the z-component of F contributesand the surface integral reduces to a separable double scalar integral:S
F dS =
x=0
y=0exp(x y) dy dx
= [ exp(x)]x=0 [ exp(y)]y=0= 1
Calculate the surface integral of the vector fieldF = yzi+zxj +xyk over the surfaceSconsistingof that part of the plane 2x+ y z= 0 bounded by 0 x aand 0 y b.
In Cartesian coordinates, F dS = Fxdy dz + Fydz dx + Fzdx dy so this integral separatesinto three double integrals:
SF dS=
S
yz dy dz+
S
zx dz dx+
S
xy dx dy
Since the boundary of S is determined by constraints on x andy, usez= 2x+ yon S to eliminate
z from the integrands. From this same equation, dz = 2dx +dy. In the first double integral, a
substitution for z in terms of xcan be made, with dz = 2dx (yis constant during the z integration
sody= 0). Whereas in the second double integral, a substitution for zin terms of ycan be made
i.e.dz=dy(sincexis constant during thezintegration sodx= 0). Hence
S
F dS = ax=0
by=0
[2y(2x+ y) + (2x+ y)x+ xy] dx dy
=
ax=0
by=0
2x2 + 6xy+ 2y2
dx dy
= 2
3a3b+
3
2a2b2 +
2
3ab3
Calculate the surface integral of the vector field E = xsin(y/b) sin(z/c) iover the part of the planex=athat satisfies 0 y b, 0 z c.
Calculate the surface integral of the vector fieldg = (/)e over the closed surface of a cylinder ofradiusaand lengthL.
The closed surface of a cylinder consists of three parts: the curved surface and the two pla-
nar ends. For the ends, the surface element is parallel (or antiparallel) to ez and therefore
perpendicular tog. These surfaces make no contribution to the surface integral.
The surface element of the curved surface = ais a d dze and so
S
g dS= L
z=0
2=0
aa d dz= 2L
Calculate the surface integral of the vector field F = 2 ezover that part of the plane z=hsatisfying R.
Department of Materials, Imperial College London
-
8/11/2019 Vector calculus Prof. Peter Haynes
41/44
MSE 201: Mathematics 41
Evaluate the surface integral I=
Sv dSwherev = yj and Sis the upper surface of a hemisphere
of radiusa.
The surface S is x2 + y2 + z2 = a2 with z 0 i.e. 0 /2. The element of surfacearea for a spherical surface is dS= r
2
sin d der. From section 3.3:
j er= sin sin and y =rsin sin
Hence
I=
S
v dS = /2=0
2=0
a3 sin2 sin2 sin d d
=
/2=0
sin3 d
2=0
sin2 d
= /2
=0sin cos
2 sin d 2
=0
1
2(1
cos2) d
=
cos + 1
3cos3
/2=0
2 1
4sin 2
2=0
= 2
3
Calculate the surface integral
SF dS where F = Q/(4r2)er and S is the closed surface of a
sphere of radiusR.
12.2 Stokes theorem
Stokes theorem may be stated as follows:
S
( F) dS=
CF ds
whereSis theopensurface bounded by the path C. Greens theorem in the plane is a special case when
the pathCand surfaceSare confined to a plane, however the theorem is more general than that.
Consider splitting the surfaceSinto tiny planar tiles. The surface integral may be approximated by the sumof the contribution of each tile. Naturally, the dimensions will be made vanishingly small to obtain the limit
in which this sum approaches the integral. Consider a single tilePQRSoutlined in bold in Fig. 18. The
neighbouring tiles that share edges with the bold tile are also shown, with an artificial gap between them
for clarity.
Since the tile is planar, Greens theorem in the plane applies:
PQRS
F ds=
PQRS( F) dS
Consider the four neighbouring tiles that share edges with PQRSe.g. the one sharing the edge PQ. For
PQRSthe contribution of this edge to the line integral is in the direction
PQwhereas for the neighbouring
tile it is in the opposite direction
QP. Hence when the contributions of these two tiles are added together,
Department of Materials, Imperial College London
-
8/11/2019 Vector calculus Prof. Peter Haynes
42/44
42 Vector calculus
P Q
R
S
Figure 18: Diagram of a single tile surface element in the derivation of Stokes theorem.
the contributions to the line integrals from the edge PQcancel, and the remaining line integral runs anti-
clockwise around the perimeter of both tiles. This cancellation will continue for all edges shared by tiles
in fact all the edges of all tiles except those which make up the boundaryCof the whole surface S.
Examples
Verify Stokes theorem for the vector field F = yi+ xj+ zk
for the hemispherical surface x2
+y2
+ z2
=a2
,z 0:Consider the left-hand side:
S
( F) dS. F = 2 k. In spherical polar coordinates thesurface element for the hemisphere isdS= a2 sin d der. Sinceer k= cos ,
S
( F) dS = 2 /2=0
2=0
(a2 sin )cos d d
= a2 /2
=0sin2 d
2=0
d
= 2a2 1
2cos2
/2
=0= 2a2
For the right-hand side:
C
F ds,F ds= x dy y dxUse plane polar coordinates to parame-teriseC: x=acos ,y =asin :
C
F ds= 2=0
[(acos )(acos ) (asin )(asin )] d= a2 2=0
d= 2a2
Hence Stokes theorem is verified.
for the square planar surfacez= 0 where 0 x a, 0 y a
for the square planar surfacex=awhere 0
y
b, 0
z
b
Prove that
S( u) dS= 0 for any vector field u over any closed surfaceS.
Department of Materials, Imperial College London
-
8/11/2019 Vector calculus Prof. Peter Haynes
43/44
MSE 201: Mathematics 43
12.3 Volume integrals
Volume integrals are triple integrals and much simpler than line or surface integrals since dV is a scalar.
There are therefore only two possibilities:
Vf dV is a scalar quantity derived from a scalar fieldf
VF dVis a vector quantity derived from a vector field F
Examples
Calculate the volume integral of(r) =rover the sphere of radius acentred on the origin. Calculate the volume integral of(, z) =2 + z2 over the cylinder defined by aand |z| L/2. Calculate the volume integral of the vector field F = x2 i + xyj + zk over the cube 0 x L,
0 y L, 0 z L.
12.4 The divergence theorem
The divergence theorem may be stated as follows:V
F dV =
SF dS
whereVis the volume bounded by the closedsurfaceS. The derivation of the divergence theorem followsa similar argument to that used for Stokes theorem. Consider splitting the volume V into tiny cuboids of
volumeV =xyzwith a corner located at (x0, y0, z0). ThenV
F dV = x0+x
x=x0
y0+yy=y0
z0+zz=z0
Fxx
+Fy
y +
Fzz
dx dy dz
For the first term in the integrand, integrate with respect to x first. For the second and third terms first
integrate with respect toy andzrespectively:V
F dV = y0+y
y=y0
z0+zz=z0
[Fx(x0+ x, y, z) Fx(x0, y, z)] dy dz
+
z0+z
z=z0
x0+x
x=x0
Fy(x, y0+ y, z) Fy(x, y0, z)
dz dx
+
x0+xx=x0
y0+yy=y0
[Fz(x, y, z0+ z) Fz(x, y, z0)] dx dy
The right-hand side of this equation is the surface integral over the closed surface of the cuboid. For
example, for the front side x = x0+ xhas outward normal parallel to i and surface area element dy dziwhere as the back sidex=x0has a normal pointing in the opposite direction and surface element dy dzi
hence the minus sign in the integrand. Likewise the second and third lines give the contributions from the
left and right and top and bottom sides.
As with Stokes theorem, when the contributions from cuboids are summed, neighbouring cuboids sharesurfaces whose contributions cancel because their outward normals point in opposite directions. Thus the
only contribution that remains is from the boundary of the whole volumeV.
Department of Materials, Imperial College London
-
8/11/2019 Vector calculus Prof. Peter Haynes
44/44
44 Vector calculus
Examples
Verify the divergence theorem for the vector field F = xi + yj + zk for the unit cube 0 x 1,0 y 1, 0 z 1.
Use the divergence theorem to evaluate the surface integral S F dSofF= (x+ y2z) i+ (xz2 2y) j+ (z+ x2 + y2) k
over theopenhemispherical surfacex2 + y2 +z2 =a2,z 0.
13 Summary
From this section of the course, students should be able to:
understand the concept of vector area and calculate it for simple surfaces understand the significance of the scale factors in orthogonal coordinate systems and recall them for
Cartesian, cylindrical polar and spherical polar coordinates
find expressions for line, surface and volume elements in Cartesian, cylindrical polar and sphericalpolar coordinates
perform partial differentiation including the use of the chain rule to change coordinate system
calculate total differentials and establish whether a given differential is exact or inexact
perform double and triple integrals calculate and use the Jacobian to change variables in multidimensional integrals calculate derivatives of vector quantities interpret the gradient, divergence and curl geometrically recall and apply the formulae for the gradient, divergence, curl and Laplacian in Cartesian coordinates apply given formulae for the gradient, divergence, curl and Laplacian in cylindrical polar and spherical
polar coordinates
derive vector operator identities using Cartesian coordinates calculate line, surface and volume integrals recall and apply Stokes theorem and the divergence theorem use vector calculus to solve problems in materials science and engineering