0% found this document useful (0 votes)
9 views159 pages

Semester 1 Lecture Notes - JEJS

The CAPE 2000 Semester 1 notes cover topics in Series, Fourier Series, and Vector Calculus, structured into several sections including Power Series, Fourier Series, Matrices, and various types of integrals. Each section provides definitions, properties, and problem sets to reinforce learning, with practical applications and examples included throughout. The notes are designed to complement lectures and include a preamble that emphasizes the importance of problem-solving for understanding the material.

Uploaded by

Asma Nasser
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views159 pages

Semester 1 Lecture Notes - JEJS

The CAPE 2000 Semester 1 notes cover topics in Series, Fourier Series, and Vector Calculus, structured into several sections including Power Series, Fourier Series, Matrices, and various types of integrals. Each section provides definitions, properties, and problem sets to reinforce learning, with practical applications and examples included throughout. The notes are designed to complement lectures and include a preamble that emphasizes the importance of problem-solving for understanding the material.

Uploaded by

Asma Nasser
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 159

CAPE 2000: Semester 1 Notes

CAPE2000 Semester 1

Series, Fourier Series and Vector


Calculus.
Lecturer: J. E. J. Staggs

-1-
PEME 2000: Semester 1 Notes

CONTENTS

§0. PREAMBLE...............................................................................................5

§1. POWER SERIES .......................................................................................6


1.1 What is a Power Series?.......................................................................................6
1.2 Deriving Power Series Expansions from First Principles....................................7
1.3 Maclaurin's Series. ...............................................................................................8
1.4 Power Series Expansions of Some Functions ......................................................9
1.5 The O( ) Notation...............................................................................................10
1.6 Using Power Series Substitutions to Find Limiting Values...............................10
1.7 Using Power Series to Find Approximate Solutions. ........................................11
Problems 1: Power Series ........................................................................................13

§2. FOURIER SERIES...................................................................................14


2.1 Periodic Functions .............................................................................................14
2.2 Piecewise Description of Periodic Functions.....................................................15
2.3 Odd and Even Functions ....................................................................................16
Properties of Odd and Even functions .................................................................17
2.4 Fourier Series Definition....................................................................................18
Basic Formulae for Functions Defined on the Full Range: -L < x < L ...............18
Basic Formulae for Functions Defined on the Half Range: 0 < x < L .................22
2.5 Useful Integrals Involving Trigonometric Functions.........................................25
Problems 2. Fourier Series .......................................................................................26

§3. OVERVIEW OF MATRICES, DETERMINANTS AND VECTORS...........28


3.1 Matrices..............................................................................................................28
Definintions and Basic Operations ......................................................................28
Matrix Multiplication...........................................................................................31
The Matrix Inverse...............................................................................................36
2 x 2 Determinants ...............................................................................................36
Using the Matrix Inverse to Solve Simultaneous Equations................................37
3 x 3 Determinants ...............................................................................................39
3.2 Vectors ...............................................................................................................44
Definitions and Basic Properties..........................................................................44
The i, j, k notation ................................................................................................48
The Scalar Product ...............................................................................................48
The Vector Product ..............................................................................................51
Problems 3. Matrices, Determinants and Vectors....................................................56

§4. LINES, CURVES AND PLANES .............................................................58


4.1 Lines and Curves................................................................................................58
Line Segments......................................................................................................58
Curves ..................................................................................................................60
Length of a Curve.................................................................................................62
Application: Cyclone Dryer .................................................................................63
4.2 Planes .................................................................................................................66

-2-
CAPE 2000: Semester 1 Notes

Introduction..........................................................................................................66
Parametric Equations of a Plane ..........................................................................69
Cartesian Equation of a Plane ..............................................................................70
Cartesian Equation of a Plane Given Three Non-Collinear Points ......................71
Problems 4. Lines Curves and Planes ......................................................................74

§5. GRAD AND DIV.......................................................................................76


5.1 Surfaces..............................................................................................................76
Common Surfaces ................................................................................................77
5.2 Normal to a Surface, the Tangent Plane and Grad.............................................78
Grad......................................................................................................................79
Tangent Plane.......................................................................................................80
5.3 The Directional Derivative.................................................................................83
Slope Varies with Direction!................................................................................83
Directions of Maximum and Minimum Slope .....................................................85
5.4 Conservation Laws.............................................................................................87
Mass Flux of Fluid ...............................................................................................87
Conservation of Fluid Mass .................................................................................89
Definition of div...................................................................................................91
Conservation of Energy and the Laplacian ..........................................................94
Problems 5. Grad and Div........................................................................................99

§6. CURL AND THE SCALAR POTENTIAL ..............................................101


6.1 Vorticity ...........................................................................................................101
Introduction........................................................................................................101
Definition of Vorticity and Curl.........................................................................102
6.2 The Scalar Potential .........................................................................................103
Problems 6. Curl and the Scalar Potential ............................................................108

§7. LINE INTEGRALS .................................................................................109


7.1 Mass of a Length of Wire.................................................................................109
7.2 The Work Done by a Force..............................................................................111
7.3 Line Integral Along a Set of Discrete Curves ..................................................114
7.4 Integrals Around Closed Paths.........................................................................115
7.5 Conservative Forces and Irrotational Flows ....................................................118
7.6 The Circulation in Fluid Mechanics.................................................................121
Problems 7. Line Integrals ....................................................................................122

8. SURFACE INTEGRALS ..........................................................................124


8.1 Centre of Mass .................................................................................................124
8.2 CoM of Composite Areas ................................................................................132
8.3 Area Integrals of Scalar Functions ...................................................................133
8.4 Surface Integrals of Vector Functions..............................................................135
Example: Mass Flux of Fluid.............................................................................135
General Surface Integrals ...................................................................................137
8.5 Stokes’ Theorem ..............................................................................................141
8.6 The Relationship between Vorticity and Aerodynamic Lift (Again)...............144
Problems 8. Surface Integrals ...............................................................................147

-3-
PEME 2000: Semester 1 Notes

Problems 8a. (Stokes’ Theorem)...........................................................................149

9. VOLUME INTEGRALS ............................................................................150


9.1 Mass of an Object of Varying Density.............................................................150
9.2 General Volume Integrals ................................................................................152
Volume Integrals with Variable Bounds............................................................153
9.3 Gauss’s Divergence Theorem ..........................................................................156
Conservation of Mass Using the Divergence Theorem .....................................157
Problems 9. Volume Integrals...............................................................................159

-4-
CAPE 2000: Semester 1 Notes

§0. Preamble

These notes are intended to be used together with the lectures. At the end of each
section you will find a problems sheet. Please make sure that you go through the sheet
before progressing to the next section. Solutions are available in video files on
Minerva.

You will see the symbol ☺ scattered throughout these notes. It is intended to mark
the end of an example, rather than a prompt for you to smile!

You will also need to be familiar with the Greek alphabet, which is used as a source of
symbols for variables. It is shown below in case you need to be reminded.

-5-
PEME 2000: Semester 1 Notes

§1. Power Series

1.1 What is a Power Series?

Functions can be represented as a series of ascending powers of the variable. For


example sin x can be represented as the infinite series :-

x3 x5 ∞
x 2 n +1
+ ... = ∑ (− 1)
n
sin x = x −
3! 5! n =0 (2n + 1)!
A series such as this, consisting of ascending powers of x, is called a power series.
An example of an application of these series is how computers calculate values of the
trigonometric functions. It would be impossible to store all the values in tables of
sines, cosines etc., so the computer calculates the value by using a power series.

For example, evaluate cos 1.5 radians :-

The series expansion of cos x is

x 2 x 4 x 6 x8 ∞
n x
2n
cos x = 1 − + − + ... = ∑ (− 1)
2! 4! 6! 8! n =0 (2n )!

Simply substitute the value 1.5 for x in the expansion, so :-

2 4 6 8
. = 1−
cos15
( .)
15
+
( .)
15

( .)
15
+
( .)
15
.....
2! 4! 6! 8!

2 4 6 8
. = 1−
cos15
( .)
15
+
(15
.)

(15
.)
+
(15
.)
.....
1× 2 1× 2 × 3× 4 1× 2 × 3× 4 × 5× 6 1× 2 × 3× 4 × 5 × 6 × 7 × 8

This should work out as :-

cos 1.5 = 0.070752825

Check this with your calculator. It may differ slightly. The answer is dependent on
how many terms are used in the power series.

Power series such as those for sin x and cos x considered above are infinite series. In
order to use them for practical calculations one must use only a finite number of
terms. This is called truncation and the number of terms that one uses to calculate a
value depends ultimately on the precision that is required of the final answer.

-6-
CAPE 2000: Semester 1 Notes

1.2 Deriving Power Series Expansions from First Principles

By way of example, consider the power series for cos x. We assume that a series
exists and is of the form:-

cos x = a + bx + cx 2 + dx 3 + ex 4 ....... equ 1

We must now find the values of the constants a, b, c, etc.

STEP 1 Substitute in x = 0. Every term except ‘a’ now disappears to leave

cos 0 = a = 1

STEP 2 Unfortunately there are no other substitutions which will just leave a specific
constant. However, we can differentiate both sides of equ , then substitute in x = 0.

Differentiating, equ 1 gives :-

− sin x = b + 2cx + 3dx 2 + 4ex 3 ....... equ 2

Now, when x = 0, sin x = 0 Therefore, b = 0

Differentiating, equ 2 gives :-

− cos x = (1 × 2)c + ( 2 × 3)dx + ( 3 × 4)ex 2 ....... equ 3

1
Again, substituting in when x = 0, -1 = (1 × 2)c = 2!c, Therefore, c = −
2!

Now, differentiating equ 3 gives :-

sin x = (1 × 2 × 3)d + (2 × 3 × 4)ex ..... equ 4

substituting in x = 0 sin x = 0 Therefore, d = 0

Differentiating equ 4 gives :-

cos x = (1 × 2 × 3 × 4)e

1
And, substituting in x = 0, cos x = 1 1 = 4!e e=
4!

STEP 3 Now substitute all the constant terms determined back into the general
equation :-

cos x = a + bx + cx 2 + dx 3 + ex 4 .......

-7-
PEME 2000: Semester 1 Notes

1 2 1
cos x = 1 + 0 × x + − x + 0 × x 3 + x 4 .......
2! 4!

Which leaves the final series expansion for cos x as :-

1 2 1 4
cos x = 1 − x + x .......
2! 4!

1.3 Maclaurin's Series.


Series.

Provided that a function can be differentiated repeatedly the method described above
can be used to expand a function into a series. However, rather than work each step
out every time the result has a general form which makes things quicker. The general
form is known as Maclaurin’s Series and for a function f ( x ) , the result is

x2 x3
f ( x ) = f ( 0) + x f ' ( 0) + f ' ' ( 0) + f ' ' ' (0)... etc.
2! 3!

Where f = the function


f ' = the first differential of f
f '' = the second differential of f etc....

Example. Use Maclaurin’s Series to derive the first three none zero terms in a power
series expansion of sin x

x2 x3
Maclaurin's Series is f ( x ) = f (0) + x. f ' (0) + . f ' ' (0) + f ' ' ' (0)... etc.
2! 3!

Taking each term one at a time

(a) f ( x) = sin x put x = 0, sin 0 = 0, i.e. f (0) = 0

(b) f ' means differentiate the function f

d sin x
= cos x again put in x = 0 cos 0 = 1 i.e. f '(0) = 1
dx

(c) f '' means the second differential of f i.e. differentiate - sin x again.

d cos x
= − sin x put x = 0 -sin 0 = 0 i.e. f ''(0) = 0
dx

(d) f ''' = the third differential of f

-8-
CAPE 2000: Semester 1 Notes

d − sin x
= − cos x , put x = 0 -cos x = -1 i.e. f ''' (0) = -1
dx
(e) f iv = the fourth differential of f

d − cos x
= sin x put x = 0 sin x = 0 i.e. f iv (0) = 0
dx

(f) f v = the fifth differential of f


d sin x
= cos x x=0 cos x = 1 i.e. f v (0) = 1
dx

Now, substitute all the above answers back into the Maclaurin Series to give the
expansion sin x

x 3 x5
sin x = x − + ..... ☺
3! 5!

Summary:

Term f (n)
( x) f (n )
( 0) Coefficient of x n
0 sin x 0 0 / 0! = 0
1 cos x 1 1 / 1! = 1
2 − sin x 0 0 / 2! = 0
3 − cos x -1 − 1 / 3!
4 sin x 0 0 / 4! = 0
5 cos x 1 1 / 5!

1.4 Power Series Expansions of Some Functions

x 3 x5 x 7 x 9 x 2 x 4 x 6 x8
sin x = x − + − + ........ cos x = 1 − + − + .......
3! 5! 7! 9! 2! 4! 6! 8!
x3 x5 x 3 x5 x 7
tan x = x + +2 +..... sinh x = x + + + +......
3 15 3! 5! 7!
x 2 x 4 x 6 x8 x 2 x 3 x 4 x5
cosh x = 1 + + + + ... ln(1 + x) = x − + − + ...
2! 4! 6! 8! 2 3 4 5
x4 2 6 x4
sin 2 x = x 2 − + x ... cos 2 x = 1 − x 2 + +....
3 45 3
x 2 x3 x 4
ex = 1 + x + + + + ...
2! 3! 4!

-9-
PEME 2000: Semester 1 Notes

1.5 The O( ) Notation

In order to use a power series expansion, it must be truncated (stopped) at some point.
This will invariably introduce an error represented by the missing terms and we use
the O( ) notation to denote the magnitude of the missing terms. For example, if we
approximate sin x by the first two terms of its series: sin x ≈ x − x 3 / 3!, then the
missing terms are x 5 / 5!, − x 7 / 7!, x 9 / 9!, and so on. We see that the missing portion
of the series involves powers of x of order 5 and greater and we denote this by:

x3
sin x = x −
3!
( )
+ O x5 .

( )
The O x 5 bit is just shorthand for "other terms involving x 5 and higher powers".

1.6 Using Power Series Substitutions to Find Limiting Values.

This is an alternative to using l'Hopital's rule. For example, consider the limit

Lim  sinx 
 
x → 0 x 

Firstly putting x = 0, gives :-

0
 =0 i.e. it is indeterminate.
0

However, substituting in initial terms in the power series of sin x gives:-

 x 3 x5 
Lim  x − + ... 
3! 5! 
 
x → 0 x 
 

Lim  x 2 x 4 
= 1 − + ...
x → 0  3! 5! 

Now, as x → 0 the ‘x’ terms in the expression → 0

- 10 -
CAPE 2000: Semester 1 Notes

Lim  x 2 x 4 
1 − + ... = {1 − 0 + 0...} = 1
x → 0  3! 5! 

Provided that a function has a power series expansion, you can use the expansion to
find limits in a similar fashion.

1.7 Using Power Series to Find Approximate Solutions.

As we shall see later in the course, some equations cannot be solved simply by
rearranging them to give the answer. A good example is the equation e − x = x . After
a short while of trying, you should soon convince yourself that no amount of
manipulation will result in a solution. However, if a graph is plotted, it is apparent
that there is a solution between x = 0.5 and x = 0.6 :

1.2
y=x

1 y = exp(-x)

0.8

0.6

0.4

0.2
Solution

0
0 0.2 0.4 0.6 0.8 1 1.2

( )
Now, let us use the power series expansion for e − x = 1 − x + O x 2 . So, approximating
−x −x
e by 1 − x and substituting in the equation e = x gives the approximate solution:

1 − x ≈ x ⇒ 2x ≈ 1 ⇒ x ≈ 1/ 2 .

If more terms are used in the series expansion, then a more accurate result may be
obtained. For example, if we include the next term in the power series expansion:

x2
e−x = 1 − x +
2
( )
O x2 ,

then the approximate solution becomes:

x2 x2
1− x + ≈ x ⇒ 1 − 2x + ≈ 0.
2 2

- 11 -
PEME 2000: Semester 1 Notes

This last equation is a quadratic, so its solution is

2± 4−2
x= =2± 2 .
1

x2
The approximate representation of e − x by the quadratic 1 − x + has introduced a
2
spurious solution at x = 2 + 2 ≈ 3.4 , which may be seen more clearly in the diagram
below.

4
y=x
y = exp(-x)
3
y = 1-x+x^2/2 Spurious Solution

Solution
1

0
0 1 2 3 4 5

So disregarding this, our next approximation is x ≈ 2 − 2 ≈ 0.59 .

- 12 -
CAPE 2000: Semester 1 Notes

Problems 1: Power Series

1. Use the first 4 terms of the power series for e x to calculate an approximate value
for e .

2. Use an Excel spreadsheet to determine how many terms one should include in the
power series representation of e x to calculate e to 6 decimal places.

3. (a) Use McClaurin’s series to derive the first 4 non-zero terms for the power series
expansions of the following :-

(i) cos(2 x ) (ii) sinhx (iii) coshx

(b) Using the series found in (a) calculate the limiting values of the following :-

Lim  cos x − 1 Lim  cosh x − 1


(i)   (ii)  
x → 0  x2  x → 0  x2 

4. Use McClaurin's series to prove Euler's formula: cos x + i sin x = e i x , where


i = −1 .

5. Use the power series expansion for e − x to derive the power series expansion for
2
e− x .

6. Use the first two terms of the power series expansion for cos x to find an
approximate solution of the equation cos x = x for x > 0.
2
7. Use the first two terms of the power series for e − x to find an approximate solution
2
of the equation e − x = x .

- 13 -
PEME 2000: Semester 1 Notes

§2. Fourier Series

During the early 19th century, Joseph Fourier introduced the series that was to bear
his name as a method of solving heat transfer problems in conduction. A Fourier
series is a series expansion of a function much like the power series of the previous
chapter, but using the functions sin(x) and cos(x) rather than xn. Since then, Fourier
series have been applied in many different fields including signal processing,
acoustics, fluid dynamics and electronics.

2.1 Periodic Functions

A function f(x) is periodic if its values repeat as a function of x. The regular interval
between repetitions is known as the period T. We write this as f ( x + T ) = f (x ) . The
amplitude is the maximum value of f(x). This is illustrated in the diagram below for
f ( x ) = sin x .

Examples

f (x ) = An sin (nx ), n = 1,2,3,...

Amplitude = An and period is 2π / n .

- 14 -
CAPE 2000: Semester 1 Notes

An

2π/n

In general, if f(x) is expressed as the sum of a number of such terms


f ( x ) = ∑ An sin (nx )
n =1

then A1sin(x) is known as the first harmonic or fundamental (it has largest period),
while Ansin(nx) is the nth harmonic.

Since the Fourier series involves the functions sin and cos, which are periodic, any
expansion involving them will itself be periodic. Therefore, in order to represent a
given function f ( x ) as a Fourier series, the function must be defined on some finite
range such as − L ≤ x ≤ L , or 0 ≤ x ≤ L . Note the following:

 The Fourier series expansion will then be periodic with period 2L for a
function defined on − L ≤ x ≤ L , i.e. f ( x ) = f ( x + 2 L ) .
 Or periodic with period L for a function defined on 0 ≤ x ≤ L , i.e.
f ( x ) = f (x + L ) .

2.2 Piecewise Description of Periodic Functions


Functions

It is sometimes necessary to define a function on a series of intervals on the x-axis. As


an example, consider the function f ( x ) defined as:

 x , 0 < x < 2,

f ( x ) = 2 , 2 < x < 3,
(7 − x ) / 2, 3 < x < 7,

together with f ( x ) = f ( x + 7 ) , i.e. f is periodic with period 7. A graph of this function


is shown plotted below. Note that the shape of the function repeats every 7 units on
the x-axis.

- 15 -
PEME 2000: Semester 1 Notes

f(x)

x
2 3 7 14

2.3 Odd and Even Functions


Functions

A function f(x) is odd if f(-x) = -f(x), i.e. function is anti-symmetrical about the y-
axis. Another way of putting this is that the function is unaltered if it is rotated 180o
about the origin.

Examples
sin(x), tan(3x), x3, x5 -3x3+2x are all odd.

sin(x) is an odd function

A function f(x) is even if f(-x) = f(x)


i.e. function is symmetrical about the y axis.

Examples
cos(x), x4, 2x6-4x2+5, ex+e-x are all even.

cos(x) is an even function


- 16 -
CAPE 2000: Semester 1 Notes

Properties of Odd and Even functions

If f(x) is an even function:

L L
(1) ∫
−L
f ( x )dx = 2∫ f ( x )dx . This identity follows from the symmetry of even functions
0

(reflection in y-axis) and is useful when evaluating integrals.

(2) Fourier expansion contains no sine terms.

So if f ( x ) is even it satisfies the condition f (− x ) = f (x ) . If there were any sin


functions in the Fourier series of f then this condition would not be satisfied. Hence
the Fourier series of an even function contains only cosine terms and is of the
form

A0 ∞  nπx 
f ( x) = + ∑ An cos 
2 n=1  L 

(3) If g ( x ) is even then f ( x )g ( x ) is even. If g ( x ) is odd then f ( x )g ( x ) is odd. So


in particular:

L L L
 nπx   nπx   nπx 
∫−L f (x )sin L dx = 0 , ∫−L f (x ) cos L dx = 2∫0 f (x ) cos L dx .

(4) The derivative f ' ( x ) is odd.

If f(x) is an odd function:

L
(1) ∫ f (x )dx = 0 .
−L
This identity follows from the anti-symmetry of odd functions:

f (− x ) = − f ( x ) .

(2) Fourier expansion contains no cosine terms.

So if f ( x ) is odd it satisfies the condition f (− x ) = − f ( x ) . If there were any cos


functions in the Fourier series of f then this condition would not be satisfied. Hence
the Fourier series of an odd function contains only sin terms. Furthermore, if f is
L
odd, then ∫ f (x )dx = 0 and so
−L
A0 = 0 . Hence the Fourier series of an odd function

has the form


 nπx 
f ( x) = ∑ Bn sin  
n =1  L 

- 17 -
PEME 2000: Semester 1 Notes

(3) If g ( x ) is even then f ( x )g ( x ) is odd. If g ( x ) is odd then f ( x )g ( x ) is even. So


in particular:

L L L
 nπx   nπx   nπx 
∫−L f (x )sin L dx = 2∫0 f (x )sin L dx , ∫ f (x ) cos
−L
L 
dx = 0 .

(4) The derivative f ' ( x ) is even.

2.4 Fourier Series Definition

As alluded to in the introduction, Fourier series allow us to represent a periodic


function (even if it contains discontinuities) as an infinite trigonometrical series in
sine and cosine terms. Expanding a function in a Fourier series amounts to breaking it
down into various harmonics.

As an example we might want to know what light frequencies (colours) are in a given
light beam and in what proportions - to find the answer we need to expand the light
wave (varying electric and magnetic fields) as a Fourier series.

Basic Formulae for Functions Defined on the Full Range: -L < x < L

Periodic function f(x) is defined in the interval x=-L to x=+L and has period 2L. (i.e.
f(x)=f(x+2L) )

Then Fourier Series expansion of f(x) is

A0 ∞   nπx   nπx 
f ( x) = + ∑  An cos  + B n sin  
2 n =1   L   L 

where n = 0, 1, 2, 3 ..........

The Fourier coefficients An and Bn are given by the formulae

L L
1  nπx  1  nπx 
An = ∫
L −L
f ( x) cos
 L 
dx , B n = ∫ f ( x) sin 
L −L  L 
dx

and A0 is defined when n=0 by

L
1
A0 = ∫ f ( x)dx
L −L

- 18 -
CAPE 2000: Semester 1 Notes

Note that A0 / 2 is the mean (average) of f(x) over a period.

When calculating Fourier coefficients, the following identities are useful:

When n is an integer,

sin(nπ ) = 0 ,
cos(nπ ) = (− 1) so if n is even cos(nπ ) = 1 and if n is odd cos(nπ ) = −1 .
n

Example

0 , − π < x < −π / 2,

Consider function f ( x ) = 4 , − π / 2 < x < π / 2, f ( x + 2π ) = f ( x ) .
0 , π / 2 < x < π ,

f(x)

−π π
x
−3π / 2 −π / 2 0 π/2 3π / 2

Note the function is symmetric about the y-axis and so is even, f(x) = f(-x), hence
we expect Bn to be zero, i.e. Fourier series will contain only cosine terms

1 
−π / 2 π /2 π
Bn =  ∫ 0. sin(nx)dx + ∫ 4. sin(nx)dx + ∫ 0. sin(nx)dx 
π  −π −π / 2 π /2 
π /2
4 4
∫ sin(nx)dx = − nπ [cos(nx)] π
π /2
= − /2 =0
π π
− /2

(Check this for yourself)


π −π/2 π/2 π/

A0 = 1/π ∫−π f(x) dx = 1/π { ∫−π 0 dx + ∫−π/2 4 dx + ∫π/2 0 dx }

- 19 -
PEME 2000: Semester 1 Notes

π/2
A0 = 1/π [4x ] −π/2 = 4

constant = A0/2 = 2
−π/2 π/2 π

An = 1/π { ∫−π 0.cos (nx) dx + ∫−π/2 4.cos (nx) dx + ∫π/2 0.cos (nx) dx }
π/2 π/2

= 4/π { ∫−π/2 cos (nx) dx } = 4/π [ sin(nx)/n ] −π/2

= 8/(nπ) . sin (nπ/2)

Note that when n is even, sin(nπ / 2) = 0 , since the sin of an integer multiple of π is
always 0.

Thus (substituting in increasing n values)

f(x) = 2 + 8/π.{cos(x) - 1/3 cos(3x) + 1/5 cos(5x) -1/7 cos(7x)............}

Gradually adding terms (harmonics) produces better approximations for the function
f(x):

5
f(x)
4 n=1

0
-4 -3 -2 -1 0 1 2 3 4
-1
x

- 20 -
CAPE 2000: Semester 1 Notes

5
f(x)
4 n=3

0
-4 -3 -2 -1 0 1 2 3 4
-1
x

5
f(x)
4 n=5

0
-4 -3 -2 -1 0 1 2 3 4
-1
x

- 21 -
PEME 2000: Semester 1 Notes

5
f(x)
4 n=7

0
-4 -3 -2 -1 0 1 2 3 4
-1
x

Basic Formulae for Functions Defined on the Half Range: 0 < x < L

Note that for a periodic function f (x) defined for 0 ≤ x ≤ L (rather than − L ≤ x ≤ L ,
which has been considered above) with f ( x + L) = f ( x) , then it transpires that the
Fourier coefficients can be written for n = 1,2,3,... as

L
2
L ∫0
A0 = f ( x)dx ,

 1 + (− 1)n  L
 ∫ f ( x) cos
nπx 
An =   dx ,
 L 0  L 
 1 + (− 1)n  L
 ∫ f ( x) sin 
nπx 
Bn =   dx .
 L 0  L 

It therefore follows that for odd n the coefficients are 0, since (− 1) = −1 when n is
n

odd and so 1 + (− 1) = 1 − 1 = 0 when n is odd.


n
When n is even we can write
n = 2k , k = 1, 2, 3, ... and 1 + (− 1) = 1 + 1 = 2 , implying that we can write the Fourier
n

coefficients for k = 1,2,3,... as

L L L
2 2  2kπx  2  2kπx 
A0 =
L0∫ f ( x)dx , Ak = ∫ f ( x) cos
L0  L 
dx , Bk = ∫ f ( x) sin 
L0  L 
dx . (*)

and the Fourier series is

- 22 -
CAPE 2000: Semester 1 Notes

A0 ∞  2kπx   2kπx 
f (x ) = + ∑ Ak cos  + Bk sin   (**)
2 k =1  L   L 

NOTE THAT THE SIMPLIFICATIONS FOR ODD AND EVEN FUNCTIONS


STATED ABOVE DO NOT APPLY HERE SINCE THE FUNCTION IS
DEFINED ON THE HALF INTERVAL 0 TO L.

Example.

The saw-tooth function F (x) is defined by

F ( x) = x , 0 ≤ x ≤ 1, F ( x + 1) = F ( x)

and looks like

F(x)

x
2 -1 0 1 2
In order to find its Fourier series, we use equations (*) above for the Fourier
coefficients.

So, L = 1 and:

2
L
 2kπx 
1
 x 
1
1
1

Ak =
L0∫ f ( x ) cos 
 L 
 dx = 2 ∫
0
x cos (2 kπx )dx = 2 
 2kπ
sin (2 kπx )
0
− ∫
2kπ 0
sin (2 kπx )dx 

 1 1
= 2 0 + 2 2 [cos(2kπx )]0 
 4k π 
1
= 2 2 (cos(2kπ ) − 1)
2k π

Here integration by parts has been used. Also sin (2kπ ) = 0 for all integers k.

So, since cos(nπ ) = (− 1) , it follows that cos(2kπ ) = 1 and so when k > 0


n

Ak = 0 .

When k = 0,

- 23 -
PEME 2000: Semester 1 Notes

1
[ ]
A0 = 2∫ xdx = x 2 0 = 1 .
1

2
L
 2kπx 
1
 x 
1
1
1

Bk = ∫ f ( x) sin  dx = 2 ∫ x sin (2kπx )dx = 2− cos(2kπx ) + ∫ cos (2 kπx )dx 
L0  L  0  2kπ  0 2kπ 0 
 1 1 1
= 2 − cos(2kπ ) + 2 2 [sin (2kπx )]0 
 2kπ 4k π 
1
=− cos(2kπ )

Here integration by parts has been used. Also sin (2kπ ) = 0 for all integers k.

So, since cos(nπ ) = (− 1) , it follows that cos(2kπ ) = 1 and so


n

1
Bk = − .

Therefore, using equation (**) above, the Fourier series is

1 1 ∞ sin (2πkx )
F ( x) = − ∑ . ☺
2 π k =1 k

- 24 -
CAPE 2000: Semester 1 Notes

2.5 Useful Integrals Involving Trigonometric Functions

You might find the following integrals useful when calculating terms in Fourier series:

- 25 -
PEME 2000: Semester 1 Notes

Problems 2. Fourier Series

1. Sketch graphs of the following periodic functions and state the period of each one:

 x 2 , 0 < x < 2,
(a) f (x ) =  f ( x + 3) = f ( x ) .
12 − 4 x , 2 < x < 3,

1, 0 < x < 3,


(b) g (x ) =  g (x + 4) = g (x ) .
0 , 3 < x < 4,

2. Define the function shown plotted in the graph below and state its period:

f(x)

x
1 3 5 7

-1

3. Classify the following functions as either odd, even or neither.

(a) f ( x ) = x 2 + 2 , − ∞ < x < ∞ .


(b) f ( x ) = 2 x , − ∞ < x < ∞ .

(c) f ( x ) = tan x , − π / 2 < x < π / 2 .

− 4 , − 3 < x < 0,
(d) f ( x ) = 
4 , 0 < x < 3 .

 x , − 2 < x < 0,
(e) f ( x ) = 
 − x , 0 < x < 2.

4. (a) Show that if f ( x ) is odd then f ' ( x ) is even and if g ( x ) is even then g' ( x ) is
odd.
- 26 -
CAPE 2000: Semester 1 Notes

(b) Show that if f ( x ) is even and g ( x ) is odd then f ( x )g ( x ) is odd.

5. Find the Fourier Series of the following functions:

− 1, − 1 < x < 0,
(a) f ( x ) =  f ( x + 2) = f (x ) .
2 , 0 < x < 1,

(b) f ( x ) = x / 2 , − 2 < x < 2, f ( x + 4) = f ( x ) .

(c) (i) f ( x ) =| x | , − 1 < x < 1 , f ( x + 2) = f (x ) .

π2 ∞
1
(ii) (Harder). Use your series to show that =∑ .
n =1 (2n − 1)
2
8

a , − 1 < x < 0,
(d) f ( x ) =  f ( x + 2) = f (x ) . Use this result to check your answer to
b , 0 < x < 1,
part (a).

0 , − 1 < x < 0,
(e) f ( x ) =  f ( x + 2) = f (x ) .
 x , 0 < x < 1,

6. Find the Fourier Series of the following functions:

1, 0 < x < 1,


(a) f ( x ) =  f ( x + 2) = f (x ) .
2, 1 < x < 2,

(b) f ( x ) = x 2 , 0 < x < 1, f (x + 1) = f ( x ) .

a , 0 < x < 1,
(c) f ( x ) =  f ( x + 2) = f (x ) and use your result to check (a).
b, 1 < x < 2,

- 27 -
PEME 2000: Semester 1 Notes

§3. Overview of Matrices, Determinants and Vectors

3.1 Matrices

Definintions and Basic Operations

A matrix is an ordered 2D array of numbers. Examples of matrices are:

 − 1 − 2 3
 2 3 4  
(a) (− 1 2 2 ) , (b)   , (c)  4 3 1 .
3 2 5 0 0 1 

The size or order of a matrix is defined as (number of rows) × (number of columns).


Thus in the examples above, (a) is a 1 x 3 matirx, (b) is a 2 x 3 matrix and (c) is a 3 x
3 matrix. If a matrix has the same number of rows and columns (as in example (c)
above), then it is said to be a square matrix.

It is common practice to use a bold uppercase letter to denote a particular matrix.


The individual numbers in a matrix are called the elements of the matrix and we refer
to an element by quoting its row index first then its column index. Thus the 2,3
element in example (b) above is 5. In general a double subscript is used to denote
matrix elements. So for an m x n matrix (m rows by n cols) A, the elements would be
denoted in general by aij , i = 1, 2, ..., m , j = 1, 2, ...n . This would correspond to the
matrix:

 a11 a12 ... a1n −1 a1 n 


 
 a21 a22 ... a2 n −1 a2 n 
 a a32 ... ... a 3n 
A= 
31

 M M 
a am −1 2 ... ... am −1n 
 m −11 
 am 1 am 2 ... ... am n 

We can also write this as A = (aij ), 1 ≤ i ≤ m , 1 ≤ j ≤ n .

Two matrices of the same order can be added or subtracted by adding or subtracting
 2 3 4  − 1 0 2
the individual elements. Thus if A =   and B =   , then
3 2 5  4 − 2 3

 2 − 1 3 + 0 4 + 2   1 3 6
A + B =   =   ,
 3 + 4 2 − 2 5 + 3  7 0 8

- 28 -
CAPE 2000: Semester 1 Notes

 2 +1 3 − 0 4 − 2  3 3 2
A − B =   =   .
3 − 4 2 + 2 5 − 3  −1 4 2

In general we have that if A = (aij ) and B = (bij ) , 1 ≤ i ≤ m , 1 ≤ j ≤ n , then

A + B = (aij + bij ).

Note that matrices can be added or subtracted only if they are the same size. If
they are of different sizes then addition or subtraction is not possible.

 2 3 4
Also a matrix can be multiplied by a number. For example if A =   , then
3 2 5

 2 × 3 3 × 3 4 × 3  6 9 12 
3A =   =   .
 3 × 3 2 × 3 5 × 3   9 6 15 

In general, if A = (aij ) then cA = (c.aij ) .

 − 1 − 2 3  2 1 3
   
Example. If A =  4 3 1  and B =  0 0 1  then find
0 0 1   1 0 2
  
(a) A − 2B (b) 2 A + 3B .

So we have:

(a)
 − 1 − 2 3   2 1 3   − 1 − 4 − 2 − 2 3 − 6   − 5 − 4 − 3
       
A − 2B =  4 3 1  − 2 0 0 1  =  4 3 1− 2 =  4 3 − 1 .
0 0 1   1 0 2   0 − 2 0 1 − 4   − 2 0 − 3

(b)
 − 1 − 2 3  2 1 3   − 2 + 6 − 4 + 3 6 + 9   4 − 1 15 
       
2A + 3B = 2 4 3 1  + 3 0 0 1  =  8 6 2 + 3 =  8 6 5  .
0 0 1   1 0 2   0 + 3 0 2 + 6   3 0 8 

Some examples of special types of matrices are:

- 29 -
PEME 2000: Semester 1 Notes

 − 1 0 0
 
Diagonal Matrix, e.g.:  0 2 0  . In general a diagonal matrix has 0s everywhere
 0 0 4
 
apart from on the leading diagonal. Sometimes a diagonal matrix is denoted by
diag(…). Thus the example above would be denoted diag(-1, 2, 4).

1 0 0 0
 
0 1 0 0
The identity matrix, e.g.  . A special type of diagonal matrix with 1s
0 0 1 0
 
0 0 0 1 
on the leading diagonal.

Upper Triangular Matrix, e.g.

1 0 2 0
 
Zeros everywhere 0 −1 4 1
below this line
0 0 5 0
 
0 0 0 2
This type of matrix has zeros everywhere below the main diagonal. Note there can
be zeros above the main diagonal but there cannot be non-zero elements below the
main diagonal.

Lower Triangular Matrix, e.g.

 3 0 0 0 
 
−1 2 0 0 
Zeros everywhere

1 1 0 
above this line
0
 
 0 −3 2 − 5 
This type of matrix has zeros everywhere above the main diagonal. Note there can
be zeros below the main diagonal but there cannot be non-zero elements above the
main diagonal.

- 30 -
CAPE 2000: Semester 1 Notes

Matrix Multiplication

The first thing to note here is that it is not always possible to multiply matrices and the
second thing to note is that multiplication of matrices is NOT COMMUTATIVE, i.e.
AB is generally not the same as BA .

If matrix A is of order m1 × n1 and B is of order m2 × n2 , then it is only possible to


multiply A by B (i.e. the product AB) if n1 = m2 and it is only possible to multiply B
by A (i.e. the product BA) if n2 = m1 . So in summary, you can multiply a m × n
matrix by a n × p matrix. It transpires, as will shortly be revealed, that the result of
multiplying a m × n matrix by a n × p matrix is a matrix of size m × p .

Matrix multiplication is best illustrated by an example, so here goes…

− 2 1 3
 −1 2 5  
Let A =   and B =  1 − 1 2  . Note that A is a 2 × 3 matrix
 2 − 3 4  4 − 2 5 

and B is a 3× 3 matrix. Therefore it is possible to multiply A by B (with B on the
right) and the product C = AB will itself be a 2 × 3 matrix with the structure

c c c13 
C =  11 12 .
 c21 c22 c23 

In order to proceed, we take row 1 of A and multiply it by col 1 of B to get the (1, 1)
element of AB:

By
Multiply this row this
col To get this element
 −1 2 5   − 2 1 3
     c11 c12 c13 
 2 − 3 4  1 − 1 2  
 4 − 2 5  c21 c22 c23 
 
A B C

In order to compute c11 , we multiply a11 by b11 , a12 by b21 , a13 by b31 and add:

c11 = a11b11 + a12b21 + a13b31 ,

i.e.

- 31 -
PEME 2000: Semester 1 Notes

 −1 2 5  −2 1 3
     c11 c12 c13 
 2 − 3 4  1 −1 2  
 4  c21 c22 c23 
 − 2 5 
A B C

c11 = −1 × (− 2) + 2 × 1 + 5 × 4 = 24
Proceeding in a similar fashion, to find c12 we multiply row 1 of A by col 2 of B:

By
Multiply this row this
col To get this element
 −1 2 5  −2 1 3
     c11 c12 c13 
 2 − 3 4  1 − 1 2  
 4  c21 c22 c23 
 − 2 5 
A B C

c12 = a11b12 + a12b22 + a13b32 = −1 × 1 + 2 × (− 1) + 5 × (− 2 ) = −13 .

To find c13 we multiply row 1 of A by col 3 of B:

By
Multiply this row this
col To get this element
 −1 2 5   − 2 1 3
     c11 c12 c13 
 2 − 3 4  1 − 1 2  
 4 − 2 5  c21 c22 c23 
 
A B C
c13 = a11b13 + a12b23 + a13b33 = −1 × 3 + 2 × 2 + 5 × 5 = 26 .

To find c21 we multiply row 2 of A by col 1 of B:

By
Multiply this row this
col To get this element
 −1 2 5   − 2 1 3
     c11 c12 c13 
 2 − 3 4  1 − 1 2  
 4 − 2 5  c21 c22 c23 
 
A B C

c21 = a21b11 + a22b21 + a23b31 = 2 × (− 2 ) − 3 × 1 + 4 × 4 = 9 .

- 32 -
CAPE 2000: Semester 1 Notes

To find c22 we multiply row 2 of A by col 2 of B:

By
Multiply this row this
col To get this element
 −1 2 5   − 2 1 3
     c11 c12 c13 
 2 − 3 4  1 − 1 2  
 4 − 2 5  c21 c22 c23 
 
A B C

c22 = a21b12 + a22b22 + a23b32 = 2 × 1 − 3 × (− 1) + 4 × (− 2 ) = −3 .

Finally, to find c23 we multiply row 2 of A by col 3 of B:

By
Multiply this row this
col To get this element
 −1 2 5   − 2 1 3
     c11 c12 c13 
 2 − 3 4  1 − 1 2  
 4 − 2 5  c21 c22 c23 
 
A B C

c23 = a21b13 + a22b23 + a23b33 = 2 × 3 − 3 × 2 + 4 × 5 = 20 .

Thus:

 − 2 1 3
 − 1 2 5    24 − 13 26 
  1 − 1 2  =  
 2 − 3 4  4 − 2 5   9 − 3 20 .
 
Note that we cannot form the product BA because B is 3× 3 and A is 2 × 3 , i.e. the
number of columns of B is different from the number of rows of A.

In general, if A = (aij ) is a m × n matrix and B = (bij ) is a n × p matrix, then C = AB


is a m × p matrix with elements

n
cij = ∑ aik bkj , 1 ≤ i ≤ m , 1 ≤ j ≤ p.
k =1

 4 
Example. Let A = (2 3) and B =   . Find the products AB and BA.
 − 5

- 33 -
PEME 2000: Semester 1 Notes

Since A is a 1× 2 matrix and B is a 2 × 1 matrix, AB will be a 1× 1 matrix (i.e. a


single number) and BA will be 2 × 2 matrix. This example nicely illustrates that
matrix multiplication is not commutative!

So
 4 
AB = (2 3)  = 2 × 4 − 3 × 5 = −7
 − 5
and
 4   4×2 4×3   8 12 
BA =  (2 3) =   =   . ☺
 − 5  − 5 × 2 − 5 × 3   − 10 − 15 

2 − 3
Example. If A =   , find (i) A 2 , (ii) Is it possible to find A 3 , and if so
3 1 
what is it?

 2 − 3  2 − 3 
(i) So A 2 is just simply A.A =    . Since A is a 2 × 2 matrix, it is
 3 1  3 1 
possible to find A 2 and the result will be another 2 × 2 matrix. Thus:

 2 − 3  2 − 3   4 − 9 − 6 − 3   − 5 − 9 
A 2 =    =   =   .
 3 1  3 1   6 + 3 − 9 + 1   9 − 8 

(ii) We have to be careful when finding A 3 because this could be either A.A 2 or
A 2 .A and it is not obvious whether these two things are the same or not since matrix
multiplication is not commutative. So proceeding with the first isomer:

 2 − 3 − 5 − 9   − 10 − 27 − 18 + 24   − 37 6 
AA 2 =    =   =   .
 3 1  9 − 8   − 15 + 9 − 27 − 8   − 6 − 35 

The second possibility is:

 − 5 − 9  2 − 3  − 10 − 27 15 − 9   − 37 6 
A 2 A =    =   =   .
 9 − 8  3 1   18 − 24 − 27 − 8   − 6 − 35 

Thus both isomers are the same and so there is no ambiguity and we have

 − 37 6 
A 3 =   . ☺
 − 6 − 35 

In fact it transpires that matrix multiplication is associative, which means that

(AB)C = A(BC),
- 34 -
CAPE 2000: Semester 1 Notes

i.e. although order of multiplication is important (commutative law fails), the


placement of brackets is not important. The proof of this is technical and boring so I
won’t trouble you with it here (although if you are keen you can have a go and prove it
yourself). This fact means that if A is any square matrix (i.e. the same number of
rows as cols) then if n is a positive integer, A n is always unambiguous and has a
unique value (as in the example above when A.A 2 = A 2 .A ).

The identity matrix I was introduced above. It is a square matrix with 1 on the
leading diagonal and 0 everywhere else. I is called the identity matrix because it has
the property that for any square matrix M the same size as I,

MI = IM = M .

In other words, the result of multiplication by I, either on the left or the right, leaves
the original matrix unchanged.

−1 2 0
 
Example. Let M =  3 2 1  . Verify that MI = IM = M .
 2 − 2 3 

So starting with multiplication on the left by I:

 1 0 0  − 1 2 0 
  
IM =  0 1 0  3 2 1
 0 0 1  2 − 2 3 
  
1 × ( −1) + 0 × 3 + 0 × 2 1 × 2 + 0 × 2 + 0 × ( −2) 1 × 0 + 0 × 1 + 0 × 3
 
=  0 × ( −1) + 1 × 3 + 0 × 2 0 × 2 + 1 × 2 + 0 × ( −2) 0 × 0 + 1 × 1 + 0 × 3
 0 × ( −1) + 0 × 3 + 1 × 2 0 × 2 + 0 × 2 + 1 × ( −2) 0 × 0 + 0 × 1 + 1 × 3
 
 − 1 2 0
 
= 3 2 1 = M
 2 − 2 3
 

Multiplication on the right gives the same result:

- 35 -
PEME 2000: Semester 1 Notes

 − 1 2 0  1 0 0 
  
MI =  3 2 1  0 1 0 
 2 − 2 3  0 0 1 
  
1 × ( −1) + 0 × 3 + 0 × 2 1 × 2 + 0 × 2 + 0 × ( −2) 1 × 0 + 0 × 1 + 0 × 3
 
=  0 × ( −1) + 1 × 3 + 0 × 2 0 × 2 + 1 × 2 + 0 × ( −2) 0 × 0 + 1 × 1 + 0 × 3
 0 × ( −1) + 0 × 3 + 1 × 2 0 × 2 + 0 × 2 + 1 × ( −2) 0 × 0 + 0 × 1 + 1 × 3
 
 − 1 2 0
 
= 3 2 1 = M
 2 − 2 3
 

The Matrix Inverse

Let M be a n × n square matric and I the n × n identity matrix. Then the inverse
matrix of M is written as M −1 and is defined as the matrix such that

M M −1 = M −1 M = I .

It is important to note that not every square matrix has an inverse. Finding the
inverse matrix is quite an involved task in general, however it is quite simple for 2 × 2
matrices.

a b
Let M =   be a general 2 × 2 matrix. Then it transpires that the inverse is
c d 

1  d − b
M −1 =  .
ad − bc  − c a 

It is clear from this equation that the inverse exists only when ad − bc ≠ 0 .

2 x 2 Determinants

Thus the quantity ad − bc is of fundamental importance: when it is non-zero the


inverse matrix exists and when it is 0 no inverse exists.

For this reason, ad − bc is defined as the determinant of the 2 × 2 matrix M, and is


a b
written as det (M ) or . Note that sometimes the brackets are omitted and we
c d
may simply write det M .

- 36 -
CAPE 2000: Semester 1 Notes

a b 1  d − b
Example. Verify that if M =   and det M ≠ 0 , then M −1 =  .
c d  det M  − c a 

In order to achieve this, we must simply show that M −1M = MM −1 = I . So with this
in mind:

 a b  d − b   ad − bc − ab + ab   det M 0 
   =   =  .
 c d  − c a   cd − cd − bc + ad   0 det M 

and the result follows by dividing by det M:

 a b  d / det M − b / det M   1 0 
   =   .
 c d  − c / det M a / det M   0 1 

Multiplying on the left gives the same result:

 d − b  a b   ad − bc db − bd   det M 0 
   =   =  .
 − c a  c d   − ca + ac − bc + ad   0 det M 

Hence the required result follows on dividing by det M . ☺

2 3
Example. Find .
−4 5

a b
So using the definition above that = ad − bc , we have
c d

2 3
= 10 − ( −12) = 22 . ☺
−4 5

 2 3
Example. Does the matrix M =   have an inverse? If it does, find it.
 − 4 5

From the last example we know that det M = 22 , which is clearly not 0 and so M
definitely DOES have an inverse. Using the definition above for the inverse, we then
get

1  5 − 3  5 / 22 − 3 / 22 
M −1 =  = . ☺
22  4 2   2 / 11 1 / 11 

Using the Matrix Inverse to Solve Simultaneous Equations

- 37 -
PEME 2000: Semester 1 Notes

The matrix inverse may be employed to solve systems of 2 equations in 2 unknowns.


In fact it may be used to solve higher order systems, but the computations rapidly
become too complex for it to be a useful method in practice.

Consider the pair of equations 2 x + y = −1 , 3 x − 2 y = 2 . You may well have been


taught to solve equations like this using an elimination method, i.e. reduce the
equations to just one equation in one unknown, etc. Proceeding like this we see that
y = −1 − 2 x from the first equation and using this in the second gives:

3x − 2(− 1 − 2 x ) = 2 ⇒ 7 x = 0 , i.e. x = 0 and y = −1 .

However using matrices, we can write the equations as

 2 1  x   − 1 
   =   .
 3 − 2  y   2 

2 1   x
Note that the result of multiplying the matrix M =   by x =   yields
 3 − 2  y
 2x + y 
  . Thus the equations are represented in much more compact form by
 3x − 2 y 

Mx = b ,

 − 1
where b =   . Now, if det M ≠ 0 then M −1 exists and so we can multiply on the
2
−1
left by M to give:

x = M −1b ,

which is the solution!

So in order to find the solution of the original equations, all we have to do is find M −1
and then multiply it by b. Thus det M = −4 − 3 = −7 and so

1  − 2 − 1
M −1 = −  ,
7  − 3 2 

giving

 x 1  − 2 − 1  − 1 1  2 − 2  0 
  = −    = −   =  .
 y 7  − 3 2  2  7  3 + 4   − 1

Example. Use the matrix inverse method to solve the equations 5 x − 3 y = 3 ,


− 3 x + 4 y = −2 .

- 38 -
CAPE 2000: Semester 1 Notes

Writing this in matrix form gives:

 5 − 3  x   3 
   =   .
 − 3 4  y   − 2 

Hence

 x 1  4 3 3  1 12 − 6   6 / 11 
  =    =   =   ,
 y  20 − 9  3 5  − 2  11  9 − 10   − 1 / 11

and consequently x = 6 / 11, y = −1 / 11 . ☺

3 x 3 Determinants

It is possible to calculate the determinant of any square matrix, but we shall just look
at determinants of 3 x 3 matrices in this course. It is straight forward to calculate 3 x
3 deterimants and it transpires that they are expressible in terms of 2 x 2 determinants.
The definition of the determinant of the general 3 x 3 matrix

 a11 a12 a13 


 
A =  a21 a22 a23 
a a33 
 31 a32

is
a22 a23 a21 a23 a21 a22
det A = a11 − a12 + a13 .
a32 a33 a31 a33 a31 a32

NOTE THE NEGATIVE SIGN BEFORE THE SECOND DETERMINANT! Each 2


x 2 determinant in the expression above is called a cofactor of the 3 x 3 determinant.

There are some other points to note about this definition:

• The numbers before each cofactor come from the first row of A:
 a11 a12 a13 
 
A =  a21 a22 a23 
a a33 
 31 a32

a22 a23 a a23 a a22


det A = a11 − a12 21 + a13 21 .
a32 a33 a31 a33 a31 a32

- 39 -
PEME 2000: Semester 1 Notes

• The signs before each 2 x 2 determinant follow the rule + - +.


• Each cofactor is formed from A by deleting the row and column corresponding
to the coefficient in front of it and then using the remaining elements to form
the 2 x 2 determinant:

 a11 a12 a13 


  a22 a23
 a21 a22 a23  11
a32 a33
a a33 
 31 a32

 a11 a12 a13 


  a21 a23
 a21 a22 a23  12
a31 a33
a a33 
 31 a32

 a11 a12 a13 


  a21 a22
 a21 a22 a23  13
a31 a32
.
a a33 
 31 a32
2 3 −1
Example. Calculate the value of the determinant 4 1 −2 .
−1 3 2
So following the definition, we have

2 3 −1
1 −2 4 −2 4 1
4 1 −2 = 2 −3 −1
3 2 −1 2 −1 3
−1 3 2

- 40 -
CAPE 2000: Semester 1 Notes

= 2(2 + 6 ) − 3(8 − 2 ) − 1(12 + 1)


= 16 − 18 − 13

= −15 . ☺

In fact we do not have to expand a 3 x 3 determinant using the first row. As long as
we observe the following rule of signs:

+ − +
 
 − + −
+ − +
 

we can use any row (or indeed any column) we like. We just form the 2 x 2 cofactors
by deleting the row and column corresponding to the coefficient and then using the
remaining elements. So for example, if we revisit the example above we can calculate
it using the second row for the coefficients and observing that the signs in front of
each coefficient must follow the pattern - + -:

+ − +
 
− + −
+ − +
 
2 3 −1
3 −1 2 −1 2 3
4 1 − 2 = −4 +1 +2
3 2 −1 2 −1 3
−1 3 2

= −4(6 + 3) + (4 − 1) + 2(6 + 3)
= −36 + 3 + 18 = −15.

2 3 −1
Example. Calulate the value of 4 1 − 2 by expanding from the 3rd row.
−1 3 2

Following the rule of signs, the signs in front of the coefficients must go + - + again
and so we have

2 3 −1
3 −1 2 −1 2 3
4 1 − 2 = −1 −3 +2
1 −2 4 −2 4 1
−1 3 2

= −1(− 6 + 1) − 3(− 4 + 4 ) + 2(2 − 12 )

- 41 -
PEME 2000: Semester 1 Notes

= 5 − 20

= −15 as before. ☺

2 3 −1
Example. Calulate the value of 4 1 − 2 by expanding from the middle column.
−1 3 2

Following the rule of signs, the signs before each cofactor must follow the order:

+ − +
 
 − + − 
+ − +
 

i.e. - + -, so we have

2 3 −1
4 −2 2 −1 2 −1
4 1 − 2 = −3 +1 −3
−1 2 −1 2 4 −2
−1 3 2
= −3(8 − 2 ) + (4 − 1) − 3(− 4 + 4 )

− 18 + 3 = −15 as before. ☺

Finally, we not the following important property of determinants:

If two consecutives rows or columns are swapped then the determinant changes
in value by a factor of -1.

To illustrate what is meant by this statement, consider the determinant obtained by


swapping rows 1 and 2 in the example above, i.e.

2 3 −1 4 1 −2
4 1 − 2 → 2 3 −1 .
−1 3 2 −1 3 2

According to the statement above, we expect the value of the new determinant to be
15, so let us see if this is true:

4 1 −2
3 −1 2 −1 2 3
2 3 −1 = 4 −1 −2
3 2 −1 2 −1 3
−1 3 2

- 42 -
CAPE 2000: Semester 1 Notes

= 4(6 + 3) − (4 − 1) − 2(6 + 3)

= 36 − 3 − 18 = 15 as expected.

The proof of this property in general is tedious but straightforward and will be spared
here.

Note as a corollary to this property that if there are an even number of


consecutive row or column swaps then the value of the resulting determinant is
unchanged because -1 to an even power is +1. If there are an odd number of
swaps then the determinant changes by a factor of -1 because -1 to an odd power
is -1.

2 −3 2
Example. Calculate the value of 3 4 1 . Then swap columns 1 and 2 and
−1 5 2
columns 2 and 3 and verify that the value of the determinant is unchanged.

Expanding along the first row gives:

2 −3 2
4 1 3 1 3 4
3 4 1 =2 +3 +2 = 2(8 − 5) + 3(6 + 1) + 2(15 + 4 )
5 2 −1 2 −1 5
−1 5 2
= 6 + 21 + 38 = 65.

Now doing the column swaps:

2 −3 2 −3 2 2 −3 2 2
3 4 1→ 4 3 1→ 4 1 3 .
−1 5 2 5 −1 2 5 2 −1

Calculating the value of the final determinant gives:

−3 2 2
4 1 3 = −3(− 1 − 6) − 2(− 4 − 15) + 2(8 − 5) = 21 + 38 + 6 = 65
5 2 −1

as before. ☺

Example. Show that if two rows (or columns) of a 3 x 3 determinant are identical,
then the determinant is 0.

From the row and column swapping rule above, it will suffice to show that if the first
two rows or columns of a determinant are identical then it is necessarily 0. So
consider the determinant

- 43 -
PEME 2000: Semester 1 Notes

a1 a2 a3
a1 a2 a3 .
b1 b2 b3

Expanding from the first column gives

a1 a2 a3
a2 a3 a a3
a1 a2 a3 = a1 − a1 2 + b1 (a2 a3 − a3a2 ) = 0 .
b2 b3 b2 b3
b1 b2 b3

Also, considering the determinant

a1 a1 b1
a2 a2 b2 ,
a3 a3 b3

expanding this by the first row gives the same result. ☺

3.2 Vectors

Definitions and Basic Properties

It transpires that not everything in mathematics can be represented as a simple


number. In fact the only objects that can be represented by numbers are physical
quantities that possess only magnitude (or size). Quantities such as temperature,
mass, density, pressure and energy all fall into this category and are called scalars.
However, some important physical quantities such as velocity, momentum,
acceleration, possess a direction as well as a magnitude and they must be represented
by a vector.

Perhaps the simplest example of a vector is the line segment joining two points
together. Consider the points P(1, 2) and Q(8 5) The line segment from P to Q is 7
units along the x-axis and 3 units up the y-axis and is a vector that is denoted PQ :

- 44 -
CAPE 2000: Semester 1 Notes

y
Q(8,5)

5 – 2 = 3 units in y direction
8 – 1 = 7 units in x direction

P(1,2)

The magnitude (or modulus) of the vector PQ , which is denoted by PQ ,


corresponds to the length of the line segment, which we can determine using
Pythagoras’ theorem:

PQ = 72 + 32 = 58 = 7.62

Note that two vectors are equal only if they have the same direction AND the same
magnitude. Vectors can also be denoted by a boldface letter such as v or an
underlined character such as v.

Vectors can be represented by a an ordered row or column, thus the vector PQ above
7
could be written as either (7, 3) or   . Note that distance along the x-axis preceeds
 3
distance along the y-axis. The row notation will be used mostly in these notes in order
to save space.

In three dimensions, three ordinates are required to represent a vector, thus u = (1, 2, 3)
indicates that the vector u is 1 unit along the x-axis, 2 units along the y-axis and 3
units along the z-axis. The individual ordinates in a vector are called its components
and the first ordinate is the x-component, the second is the y-component and the
third is the z-component.

The modulus of a vector in three dimensions is defined using a straight forward


extension to the 2D case. Thus the modulus of the vector p = (a, b, c ) is

| p |= a 2 + b2 + c 2 .

Example. Write as an ordered row the vector u which has x-component 3, y-


component -2 and z-component 5. What is the modulus of u?

- 45 -
PEME 2000: Semester 1 Notes

So u = (3, − 2, 5) and | u |= 32 + (− 2 ) + 52 = 38 . ☺
2

Vectors can be added, subtracted and multiplied by a scalar. Thus if

u = (u1 , u2 , u3 ) and v = (v1 , v2 , v3 ) ,

then:

u + v = (u1 + v1 , u2 + v2 , u3 + v3 ) ,
u − v = (u1 − v1 , u2 − v2 , u3 − v3 )
and if c is any scalar,

cu = (cu1 , cu2 , cu3 ) .

Example. If u = (1,3,2 ) and v = (2,−5,−1) , then what is (i) u − v , (ii) 2u + 3v ?

We have:

(i) u − v = (1 − 2,3 − ( −5),2 − ( −1) ) = (− 1,8,3) .


(ii) 2u + 3v = (2,6,4 ) + (6,−15,−3) = (8,−9,1) . ☺

Note that when two vectors are added (or subtracted) a new vector is created. The
result of adding or subtracting two vectors is shown graphically in the figure below.

b
a+
a

a-
a b

-b

Example. A triangle has vertices at A(1, 2, -1), B(6, 0, 2) and C(4, 5, 5). Find vectors
representing all three sides of the triangle.

The triangle is shown in the diagram below.

- 46 -
CAPE 2000: Semester 1 Notes

And the vectors that we are required to find are shown below:

BC
AC

AB
A

Let the position vectors of the points A, B and C be OA , OB and OC respectively.


Then using the result above for addition/subtraction of vectors, we have that

AB = OB − OA , so AB = (6,0,2 ) − (1,2,−1) = (5,−2,3) ,

AC = OC − OA , so AC = (4,5,5) − (1,2,−1) = (3,3,6) ,

BC = OC − OB , so BC = (4,5,5) − (6,0,2 ) = (− 2,5,3) . ☺

A unit vector is a vector of magnitude 1. Often the symbol ^ is used to emphasise the
fact that a vector is a unit vector. Thus v̂ would indicate a unit vector. The vectors
( ) ( )
(0, − 1, 0) , 1 / 2 ,1 / 2 and 3 / 38 , − 2 / 38 , 5 / 38 are all examples of unit
vectors. Note that any vector can be converted into a unit vector simply by dividing
the vector by its magnitude.

Example. Convert the vector p = (1, 2, − 1) into a unit vector.

- 47 -
PEME 2000: Semester 1 Notes

 1 2 1 
Here | p |= 1 + 4 + 1 = 6 , so p̂ =  , ,− . ☺
 6 6 6

The i, j, k notation

The vectors

i = (1,0,0) , j = (0,1,0) and k = (0,0,1)

are unit vectors that lie along the x, y and z axes respectively. These vectors have a
special significance because we can write any vector in terms of i, j and k. For
instance the vector (2,−4,3) can be written as 2i − 4 j + 3k .

Thus the use of these special unit vectors gives us an alternative way of representing a
vector. In general, the vector u = (u1 , u2 , u3 ) can be written as

u = u1i + u2 j + u3k .

Example. Write the vector (2,−3,1) + (1,2,3) using the i,j,k notation.

Here (2,−3,1) + (1,2,3) = 3i − j + 4k . ☺

The Scalar Product

The scalar product (or dot product as it is also known) of two vectors u = (u1 , u2 , u3 )
and v = (v1 , v2 , v3 ) , is written as u . v and defined as

u . v = u1v1 + u2 v2 + u3v3 .

• Note that the scalar product of two vectors gives a number (or a scalar as it is
also known- hence the name!).
• Note also that the scalar product is commutative, i.e. u . v = v . u , so the order
of scalar product is unimportant.

It may be shown that the scalar product is given by the equivalent formula

u . v =| u || v | cos θ ,

where θ is the angle (between 0 and π) between u and v (see figure below).

- 48 -
CAPE 2000: Semester 1 Notes

u
θ

Given the last definition, the scalar product is a useful tool for telling whether two
vectors are orthogonal (at right angles) or not, for if θ = π / 2 then since cos(π / 2 ) = 0 ,
the scalar product will be 0. Hence:

• Scalar product > 0 means that angle between vectors is between 0 and π / 2.
• Scalar product < 0 means that angle between vectors is between π / 2 and π.
• Scalar product = 0 means that vectors are orthogonal.

Example. Which pair of the following vectors is orthogonal?

a = 2 i − 3 j + k , b = −2 i + j + k , c = i + 2 j + 4 k .

So forming the scalar products, we have:

a . b = ( 2 × −2) + (− 3 × 1) + (1 × 1) = −6 so NOT orthogonal


b . c = ( −2 × 1 ) + (1 × 2 ) + (1 × 4 ) = 4 so NOT orthogonal
a . c = ( 2 × 1) + (− 3 × 2 ) + (1 × 4 ) = 0 so ORTHOGONAL.

Hence a is perpendicular to c. ☺

The scalar product may be used to calculate the angle between two vectors. This
follows from the fact that

a . b =| a || b | cos θ

and so

 a. b 
θ = cos −1  
 | a || b | 

Example. Calculate the angles between vectors a and b and also between b and c in
the previous example.

From the previous example we have that a . b = −6 . We next need to find | a | and
| b |:

- 49 -
PEME 2000: Semester 1 Notes

| a |= 2 2 + 32 + 12 = 14 , | b |= 2 2 + 12 + 12 = 6 .

Therefore if θ1 is the angle between a and b, then

 −6 
θ1 = cos −1   = 130.9 .
o

 14 6 

To find the angle θ 2 between b and c, we know from above that b . c = 4 and

| c |= 12 + 2 2 + 4 2 = 21 ,
so
  4
θ 2 = cos −1   = 69.1 . ☺
o

 6 21 

Example. A triangle has vertices at A(1, 2, -1), B(6, 0, 2) and C(4, 5, 5). Find all
three angles A, B, C.

The triangle is shown in the diagram below.

To find angle A, we need to find the angle between the vectors


AC = (4,5,5) − (1,2,−1) = (3,3,6) and AB = (6,0,2 ) − (1,2,−1) = (5,−2,3) . Thus

AC . AB 15 − 6 + 18
cos A = = = 0.596 ,
| AC || AB | 9 + 9 + 36 25 + 4 + 9
so
A = cos −1 (0.596 ) = 53.4o .

- 50 -
CAPE 2000: Semester 1 Notes

To find B we need the angle between BC = (4,5,5) − (6,0,2 ) = (− 2,5,3) and


BA = (1,2,−1) − (6,0,2 ) = (− 5,2,−3) . Thus

BC . BA 10 + 10 − 9
cos B = = = 0.290 ⇒ B = cos −1 (0.29 ) = 73.2o .
| BC || BA | 4 + 25 + 9 25 + 4 + 9

Since the points A, B, C are all in the same plane, we can use the fact that angles in a
triangle add to 180 to find C:

C = 180 − 53.4 − 73.2 = 53.4o . ☺

The Vector Product

The vector product (or cross product as it is also known) of two vectors
a = a1 i + a2 j + a3 k and b = b1 i + b2 j + b3 k is written as

a×b
and defined in terms of the determinant

i j k
a × b = a1 a2 a3 = (a2b3 − a3b2 ) i + (a3b1 − a1b3 ) j + (a1b2 − a2b1 ) k .
b1 b2 b3

• The first thing to note from this definition is that a × b is a vector.


• The second thing to note is that a × b ≠ b × a , i.e. the order of vector
multiplication is important (unlike the scalar product above, where
a . b = b . a ).
i j k
• Since b × a = b1 b2 b3 , we see that this determinant is obtained from a × b
a1 a2 a3
by swapping rows 2 and 3 and so from the section on determinants above that

b × a = −a × b

It may also be shown that the vector product may be written as

a × b =| a || b |sin θ nˆ ,

where θ is the angle between a and b and n̂ is a unit vector at right angles to the plane
containing a and b, oriented such that the triple a, b, n̂ form a right-handed system.
The meaning of this last point may be demonstrated in the following manner. Align

- 51 -
PEME 2000: Semester 1 Notes

your first (index) finger of your right hand with a and the second finger with b and
extend your thumb. Your thumb will then point in the direction of n̂ :

An alternative view for the more practically minded is that n̂ will point in the
direction of a right-handed screw turned from a to b:

Example. If a = 2 i − j + 3 k and b = −3 i + 2 j − k , then find a × b .

So we have:
i j k
a × b = 2 − 1 3 = (1 − 6) i + (− 9 + 2 ) j + (4 − 3) k
− 3 2 −1

= −5 i − 7 j + k . ☺

If a triangle is formed from two sides of length a and b with an included angle θ :

b
1
then it is well known that its area is given by the formula ab sin θ . Therefore, if a
2
triangle is formed from two vectors a and b:

- 52 -
CAPE 2000: Semester 1 Notes

then it follows from the alternative definition of cross product that the area will be
1
given by | a × b |
2

Example. If a triangle has its vertices at position vectors OA , OB and OC


(corresponding to the coordinates of points A, B and C) then find an expression for its
area using the cross product. Use the resulting expression to calculate the area of the
triangle in the last example but one.

We need to form two vectors aligning with two sides with a common vertex. So
choosing sides AB and AC:

C
A

B
O

Then AB = OB − OA AC = OC − OA , so it follows that the area of the triangle


will be given by

1
2
1
( )(
| AB × AC | = OB − OA × OC − OA .
2
)
In the example above, the vertices were at A(1, 2, -1), B(6, 0, 2) and C(4, 5, 5) and
AB = (6,0,2 ) − (1,2,−1) = (5,−2,3) , AC = (4,5,5) − (1,2,−1) = (3,3,6) . So

i j k
AB × AC = 5 − 2 3 = (− 12 − 9) i + (9 − 30) j + (15 + 6) k
3 3 6
= −21 i − 21 j + 21 k .

- 53 -
PEME 2000: Semester 1 Notes

1
Therefore the area is 212 + 212 + 212 = 18.19 sq. units. ☺
2

Example. If a = a1 i + a2 j + a3 k , b = b1 i + b2 j + b3 k and c = c1 i + c2 j + c3 k show


a1 a2 a3
that a . (b × c ) = b1 b2 b3 .
c1 c2 c3

i j k
We know that b × c = b1 b2 b3 = (b2 c3 − b3c2 ) i − (b1c3 − b3c1 ) j + (b1c2 − b2 c1 )k ,
c1 c2 c3
therefore the scalar product is:

a . (b × c ) = a1 (b2 c3 − b3c2 ) + a2 (b3c1 − b1c3 ) + a3 (b1c2 − b2 c1 ) .

Now if we look at the determinant:

a1 a2 a3
b1 b2 b3 = a1 (b2 c3 − b3c2 ) − a2 (b1c3 − b3c1 ) + a3 (b1c2 − b2 c1 )
c1 c2 c3
= a1 (b2 c3 − b3c2 ) + a2 (b3c1 − b1c3 ) + a3 (b1c2 − b2 c1 )

which is the same as the scalar product highlighted above. ☺

Example. Show that u . ( u × v ) = 0 for any vectors u and v.

We shall consider two proofs of this. The first is obtained from the basic properties of
scalar and cross product:

Since u × v is perpendicular to both u and v (from the right-hand rule above) it


follows that the scalar product of u with u × v will be zero (since the scalar product of
two orthogonal vectors is 0). Easy!

The second proof uses the determinant definition of the cross product:

If u = u1 i + u2 j + u3 k and v = v1 i + v2 j + v3 k then we know that

i j k
u × v = u1 u2 u3 .
v1 v2 v3

- 54 -
CAPE 2000: Semester 1 Notes

Therefore

u1 u2 u3
u . ( u × v ) = u1 u2 u3
v1 v2 v3

and we know from the properties of determinants that if two rows (or columns) of a
determinant are identical then the determinant is zero. ☺

- 55 -
PEME 2000: Semester 1 Notes

Problems 3. Matrices, Determinants and Vectors

1. Use the matrix inverse method to solve the equations 2 x − 3 y = 3 , x + 2 y = −1 .

2. Show that the equations ax + 3 y = −1 , 2 x + ay = 3 have solutions as long as a is


not 6 or − 6 . Use the matrix inverse method to find the solutions when they
exist.

a 1 2
3. For what values of a is the determinant − 1 3 1 equal to 0?
0 −a 3

4. Recall that an upper triangular matrix has zeros everywhere below the main
diagonal. Show that the determinant of any upper triangular matrix is equal to the
product of the elements on the main diagonal.

 a11 a12 a13 


 
5. Let A =  0 a22 a23  be an upper triangular matrix such that the elements on
 0 0 a33 

 x1 
 
the main diagonal are non-zero and let x =  x2  .
x 
 3
1
 
(a) Solve the equations A x =  0  by starting at the equation for x3 and working
 0
 
backwards towards the equation for x1 . (So: the equation for x3 is
a33 x3 = 0 ⇒ x3 = 0 , The equation for x2 is a22 x2 + a23 x3 = 0 and we know that
x3 = 0 , so x2 = 0 , etc.)
 0  0
   
(b) Use the same method as in (a) to solve the equations A x =  1  and A x =  0  .
 0 1
   
(c) Use the results from (a) and (b) to deduce the inverse matrix A −1 .

6. Are any of the following vectors orthogonal? a = 2 i − j + 4 k , b = 3i − 2 j + −2 k ,


c = 4i + j + 5 k .

7. A triangle has vertices at A(1, 0, -2), B(2, 2, 3) and C(0, -1, 5).

(i) What are the lengths of the sides of the triangle?


(ii) What is the area of the triangle?
(iii) Use the scalar product method to find the angle at A.
- 56 -
CAPE 2000: Semester 1 Notes

8. Find a vector orthogonal to both the vectors u = i − j + 3 k , v = −2 i − 3 j + k .

9. (Quite tough but have a go!) A UFO is detected at co-ordinates (d , 0, h ) moving at


a constant velocity in a straight line parallel with the x-axis in the direction of − i . At
the same instant a jet is scrambled from an air force base at co-ordinates (0, c, 0) . The
speed of the jet is less than the speed of the UFO.

(a) If the jet also moves with constant velocity in a straight line starting at (0, c, 0) ,
( )( )
show that if d 2 < λ2 − 1 c 2 + h 2 , where λ > 1 is the ratio of the UFO’s speed to the
jet’s speed, then the jet cannot intercept the UFO. (Hint: in a fixed time interval, the
UFO will travel λ times the distance travelled by the jet.)
( )( )
(b) If d 2 ≥ λ2 − 1 c 2 + h 2 and taking north in the direction j, what bearing (i.e. the
angle from north) must the jet take to intercept the UFO at the earliest opportunity?

- 57 -
PEME 2000: Semester 1 Notes

§4. Lines, Curves and Planes

4.1 Lines and Curves

Line Segments

Consider two points P1 and P2 located with position vectors r1 and r2 relative to an
origin O. The line segment between P1 and P2 may be thought of as a collection of
points on the line joining P1 and P2 together, each with its own position vector. It may
also be thought of as the path described by an object moving in a straight line between
points P1 and P2. The position vector r of a general point on the line may be written
as

r = (1 − t )r1 + t r2 , (1)

where t is a parameter that varies


P1 0<t<1 P2
between 0 and 1. Note the following:
t=0 t=1
 When t = 0, r = r1 and the
object is at P1.
 When t = 1, r = r2 the object r
is at P2. r1 r2
 As t increases from 0 to 1 the
object moves along the line
joining P1 to P2, moving from
P1 towards P2.

Origin, O

Because t is a parameter that varies with position along the line segment we say that
eqn. (1) gives the equation of the line segment between P1 and P2 in parametric
form.

In component form, if r1 = ( x1 , y1 , z1 ) , r2 = ( x2 , y2 , z 2 ) , r = ( x, y, z ) , then eqn. (1) is

x = (1 − t ) x1 + t x2 ,
y = (1 − t ) y1 + t y 2 ,
z = (1 − t ) z1 + t z 2

and we can equally well think of the line segment as being specified by defining three
functions of t for x, y and z, for 0 ≤ t ≤ 1 .

Example. Write down the parametric equation of the line segment joining (1, -1, 2) to
(3, 2, -1).

- 58 -
CAPE 2000: Semester 1 Notes

So here we have r1 = (1,−1,2) , r2 = (3,2,−1) and so the line segment is defined by

r = (1 − t )(1,−1,2) + t (3,2,−1)
= (1 − t + 3t )i + (t − 1 + 2t )j + (2 − 2t − t )k
= (1 + 2t )i + (3t − 1)j + (2 − 3t )k

for 0 ≤ t ≤ 1 . In component form:

x = 1 + 2t , y = 3t − 1, z = 2 − 3t , 0 ≤ t ≤ 1 . ☺

More generally, if the particle has position vector r1 when t = t1 and has position
vector r2 when t = t 2 , then we may represent its path along the line segment joining
the two points as:

 t −t   t − t1 
r =  2 r1 +  r2 .
t −
 2 1t t −
 2 1 t

Example. When t = 0 a particle is at the origin. When t = 1 it is at (1, 1, 1). When t is


2 it is at (2, 3, 4). Assuming that it travels along line segments, define the particle's
path as a function of t.

The first line segment is between r1 = (0,0,0) and r2 = (1,1,1) so for 0 ≤ t ≤ 1 we have

 1− t  t −0
r= (0,0,0 ) +  (1,1,1) = t i + t j + t k .
1− 0  1− 0 

When 1 ≤ t ≤ 2 :

2−t   t −1 
r= (1,1,1) +  (2,3,4 ) = (2 − t + 2t − 2 )i + (2 − t + 3t − 3)j + (2 − t + 4t − 4 )k
 2 −1  2 −1
= t i + (2t − 1)j + (3t − 2 )k

So, the path is described by the position vector

t i + t j + t k , 0 ≤ t ≤ 1,
r= ☺
t i + (2t − 1)j + (3t − 2 )k , 1 ≤ t ≤ 2.

- 59 -
PEME 2000: Semester 1 Notes

Curves

This idea can be generalised to define a curve. In general, a curve may be represented
in terms of three functions of a parameter t:

x = f1 (t ), y = f 2 (t ), z = f 3 (t ) .

Example. The functions

x = cos t , y = sin t , z = 0, 0 < t < π / 2 ,

define a quarter of a circle in the x-y plane described anti-clockwise starting on the x-
axis at (1, 0, 0) and ending on the y-axis at (0, 1, 0).

y
t=π/2
1

t=0 x
0 1

Example. The functions:

x = sin t , y = cos t , z = t , t > 0,

define a spiral that loops clockwise around the z-axis as t increases:

- 60 -
CAPE 2000: Semester 1 Notes

Z-axis

12

10
t = 2π
8
t = 3π / 2
6

4
t=0
2

0 t=π
-1.0
t=π/2 1.0
0.5
-0.5
0.0
0.0
is
XA
xis 0.5 -0.5 Ax
Y
1.0 -1.0

Example. The functions x = e −t , y = 2 cos 3t , z = 2 sin 3t , t > 0, define an ever-


shortening spiral that loops anti-clockwise around the x-axis heading for the origin:

0
z

x-axis
-1

-2 2
0.0
0.2 1
0.4 0
y
x 0.6 -1
0.8
1.0 -2

- 61 -
PEME 2000: Semester 1 Notes

If the parameter t corresponds to time then the vector r = ( f1 (t ), f 2 (t ), f 3 (t )) defines


the position of an object and its velocity will be given by the time derivative

dr
v=
dt
and its acceleration by
dv d 2 r
a= = .
dt dt 2

So for the spiral example above where x = sin t , y = cos t , z = t , if t is time then we
have:

r = sin t i + cos t j + t k (position)

dr
= cos t i − sin t j + k (velocity)
dt

d 2r
= − sin t i − cos t j (acceleration)
dt 2

Note that velocity and acceleration are also vectors! Note also that, in line with ideas
from physics about motion in a circle, the acceleration vector (corresponding to the
centripetal acceleration of the object) points inwards towards the centre of the loop.

Length of a Curve

Suppose that we have a curve defined by |r(t+∆t) – r(t)|


r = ( f1 (t ), f 2 (t ), f 3 (t )) , a ≤ t ≤ b , then how far does an
object travel if it moves along the curve from the start at t
= a to the finish at t = b? Suppose that at some time t the
object is at location r(t) and a short time ∆t elapses when
the object moves to position r(t + ∆t) as shown in the
r(t) r(t+∆t)
diagram on the right.

The distance moved by the object ds during the time


period t to t + ∆t will then be given by the magnitude of
the vector r (t + ∆t ) − r (t ) , i.e.

ds =| r (t + ∆t ) − r (t ) | Origin, O

Now if we expand r (t + ∆t ) as a power series, we get

dr dr
r (t + ∆t ) = r (t ) + ∆t
dt
( )
+ O ∆t 2 ⇒ r (t + ∆t ) − r (t ) = ∆t
dt
( )
+ O ∆t 2

- 62 -
CAPE 2000: Semester 1 Notes

dr
and so in the limit as ∆t → 0 , ds = dt , implying that the total length s moved by
dt
the object over the entire time interval a ≤ t ≤ b will be given by the integral

b
dr
s=∫ dt . (2)
a
dt

In terms of the parametric description x = f1 (t ), y = f 2 (t ), z = f 3 (t ) , this expression


becomes

b 2 2 2
 df1   df 2   df 3 
s=∫   +  +  dt .
a  dt   dt   dt 

Note that this expression implies, for the simple curve y = f ( x ) in the x-y plane, the
length of the curve between x = a and x = b will be given by

b 2
 df 
s=∫ 1 +   dx .
a  dx 

Application: Cyclone Dryer

A particle enters a cylindrical cyclone dryer of length l and radius a. It moves through
the drier with constant axial speed U and constant rotational speed ω radians/s.
Assuming that its path through the dryer is a spiral, let us find expressions for:

(a) The residence time of the particle in the dryer.

(b) The total distance covered by the particle on its journey through the dryer.

We must first formulate an expression for the curve representing the path of the
particle as it moves through the dryer. Let us take the axial direction as z. Then let z
= 0 be the entrance to the dryer and z = l the exit (since it is of length l) and let the x, y
axes be in the plane of the disc at the opening:

- 63 -
PEME 2000: Semester 1 Notes

z=0 z-axis z=l


y

us a
radi
x

We have already met an example of a spiral path in an example above, so we shall use
this as our motivation here.

Since the axial speed U of the particle is constant, its location along the z-axis will be
given by

z = Ut .

Also, since it is moving in a spiral, its motion in the x-y plane will be circular with
radius a (corresponding to the radius of the dryer). The rotational speed of the particle
is ω radians/s, which means that in time t the particle will have travelled an angular
distance ωt around the circle, implying that x, y will be of the form

x = a cos ω t , y = a sin ω t .

Thus, the particle's location on its journey through the dryer will be given by the
position vector

r (t ) = a cos(ωt )i + a sin (ωt )j + Ut k .

The particle will reach the end of the dryer when z = l, i.e. when

l
Ut = l ⇒ t = .
U

This is therefore how long the particle spends in the dryer (its residence time) and is
the answer to (a).

To calculate the total distance moved by the particle, we use eqn (2). In order to do
this, we must find dr / dt . Using the expression above for r(t):

dr
= − aω sin (ωt )i + aω cos(ωt )j + U k
dt

and so

- 64 -
CAPE 2000: Semester 1 Notes

dr
= a 2ω 2 sin 2 (ωt ) + a 2ω 2 cos 2 (ωt ) + U 2

dt
[
= a 2ω 2 sin 2 (ωt ) + cos 2 (ωt ) + U ] 2

Now since sin 2 θ + cos 2 θ = 1 , we have that

dr
= a 2ω 2 + U 2
,
dt

which is a constant! Therefore the distance travelled by the particle, using eqn. (2), is

l /U
dr l
∫ a 2ω 2 + U 2
s= dt =
0
dt U
1/ 2
 a 2ω 2 
= l 1 +  .
 U 2 

Thus if we write λ = aω / U , corresponding to the rotational speed divided by the


axial speed, the distance moved by the particle may be written as

s
l
(
= 1 + λ2 )
1/ 2
.

and a graph of this relationship is shown below:

4
s/l

0
0 2 4 6 8
λ = a ω /U

Note that the relationship becomes linear as aω / U gets large, i.e. as the rotational
speed becomes much greater than the axial speed. This is expected, since as λ → ∞ ,
1 + λ2 ~ λ2 and consequently s / l becomes proportional to λ:

s
l
( )
~ λ2
1/ 2
= λ.

- 65 -
PEME 2000: Semester 1 Notes

4.2 Planes
Planes

Introduction

We begin this section with three observations that should become obvious presently:

1. Given any two non-parallel vectors u and v, any point in the same plane as u
and v has a position vector that can be written as a linear combination of u and
v.
2. Any three points that are not on the same straight line lie in the same plane
(this one really is obvious!).
3. A plane has a unit normal vector that is unique.

Observation 1. Consider any two non-parallel vectors u and v. The two vectors
clearly lie in the same plane.

λu Q
µv

r
v

In the diagram above, the position vector of the point Q, in the same plane as u and v,
may be found by taking some scalar multiple of u (λu) and adding to it some other
multiple of v (µv) so that r = λ u + µ v .

Observations 2 and 3. Now suppose that we have a plane P. Let us choose any three
points in the plane not on the same line with position vectors r0 , r1 and r2 . Then the
vectors u = r1 − r0 and v = r2 − r0 will lie in the plane. See the figure below for
illustration.

- 66 -
CAPE 2000: Semester 1 Notes

Furthermore, the vector n = u × v will be at right-angles (or orthogonal) to the plane


(since the cross product of two vectors produces a vector that is orthogonal to both).
The vector n is said to be a normal to the plane and it is important because its
direction defines the orientation of the plane:

So for a given plane, the direction of its normal vector will be fixed:

- 67 -
PEME 2000: Semester 1 Notes

This in turn implies that if we fix the magnitude of the normal, say by making it a unit
vector, then this will be a unique feature of the plane. In other words a plane will have
a unique unit normal nˆ = n / | n | .

- 68 -
CAPE 2000: Semester 1 Notes

Parametric Equations of a Plane

Observation 2 above allows us to describe a plane parametrically. To see this let r0


be the position vector of a point in the plane and let u, v be any two non-parallel
vectors in the plane. Then any vector of the form

r = r0 + λ u + µ v , (*)

where λ and µ are scalars gives the position vector of a point in the plane. This is the
parametric form of the equation of a plane and the whole plane would be described by
taking − ∞ < λ < ∞ , − ∞ < µ < ∞ . If we wanted to define only a part of the plane,
then the ranges of λ and µ would be restricted.

In component form eqn. (*) is:

x = x0 + λ u1 + µ v1 ,
y = y0 + λ u 2 + µ v2 ,
z = z0 + λ u3 + µ v3 .

Example. Find the parametric equation for the shaded region R shown in the diagram
below.

- 69 -
PEME 2000: Semester 1 Notes

A way of confirming this would be to plot points in R according to the equations


x = 1 + 2λ + µ , y = 1 + λ + 2 µ for 0 ≤ λ ≤ 1 , 0 ≤ µ ≤ 1 using something like MS-
Excel:

Cartesian Equation of a Plane

The Cartesian equation of a plane has the form

ax + by + cz = d , (**)

where a,b,c,d are all constants. Let us define the vector n = ai + bj + ck . Then if
r = ( x, y, z ) is the position vector of a general point in the plane, then an equivalent
way of writing (**) is:

r .n = d .

Now, it transpires that the vector n is a normal to the plane, as can be seen from the
following argument: Take two points in the plane with locations r1 = ( x1 , y1 , z1 ) and
r2 = ( x2 , y2 , z 2 ) . Then both of the following must be true (since both points are in the
plane):

r1 .n = d and r2 .n = d .

Subtracting these expressions gives

r2 .n − r1.n = 0 ⇒ (r2 − r1 ).n = 0 .

In other words n is orthogonal to the vector r2 − r1 . However, in a similar vein to last


section, r2 − r1 lies within the plane, implying that n must be at right angles to the
plane and so completing the proof. The diagram below may help elucidate this
argument.

- 70 -
CAPE 2000: Semester 1 Notes

Proof that n is normal to the plane:


n = (a, b, c)

ax + by + cz = d

r2 – r1

r1 = x1i + y1 j + z1k
r2 = x2i + y2 j + z 2k n.(r2 − r1 ) = 0

So n is normal to the plane


0

Example. Find the Cartesian equation of the plane with normal vector n = 2i + 3j +
6k, which contains the point (1, 5, 3).

From above, we know that since n = 2i + 3j + 6k is normal to the plane, the


coefficients a, b, c in the equation of the plane ax + by + cz = d must have the values

a = 2 , b = 3, c = 6

and it only remains to find the value of d. Since the plane contains the point (1, 5, 3)
we can find d by setting x = 1, y = 5, z = 3 in the equation ax + by + cz = d :

2 × 1 + 3 × 5 + 6 × 3 = d , i.e. d = 35.

So the equation of the plane is 2 x + 3 y + 6 z = 35 . ☺

Cartesian Equation of a Plane Given Three Non-Collinear Points

Suppose that we have 3 points with position vectors r0 , r1 , r2 , such that the points are
not all in the same straight line (non-collinear). Then these points are all in the same
unique plane, but how do we find the Cartesian equation?

The parametric form is easy since if we write u = r1 − r0 and v = r2 − r0 , then u and v


will be in the plane and r0 will be a point of the plane and we can therefore use eqn.
(*) above.

However, if we take

n = u× v ,

- 71 -
PEME 2000: Semester 1 Notes

then this will be a vector normal to the plane and so the Cartesian equation will be
r. n = d , where r = ( x , y , z ) and d may be found from the fact that r0 is in the plane,
i.e. d = r0 . n . Hence the Cartesian equation will be

r .[(r1 − r0 ) × (r2 − r0 )] = r0 .[(r1 − r0 ) × (r2 − r0 )] ,

or more simply

(r − r0 ).[(r1 − r0 ) × (r2 − r0 )] = 0 .
Note that this last equation may be written as a determinant:

x − x0 y − y0 z − z0
x1 − x0 y1 − y0 z1 − z0 = 0 .
x 2 − x0 y 2 − y0 z 2 − z0

Example. Find the equation of the plane containing the points r0 = (1, 1, 1), r1 = (0, -
1, 0) and r2 = (-2, 0, 3).

Let u = r1 − r0 = (− 1,−2,−1) and v = r2 − r0 = (− 3,−1,2 ) . Then u and v are in the plane


and so n = u × v will be normal to the plane. So

i j k
u × v = − 1 − 2 − 1 = (− 4 − 1)i − (− 2 − 3)j + (1 − 6)k = −5i + 5 j − 5k .
− 3 −1 2

So the equation is of the form − 5 x + 5 y − 5 z = const , or equivalently, dividing by 5:

−x+ y−z=d .

Now to find d just choose any of the 3 given points, say r1 = (1, 1, 1):

d = −1 + 1 − 1 = −1

and so the required equation is − x + y − z = −1 , or x − y + z = 1 if you prefer. ☺

Note that we could also get this result directly from the determinant:

- 72 -
CAPE 2000: Semester 1 Notes

x −1 y −1 z −1 x −1 y −1 z −1
0 −1 −1 −1 0 −1 = −1 −2 −1 = 0
− 2 −1 0 −1 3 −1 −3 −1 2

⇒ ( x − 1)(− 4 − 1) − ( y − 1)(− 2 − 3) + ( z − 1)(1 − 6 ) = 0


⇒ −5( x − 1) + 5( y − 1) − 5( z − 1) = 0
⇒ ( x − 1) − ( y − 1) + ( z − 1) = 0

i.e. x − y + z = 1 as above.

- 73 -
PEME 2000: Semester 1 Notes

Problems 4. Lines Curves and Planes

1. (a) Find a parametric equation for the line segment joining points P(-1, 2, -3) and
Q(2,7,3).

(b) Find a parametric equation for the line segments joining (0, 0) to (1, 3) to (4, -2).

2. An object moves on the trajectory x = t 2 − 4t + 5 , y = 2t (do not worry about units).

(i) Plot the trajectory for 0 ≤ t ≤ 5 .


(ii) What is the velocity and acceleration of the object?

3. Using MS-Excel, or something similar,

(a) Plot the curve described parametrically by x = 5 cos t , y = 3 sin t , 0 ≤ t ≤ 2π . What


sort of curve is it?
( )
(b) Plot the curve x = 1 + sin θ 2 , y = cos 3 (3θ ), 0 ≤ θ ≤ 8π .

4. What mathematical criteria tells you whether 3 points with positions


(xi , yi , zi ), i = 1,2,3 are in the same straight line or not?
5. Plot the path of point P on the circumference of a disk of radius 1 as the disk rolls
in a straight line on a horizontal surface: (See figure below).

P
x
Starts at (0, 0)

6. Find the length of the curve y = cosh x between the points x = 0 and x = a .

7. Find a vector orthogonal to the vectors a = 2i − j + 3k and b = −i + 2 j − 2k .

8. (a) Find the Cartesian equation of the plane with normal i − 2 j + 3k containing the
point (-1, 3, -2).

(b) Consider the three points (2,-1,1), (3,2,-1) and (-1,3,2).

(i) Find the parametric equations for the plane containing the points.
- 74 -
CAPE 2000: Semester 1 Notes

(ii) Find the Cartesian equation of the plane.

(9) Consider the three points (a, 0, 0), (0, b, 0) and (0, 0, c). Find the Cartesian
equation of the plane containing the points.

(10) What is the shortest distance from the point (1, 2, 3) to the plane 2 x − y + z = 0 ?

- 75 -
PEME 2000: Semester 1 Notes

§5. Grad and Div

In the early part of the 19th century the work of two great scientists, Claude-Louis
Navier and George Gabriel Stokes laid the foundations of fluid mechanics. The vector
equation that bears their names today, the Navier-Stokes equation, expresses
Newton's second law (F = ma) in mathematical terms for a viscous fluid. In deriving
this equation and some of the accompanying concepts (such as conservation of mass
and energy) it was necessary to develop new mathematical tools and these tools are
the subject of the rest of the course. We shall commence our study with differential
operators (grad, div and curl), but before we do this it is necessary to understand some
basic geometric concepts of surfaces.

5.1 Surfaces

As we have seen for planes (the simplest example of a surface) there are two ways of
representing a surface: the parametric representation and the Cartesian representation.
In general, a parametric representation of a surface would be something of the form

r = f1 (λ , µ )i + f 2 (λ , µ ) j + f1 (λ , µ )k ,

or in component form

x = f1 (λ , µ ), y = f 2 (λ , µ ), z = f 3 (λ , µ ) .

Here λ, µ are parameters and f j , j = 1,2,3 are functions. For the case of a plane the
functions f j are of linear form aλ + bµ + c .

Alternatively, a Cartesian representation can be used and anything of the form

z = F ( x, y ) , or more generally F ( x, y, z ) = constant ,

represents a surface. For example, a plane would have F ( x, y, z ) = ax + by + cz .

- 76 -
CAPE 2000: Semester 1 Notes

Common Surfaces

Some examples of common surfaces, and their mathematical representations are


shown below.

1. Infinite plane

Parametric representation:

x = x0 + λ u1 + µ v1 , y = y0 + λ u 2 + µ v2 , z = z0 + λ u3 + µ v3 ,
− ∞ < λ < ∞, − ∞ < µ < ∞ .

Cartesian representation:

ax + by + cz = d .

2. Finite circular cylinder

A cylinder radius a with axis along the z-axis between z = 0 and z = l :

Parametric representation:

x = a cosθ , y = a sin θ , z = λ , 0 ≤ θ ≤ 2π , 0 ≤ λ ≤ l .

Cartesian representation:

x2 + y 2 = a2 , 0 ≤ z ≤ l .

3. Sphere, centre (x0, y0, z0), radius a

Parametric representation:

x = x0 + a sin ϕ cos θ , y = y0 + a sin ϕ sin θ , z = z 0 + a cos ϕ ,


0 ≤ ϕ ≤ π , 0 ≤ θ ≤ 2π .
Cartesian representation:

(x − x0 )2 + ( y − y0 )2 + (z − z0 )2 = a 2 .

- 77 -
PEME 2000: Semester 1 Notes

4. Ellipsoid centre (x0, y0, z0), axes a, b, c:

Parametric representation:

x = x0 + a sin ϕ cos θ , y = y0 + b sin ϕ sin θ , z = z 0 + c cos ϕ ,


0 ≤ ϕ ≤ π , 0 ≤ θ ≤ 2π .

Cartesian representation:

2 2 2
 x − x0   y − y 0   z − z 0 
  +  +  = 1.
 a   b   c 

5.2 Normal to a Surface,


Surface, the Tangent Plane and Grad

Suppose that we have a surface defined by


the equation F ( x, y, z ) = constant (or
F (r ) = constant , where r = ( x, y, z ) is the
general position vector). At any location
r = ( x, y, z ) on the surface, it is possible to
define a normal vector that gives the local
orientation of the surface, i.e. the
orientation of a small element of the
surface. This may be seen in the figure
opposite, where a surface has been divided
up into a number of small elements, with
normal vectors shown by black arrows.

IMPORTANT POINT #1. In the neighbourhood of a given point r0 = ( x0 , y0 , z 0 ) ,


the surface will resemble a plane (as suggested in the figure above) and we may see
this by expanding the function F (r ) = constant at the point r0 using a generalisation
of the Maclaurin series to obtain:

∂F
F (r0 + dr ) = F (r0 ) + (r0 )dx + ∂F (r0 )dy + ∂F (r0 )dz + ... ,
∂x ∂y ∂z

where ∂F / ∂x is the partial derivative of F with respect to x etc and dr = (dx, dy, dz ) .
It is customary to use a more compact notation for partial derivatives and we shall do
so here, denoting derivatives with subscripts:

∂F ∂F ∂F
= Fx , = Fy , = Fz .
∂x ∂y ∂z

- 78 -
CAPE 2000: Semester 1 Notes

Using this notation and returning to the expansion above, we see that we can write it
using a scalar product of the vectors Fx (r0 )i + Fy (r0 )j + Fz (r0 ) k and dr :

F (r0 + dr ) = F (r0 ) + (Fx (r0 )i + Fy (r0 )j + Fz (r0 )k ). dr + ... .

Now let dr = r − r0 , i.e. (x − x0 )i + ( y − y0 ) j + (z − z0 )k , where x, y and z are


considered small. If we write a = Fx (r0 ), b = Fy (r0 ), c = Fz (r0 ) , then the second term
in the expansion above is:

(F (r )i + F (r )j + F (r )k ).dr = a(x − x ) + b( y − y ) + c(z − z )


x 0 y 0 z 0 0 0 0

and since we know that the function ax + by + cz represents a plane, it follows that the
function F looks like a plane in a small neighbourhood about a given point r0 .

IMPORTANT POINT #2. However, this is not the end of the story because if we
write n = a i + b j + c k , we also know that n is a normal vector to the plane and so it
follows that the vector

n = Fx (r0 )i + Fy (r0 )j + Fz (r0 )k

is a normal vector to the surface F (r ) = const at the point r0 .

Grad

The vector formed of partial derivatives of F, i.e. Fx i + Fy j + Fz k , turns out to be


extraordinarily important and is the first of a family of differential operators that we
shall study. This operator is called the gradient or grad for short and is denoted by ∇ .
Thus we write

∂ ∂ ∂
∇= i + j+ k
∂x ∂y ∂z

and the result of applying ∇ to a scalar function F is the vector

∂F ∂F ∂F
∇F = i+ j+ k.
∂x ∂y ∂z

Example. If F ( x, y , z ) = 3 x 2 y + 2 z 3 x + y , find ∇F .

In order to find ∇F , we must first find the x, y, z partial derivatives of F:

Fx = 6 xy + 2 z 3 , Fy = 3 x 2 + 1 , Fz = 6 z 2 x .

- 79 -
PEME 2000: Semester 1 Notes

( ) ( )
Then ∇F = 6 xy + 2 z 3 i + 3 x 2 + 1 j + 6 xz 2 k . ☺

Tangent Plane

The plane containing the point r0 = ( x0 , y0 , z 0 )


with equation

a ( x − x0 ) + b ( y − y 0 ) + c ( z − z 0 ) = 0 ,

where (a, b, c ) = ∇F (r0 ) is called the tangent


plane to the surface F (r ) = const at location r0
because it is tangential to the surface. The tangent
plane is illustrated in the figure opposite. Note
that the equation of the tangent plane may also be written as

∇F (r0 ). (r − r0 ) = 0 .

The tangent plane is an extension to 3D of the simpler tangent to a curve y = f ( x ) . If


you recall, at point x0 , the gradient (no coincidence in the name) of the curve
y = f ( x ) at x = x0 is m = f ' ( x0 ) and the equation of the tangent is of the form
y − y 0 − m( x − x0 ) = 0 , where y0 = f ( x0 ) .

Example. Find the equation of the tangent plane to the spherical surface
1 1 1 
x 2 + y 2 + z 2 = 1 at the point r0 =  , , .
2 2 2

Here we have F ( x, y, z ) = x 2 + y 2 + z 2 and so

∇F = 2 x i + 2 y j + 2 z k .

1 1 1 
At the point r0 =  , ,  , ∇F = i + j + 2 k , so the equation of the tangent plane
2 2 2
is

1 1  1 
x− + y − + 2 z −  = 0 , or x + y + 2 z = 2 . ☺
2 2  2

- 80 -
CAPE 2000: Semester 1 Notes

Example. Show that a unit normal to the curve y = x 2 at the point x is

2x 1
nˆ = − i+ j.
1 + 4x2 1 + 4x2

The curve y = x 2 may be thought


of as the surface
F ( x, y ) = y − x = 0 .
2
So the
normal at the general point x is in
the direction of

∇ F = −2 x i + j .

This vector has modulus 4 x 2 + 1 ,


so a unit normal is found by
dividing ∇F by 4 x 2 + 1 , giving
the required result. ☺

The figure opposite illustrates the


result by showing normals to the
curve at x = 0.4, 1, 1.4 and 2.0.

- 81 -
PEME 2000: Semester 1 Notes

To summarise:

1. The differential operator grad is written as

∂ ∂ ∂
∇= i + j+ k
∂x ∂y ∂z

and it acts on a scalar function to give a vector function.

2. The normal to the surface F (r ) = constant is given by the vector

∂F ∂F ∂F
∇F = i+ j+ k
∂x ∂y ∂z

3. Locally, in the neighbourhood of the point r0 , F may be expanded as the Maclaurin


series
F (r0 + dr ) = F (r0 ) + ∇F (r0 ).dr + ...

and the surface in this neighbourhood looks like a plane.

4. The tangent plane to the surface F (r ) = constant at the point r0 is a plane that is
tangential to the surface at r0 and has equation

∇F (r0 ). (r − r0 ) = 0

where r = ( x, y, z ) .

- 82 -
CAPE 2000: Semester 1 Notes

5.3 The
The Directional Derivative

Slope Varies with Direction!

The slope of a surface is not


constant- a fact well known to
you if you have ever had a pair
of skis strapped to your feet and
found yourself hurtling down a
mountain in various directions at
rather improbable speeds.

In fact, as the picture opposite


illustrates, the magnitude of the
slope of a surface depends on
both location and direction.

Therefore, in order to find the


magnitude of the slope of a surface at a given location, you must also specify the
direction, so that you can calculate the slope in that specific direction.

10 seconds after the previous photo was


taken:

This is where the directional derivative comes in. The directional derivative is the
slope of a surface at a given point in a given direction. So, given the surface
F (r ) = constant , the slope of the surface at the point r0 in the direction of the unit
vector ŝ is denoted by Ds (r0 ) and given by

Ds (r0 ) = ∇F (r0 ). sˆ ,

i.e. the scalar product of the direction ŝ with the gradient of F evaluated at the point
r0 . Note that the directional derivative as specified above is also denoted in some
texts as ∂F (r0 ) / ∂s . Note also that if the direction s is not given as a unit vector, then
we must first convert it to a unit vector or equivalently use

∇F (r0 ). s
Ds (r0 ) =
|s|

- 83 -
PEME 2000: Semester 1 Notes

Example. The T ( x, y ) at location r = (x, y ) is given by


temperature
T ( x, y ) = 500 − x − 2 y + xy . The surfaces T = const are isotherms (curves in 2
2 2

dimensions) and may be visualised by a contour plot, which is shown below.

400.0
4 405.0
410.0
415.0
420.0
2 425.0
430.0
435.0
440.0
445.0
0 450.0
y

455.0
460.0
465.0
-2 470.0
475.0
480.0
485.0
490.0
-4 495.0
500.0

-4 -2 0 2 4
x

Calculate the directional derivatives DsT (1,1) in the directions (i) s = i ,i.e. along the
x-axis, (ii) s = j , i.e. along the y-axis and (iii) s = i + j .

So here ∇T ( x, y ) = (− 2 x + y )i + (− 4 y + x )j and at the point (1,1) we have


∇T (1,1) = − i − 3j .

(i) When s = i , this is already a unit vector, so DsT (1,1) = (− i − 3j).i = −1


(ii) When s = j , this is already a unit vector, so DsT (1,1) = (− i − 3 j).j = −3
∇F (r0 ). s
(iii) When s = i + j we need to use the alternative formula Ds (r0 ) = , giving
|s|
DsT (1,1) = (− i − 3j)(
. i + j) / 2 = −4 / 2 = −2 2 . ☺

- 84 -
CAPE 2000: Semester 1 Notes

Directions of Maximum and Minimum Slope

Now, given the definition of the scalar product, we can also write the directional
derivative as

Ds (r0 ) =| ∇F (r0 ) | cosθ ,

where θ is the angle between ∇F (r0 ) and the given direction ŝ . We immediately see
from this form of the directional derivative that Ds (r0 ) varies between + | ∇F (r0 ) |
(when θ = 0 , cosθ = 1 ) and − | ∇F (r0 ) | (when θ = π , cosθ = −1 ) .

Consequently, it follows that:

 The maximum rate of increase of F at r0 is + | ∇F (r0 ) | and occurs in the


direction of s = ∇F (r0 ) (θ = 0 when s and ∇F (r0 ) are in the same direction).

 The maximum rate of decrease of F at r0 is − | ∇F (r0 ) | and occurs in the


direction of s = −∇F (r0 ) (θ = π when s and ∇F (r0 ) are in opposite
directions).

Note that as the directions of maximum change are parallel to ± ∇F (r0 ) , they will be
normal to the surfaces F = const., which will be at right-angles to the contours for a
2D example such as the temperature field considered above.

This makes sense when we look at the contours:

This figure shows the rate of change of temperature from the previous example in two
different directions. The direction l1 from A to B is in the direction of the normal to

- 85 -
PEME 2000: Semester 1 Notes

the T = 495 K contour at A and the direction l 2 from A to C is in a different


direction. Note that the temperature changes from A to B and A to C are the same: 5
K, but the distance AB is the shortest distance to the T = 490 K contour. Therefore
the rate of change of temperature (corresponding to the directional derivative) will be
greatest from A to B, since

5 5
>
| l1 | | l 2 |

Example. Find the maximum rate of change of temperature in the previous example
and also the direction of maximum changes at the points (i) (1, 1), (ii) (2, 2) and (iii) (-
2, -2)

So, from the previous example we have that ∇T ( x, y ) = (− 2 x + y )i + (− 4 y + x )j .

(i) At (1,1) ∇T (1,1) = −i − 3 j , which gives the direction of maximum rate of increase
of T. | ∇T (1,1) |=| −i − 3 j |= 10 is the maximum rate of increase. The maximum rate
of decrease will be − 10 in the direction i + 3 j .
(ii) At (2,2) ∇T (2,2 ) = −2i − 6 j , which gives the direction of maximum rate of
increase of T. | ∇T (2,2 ) |=| −2i − 6 j |= 40 is the maximum rate of increase. The
maximum rate of decrease will be − 40 in the direction 2i + 6 j .
(iii) At (-2,-2) ∇T (− 2,−2 ) = 2i + 6 j , which gives the direction of maximum rate of
increase of T. | ∇T (− 2,−2 ) |=| 2i + 6 j |= 40 is the maximum rate of increase. The
maximum rate of decrease will be − 40 in the direction − 2i − 6 j . These results are
illustrated below.

- 86 -
CAPE 2000: Semester 1 Notes

In order to fully understand the next section, a brief dip into the world of fluid
mechanics is required.

5.4 Conservation Laws

Mass Flux of Fluid

One of the most fundamental statements in the mathematical theory of fluid motion
(fluid mechanics) is an expression for conservation of mass. In order to derive this a
new differential operator was required. Before we get to that, some physical
preliminaries are required.

Consider a fluid flowing in space. The velocity of the fluid is expressed in terms of a
vector u, which varies in space (technically, u is an example of a vector field). It is
usual to visualise u by a vector plot something like that shown below.

If the density of the fluid is ρ, then the mass flow rate of fluid per unit area, the mass
flux of fluid (with units kgs-1m-2) is the vector

& ′′ = ρ u .
m

Now consider the mass flow rate of fluid flowing through a specific area A. The area
may be thought of as a segment of a plane with normal n. The vector u may be
resolved into a component parallel with n ( u n ) and a component perpendicular to n
u|| , which of course will be parallel to the area A, so that if θ is the angle between u
and n,

u n = u cos θ , u|| = u sin θ

- 87 -
PEME 2000: Semester 1 Notes

Now it is apparent that when we consider the rate of mass flow of fluid through the
surface A, the component u|| contributes nothing, since it flows across the area and
only the component u n accounts for the mass flow through the surface. Now if we
take a unit vector n̂ normal to A we have that u n = u cos θ = u . nˆ and so the mass flow
rate through A will be

ρ u.nˆ A .

- 88 -
CAPE 2000: Semester 1 Notes

Conservation of Fluid Mass

Let us now consider the accumulation of fluid as it flows into a cube of side δ, where
δ is considered small. The fluid velocity is u = u1i + u 2 j + u3k . For the moment
consider only flow in through one face of the cube, labelled ABCD in the diagram
below and out of a corresponding face labelled A'B'C'D'.

As we have seen above, only flow normal to the face contributes to accumulation of
mass and if we take the x-axis in the direction of AA' in the figure, then the
component of u that is normal to ABCD is u1 . Thus the mass flow rate into the cube
through face ABCD will be ρu1δ 2 evaluated at x, which we denote by δ 2 ρu1 | x . The
mass flow rate out of the cube through face A'B'C'D' will then be ρu1δ 2 evaluated at
x + δ , which is denoted δ 2 ρu1 | x +δ . Therefore, the rate of accumulation of fluid in the
cube from flow in through ABCD and out through A'B'C'D' will be:

δ 2 ρu1 | x −δ 2 ρu1 | x +δ = −δ 2 [ρu1 ]xx +δ .

- 89 -
PEME 2000: Semester 1 Notes

Now as we have seen in §5.2, a function like F ( x + δ , y, z ) may be expanded as a


Maclaurin series to give ( )
F ( x, y , z ) + δ ∂F ( x, y , z ) / ∂x + O δ 2 . Hence
[ρu ]x +δ
1 x ( ) and so it follows that for small δ
= δ∂ (ρu1 ) / ∂x + O δ 2

∂ (ρu1 )
rate of accumulation of fluid from flow in x-direction ≈ −δ 3 . (+)
∂x

In order to work out the total rate of fluid accumulation, we need to take into account
flow in the y and z directions. However, the hard work has already been done because
mass accumulation from flow in the other directions will give rise to expressions
similar to (+). Thus

∂ (ρu 2 )
rate of accumulation of fluid from flow in y-direction ≈ −δ 3 , (++)
∂y

∂ (ρu3 )
rate of accumulation of fluid from flow in z-direction ≈ −δ 3 . (+++)
∂z

and combining all three expressions (+), (++), (+++) will give the total mass
accumulation rate in the cube m& :

 ∂ (ρu1 ) ∂(ρu 2 ) ∂ (ρu3 ) 


m& = −δ 3  + + .
 ∂x ∂y ∂z 

Now, if we take the dot product of the vector made up from partial derivatives
∂ ∂ ∂
i + j + k with the mass flux ρ u = ρu1i + ρu 2 j + ρu3k we will get the
∂x ∂y ∂z
expression in curly brackets above:

∂ ∂ ∂  ∂ (ρu1 ) ∂ (ρu2 ) ∂(ρu3 )


 i + j + k  . (ρu1i + ρu 2 j + ρu3k ) = + + .
 ∂x ∂y ∂z  ∂x ∂y ∂z

∂ ∂ ∂
Note that we have met i + j + k before- it is just the grad operator ∇
∂x ∂y ∂z
introduced in §5.2 above. Thus we see that we can write

∂ (ρu1 ) ∂ (ρu 2 ) ∂ (ρu3 )


∇ . ( ρu ) = + + ,
∂x ∂y ∂z

and so the total mass accumulation rate in the cube can be expressed as

m& = −δ 3∇ . (ρ u ) . (*)

- 90 -
CAPE 2000: Semester 1 Notes

Conservation of Mass for Constant Density

If the fluid density ρ is constant, this implies that it cannot be compressed or


expanded. Conservation of mass under these circumstances must therefore mean that
there can be no net inflow or outflow in other words, inflow is balanced by outflow.
This in turn implies that m& above must be zero. Since ρ and δ are constants
∇ . (ρ u ) = ρ∇ . u and so it follows that for fluid of constant density, conservation of
mass implies that

∇ .u = 0

When density is not constant we have a bit more work to do.

Conservation of Mass for Variable Density

The cube has volume δ 3 and so its mass is ρδ 3 . Therefore we also have that

∂ρ
m& = δ 3 .
∂t

∂ρ
Equating this with expression (*) gives δ 3 = −δ 3∇ . (ρ u ) and so dividing by δ 3
∂t
gives the equation for conservation of mass for variable density:

∂ρ
+ ∇ . (ρ u ) = 0 .
∂t

Note that either of the equations expressing conservation of mass above are also
referred to as "the continuity equation".

Definition of div

And so we arrive at our second differential operator called the divergence or div for
short. Given a vector-valued function v = v1 ( x, y , z )i + v2 ( x, y , z )j + v3 ( x, y , z )k , the
divergence of v is the scalar-valued function defined by

∂v1 ∂v2 ∂v3


∇.v = + + .
∂x ∂y ∂z

Since expression (*) above gives the net rate of accumulation of fluid mass, or rate of
mass inflow, we see that the divergence is related to the rate of outflow per unit
volume.

- 91 -
PEME 2000: Semester 1 Notes

Another way of looking at the meaning of divergence is:

 if the divergence is < 0, then there is net inflow implying that density
increases.

 If the divergence is >0 then there is net outflow implying that density
decreases.

 If the divergence is 0 then outflow is balanced by inflow and so density in


unchanged.

IMPORTANT POINT. Vector functions for which the divergence is 0 are called
"divergence-free" (or sometimes solenoidal) and are important in fluid mechanics
since they correspond to flows that satisfy conservation of mass.

Example. Calculate the divergence of u = 2 xy i + by 2 j . For what value of b is u


divergence-free?


So we have (2 xy ) = 2 y and ∂ by 2 = 2by , so ∇ .u = 2 y + 2by = 2 y(1 + b ) . Thus u
( )
∂x ∂y
is divergence-free if b = -1. ☺

( )
Example. Find the divergence of F = x 2 y i − z 3 − 3 x j + 4 y 2 z k .

∂ 2 ∂ 3 ∂
Here we have
∂x
( )
x y = 2 xy ,
∂y
( )
z − 3 x = 0 and
∂z
( )
4 y 2 z = 4 y 2 . Hence

∇ . F = 2 xy + 4 y 2 . ☺

Example. Find an expression for ∇.( x u ) .

Here if u = u1i + u 2 j + u3k , using the product rule:

∂ ( xu1 ) ∂ ( xu2 ) ∂ ( xu3 )


∇.( x u ) = + +
∂x ∂y ∂z
∂u1 ∂u ∂u  ∂u ∂u ∂u 
=x + u1 + x 2 + x 3 = u1 + x 1 + 2 + 3 
∂x ∂y ∂z  ∂x ∂y ∂z 
= u1 + x∇ .u = u . i + x∇ .u

Note that we could factorise this as

∇.(x u ) = (i + x∇ ).u

- 92 -
CAPE 2000: Semester 1 Notes

r
Example. The Coulomb electric field is given by E(r ) = , where r = xi + yj + zk
r3
and r =| r | . Find ∇ . E

Now I bet you are saying to yourself "I bet the answer is 0!". If you are feeling
frazzled at this point and your brain is about to explode, feel free to skip to the end.

Otherwise...

∂  x ∂  y ∂  z 
So, here we are required to compute  3 ,  3  and   . These all have
∂x  r  ∂y  r  ∂z  r 3 
∂  x
the same form, so if we find   , we will be able to find the other two.
∂x  r 3 

Using the quotient rule and a subscript to denote partial differentiation:

∂  x  r 3 − x (r 3 )x
 =
∂x  r 3  r6

∂ 3
Using the chain rule for
∂x
( )
r gives:

∂ 3 ∂r
∂x
( )
r = 3r 2
∂x

∂r
and using the chain rule again for
∂x
remembering that r =| r |= x 2 + y 2 + z 2( )
1/ 2
:

∂r 1 x
∂x 2
(
= 2 x. . x 2 + y 2 + z 2 )
−1 / 2
=
r
.

∂ 3 ∂r x
So
∂x
( )
r = 3r 2
∂x
= 3r 2 = 3 xr and thus
r

∂  x  r 3 − 3x 2r 1 3x2
 = = 3 − 5 .
∂x  r 3  r6 r r

Hence it follows that

∂  y  1 3y2 ∂  z  1 3z 2
  = − and  = − ,
∂x  r 3  r 3 r 5 ∂x  r 3  r 3 r 5

so
1 3x 2 1 3 y 2 1 3z 2 3 3 2
∇ .E =
r 3
− 5 + 3 − 5 + 3 − 5 = 3 − 5 x + y2 + z2 .
r r r r r r r
( )

- 93 -
PEME 2000: Semester 1 Notes

3 2 3
Since x 2 + y 2 + z 2 = r 2 , we have that
r 5
( r
)
x + y 2 + z 2 = 3 and so after all that
∇ .E = 0 ! ☺

Conservation of Energy and the Laplacian

As well as Fourier series, Joseph Fourier laid the foundations for conduction heat
transfer. In order to do this, an expression for conservation of energy was required.
Fourier conducted many experiments involving heat flow through common materials
and he was able to conclude that the rate of heat flow per unit area was proportional to
the temperature gradient. His experiments involved measuring temperature at two
positions along a bar of material, such as copper, and as such were one dimensional.
Fourier's law (as he formulated it initially) states that

dT
q& ′′ = − k ,
dx

where q& ′′ is the rate of heat flow per unit area (with units Js-1m-2, or more simply Wm-
2
) , also called the heat flux (analogous to mass flux ρ u considered above) , k is
thermal conductivity (in Wm-1K-1), T is temperature (in K) and x is distance. He noted
that heat flux had direction as well as magnitude and so it should be more correctly
referred to as a vector. When heat flows in 3D, the temperature gradient above is
replaced by the ∇ operator, so that more generally the heat flux vector q& ′′ is

q& ′′ = − k∇T .

We consider conservation of heat by analogy with conservation of mass, replacing


ρ u with q& ′′ and mass accumulation rate m& with heat accumulation rate q& . Thus for
a cube of material, such as copper, of side δ, where δ is small, the net rate of heat
accumulation will be

q& = −δ 3∇ .q& ′′ .

If the cube has density ρ and specific heat capacity c (both taken as constants), then
the heat accumulation rate may also be written as δ 3 ρc∂T / ∂t (from mass x (specific
heat capacity) x (temperature change) = heat applied). So it follows that conservation
of energy may be expressed as

∂T
ρc + ∇ . q& ′′ = 0 .
∂t

∂T
Using Fourier's law q& ′′ = − k∇T , this becomes ρc − ∇ . (k ∇T ) = 0 , and if k is
∂t
constant, then

- 94 -
CAPE 2000: Semester 1 Notes

∂T
= α ∇ . (∇T ) , (HDE)
∂t

k
where α = is a constant known as the thermal diffusivity and has units m2s-1.
ρc
This equation is known is the conduction equation and since it is also analogous to
diffusion of mass by Fick's law and therefore expresses a diffusion process involving
heat, is also known as the heat diffusion equation (HDE). It is of fundamental
importance in engineering because it is used to model heat transfer in many different
physical situations.

Now consider the scalar product of ∇ with itself- the ∇ . ∇ term in eqn. (HDE) above.
This is:

∂ ∂ ∂  ∂ ∂ ∂  ∂2 ∂2 ∂2
 i + j + k . i + j + k  = 2 + 2 + 2 .
 ∂x ∂y ∂z   ∂x ∂y ∂z  ∂x ∂y ∂z

Thus the HDE can also be written in a more long-winded fashion as

∂T  ∂ 2T ∂ 2T ∂ 2T 
= α  2 + 2 + 2 
∂t  ∂x ∂y ∂z 

The differential operator given by the sum of second-order derivatives above is of


such importance that it is given its own symbol ∇ 2 ("grad squared") and referred to as
"the Laplacian" in honour of that other great scientist Laplace who first discovered it:

∂2 ∂2 ∂2
∇2 = + + .
∂x 2 ∂y 2 ∂z 2

Note that the Laplacian acts on a scalar function and gives a scalar function as
the result.

Thus yet another way of writing the HDE is

∂T
= α ∇ 2T
∂t

(
Example. Find ∇ 2 2 x 3 y + z 2 xy )
So we have :

∂ ∂2
∂x
( 3 2
) 2 2

∂x
( )
2 x y + z xy = 6 x y + z y ⇒ 2 2 x 3 y + z 2 xy = 12 xy ,

- 95 -
PEME 2000: Semester 1 Notes

∂ ∂2
∂y
( ) ∂y
( )
2 x 3 y + z 2 xy = 2 x 3 + z 2 x ⇒ 2 2 x 3 y + z 2 xy = 0 ,

∂ ∂2
∂z
( ) ∂z
( )
2 x 3 y + z 2 xy = 2 zxy ⇒ 2 2 x 3 y + z 2 xy = 2 xy

and so the Laplacian is:

( )
∇ 2 2 x 3 y + z 2 xy = 12 xy + 0 + 2 xy = 14 xy . ☺

Note that steady-state solutions of the HDE satisfy the equation

∇ 2T = 0 .

This equation is important in physics and engineering and is known as Laplace's


equation, again in honour of the great man.

- 96 -
CAPE 2000: Semester 1 Notes

Summary:

1. In general terms, conservation of energy may be expressed as

∂T
ρc + ∇ . q& ′′ = 0
∂t

where q& ′′ is a vector called the heat flux.

2. Fourier's law of conduction states that q& ′′ = − k∇T and when k, ρ, c are constants,
conservation of energy may be written using the Laplacian as

∂T
= α ∇ 2T .
∂t

k
Here α= is a constant known as the thermal diffusivity and
ρc
∂2 ∂2 ∂2
∇2 = + + is the Laplacian.
∂x 2 ∂y 2 ∂z 2

∂T ∂ 2T
Example. (i) In one spatial dimension (x), for 0 ≤ x ≤ l , the HDE is =α 2 .
∂t ∂x
Express the equation in the alternative variables ξ = x / l , τ = α t / l 2 .

(ii) Show that T = e − n π τ {A cos(nπξ ) + B sin (nπξ )} is a solution of the HDE with
2 2

changed variables found from (i), where n, A, B are all constants. Note that this is not
the full solution found by Fourier, but the first step. We do not have time to explore
Fourier's complete solution of the conduction heat transfer problem here,
unfortunately.

dτ α dξ 1
So, using ξ = x / l and τ = α t / l 2 , we have that = 2 and = , so that the
dt l dx l
chain rule gives

∂ α ∂ ∂ 1 ∂ ∂ 1 ∂
= 2 and = ⇒ 2 = 2 .
∂t l ∂τ ∂x l ∂ξ ∂x l ∂ξ 2

∂T ∂ 2T
Hence in the new variables, = α 2 becomes
∂t ∂x

α ∂T α ∂ 2T ∂T ∂ 2T
= ⇒ =
l 2 ∂τ l 2 ∂ξ 2 ∂τ ∂ξ 2

and 0 ≤ x ≤ l ⇒ 0 ≤ ξ ≤ 1 .

- 97 -
PEME 2000: Semester 1 Notes

{A cos(nπξ ) + B sin (nπξ )}, then


2 2
(ii) If T = e − n π τ

∂T
= − n 2π 2 e − n π τ {A cos(nπξ ) + B sin (nπξ )},
2 2

∂τ

∂T
= e − n π τ {− nπA sin (nπξ ) + nπB cos(nπξ )} ,
2 2

∂ξ

∂ 2T
∂ξ 2
{
2 2
}
= e − n π τ − n 2π 2 A cos(nπξ ) − n 2π 2 B sin (nπξ )

∂T
= − n 2π 2 e − n π τ {A cos(nπξ ) + B sin (nπξ )} =
2 2

∂τ

as required. ☺

- 98 -
CAPE 2000: Semester 1 Notes

Problems 5. Grad and Div

1. Find the gradient of the following scalar functions:

(i) f ( x, y ) = 3 x 2 y − 2 y 2 + x (ii) g ( x, y, z ) = z 3 x + cos( xy )

(
(iii) f ( x, y, z ) = exp − x 2 − y 2 − z 2 )
2. Find the equations of the tangent planes to the following surfaces:

(i) The sphere x 2 + y 2 + z 2 = 4 at the point − 1,1, 2 ( )


x2 y2  23 
(ii) The ellipsoid + + z 2 = 1 at the point 1,1, 
9 4  6 
 

3. Calculate the directional derivatives of the following:

(i) The function ϕ ( x, y, z ) = 2 xy 2 z 3 in the direction i − j + k at the point (1, 2, 3).

(ii) The function f ( x, y, z ) = xy 2 − x 2 yz in the direction i + j − k at the point


(-1, 2, -3).

4. The temperature in a long oven T ( x, y ) is approximately independent of z and is


given by the expression T ( x, y ) = 700 − x 2 y 2 − x , − 5 ≤ x ≤ 5 , − 5 ≤ y ≤ 5 . Find the
direction of greatest decrease in temperature at the point (2, 3).

5. Calculate the divergence of the following vector functions

( )
(i) v = ( x + y + z )i + x 2 − y 2 j + xyz k

( ) (
(ii) u = x 2 − y 2 i + x 2 + y 2 j )
(iii) v = xyz i + x 2 y 2 j − xy k

6. For what value of a is the vector function u = (2 xy − ax) i + (3 y − y 2 ) j divergence-


free?

( ) (
7. Can a value for c be found such that v = cx 2 − y i + x 2 y − 2 xy j is divergence- )
free?

8. Show that ϕ ( x, y, z ) = cos(2 x) + 3 sin (2 y ) is a solution of the equation


∇ 2ϕ + 4ϕ = 0 .

- 99 -
PEME 2000: Semester 1 Notes

9. The velocity of a fluid of density 900 kg/m3 is given by u = 2 x i − 2 y j m/s

(i) Show that u is divergence-free.

(ii) What is the mass flux through a small element of surface S placed at (2, 1) angled
at 600 to the x-axis (see figure)?

10. Show that a function of the form u ( x, t ) = e − ct cos(ax ) is a solution of the heat
diffusion equation ut = u xx (using subscripts for partial derivatives) provided that
c = a 2 . Show also that this solution satisfies the adiabatic boundary condition
u x (0, t ) = 0 (this boundary condition means that the boundary at x = 0 is and insulating
boundary).

- 100 -
CAPE 2000: Semester 1 Notes

§6. Curl and the Scalar Potential

6.1 Vorticity

Introduction

Recall the definition of Reynolds


number Re = UL /ν , where U is the
fluid speed (ms-1) , L (m) is a length
scale particular to the situation being
studied and ν is the viscosity of the fluid
(m2s-1). For flow past a cylinder, the
length scale is the diameter of the
cylinder. Other than for small values of
Re, the flow past a cylinder can be quite
complex. For example, when Re is
between approximately 40 and 1000, a
vortex street forms. This consists of
eddies (or vortices) of fluid that detach
periodically from the sides of the
cylinder and are swept downstream.
The vortices are produced in pairs with
opposite rotation: one rotates clockwise
Clockwise Anti-Clockwise
and the other ant-clockwise. This
rotation rotation causes the wake just behind the cylinder
is to oscillate from side to side as the
vortices develop and are shed.

This phenomenon is not confined to


Oscillation flow past a cylinder as the photo
opposite shows. This is another
example of a vortex street, which is

formed by air being blown by the prevailing


wind past the Juan Fernandez Islands in Chile.

In engineering settings, vortex streets form


behind cylindrical structures like cooling
towers, storage tanks and chimneys. They can Strakes
be disruptive and strakes are sometimes added
to these structures to disrupt the flow, as
shown opposite.

- 101 -
PEME 2000: Semester 1 Notes

Vortices are also important in flight. When air flows past a wing, it rolls up at the
leading edge creating a vortex in the shape of a long tube that extends to the wing tip,
as shown in the figure below.

Vortex Flow

Wing

The vortex tube is swept back over the top surface of the wing and back behind the
aircraft (or swift) creating a pair of counter-rotating vortices in the wake. These
vortices, while adding to the lift generated by the wing, can be hazardous to other
aircraft flying directly behind as a down-draft is created.

Definition of Vorticity and Curl

In fluid mechanics, if the flow velocity is u = u1 i + u 2 j + u3 k , then vorticity w is


defined as the cross-product of ∇ with u and as such can be written as a determinant:

- 102 -
CAPE 2000: Semester 1 Notes

i j k
w = ∇ × u = ∂ / ∂x ∂ / ∂y ∂ / ∂z .
u1 u2 u3

If we expand the determinant we get:

 ∂u ∂u   ∂u ∂u   ∂u ∂u 
∇ × u =  3 − 2  i +  1 − 3  j +  2 − 1  k .
 ∂y ∂z   ∂z ∂x   ∂x ∂y 

The differential operator ∇ × is the third and final operator that we meet in this course
and is called the curl and we refer to ∇ × u as "the curl of u". Note that the curl acts
on a vector and gives a vector as the result.

If ∇ × u = 0 , then we say that u is irrotational or vortex-free.

Example. If u = xz 3 i − 2 x 2 yz j + 2 yz 4 k find ∇ × u and evaluate it at the point (1,-1,1).

So we have
i j k
∇ × u = ∂ / ∂x ∂ / ∂y ( )
∂ / ∂z = 2 z 4 + 2 x 2 y i + 3xz 2 j − 4 xyz k
xz 3 − 2 x 2 yz 2 yz 4

and at (1,-1,1), ∇ × u = 3 j + 4k . ☺

Example. Determine whether F = 4 xz i − y 2 j + yz k is irrotational.

Here
i j k
∇ × F = ∂ / ∂x ∂ / ∂y ∂ / ∂z = ( z − 0)i + (4 x − 0)j + (0 − 0)k = z i + 4 x j
4 xz − y 2 yz

and so F is not irrotational. ☺

6.2 The Scalar Potential

It transpires that the property of being vortex-free endows a vector u with some
special properties, which are useful in fluid mechanics. In fact, if ∇ × u = 0 , then it
may be shown that a scalar function f exists, such that

u = ∇f .

We will not prove this assertion, but please take it as read. When this is the case, the
function f is called a scalar potential or velocity potential for u. Note that f is not

- 103 -
PEME 2000: Semester 1 Notes

unique since we may add any constant to f without changing ∇f , so we tend to refer
to "a scalar potential" rather than "the scalar potential.

Why is this important? Well, one reason in fluid mechanics is that if u is irrotational,
so that a function f may be found such that u = ∇f , then conservation of mass for
constant density ∇ . u = 0 implies that f must be a solution of Laplace's equation

∇2 f = 0 .

Solutions such as these are known in fluid mechanics as "potential flows".

To give an example, when the Reynolds number is very low, the flow around a
cylinder may be represented by the velocity potential

 R2 x  2
ϕ (x, y ) = U  x + 2
 , x + y2 ≥ R2 ,
2 
 x +y 

where U and R are constants corresponding to the free-stream speed and cylinder
radius respectively. Thus we see that the velocity is u = ∇ϕ , given by


ϕ x = U 1 +
(
R 2 y 2 − x 2 
,
)
ϕ = −
2UR 2 xy
.
 (x 2 + y 2 
2
) y
(x2 + y 2)2

This flow is symmetrical and features none of the interesting behaviour in the wake of
the cylinder that was briefly discussed at the start of this section and is illustrated in
the figure below.

In fields outwith fluid mechanics, particularly in physics where one is interested in


forces, if a vector function F, representing a force field, satisfies the condition
∇ × F = 0 , then F is said to be a "conservative field". A rather straightforward
example of this (and probably one where you will think that I am making something
that is essentially simple into something needlessly complicated) is the gravitational
force field F = −mg k , where m is the mass of an object and g is acceleration due to
gravity. Now since F is constant, it is obvious that ∇ × F = 0 and so F is conservative.

- 104 -
CAPE 2000: Semester 1 Notes

It is not much of a stretch to show that if f ( x, y, z ) = − mgz , then F = ∇f . However, it


turns out that conservative force fields (or irrotational flows in fluid mechanics)
possess other interesting properties- one of which we shall encounter in the next
section on line integrals.

When a scalar potential exists, it may be found by straightforward integration, for if


u = u1 i + u 2 j + u3 k is known to be irrotational so that u = ∇f = f x i + f y j + f z k , then
comparing components gives:

f x = u1 ⇒ f = ∫ u1dx + C1 ( y, z ) ,

where C1 ( y, z ) is a "constant of integration", which in its most general form must be


a function that does not depend on x (the variable of integration), i.e. a function of y
and z only.

Similarly,
f y = u 2 ⇒ f = ∫ u 2 dy + C 2 (x, z )
and
f z = u3 ⇒ f = ∫ u3 dz + C3 ( x, y ) .

In practice when constructing a scalar potential, the three different expressions above
for f can be combined together, effectively eliminating the need to find C1 , C2 , C3
explicitly, as the following examples are intended to show.

Example. Flow in the vicinity of a stagnation point, where the velocity is zero, is
given by the velocity u = x i − y j . Show that this flow is irrotational and hence find a
scalar potential for u.

So we have

i j k
∇ × u = ∂ / ∂x ∂ / ∂y ∂ / ∂z = (0 − 0) i + (0 − 0)j + (0 − 0)k = 0
x −y 0

and so the flow is indeed irrotational.

To find the scalar potential, let u = ∇f so that

x2
f x = u1 = x ⇒ f = ∫ xdx = + C1 ( y )
2
y2
f y = u 2 = − y ⇒ f = ∫ − ydy = − + C2 (x ) .
2

- 105 -
PEME 2000: Semester 1 Notes

Now from the first expression we know that f must include a term x 2 / 2 and from the
second expression we know that f must include a term − y 2 / 2 . Therefore, combining
these two terms we may find f :
x2 y 2
f ( x, y ) = − ,
2 2

without the need to find C1 or C 2 explicitly. ☺

Example. Confirm that v = ( x + 2 y + 4 z )i + (2 x − 3 y − z ) j + (4 x − y + 2 z )k is


irrotational and find a scalar potential for v.

Here we have
i j k
∇× v = ∂ / ∂x ∂ / ∂y ∂ / ∂z
x + 2 y + 4z 2x − 3 y − z 4x − y + 2z

= (− 1 − (−1) )i + (4 − 4 )j + (2 − 2)k = 0

so definitely irrotational.

Let v = ∇ϕ , then

x2
ϕ x = v1 = x + 2 y + 4 z ⇒ ϕ = ∫ ( x + 2 y + 4 z )dx = + 2 xy + 4 xz + C1 ( y, z ) , (1)
2
3y2
ϕ y = v2 = 2 x − 3 y − z ⇒ ϕ = ∫ (2 x − 3 y − z )dy = 2 xy − − yz + C2 ( x, z ) , (2)
2
ϕ z = v3 = 4 x − y + 2 z ⇒ ϕ = ∫ (4 x − y + 2 z )dz = 4 xz − yz + z 2 + C3 ( x, y ) . (3)

From the expression (1) we have that

x2
ϕ= + 2 xy + 4 xz +...
2

From (2) we know that

3y2
ϕ = 2 xy − − yz +...
2

so noting that 2 xy is common to both of these, if we combine them in such a way that
each separate term in included only once we have:

- 106 -
CAPE 2000: Semester 1 Notes

x2 3y2
ϕ = + 2 xy + 4 xz − − yz + ...
2 2

From first expression


From second expression

Note that the term 2 xy has not been included from the second expression because
it is already present in the first expression.

Now, what is new in the expression (3) that is not already there in the expression
above for ϕ ? We see that the terms 4 xz and − yz have already been accounted for,
leaving only z 2 that is new. So we add this term to our expression for ϕ giving the
final form:
x2 3y2
ϕ = + 2 xy + 4 xz − − yz + z 2
2 2

Only new term from third expression

x2 3y2
So the scalar potential for v is ϕ = + 2 xy + 4 xz − − yz + z 2 . ☺
2 2

- 107 -
PEME 2000: Semester 1 Notes

Problems 6. Curl and the Scalar Potential

1. Calculate the curl of the following vector functions:

(i) v = (xz 2 + y )i + z 2 j + (2 yz − x 2 )k

(ii) u = ( x + 3 y ) i + ( y − 2 z )j + ( x + 3z ) k

2. Determine the value of a to make the vector x i + 3( y + z ) j + (z − ay ) k irrotational.

3. Show that ∇ × ∇f = 0 for any function f (note: f must be twice differentiable, but
do not worry about this).

4. A rigid-body rotational flow is defined by the velocity u = −ω y i + ω x j , where ω


is a constant.

(i) Show that u satisfies the continuity equation for constant density.

(ii) Find the vorticity of the flow. Does a scalar potential exist for u?

(iii) (Feel free to skip this question, but it is doable). The stream function ψ ( x, y ) is a
function defined such that if u = u1 i + u2 j , then ψ y = u1 and ψ x = −u2 (partial
derivatives denoted by subscripts). The curves given by the equation ψ ( x, y ) =
constant are parallel to the flow and so may be used to visualise it (these curves are
called streamlines). Show that the streamlines for the rigid-body rotational flow are
circles centred on the origin.

x2
5. The vector function F is defined by F = 2 x ln y i + j .
y
(i) Show that F is conservative.

(ii) Find a scalar potential for F.

6. What is the corresponding vector field V for the scalar potential


ϕ (x, y ) = ln( x + y ) ?

7. Confirm that the velocity field defined by u = (3 + 2 xy ) i + (x 2 − 3 y 2 ) j is irrotational


and find a scalar potential for it.

8. Show that the velocity field defined by v = ay 2 z i + 2axyz j + axy 2 k is irrotational


for any value of a and find a scalar potential for it.

- 108 -
CAPE 2000: Semester 1 Notes

§7. Line Integrals

7.1 Mass of a Length of Wire

We begin our discussion of line integrals with a direct application involving the line
integral of a scalar function. Consider a length of wire in space described by the
parametric equations

r (t ) = x(t )i + y (t ) j + z (t )k , a ≤ t ≤ b .

This path is the parametric description of a curve that we shall denote by C. The mass
per unit length of the wire µ is not constant, but a function of position, i.e. µ ( x, y, z ) ,
or equivalently µ (r ) . What is the mass of the wire M ?

Now divide the curve C into a n line segments each of length dsi , located between the
points ri = r (ti ) and ri −1 = r (ti −1 ) , where

b−a
ti = a +  i , i = 0,1, ..., n .
 n 

Hence dsi =| ri − ri −1 | . The mass of this element of wire is µ (ri )dsi and so the mass of
the entire length will be approximately given by

n
M ≈ ∑ µ (ri )dsi .
i =1

- 109 -
PEME 2000: Semester 1 Notes

As we increase the number of elements of wire, the approximation for M becomes


more accurate and as n → ∞ , the summation above tends to a special sort of integral
called a line integral, which we denote:

M = ∫ µ (r )ds .
C

Thus the integral differs from a normal integral in that the integrand (the function
being integrated) is integrated along a specific curve in space. The subscript "C" to
the integral sign refers to the name of the curve. We have met an integral similar to
this in §4.3 where we considered the length of a curve.

Since C is defined parametrically in terms of t, we note from §4.3 that ds is also the
same as:

1/ 2
dr  dx  2  dy  2  dz  2 
ds = dt =   +   +    dt
dt  dt   dt   dt  

and so we can also write the line integral for mass M in terms of an ordinary integral
over t as

1/ 2
b
 dx  2  dy  2  dz  2 
M = ∫ µ (r (t ) )  +   +    dt ,
a  dt   dt   dt  

Example. Find the mass of wire located on the line segment between A(1,1) and
B(2,4) with mass per unit length µ ( x, y ) = 3x + 2 y (do not worry about units).

The line segment is defined by (§4.3)

r (t ) = (1 − t )(i + j) + t (2i + 4 j) = (1 + t )i + (1 + 3t )j , 0 ≤ t ≤ 1 ,

i.e.
x = 1 + t , y = 1 + 3t , 0 ≤ t ≤ 1 .

Thus the mass of the wire is

1 1

∫ (3x + 2 y ){1 + 3 } dt =
2 1/ 2
M= 2
10 ∫ 3(1 + t ) + 2(1 + 3t )dt
t =0 0
1
= 10 ∫ 5 + 9t dt
0
1
 9  19 10
= 10 5t + t 2  = ≈ 30
 2 0 2

- 110 -
CAPE 2000: Semester 1 Notes

Note that we could have arrived at the answer another way. In 2D if the curve C is
described by the Cartesian form y = f ( x ) , for a ≤ x ≤ b , then from §4.3

1/ 2
  df  2 
ds = 1 +    dx
  dx  

and so
1/ 2
b
  df  2 
M = ∫ µ ( x, f (x ))1 +    dx .
a   dx  

For our problem, the line segment containing the points (1,1) and (2, 4) has equation

4 −1
y −1 = (x − 1) , i.e. y = 3x − 2 , 1 ≤ x ≤ 2 ,
2 −1

so dy / dx = 3 and using the alternative formula above,

2 2

∫ (3x + 2 y ){1 + (3) }


2 1/ 2
M= dx = 10 ∫ 3 x + 2(3 x − 2 ) dx
x =1 x =1
2 2
9 
= 10 ∫ 9 x − 4 dx = 10  x 2 − 4 x 
x =1 2  x =1
 9  19 10
= 10 18 − 8 − + 4  = .
 2  2

7.2 The Work Done by a Force

It is also possible to apply the concept of an integral along a curve to a vector


function and the classic example of this is the work done by a force.

Recall that the work done W by a force acting on an object is W = force x distance. In
fact this is only true for a very limited range of examples, most notably that the force
is constant and acts in a fixed direction. When the force is not of constant magnitude
or direction this simple rule no longer applies. Consider a particle in a force field
F(r ) , where r = x i + y j + z k and the force acting on the particle depends on its
location. Suppose that the particle is at location r and in a small interval of time the
particle moves a distance dr .

- 111 -
PEME 2000: Semester 1 Notes

Then if θ is the angle between F and dr (see figure above) the component of force in
the direction of the particle's movement is F cos θ and so the work done dW by the
force in moving the particle a distance dr is

dW = F cosθ dr = F . dr

Now just as in the last section, if the particle's entire path is given by the curve C, then
dividing C into a number of straight line segments, the total work done W by the force
in moving along the entire curve will be given approximately by the sum of the work
done by moving along each line segment, i.e. W ≈ ∑ F .dr . In the limit as the
every line segment

number of line segments tends to infinity, the summation will be replaced by an


integral along C:

W = ∫ F.dr .
C

So this is an example of a line integral of a vector function. In general,


dr = dx i + dy j + dz k and if F = F1 i + F2 j + F3 k , then

F.dr = F1dx + F2 dy + F3 dz .

If C is described parametrically, as in §7.1, so that the general position vector of a


point on C is given by r (t ) = x(t )i + y (t ) j + z (t )k , a ≤ t ≤ b , then the line integral
becomes an ordinary integral over t:

b
 dx dy dz 
∫ F.dr = ∫  F
C t =a
1
dt
+ F2
dt
+ F3 dt .
dt 

- 112 -
CAPE 2000: Semester 1 Notes

Example. Calculate the work done by force F = (3x + 2 y )i + yz j + xz k in moving an


object from P(0, 0, 0) to Q(1, 1, 1) along the following paths:

(i) x = t , y = t 2 , z = t 3 , 0 ≤ t ≤ 1 ,
(ii) The straight line joining PQ.

 dx dy dz 
So for F.dr = (3 x + 2 y ) + yz + xz dt
 dt dt dt 

dx dy dz
and for path (i) x = t , y = t 2 , z = t 3 implies that = 1, = 2t , = 3t 2 .
dt dt dt

In terms of t:
( )
F.dr = 3t + 2t 2 dt + t 2 .t 3 .2tdt + t.t 3 .3t 2 dt
= (3t + 2t + 5t )dt 2 6

and consequently

1
3 2 5 121
∫ F.dr = ∫ (3t + 2t )
2
+ 5t 6 dt = + + = .
C t =0
2 3 7 42

For (ii) C may be represented simply as x = t , y = t , z = t , 0 ≤ t ≤ 1 and consequently

F.dr = (3t + 2t )dt + t 2 dt + t 2 dt


(
= 5t + 2t 2 dt )
therefore
1
5 2 19
∫ F.dr = ∫ (5t + 2t )dt = 2 + 3 = 6 .
2

C t =0

Naturally it is possible to have line integrals of a scalar function that is not mass per
unit length or a vector function that is not a force. In fact there are direct applications
of line integrals in other fields such as fluid mechanics (which we shall see later) and
from this point forward we shall consider integrals of general functions.

- 113 -
PEME 2000: Semester 1 Notes

7.3 Line Integral Along a Set of Discrete Curves

Sometimes a path consists of a number of line segments or discrete curves, i.e.


C = C1 + C2 + ... + Cn . If this is the case, then you should evaluate the line integrals
along each discrete section and then add the results to get the final answer.

Example. Evaluate ∫ (2 x − y )dx + (3x + 2 y )dy , where C is the path consisting of the
C

straight line segments from (0, 0) to (1, 1) to (3, 1).

Here C consists of two line segments:

 The first ( C1 ) is the line segment joining (0, 0) to (1, 1), i.e.
x = t, y = t, 0 ≤ t ≤1.
 The second ( C 2 ) is the line segment joining (1, 1) to (3, 1), i.e.
x = t , y = 1, 1 ≤ t ≤ 3 .

So the integral along C1 is:

1
1
 6t 2 
I1 = ∫ (2 x − y )dx + (3x + 2 y )dy = ∫ (2t − t + 3t + 2t )dt =   = 3 .
C1 t =0  2  t =0

On C 2 , y = 1 , which means that dy = 0 , so the integral along C 2 is:

∫ (2 x − y )dx + (3x + 2 y )dy = ∫ (2t − 1)dt = [t − t ]t =1 = 6 − 0 = 6 .


2 3
I2 =
C1 t =1

Hence the final result is

∫ (2 x − y )dx + (3x + 2 y )dy = I


C
1 + I2 = 3 + 6 = 9 . ☺

- 114 -
CAPE 2000: Semester 1 Notes

7.4 Integrals Around Closed Paths

The examples we have considered so far have all involved open paths, i.e. the start
and end points of the curve C are different. It is perfectly possible to evaluate a line
integral along a closed path, where the start and end points are the same. When this
is the case, it is usual to emphasise the fact that the path is a loop by adopting the
alternative notation for the line integral:

∫ F.dr .
C

Example. Evaluate ∫ u.dr ,


C
where u is the rigid-body rotational flow
u = −ω y i + ω x j (ω constant) introduced in Problems Sheet 6 and C is the circle

x = cos θ , y = sin θ , 0 ≤ θ ≤ 2π .

dx dy
We proceed exactly as before. So, noting that = − sin θ , = cosθ ,
dθ dθ

 dx dy 
u . dr = ω  − y
θ
+x
θ
2
( 2
dθ = ω sin θ + cos θ dθ = ωdθ)
 d d 

and it follows that

∫ u.dr = θ∫ ωdθ = 2πω . ☺


C
=0

In fluid mechanics, if u is the velocity of a fluid, the line integral of u around a closed
loop C, ∫ u.dr , is called the circulation and we shall investigate it further below.
C

y
Example. Evaluate ∫C F. dr where (i) F = 3xyi − y 2 j and 1

(ii) F = xi + 2 yj and C is the closed path opposite (note the


direction of C !).
C
In this example C is made up from 3 separate line
segments: x
0 1

L1: 0 ≤ x ≤ 1 , y = 0 .
L2: 0 ≤ y ≤ 1 , x = 1
L3: y = x , 1 ≥ x ≥ 0 .

- 115 -
PEME 2000: Semester 1 Notes

Since y = 0 on L1, it follows that dy = 0 on L1 and since x = 1 on L2 then dx = 0 on


L2.

∫ F .dr = ∫ 3xydx − y dy = 0 , since


2
(i) y = 0 on L1.
L1 L1

1
1
∫ F .dr = ∫ 3xydx − y dy = ∫ − y dy = − 3 , since dx = 0 on L2.
2 2

L2 L2 y =0
0 0
2
∫ F .dr = ∫ 3xydx − y dy = ∫ 3x ∫ 2 x dx = − 3 , since y = x on L3.
2 2 2 2
− x dx =
L3 L3 x =1 x =1

1 2
Adding these gives ∫ F. dr = − 3 − 3 = −1
C

1
1
(ii) ∫ F .dr = ∫ xdx + 2 ydy =
L1 L1
∫ xdx = 2 , since
x =0
y = 0 on L1.

∫ F .dr = ∫ xdx + 2 ydy = ∫ 2 ydy = 1 , since dx = 0 on L2.


L2 L2 y =0
0 0
3
∫ F .dr = ∫ xdx + 2 ydy = ∫ x + 2 xdx = ∫ 3xdx = − 2 , since y = x on L3.
L3 L3 x =1 x =1

1 3
Adding these gives ∫ F. dr = 2 + 1 − 2 = 0 .
C

Two important points arise from the last examples:

IMPORTANT POINT #1. In general, the value of a line integral depends on the
path of integration. So for example, if C1 and C2 are two different paths having the
same start and end points, in general

∫ F.dr ≠ ∫ F.dr .
C1 C2

However (as we shall see in the next section) there are some special circumstances
when this is not the case.

IMPORTANT POINT #2. This is something of a corollary to the previous


point really. The integral of a function around a closed curve C is not necessarily 0
(even though the start and end points are the same). However, as with point 1 above,
there is a special case when the integral of a particular type of function around any
closed loop is 0.

- 116 -
CAPE 2000: Semester 1 Notes

These points naturally lead to the question: when is a line integral independent of the
path taken between the start and end points? In other words, if C1 and C2 are any two
different paths having the same start and end points, when is

∫ F.dr = ∫ F.dr ?
C1 C2

An obvious case exists, i.e. when F is a constant vector. When this is the case, if
F = F1 i + F2 j + F3 k , where F1 , F2 , F3 are constants, and C is any path:

r (t ) = x(t )i + y (t ) j + z (t )k , a ≤ t ≤ b ,

then

b
 dx dy dz 
∫ F.dr =
C
∫  F
t =a
1
dt
+ F2
dt
+ F3 dt
dt 
b b b
dx dy dz
= F1 ∫ dt + F2 ∫ dt + F3 ∫ dt
t =a
dt t =a
dt t =a
dt
= F1 ( x(b) − x(a ) ) + F2 ( y (b) − y (a ) ) + F3 ( z (b) − z (a ) )

Note that the last line above is just F.(r (b) − r (a) ) . We could have arrived at the same
conclusion as follows. If C is any closed curve and F is a constant vector, then

∫ F.dr = F.∫ dr = F.[r (t )] = F.(r (b) − r (a ) )


t =b
t =a
C C

In either case we see that when F is constant, the line integral does not depend on the
particular path between the start and end points of C, but depends only on the start
point r (a) = ( x(a), y (a), z (a) ) and the end point r (b) = ( x(b), y (b), z (b) ) .

In the next section we shall see that line integrals of constant vectors are not the only
cases that have this property of path independence.

- 117 -
PEME 2000: Semester 1 Notes

7.5 Conservative Forces and Irrotational Flows

Recall the definition of an irrotational flow u or a conservative force F given in §6.2.


A flow is irrotational (vortex-free) if ∇ × u = 0 and a force field is conservative if
∇ × F = 0 . These conditions are obviously the same and to reduce typing I shall just
refer to a conservative vector field, but when the application is fluid mechanics
please remember that conservative fields and irrotational flows are the same thing!

We have also seen that conservative vector fields have the interesting property that
they possess scalar potentials. So if V is a conservative field, i.e. if ∇ × V = 0 , then a
scalar function f exists such that

V = ∇f .

When this is the case, consider the line integral ∫ V.dr ,


C
where C is any path
r (t ) = x(t )i + y (t ) j + z (t )k , a ≤ t ≤ b between the two points r (a ) and r (b ) . Now on
the curve C, the function f ( x, y, z ) may be represented as a function of t only:

F (t ) = f ( x(t ), y (t ), z (t ) ) , a ≤ t ≤ b

and using the chain rule:

dF dx dy dz
= fx + fy + fz .
dt dt dt dt

Therefore, since V = ∇f , it follows that

∫ V .dr = ∫ ∇f .dr
C C

= ∫ f dx + f x y dy + f z dz
C
t =b
 dx dy dz 
= ∫  f
t =a
x
dt
+ fy
dt
+ f z dt
dt 
t =b
dF
= ∫
t =a
dt
dt = F (b) − F (a )

Now F (b ) = f ( x(b), y (b), z (b) ) and F (a ) = f ( x(a), y (a), z (a) ) , so it follows from the
last line above that
∫ V .dr = [ f (r(t ) )]t = a
t =b
C

and we see that the line integral depends only on the values of the scalar
potential at the start and end points of C, or in other words: the line

- 118 -
CAPE 2000: Semester 1 Notes

integral is independent of the particular path between the two points r (a ) and
r (b) .

This observation also has consequences for the line integral of a conservative vector
function around a closed path. From above, since a conservative function V has the
property that

∫ V .dr = [ f (r(t ) )]
t =b
t =a ,
C

it follows that if the start and end points are the same, then the line integral must be
zero, i.e.

C
∫ V.dr = 0

for any closed path.

Summary:

1. If V (x, y, z ) is a conservative vector function, i.e. if ∇ × V = 0 , then the line


integral ∫ V.dr
C
depends only on the start and finish points of C, but not on the path
itself. In other words any curve C between the same start and finish point will give
the same result for ∫ V.dr .
C

2. As a corollary to point 1, if V (x, y, z ) is a conservative vector function then


∫ V.dr = 0
C
for any closed path.

3. If V (x, y, z ) is a conservative vector function with scalar potential f, so that


V = ∇f , then ∫ V.dr
C
may be found by evaluating the scalar potential at the start and
finish points of C. In particular

∫ V .dr = [ f (r(t ) )]
t =b
t =a .
C

This last point means that when V is conservative, we don't have to evaluate the
line integral explicitly. All we need to do is find the scalar potential and evaluate
it at the start and end points of C.

Example. We have seen in §6 that the stagnation point flow u = x i − y j is irrotational


( )
and has scalar potential ϕ ( x, y ) = x 2 − y 2 / 2 .

- 119 -
PEME 2000: Semester 1 Notes

(i) Evaluate ∫ u.dr


C
by direct integration, where C is the portion of the circle
x = cos θ , y = sin θ between 0 ≤ θ ≤ π / 2 .
(ii) Evaluate the integral in (i) using the scalar potential.

(i) With x = cos θ , y = sin θ , we have that dx = − sin θ dθ , dy = cosθ dθ and so

π /2

∫ C
u . dr = ∫ xdx − ydy = −2 ∫ cos θ sin θ dθ
C
0
π /2
1
= − ∫ sin 2θ dθ = [cos 2θ ]π0 / 2 = 1 (− 1 − 1)
0
2 2
= − 1.

Another way of obtaining the same result is to note that since ∫ u.dr = ∫
C C
xdx − ydy , it
follows that

1
∫ u . dr = 2 [x ]
2
− y2 C
C

and since that on C, x 2 + y 2 = 1 (since C is quarter of a circle of radius 1 and x = 1


when θ = 0 and x = 0 when θ = π / 2) it follows that

1
∫ u .dr = 2 [x ]
2 0
− (1 − x 2 ) x =1
C

1 2 −1− 2 +1
=
2
[ 0
2 x − 1 x =1 =
2
] = −1

( )
(ii) The scalar potential is ϕ ( x, y ) = x 2 − y 2 / 2 , so using Result 3 in the summary box
above, noting that the start point of C is (1, 0) and the end point is (0, 1), we have that

1 1
∫ u .dr = 2 [x ](( 0 ,1)
2
− y2 1, 0 ) = (0 − 1 − (1 − 0) ) = −1. ☺
C 2

Example. Evaluate ∫ u.dr , where u = (3 + 2 xy ) i + (x 2 − 3 y 2 ) j and C is the closed


C

elliptical path x = 3 cos θ , y = sin θ , 0 ≤ θ ≤ 2π .

If a line integral looks like it is going to be tricky, as in this case, it is always worth
checking if the integrand is conservative (because as we have seen above things are
much simpler if it is!). Here u = (3 + 2 xy ) i + x 2 − 3 y 2 j and ( )
i j k
∇×u = ∂x ∂y 0 = 0i + 0 j + (2 x − 2 x )k = 0 .
3 + 2 xy x − 3y2
2
0
- 120 -
CAPE 2000: Semester 1 Notes

And Hallelujah! u is conservative (note that this was previously shown to be the case
in Q7 of Problem Sheet 6). This means that since C is a closed path we do not need to
evaluate the integral explicitly since we know that the answer must be 0 from point 2
in the summary box above! ☺

7.6 The Circulation in Fluid Mechanics

A quantity called the circulation is important in the theory of lift in fluid mechanics.
Consider the flow around a wing section as shown below.

If u is fluid velocity and C is a closed curve surrounding the aerofoil, the line integral

K = ∫ u. dr ,
C

is called the circulation. A famous theorem, the Kutta-Joukowski theorem, states


that the lift force generated by the aerofoil is proportional to K. In fact, if L' is the lift
force per unit length of wing, the theorem asserts that

L' = ρUK ,

where ρ is fluid density and U is the free-stream speed, i.e. the speed of flow away
from the aerofoil, which would equate in practical terms to the airspeed.

Hence in order for a wing to produce lift, this theorem effectively states that the flow
around the wing u cannot be irrotational, or in other words must have vorticity. For
if this was not the case, i.e. the flow was irrotational, then as we have seen above K
would necessarily be 0 (since a scalar potential would exist, implying that the integral
around any closed curve would be zero).

- 121 -
PEME 2000: Semester 1 Notes

Problems 7. Line Integrals

1. Find the mass of wire located on the line segment between A(1, 0) and B(3, 2) with
mass per unit length µ ( x, y ) = x + 2 y (do not worry about units).

2. (i) Find ∫ x(1 + 4 y )dy , where C is the curve


C
y = x 2 starting from (0, 0) and ending

at (1, 1).
(ii) Find ∫ xy dx where C is the curve x = 3t 2 , y = t 3 − 1, 0 ≤ t ≤ 1 .
C

∫ 2 x + y ds , where C is the line


2
3. Find y = 2 x from (0, 0) to (1, 2) and ds is the
C

element of arc length given in §7.1.

4. Find ∫ F. dr , where F = 2 xy i − 5 x j and C is the curve y = x 3 , 0 ≤ x ≤ 1 .


C

5. Let F = y 2 i + xy j represent a force field in the x,y plane. Find the work done by
the force in moving an object along the following paths:

(i) C1 : y = 2 x from (0, 0) to (1, 2)


(ii) C2 : y = 2 x 2 from (0, 0) to (1, 2)
(iii) C3 : the straight line segments from (0, 0) to (1, 0) and from (1, 0) to (1, 2).

6. Let F = x i + (4 x − y ) j and let C1 , C2 be two curves defined by


C1 : x = t , y = t , z = t , 0 ≤ t ≤ 1 and C2 : x = t 2 , y = t , z = t 2 , 0 ≤ t ≤ 1 .

(i) Evaluate ∫ F.dr


Cj
for j = 1, 2 .

(ii) Evaluate ∫ F . dr , where C is the closed path made up from C1 from (0, 0, 0) to (1,
C

1, 1) and − C2 from (1, 1, 1) to (0, 0, 0).

7. Let G = y 2 z 3 i + 2 xyz 3 j + 3 xy 2 z 2 k .

(i) Show that G is a conservative vector field.


(ii) Find a scalar potential for G and use it to evaluate ∫ G .dr , where C is the path
C

x = cos t , y = sin t , z = t , 0 ≤ t ≤ π / 2 .

( 2 ,1)

∫ (2 xy + 1)dx + (x )
2
8. Consider the line integral J = − 2 y dy .
(0,0)

- 122 -
CAPE 2000: Semester 1 Notes

(i) Show that J is independent of the path between (0, 0) and (2, 1).

(ii) Evaluate J along the straight line joining (0, 0) to (2, 1).

(iii) Find a scalar potential for F = (2 xy + 1)i + ( x 2 − 2 y ) j and use it to evaluate J.

- 123 -
PEME 2000: Semester 1 Notes

8. Surface Integrals

8.1 Centre of Mass

Consider a collection of n particles each of mass mi located at positions ri = ( xi , yi ) ,


i = 1, 2, ..., n :

The definition of the centre of mass (CoM) of the group of particles is the location
with position vector r , where

∑ m (r − r ) = 0 .
i =1
i i

Re-arranging this expression gives

n n n
1
∑m r = ∑m r ⇒ r = M ∑m r ,
i =1
i
i =1
i i
i =1
i i

n
where M is the total mass M = ∑ mi . Hence we see that the centre of mass is located
i =1

at the mass-weighted average particle location. Thus if r = ( x, y ) , we have that

n n
1 1
x=
M
∑ mi xi , y =
i =1 M
∑m y
i =1
i i .

- 124 -
CAPE 2000: Semester 1 Notes

Now, instead of a discrete set of


particles, consider the case of the
centre of mass of a continuous area of
material S of uniform thickness δ and
density ρ.

Suppose that we divide S into a finite


number of small non-overlapping
elements of area dS = dxdy as shown in
the diagram opposite. Since we are
assuming that S is of uniform thickness
and density, the mass of an element dS
will be dm = ρδ dS .

Now, using the definition above, the CoM of S is located at ( x , y ) , where

1 1
x=
M
∑ ρδ xdS , y = M ∑ ρδ ydS .
S S

Here ∑
S
denotes the summation of all elements of area over the total surface S.

Now, the mass of S is M = ρδ S and consequently

1 1
x= ∑
S S
x dxdy , y = ∑ y dxdy .
S S

In the limit, as the number of area elements dS increases to infinity, each of the
summations above are replaced by a special form of integral called a surface integral
denoted by ∫ and we denote the CoM by
S

1 1
x=
SS∫ x dxdy, y = ∫ y dxdy .
SS

The surface integrals above involve integrations over both x and y, i.e. they are
double integrals. In order to see how to compute them, we shall now consider some
straightforward examples.

Example. Confirm that the CoM of a rectangle a units wide by b units high is located
half way along the width and half way along the height.

Let the rectangle occupy the region S given by 0 ≤ x ≤ a and 0 ≤ y ≤ b . Then the total
area S = ab and using the formula above,

1
S ∫S
x= x dxdy .

- 125 -
PEME 2000: Semester 1 Notes

a b
Now the integral is taken over both x and y, so that ∫
S
= ∫ ∫
x = 0 y =0
. The bounds are

obtained from the definition of the surface S: 0 ≤ x ≤ a , 0 ≤ y ≤ b . Since both bounds


are constant, i.e. do not depend on x or y, then the order of integration is unimportant:
we can do the x integral first and then the y integral or vice-versa.

So we have

a b 
 xdy dx .
∫S x dxdy = ∫∫ 
x=0  y =0 

It is customary to do the integrals starting from the innermost integral working to the
outermost, i.e. the y-integral comes first in the example above. When evaluating the
integrals, we treat the variables as we would when differentiating, i.e. if we are
integrating with respect to y then we treat x as a constant. Thus:

∫ xdy = [xy ]
y =b
y =0 = xb − x.0 = xb .
y =0

We now replace the innermost integral with the result above and carry on:

a  b  a
a 2b
 xdy dx = xb dx = b x 2 [ ] a
∫  ∫  x∫=0
x =0  y =0
2
x =0 =
2
.

This completes the evaluation of ∫ x dxdy


S
and so the CoM is

1 1 a 2b a
S ∫S
x= x dxdy = =
ab 2 2

as required.

a b
1
S ∫S ∫ ∫ ∫
Proceeding with y = y dxdy , as before we have = (note again that the
S x = 0 y =0

order of integration in this example is unimportant because the integral bounds are all
constants), and consequently

a  b 
 ydy dx .
∫ y dxdy = ∫∫ 
x =0  y =0
S 

So we start with the innermost integral:

- 126 -
CAPE 2000: Semester 1 Notes

b
b
 y2  b2

y =0
ydy =   =
 2  y =0 2

and then

a  b  a 2 2
 ydy dx = b dx = ab .
∫  ∫  x∫=0 2
x =0  y =0 2

Hence

1 1 ab 2 b
S ∫S
y= y dxdy = = ,
ab 2 2

as required. ☺

Example. Find the CoM of the triangle made up from the area beneath the line y = x ,
between x = 0 and x = 1.

Here S corresponds to the shaded region shown below.

S is defined by x varying between 0 and 1, i.e. 0 ≤ x ≤ 1 and y varying between 0 and


the line y = x , i.e. 0 ≤ y ≤ x . These limits give the bounds for the double integrals
and since the bound for y depends on x, we must do the y-integral before the x-
integral, i.e. the order is important for this example! So, proceeding as before and
taking careful note of the bounds:

1  x 
 xdy dx .
∫S x dxdy = ∫∫ 
x =0  y =0 

The innermost integral is done first:

- 127 -
PEME 2000: Semester 1 Notes

∫ xdy = [xy ]
y=x
y =0 = x.x − x.0 = x 2 ,
y =0

then the outer integral:

1  x  1
 xdy dx = x 2 dx = 1 .
∫  ∫  x∫=0
x = 0  y =0 3

1 1
In this example the total area S = × 1 × 1 = and so
2 2

1 1 2
x=
SS∫ x dxdy = 2. = .
3 3

1
S ∫S
Now for y = y dxdy :

1  x 
 ydy dx ,
∫S y dxdy = ∫∫ 
x =0  y =0 

and
y= x
x
 y2  x2
∫y =0ydy =   =
 2  y =0 2
.

Consequently

1  x  1
x 2
 x 3 1
 1
 ydy dx =
∫x=0  y∫=0  x∫=0 2 dx =   =
 6  x =0 6
 

and so

1 1 1
y=
SS∫ y dxdy = 2. = .
6 3

2 1
Hence the CoM is located at  , . ☺
3 3

- 128 -
CAPE 2000: Semester 1 Notes

Example (+). Find the CoM of the shaded region S in the figure below.

In order to proceed with this example, we first split the region S into two rectangles S1
and S 2 :

S1 is defined as the area: 0 ≤ x ≤ 4 , 0 ≤ y ≤ 2 and S 2 is defined as the area


4 ≤ x ≤ 5, 0 ≤ y ≤ 4 .

Then we use the fact that ∫


S
= ∫
S1
+ ∫
S2
.

Following the method of the first example in this section for S1 :

4  2  4
2 2
  [ ]
∫S xdS = x∫=0  y∫=0xdy dx = x∫=02 xdx = 2 x
x=4
x =0 = 16
1  
and for S 2 :

- 129 -
PEME 2000: Semester 1 Notes

5  4  5
 xdy dx = 4 xdx = 4 x 2 [ ] x =5
∫ xdS = ∫  ∫  x∫=4
x = 4  y =0 2
x=4 = 2(25 − 16 ) = 18 .
S2 

Hence ∫ xdS = 16 + 18 = 34 and since S = 4 × 2 + 1× 4 = 12 , we have


S

1 34 17
x=
SS∫ xdS = = .
12 6
Carrying on...
 2 
2
 ydy dx =  y  dx = 2dx = 8
4 4 2 4

∫ ydS = ∫  ∫  x∫=0  2 
x=0  y =0

S1  y =0 x=0

and
5  4  5
 y 2 4
 5
 ydy dx =
∫S ydS = ∫x =4  y∫=0  x∫=4  2  dx = ∫x =48dx = 8 .
2   y =0

Hence ∫ ydS = 8 + 8 = 16 and


S

1 16 4
y=
SS∫ ydS = = .
12 3

So the CoM is located at (17 / 6, 4 / 3) :

- 130 -
CAPE 2000: Semester 1 Notes

Example. Find the centre of mass of the shaded region R shown below.
y

x
0 1 3
As before, we split R into two regions: R1 is the triangle 0 ≤ x ≤ 1, 0 ≤ y ≤ x and R2 is
the rectangle 1 ≤ x ≤ 3 , 0 ≤ y ≤ 1 .

Now, for R1 we note that the bound for y depends on x and consequently the order of
integration is important: we must do the y integral before the x integral. So:

1 x  1 1
 xdy dx = [xy ]y = x dx = x 2 dx = 1 .
∫ xdS = ∫  ∫  x∫=0 y =0 x∫=0
x =0  y =0
3
R1 

The integral over R2 is straightforward:

3 1  3 3
 xdy dx = [xy ]y =1 dx = xdx = 8 = 4
∫ xdS = ∫  ∫  x∫=1 y =0 x∫=1
x =1  y = 0
2
R2 

13 1 5
and so ∫ xdS = ∫ xdS + ∫ xdS =
R R1 R2
3
. Since R = + 2 = it then follows that
2 2

2 13 26
x= . = .
5 3 15

Similarly,

y=x
1  x  1
 y2  1
1
1
 
∫R ydS = ∫x=0  y∫=0  x∫=0  2 
ydy dx = dx = ∫
2 x =0
x 2 dx =
6
1   y =0

and
y =1
 1 
 ydy dx =  y  dx = 1 dx = 1 .
3 3 2 3

∫ ydS = ∫  ∫  x∫=1  2 
x =1  y = 0

x =1 2
R2  y =0

Consequently
21  7
y =  + 1 = . ☺
5  6  15

- 131 -
PEME 2000: Semester 1 Notes

8.2 CoM of Composite Areas

We can write the equations for CoM in more compact vector form. Let r = (x , y ) and
let r = ( x , y ) , then the CoM is located at

1
S ∫S
r= r dxdy .

Suppose now that we have a region S that can be split into n discrete areas
S i , i = 1, 2, ..., n , such as in the cases of the two previous examples. Suppose that
1
region i with area S i has CoM located at ri , that is ri = ∫ r dxdy . Since
S i Si
n
S = S1 + S 2 + ... + S n = ∑ S i , it follows that
i =1

∫ r dxdy = ∑ ∫ r dxdy
i =1 S i
S

and consequently we have the neat result that

1 n 1 n
r = ∑ ∫ r dxdy = ∑ S i ri . (*)
S i =1 Si S i =1

In other words, the CoM of the whole region S is the area-weighted average of the
CoMs of the individual regions.

Example. Use result (*) to confirm the result in Example (+) above.

In this example, we are required to confirm the


result shown opposite.

We know that the CoM of a rectangle is located


half way along its width and half way up its
height, so the CoM of S1 is located at (2, 1) and
the CoM of S 2 is located at (9/2, 2). So, using
result (*) the CoM of S = S1 + S 2 will be at

8(2,1) + 4(9 / 2, 2 )  16 + 18 8 + 8   17 4 
r= = , = , 
12  12 12   6 3 

as previously found. ☺

- 132 -
CAPE 2000: Semester 1 Notes

8.3 Area Integrals of Scalar Functions

Now that we have established the concept of a double integral over an area, we can
easily extend this idea to integrating any scalar function over a given area. The
method is exactly the same as above: we use the definition of the area to form the
bounds of the double integral, being careful of the order if the bounds are not constant.

∫x
2
Example. Find ydS , where S is
S

(i) The square 0 ≤ x ≤ 1, 0 ≤ y ≤ 1 .


(ii) The triangle 0 ≤ x ≤ 1, 0 ≤ y ≤ x .

(i) For the square we do not need to concern ourselves over the order of integration, so

1
1 1
 x3 y  1 1 1
y 1
∫S ∫y =0 x∫=0 ∫y =0 x∫=0  3  ∫y =0 3 dy = 6 .
2 2
x ydS = x y dxdy = dy =
x =0

(ii) For the triangle we must do the y integration before the x integration:

x
1 x
 x2 y2 1 1 1
x4 1
∫S ∫x=0 y∫=0 ∫x =0 y∫=0  2  ∫x=0 2 dx = 10 . ☺
2 2
x ydS = x y dydx = dx =
y =0

∫ y dS , where S is one quarter of a disc of radius 1 shown shaded


3
Example. Evaluate
S

in the figure below:

x
0
1

The equation of a circle of radius 1 is x 2 + y 2 = 1 , so the curve representing the edge


of the disc in the figure above is given by the equation y = 1 − x 2 , 0 ≤ x ≤ 1 .
Consequently the shaded region is defined by

S : 0 ≤ x ≤ 1, 0 ≤ y ≤ 1 − x 2 .

- 133 -
PEME 2000: Semester 1 Notes

See figure below for clarification.

So, noting that the order of integration is important, we have

1− x 2 1− x 2
1 1
 y4  1
1

∫ y dS = ∫
3
( ) 2 2
∫y =0y dydx = x∫=0  4  dx = 4 x∫=01 − x dx
3

S x =0 y =0
1
1 1 2 1 2
= ∫1 − 2 x 2 + x 4 dx = 1 − +  = . ☺
4 x =0 4  3 5  15

- 134 -
CAPE 2000: Semester 1 Notes

8.4 Surface Integrals of Vector Functions

Example: Mass Flux of Fluid

Let us now return to our happy hunting ground of fluid mechanics and recall that if u
is fluid velocity, ρ is density, then m& ′′ = ρ u is mass flux, i.e. the mass flow rate of
fluid per unit area. Also recall from §5.4 that if we have an element of area dS in
space with unit normal n̂ (see figure below) then only the component of m & ′′ that is
parallel to n̂ contributes to the mass flow through dS, i.e. ρ u cosθ = ρ u .n .
ˆ

Area = dS
ρu

So the mass flow rate in kg / s through the element of area will be

ρ u .nˆ dS .

It is customary to write n̂ dS as a vector dS , and if we do this, the mass flow rate of


fluid through dS is simply

ρ u .dS .

Now consider a surface S in three-dimensional space. In order to calculate the total


mass flow rate of fluid flowing through the surface we can divide the surface into a
number of surface area elements dS i and add up all of the mass flow rates through
each element (see figure below).

- 135 -
PEME 2000: Semester 1 Notes

dSi

So, if the fluid mass flux at the location of element i is (ρu )i , then the total mass flow
rate through S will be ∑ (ρu ) .dS
i
i i . In the limit as the number of surface elements

tends to infinity, the summation is replaced by a surface integral and we have that the
total mass flow rate through the entire surface S is

∫ ρ u .nˆ dS
S
or equivalently ∫ ρ u . dS .
S

Here n̂ is now interpreted as the unit normal to the surface S at a general point
(x, y, z ) . Recall from §5.2 that if the surface S is described by the equation
ϕ ( x, y, z ) = const , then the normal to S at ( x, y, z ) is given by ∇ϕ and consequently
the unit normal will be

∇ϕ
nˆ = .
| ∇ϕ |

- 136 -
CAPE 2000: Semester 1 Notes

General Surface Integrals

In order to calculate a surface integral in general, the following points must be


addressed:

 As in the case of line integrals, one must first define the surface S. There are a
number of ways of doing this – including a parametric representation similar to
that used for curves. However, we shall consider only simple surfaces in this
module.

 Once the surface has been defined, then one must find the unit normal to the
surface and also define the elemental area dS.

 As in the case of line integrals, we use the equation(s) defining the surface to
substitute for variables within the integrand.

 As with the simpler area integrals considered in the first section, the integral itself
involves a double integration, i.e. an integral of an integral.

 Again as with line integrals, surfaces can be open or closed. A closed surface is a
surface that surrounds a finite volume as in the case of the spherical surface
x 2 + y 2 + z 2 = 1 , which surrounds a sphere of radius 1.

 When evaluating integrals over closed surfaces, you should take care that the unit
normal points towards the outside of the surface, i.e. away from the interior.

 Note that surfaces can have two faces and each face has a normal (one in the
opposite direction to the other). A surface integral is evaluated over one face, so
care must be taken over which face is to be used. If no face is specified then just
choose one and state which face you have chosen.

- 137 -
PEME 2000: Semester 1 Notes

Example. Evaluate ∫ F . dS where F = x 2 y i + z j + (2 x + y )k and


S

(i) S is the upper surface of the unit square in the x-y plane 0 ≤ x ≤ 1 , 0 ≤ y ≤ 1 , z = 0 .
(ii) S is the surface of the unit square in the y-z plane 0 ≤ y ≤ 1 , 0 ≤ z ≤ 1 , x = 0
pointing towards x < 0.

(i) In this case (see figure below) the unit normal is in the same direction as the z axis,
so nˆ = kˆ , and S is a square in the x-y plane, so dS = dxdy .

Therefore dS = k dxdy and F .nˆ = F .k = 2 x + y . Now we proceed as in the cases


above for simple for area integrals:

1 1

∫ F .dS = ∫ ∫ 2 x + y dxdy
S y =0 x =0
1 1
3
∫ [x ]
1
x = 0 dy = ∫ 1 + y dy =
2
= + xy .
y =0 y =0
2

(ii) Here we have a square in the y-z plane with the normal pointing towards x < 0, so
it follows that nˆ = −i and dS = dydz :

Then F . nˆ = −F . i = − x 2 y . But x = 0 on S so F .nˆ = 0 and consequently the surface


integral will be 0 for this case, i.e. ∫ F . dS = 0. ☺
S

- 138 -
CAPE 2000: Semester 1 Notes

Example. Find ∫ F .dS , where ( ) ( )


F = x 2 + y 2 i + x 2 + z 2 j + 2 xz k and S is the surface
S

of the square formed from the points (1,0,1) , (1,0,−1) , (− 1,0,1) , (− 1,0,−1) pointing
towards y > 0 .

In this case S is defined as − 1 ≤ x ≤ 1 , − 1 ≤ z ≤ 1 , y = 0 , with nˆ = j and dS = dxdz .


Therefore

(
F . dS = F . j dxdz = x 2 + z 2 dxdz )
and so
1
1 1
 x3 2
1

∫S ∫ ∫ ∫
2 2
F . dS = x + z dxdz =  + xz  dz
z = −1 x = −1 z = −1 
3  x = −1
1
2 4 4 8
= ∫ + 2 z 2 dz = + = . ☺
−1
3 3 3 3

Example. Let F = 4 xz i − y 2 j + yz k . Evaluate ∫ F . dS , where S is the outside surface


S

of the unit cube bounded by x = 0, x = 1, y = 0, y = 1, z = 0, z = 1.

In order to evaluate this integral, we first split the cube into 6 faces and then evaluate
surface integrals over each face. The final result is then obtained by summing the
integrals over each face.

Let the cube’s faces be labelled as follows:

z
Face 6 Face 3
1

Face 2
Face 4
0 1
y

1 Face 1

x Face 5
Now, Face 1 is defined by x = 1, 0 ≤ y ≤ 1, 0 ≤ z ≤ 1 with nˆ = i and dS = dydz , so we
have

- 139 -
PEME 2000: Semester 1 Notes

1 1 1

∫ F.dS =
Face 1
∫ ∫ 4 zdydz = ∫ 4 zdz = 2 .
z =0 y =0 0

For Face 2, we have y = 1, 0 ≤ x ≤ 1, 0 ≤ z ≤ 1 , nˆ = j , dS = dxdz , so

1 1

∫ F.dS =
Face 2
∫ ∫ − 1dxdz = −1 .
z =0 x =0

For Face 3, we have x = 0, 0 ≤ y ≤ 1, 0 ≤ z ≤ 1 , nˆ = −i , dS = dydz , so F .nˆ = −4 xz = 0


since x = 0 on this face. Therefore

∫ F.dS = 0 .
Face 3

For Face 4, we have y = 0, 0 ≤ x ≤ 1, 0 ≤ z ≤ 1 , nˆ = − j , dS = dxdz , so F . nˆ = y 2 = 0


since y = 0 on this face. Therefore

∫ F.dS = 0 .
Face 4

For Face 5 we have z = 0, 0 ≤ x ≤ 1, 0 ≤ y ≤ 1 with nˆ = −k and dS = dxdy , so


F .nˆ = − yz = 0 since z = 0 on this face. Therefore

∫ F.dS = 0 .
Face 5

Finally for Face 6 we have z = 1, 0 ≤ x ≤ 1, 0 ≤ y ≤ 1 with nˆ = k and dS = dxdy , so


F .nˆ = yz = y since z = 1 on this face. Therefore

1 1
1
∫ F.dS =
Face 6
∫ ∫ ydydx = 2 .
x =0 y =0

Hence for the whole surface, we have

6
1 3
∫ F.dS = ∑
S
∫ F.dS = 2 − 1 + 2 = 2 . ☺
j =1 Face j

- 140 -
CAPE 2000: Semester 1 Notes

8.5 Stokes’ Theorem

Stokes’ theorem relates surface integrals to line integrals and as we shall see is
important in the theory of aerodynamic lift.

Consider a simple finite surface S with boundary ∂S , which is a simple curve as


shown in the figure below.

n
S

∂S
In the figure the normal to S is indicated by n. Note that the orientation of the
boundary curve must be such that as one travels around ∂S , the surface S is on one’s
left. Thus in the figure the boundary is oriented anti-clockwise and this is indicated
by the arrow.

Stokes’ theorem then states that for any vector-valued function F,

∫ F . dr = ∫ (∇ × F). dS .
∂S S

That is the line integral of F around the closed path ∂S is equal to the surface integral
of the curl of F over the surface S.

The theorem is best illustrated by an example.

Example. Verify Stokes’ theorem for F = y i − x j , where S is the upper face of a disk
in the x-y plane of radius a centred on the origin.

So in this case, since we S is the upper face of a disk in the x-y plane, the normal to S
is n = k and we have:

- 141 -
PEME 2000: Semester 1 Notes

y
Radius a

∂S
x
S

Here ∂S is a circle of radius a described anticlockwise, i.e.

x = a cos t , y = a sin t , 0 ≤ t ≤ 2π .

Note that since S is the top face of the disk, ∂S must be described anticlockwise in
order to keep it on the left as the boundary navigated. If we went clockwise around
the boundary S would be on our right:

If we walked clockwise
R around the boundary then S
would be on our right

Now, doing the line integral first, we have dx = −a sin t dt , dy = a cos t dt and
consequently

F . dr = ydx − xdy = − (a 2 sin 2 t + a 2 cos 2 t )dt = −a 2 dt .

Therefore

∫ F . dr = ∫ − a dt = −2πa
2 2
.
∂S t =0

Also noting that

- 142 -
CAPE 2000: Semester 1 Notes

i j k
∇ × F = ∂x ∂ y ∂ z = −2 k
y −x 0

and so (∇ × F ).n = −2k.k = −2 . Consequently

∫ (∇ × F). dS = ∫ − 2 dS = −2S
S S

and since S is a circle of radius a, S = π a 2 , implying that

∫ (∇ × F). dS = −2πa
2
,
S

in agreement with the line integral found above. ☺

Example. Verify Stokes’ theorem for F = y 2 i + x 3 j , where ∂S is made up from the


line segments (0,0) → (1,0) , (1,0) → (1,1) , (1,1) → (0,1) and (0,1) → (0,0) .

So in this case S is a square with vertices at (0,0), (1,0), (1,1) and (0,1) withis
boundary again described anticlockwise:

Doing the surface integral first this time,

i j k
∇× F = ∂x ∂y ∂ z = (3x 2 − 2 y )k ,
y2 x3 0

and noting that again n = k ,

- 143 -
PEME 2000: Semester 1 Notes

1 1

∫ (∇ × F). dS = ∫ ∫ 3x
2
− 2 y dydx
S x =0 y =0
1

∫ 3x
2
= − 1 dx = 1 − 1 = 0
x =0

Now to do the line integral, split ∂S into 4 line segments:

L1 : y = 0, 0 ≤ x ≤ 1 , L2 : x = 1, 0 ≤ y ≤ 1 , L3 : y = 1, 1 ≥ x ≥ 0 , L4 : x = 0, 1 ≥ y ≥ 0 ,

F . dr = y 2 dx + x 3dy

So on L1 y = 0 so F . dr = 0 and there is no contribution to the line integral.

1
On L2 x = 1 so F . dr = dy and ∫
L2
= ∫ 1.dy = 1 .
y =0
0
On L3 y = 1 so F . dr = dx and ∫
L3
= ∫ 1.dx = −1 .
x =1

On L4 x = 0 so F . dr = 0 and there is no contribution to the line integral.

Hence ∫ F . dr = 0 + 1 − 1 + 0 = 0
∂S
in agreement with the surface integral of ∇ × F found

above. ☺

8.6 The Relationship between Vorticity and Aerodynamic Lift


(Again)

In §7.6 we saw that the Kutta-Joukowski theorem stated that the lift generated per unit
length L' by an aerofoil section is given by

L' = ρU ∫ u . dr ,
C

where ρ is the fluid density, U is the free-stream velocity (corresponding to the


airspeed), u is fluid velocity and C is any closed curve surrounding the aerofoil
section.

If we now employ Stokes’ theorem to convert the line integral into a surface integral,
we see that

L' = ρU ∫ (∇ × u ). dS ,
S

- 144 -
CAPE 2000: Semester 1 Notes

where S is the area bounded by C. Now the point here is that ∇ × u is the fluid
vorticity and so we see that the lift force depends directly on vorticity. In fact, if
vorticity is constant then doubling vorticity will cause the lift force to double.

Many aircraft have rows of vanes set along the leading edges of their wings as shown
in the diagram below called vortex generators.

These vanes do exactly as their name suggests- they generate vorticity and amongst
their other properties, we see from Stokes’ theorem that they should increase the lift of
a wing.

Various studies, such as that presented by Sørensen et al.1 demonstrate the


effectiveness of vortex generators in promoting lift as the figure below (Fig. 9 in
Sørensen et al.) confirms.

1
Sørensen, N. N., Zahle, F., Bak, C., & Vronsky, T. (2014, June). Prediction of the effect of vortex
generators on airfoil performance. In Journal of physics: conference series (Vol. 524, No. 1, p. 012019).
IOP Publishing.

- 145 -
PEME 2000: Semester 1 Notes

In this figure “Aoa” is the angle of attack of the wing (the angle of the wing relative to
the direction of the free-stream velocity) and Cl is the aerodynamic lift coefficient,
which is used in an analogous manner to a drag coefficient to define lift force L:

1
L = C l ρU 2 A .
2

Here ρ, U have the meanings as above and A is the surface area of the wing.

- 146 -
CAPE 2000: Semester 1 Notes

Problems 8. Surface Integrals

1. Find the CoM of the triangular region S shown in the figure below.

2. A triangle has vertices at (0, 0), (a, 0) and (0, b). Show that its CoM is located at
a b
 , .
 3 3

3. Use result (*) to find the CoM of the region S shown in the figure below.

4. Use result (*) and the solution of problem 2 above to find the CoM of the region S
shown in the figure below.

1 1− x
1
∫ ∫ ( x + y) dydx = n + 2 .
n
5. Show that
0 0

- 147 -
PEME 2000: Semester 1 Notes

y
6. Evaluate ∫ 1 + x dS
S
where S is the unit square 0 ≤ x ≤ 1, 0 ≤ y ≤ 1 .

7. Find ∫ r .dS , where


S

(i) S is the face of the square with vertices at (1, 0, 0), (1, 1, 0), (1, 1, 1), (1, 0, 1)
pointing towards x > 0.
(ii) S is the outside surface of the unit cube bounded by x = 0, x = 1, y = 0, y = 1, z =
0, z = 1.

8. Find ∫ F .dS , where F = yz i + xz j + xy k and S is the outside surface of the unit


S

cube bounded by x = 0, x = 1, y = 0, y = 1, z = 0, z = 1.

U0
9. Fluid with density ρ is flowing with velocity u = (x i − y j) , where U 0 , L are
L
constants. Find the mass flow rate of fluid:

(i) through the square with vertices at (1, 0, 0), (1, 1, 0), (1, 1, 1), (1, 0, 1).
( ) ( ) (
(ii) through the square with vertices at 1 / 2 , 0, 0 , 0 , 1 / 2 , 0 , 1 / 2 , 0, 1 , )
(0 , 1/ )
2,1 .

- 148 -
CAPE 2000: Semester 1 Notes

Problems 8a. (Stokes’ Theorem)

10. Verify Stokes’ law for the vector field F = xy i + xy 2 j , where S is the upper
surface of the triangle defined by 0 ≤ x ≤ 1 , 0 ≤ y ≤ x .

11. Verify Stokes’ law for the vector field F = xz i + xz j + yz k , where S is the region
shown in the diagram below.

12. (Quite tough but have a go!) By considering ∇ × (xy i + x j + y 2 z k ) and using
Stokes’ theorem, show that ∫ (2 yz i + (1 − x )k ). dS = 3π , where S is the portion of the
S

outside surface of the sphere x 2 + y 2 + (z + 1) = 4 in z > 0 .


2

- 149 -
PEME 2000: Semester 1 Notes

9. Volume Integrals

9.1 Mass of an Object of Varying Density

Consider an object occupying a volume V in space and the density of the object at
location r = ( x, y, z ) is ρ (r ) . How do we calculate its mass?

The answer is to take an approach analogous to the one used to calculate the CoM in
the previous section. We divide the object into a number of small elements each of
volume dV . Then the mass of an element located at position r will be ρ (r )dV and
consequently the mass of the object can be found approximately by summing the
masses of the individual elements, i.e.

mass ≈ ∑ ρ (r )dV .
V

Here ∑
V
denotes summation over the entire volume. Since volumes are three-

dimensional, ∑
V
will involve summations in the x, y and z directions, i.e. a triple

summation.

To see this more clearly,


consider the mass of a simple
object such as the unit cube with
variable density. In order to
estimate the mass, we divide the
cube into n × n × n cubic
elements each of side 1 / n . The
position of an individual element
is rijk = (i / n, j / n, k / n ) ,
i = 1,..., n , j = 1,..., n , k = 1,..., n .

The volume of a cubic element is dV = 1 / n 3 and the mass of the entire cube is then
given approximately by

n n n

∑∑∑ ρ (r )dV .
k =1 j =1 i =1
ijk

Now in the limit as the number of volume elements tends to infinity, the summation
tends to a special type of integral called a volume integral, denoted by
- 150 -
CAPE 2000: Semester 1 Notes

∫ ρ (x, y, z )dV .
V

In general, if we divide a volume V into elements of volume dx by dy by dz, so that the


element of volume dV = dxdydz , the volume integral may be written as the triple
integral ∫ ∫ ∫ ρ (x, y, z )dxdydz .
z y x

As with surface integrals, the bounds for the volume integral depend on the size and
shape of V, but for the unit cube x, y and z each vary between 0 and 1, giving

1 1 1

∫ ∫ ∫ ρ (x, y, z )dxdydz .
z =0 y =0 x =0

Again as with surface integrals, we work from the innermost integral (the integration
over x above) to the outermost integral (the integral over z above). Also, the order of
integration is not important if the bounds are all constants, but care must be exercised
if this is not the case.

Example. Find the mass of the unit cube with density ρ ( x, y, z ) = 2 x + xy + z 2 .

The mass will be given by

1 1 1

∫ ∫ ∫ 2 x + xy + z
2
dxdydz .
z =0 y = 0 x =0

x =1
1
 x2 y  y
The x integral is: ∫ 2 x + xy + z dx =  x 2 +
2
+ xz 2  = 1 + + z 2 .
x =0  2  x =0 2

1
y
1
 y2  1 5
We then integrate over y: ∫ 1 + + z dy =  y +
2
+ yz 2  = 1 + + z 2 = + z 2 .
y =0
2  4  y =0 4 4

z =1
5
1
5 z3  5 1 19
Finally we integrate over z: ∫ + z dz =  z +  = + = . ☺
2

z =0
4 4 3  z =0 4 3 12

- 151 -
PEME 2000: Semester 1 Notes

9.2 General Volume


Volume Integrals

Naturally we can extend the volume integral to integrate any function of x, y, z over a
volume V, as shown in the next example.

Example. Find ∫ ∇. F dV , where F = x 2 yi + (x − z )j + 2xz 2k and V is the unit cube.


V

Here ∇.F = 2 xy + 0 + 4 xz = 2 x( y + 2 z ) and the volume integral is


1 1 1

∫ ∫ ∫ 2 x( y + 2 z )dxdydz .
z = 0 y = 0 x =0

So the x-integral gives:

1 1 1 1 1 1 1

∫ ∫ [x ( y + 2 z )]
1
∫ ∫ ∫ 2 x( y + 2 z )dxdydz = ∫ ∫ y + 2 z dydz
2
x = 0 dydz =
z = 0 y = 0 x =0 z =0 y =0 z = 0 y =0

and integrating over y:

y =1
1 1 1
 y2  1
1
∫z =0 y∫=0y + 2 z dydz = ∫z =0  2 + 2 yz 
 y =0
dz = ∫
z =0
2
+ 2 z dz .

Finally, the z-integral gives:

1
1 1  3

z =0
2
+ 2 z dz =  + 1 = .
2  2

3
Hence the rquired result is ∫ ∇. F dV = . ☺
V
2

- 152 -
CAPE 2000: Semester 1 Notes

Volume Integrals with Variable Bounds

We have to be careful when the integral bounds are not constant, as the next two
examples show.

∫ x dV
2
Example. Find where V is the prism 0 ≤ x ≤ 1, 0 ≤ y ≤ 2 , 0 ≤ z ≤ 1 − x .
V

The volume V is shown below:

Here we must perform the z integration before the x integration since the bounds for z
depend on x. So we have

y = 2 x =1 z =1− x

∫ x dV = ∫ ∫ ∫ x dzdxdy .
2 2

V y =0 x =0 z =0

[ ]
Now the z integral gives x 2 z
1− x
z =0 = x 2 (1 − x ) = x 2 − x 3 and so integrating this over x
gives

1
 x3 x4  1
 −  = .
3 4  x =0 12

y=2
y 1
Finally the y integral will give   = .
12  y =0 6

1
∫ x dV = 6 . ☺
2
Hence the required result is
V

- 153 -
PEME 2000: Semester 1 Notes

Example. Find the volume of the in the tetrahedron shown diagram below.

In this case the region V is defined by

1
0 ≤ x ≤ 2, 0 ≤ y ≤ (8 − 4 x ), 0 ≤ z ≤ 8 − 4 x − 2 y ,
2

i.e.
0 ≤ x ≤ 2 , 0 ≤ y ≤ 4 − 2 x, 0 ≤ z ≤ 8 − 4 x − 2 y .

We see that the bound for z depends on x and y, so the integral over z must be done
first. The bound for y depends on x, so the y integral must be done before the x
integral. Hence the order of integration must be z then y then x. So the volume will
be

x = 2 y = 4 − 2 x z =8 − 4 x − 2 y
V= ∫
x=0

y =0
∫ 1dzdydx .
z =0

The z-integral is: [z ]z = 0


z =8 − 4 x − 2 y
= 8 − 4x − 2 y .

Now integrating over y gives:

y = 4− 2 x

∫ 8 − 4 x − 2 y dy = [8 y − 4 xy − y ]
2 y = 4− 2 x
= (8 − 4 x )(4 − 2 x ) − (4 − 2 x )
2
y =0
y =0

= 2(4 − 2 x ) − (4 − 2 x )
2 2

= (4 − 2 x )
2

Finally integrating over x gives the required result:

- 154 -
CAPE 2000: Semester 1 Notes

∫ (4 − 2 x ) dx = − 2.3 [(4 − 2 x ) ]
1 1 32
2 3 x=2
x =0 =−
6
(
0 − 43 =) 3
. ☺
0

Example. Find ∫ 2 xydV


V
where V is the volume bounded by the surface z = 4 − x 2

and the planes x = 0, y = 0, z = 0, y = 2 shown in the diagram below.

z y

4 z = 4 − x2
2

2 x
Here V is defined by the bounds 0 ≤ x ≤ 2, 0 ≤ y ≤ 2, 0 ≤ z ≤ 4 − x 2 and so we must do
the z integration before the x integration. So,

2 2 4− x 2

∫ 2 xydV = ∫ ∫ ∫ 2 xy dzdydx
V x = 0 y =0 z =0

and the inner integral is

4− x 2
= 2 xy (4 − x 2 ) = 8 xy − 2 x 3 y .
4− x 2
∫ 2 xy dz = [2 xyz ]
z =0
z =0

Integrating over y gives

∫ 8 xy − 2 x
3
[
ydy = 4 xy 2 − x 3 y 2 ]
2
y =0 = 16 x − 4 x 3
y =0

and finally, integrating over x gives

- 155 -
PEME 2000: Semester 1 Notes

2
2
 x4 
4 ∫ 4 x − x dy = 2 x 2 −  = 4(8 − 4 ) = 16 . ☺
3

x =0  4  x =0

9.3 Gauss’s Divergence Theorem

Consider a finite volume V, whose boundary is the surface ∂V . The divergence


theorem of Gauss (or just the divergence theorem as it often known) states that for
any vector function F

∫ ∇. FdV = ∫ F . dS ,
V ∂V

i.e. the volume integral of the divergence of F over V is equal to the surface integral of
F over the boundary of V. The proof of this theorem is beyond the scope of this
course and you are only required to know how to use the result.

Amongst other things, this theorem allows us to convert a difficult surface integral
into a potentially much easier volume integral, as the next example shows.

Example. Consider the surface integral ∫ F . dS , where S is the outside surface of the
S

unit cube bounded by x = 0, x = 1, y = 0, y = 1, z = 0, z = 1 and F = 4 xz i − y 2 j + yz k .


This integral was computed in the final example of §8 and found to be equal to 3/2.

If we use the divergence theorem, then


∇.F = (4 xz ) + ∂ − y 2 + ∂ ( yz ) = 4 z − y .
( )
∂x ∂y ∂z

Hence the surface integral will be equal to the volume integral of 4 z − y throughout
the volume V given by 0 ≤ x ≤ 1, 0 ≤ y ≤ 1, 0 ≤ z ≤ 1 :

1 1 1 1 1 1
1 3
∫ F.dS = ∫ ∫ ∫ 4 z − ydxdydz = ∫ ∫ 4 z − y dydz = ∫ 4 z − 2 dz = 2 .
∂V
z =0 y =0 x =0 z =0 y =0 z =0

Example. In Question 7(ii) of Problems Sheet 8, it was required to find ∫ r . dS , where


S

S is the outside surface of the unit cube bounded by x = 0, x = 1, y = 0, y = 1, z = 0, z


= 1. The result was found to be 3.

∂ (x ) ∂( y ) ∂(z )
If we use the divergence theorem, noting that ∇. r = + + = 3 , we have
∂x ∂y ∂z
that

- 156 -
CAPE 2000: Semester 1 Notes

∫ r .dS = ∫ ∇ .r dV = 3V ,
S V

where V is the volume of the unit cube, i.e. 1. Hence it follows that

∫ r .dS = 3.
S

Conservation of Mass Using the Divergence Theorem

In §5.4 the continuity equation was derived for conservation of fluid mass. It
transpires that we can also use the divergence theorem to obtain this result in a much
more elegant way.

In §8.4 we saw that the mass flow rate of fluid through a surface S was given by the
surface integral ∫ ρu . dS , where ρ is fluid density and u is fluid velocity. Now,
S

suppose that we consider a general finite volume V that is fixed in space. Let the
boundary of V be the surface ∂V .
Now since the surface ∂V surrounds
a fixed volume, it is closed and
consequently the surface integral
∫ ρu .dS will be 0 if ρ is constant.
∂V

This follows because if density is


constant then the fluid is
incompressible and so as much fluid
will flow out of a closed surface as
flows in, implying that the total mass
flow rate across the whole surface
must be 0 (see figure for
clarification).

If ρ is not constant then it is possible for the flow to squeeze extra fluid into V, or push
extra fluid out of V, implying a net gain or loss of mass due to differing inflow and
outflow rates. When this is the case, since dS = nˆ dS , where n̂ is taken to be the
outward pointing normal to ∂V the surface integral ∫ ρu . dS represents the net
∂V

mass flow rate of fluid out of V.

Now, as we have seen above, the mass of V will be given by the volume integral
∫ ρ dV and consequently the rate of change of fluid mass inside V will be given by
V

∂ 
 ∫ ρ dV  . This will be positive if there is a net increase of mass (due to a net
∂t  V 

inflow of fluid) and negative if there is a net reduction of mass (due to a net outflow

- 157 -
PEME 2000: Semester 1 Notes

∂ 
of fluid). Thus the net mass flow rate of out of V will be given by −  ∫ ρ dV  and
∂t  V 

it follows that

∂ 
−  ∫ ρ dV  = ∫ ρu . dS .
∂t  V 
 ∂V

∂  ∂ρ
Since V is fixed in space, i.e. does not change with time,  ∫ ρ dV  = ∫ dV and

∂t  V 
 V ∂t
consequently we must have that

∂ρ

V
∂t
dV + ∫ ρ u . dS
∂V
=0.

The final part of the derivation of the continuity equation now involves employing the
divergence theorem to convert the surface integral in the expression above into a
volume integral:

∂ρ
∫ ρu .dS = ∫ ∇.(ρu )dV ⇒ ∫ ∂t dV + ∫ ∇.(ρu )dV = 0 .
∂V V V V

∂ρ
Expressing this as a single volume integral gives: ∫ ∂t + ∇.(ρu )dV = 0 .
V
Now since V

is completely arbitrary, this last integral must be true for any volume and the only way
that this can be true is if the integrand is 0, i.e. if

∂ρ
+ ∇.(ρu ) = 0 .
∂t

This completes the Semester 1 material (with the exception of the final problems sheet
to follow).

- 158 -
CAPE 2000: Semester 1 Notes

Problems
Problems 9. Volume Integrals

1. Find the mass of the unit cube 0 ≤ x ≤ 1, 0 ≤ y ≤ 1, 0 ≤ z ≤ 1 with density


ρ ( x, y, z ) = 1 + 2 xy + z 2 .

2. The equations for the centre of mass (CoM) r = x i + y j + z k of a volume V with


varying density ρ ( x, y, z ) may be expressed in terms of volume integrals as

1
M V∫
r= ρ r dV , where M = ∫ ρ dV .
V

Find the CoM of the unit cube 0 ≤ x ≤ 1, 0 ≤ y ≤ 1, 0 ≤ z ≤ 1 with density


ρ ( x, y , z ) = 3 − x − y + 2 z .

∫ y dV , where V is the cube − 1 ≤ x ≤ 1, − 1 ≤ y ≤ 1, − 1 ≤ z ≤ 1 .


2
3. (i) Find
V

(ii) Find ∫ 8 xyz dV where V is the region 2 ≤ x ≤ 3, 1 ≤ y ≤ 2, 0 ≤ z ≤ 1 .


V

∫ x + y dV
2
4. Find where V is the prism 0 ≤ x ≤ 1, 0 ≤ y ≤ 2 , 0 ≤ z ≤ 1 − x . (This
V

volume was used in an example in the main text above).

∫ x dV , where V is the volume between the planes


2
5. Find z = x + y + 2 and z = 0, for
V

− 1 ≤ x ≤ 1, − 1 ≤ y ≤ 1 , shown in the diagram below.

6. Verify the divergence theorem for the vector field F = 2 xyi − 3 y 2 j + yzk
throughout the volume of the unit cube V: 0 ≤ x ≤ 1, 0 ≤ y ≤ 1, 0 ≤ z ≤1.

- 159 -

You might also like