Lecture Notes
Lecture Notes
Dr Cristina Zambon
2 October 2024
1
Despite the effort to eliminate all typographic errors, some of them could still be present. Hence be
careful. Note that this summary is intended as a guideline for the materials covered in lectures and it is
not supposed to replace the textbook.
Contents
1 Introduction 4
1.1 Vector Algebra (Chapter 7 in Riley) . . . . . . . . . . . . . . . . . . . . . . 4
1.2 Matrices (Chapter 8 in Riley) . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.3 Vector functions (Chapter 10 in Riley) . . . . . . . . . . . . . . . . . . . . 8
3 Vector Spaces 12
5 Fourier Series 26
5.1 Fourier series and vector spaces . . . . . . . . . . . . . . . . . . . . . . . . 34
8 Theorems of integration 60
2
CONTENTS 3
10 Introduction to probability 71
10.1 The basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
10.2 Counting the number of outcomes in an event . . . . . . . . . . . . . . . . 75
10.3 Conditional probability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
Chapter 1
Introduction
Before engaging with the lectures, ensure that you are familiar with the mathe-
matical concepts that follow. This material will not be covered in any details during
lectures.
a · b = |a||b| cos θ = a1 b1 + a2 b2 + a3 b3 .
i) |a|2 = a · a.
ii) a · b = b · a.
iii) a · (b + c) = a · b + a · c, a · (β b) = β a · b, where β is a scalar.
iv) If the scalar product of two vectors is zero, then the vectors are perpendicular.
4
1.1. VECTOR ALGEBRA (CHAPTER 7 IN RILEY) 5
iv) If the vector product of two vectors is zero, then the vectors are parallel or
antiparallel.
a1 a2 a3
[a, b, c] = a · (b × c) = b1 b2 b3 .
c1 c2 c3
a × (b × c) = (a · c)b − (a · b)c.
Equation of a line.
Given a point A with position vector a located on a line having a direction b̂, a
generic point R on the same line with position vector r is given by
x
r = a + λb̂, r = y ,
z
where λ is a scalar with −∞ < λ < ∞. Note that the same equation can be also
written as follows
(r − a) × b̂ = 0.
Figure 1.1: Line passing through the point A and having a direction b̂.
6 CHAPTER 1. INTRODUCTION
Equation of a plane.
Figure 1.2: Plane perpendicular to the unit vector n̂ and passing through the point A.
Equation of a sphere.
A point R on a sphere of radius a and centre at C is:
|r − c|2 = a2 ,
|A| = Ajk Cjk , for any row j, |A| = Akj Ckj , for any column j,
where Cmn = (−1)m+n |Amn | is the cofactor associated to the matrix element Amn .
In turn, |Amn | is the minor associated to the matrix element Amn . The minor is the
determinant of the matrix obtained by removing the m-th row and n-th column from
the matrix A.
Properties:
i) |AB . . . F | = |A||B| . . . |F |.
ii) |AT | = |A|, |A∗ | = |A|∗ , |A† | = |A|∗ , |A−1 | = |A|−1 .
iii) If the rows (or the columns) are linearly dependent, then |A| = 0.
iv) If B is obtained from A by multiplying the elements of any row (or column) by
a factor α, then |B| = α |A.
v) If B is obtained from A by interchanging two rows (or columns), then |B| =
−|A|.
vi) If B is obtained from A by adding k times one row (or column) to the other
row (or column), then |A| = |B|.
CT Cji
A−1 = , that is A−1
ij = , A−1 A = AA−1 = I,
|A| |A|
8 CHAPTER 1. INTRODUCTION
where C is the cofactor matrix and I the identity matrix (Iij = δij ). If |A| = 0 the
inverse does not exist and the matrix A is said to be singular.
Note that in order to find the inverse of a matrix, you can also use the Gauss-Jordan
method shown in the lectures, which makes use of the elementary row operations.
Properties:
i) (AB . . . F )−1 = F −1 . . . B −1 A−1 .
ii) (AT )−1 = (A−1 )T , (A† )−1 = (A−1 )† .
∂r ∂r ∂r
= i, = j, = k,
∂x ∂y ∂z
hence dr = i dx + j dy + k dz.
Chapter 2
a (a · b) a
b = b∥ + b⊥ , b∥ = (|b| cos θ) = .
|a| |a| |a|
9
10 CHAPTER 2. ORTHOGONAL PROJECTION AND INDEX NOTATION IN R3
indices can take the values ,1,2,3. The summed over indices are called called dummy
indices and the other free indices.
3
P
(i) aij bjk ≡ aij bjk = ai1 b1k + ai2 b2k + ai3 b3k .
j
3 P
P 3 3
P
(ii) aij bjk ck ≡ aij bjk ck = (aij bj1 c1 + aij bj2 c2 + aij bj3 c3 )
j k j
= (ai1 b11 c1 + ai1 b12 c2 + ai1 b13 c3 ) + (ai2 b21 c1 + ai2 b22 c2 + ai2 b23 c3 )
+ (ai3 b31 c1 + ai3 b32 c2 + ai3 b33 c3 ).
Let us introduce two mathematical objects that can be used in the context of the summa-
tion convention:
Kronecker delta:
1 if i = j,
δij = i, j = 1, 2, 3
0 if i ̸= j.
Note that this object is symmetric.
(iii) a · b = ai bi = δij ai bj .
Levi-Civita symbol:
1 if (i, j, k) = (1, 2, 3) = (2, 3, 1) = (3, 1, 2),
ϵijk = −1 if (i, j, k) = (1, 3, 2) = (3, 2, 1) = (2, 1, 3),
0 otherwise.
= a1 b 2 c 3 + a2 b 3 c 1 + a3 b 1 c 2 − a1 b 3 c 2 − a3 b 2 c 1 − a2 b 1 c 3
a1 a2 a3
= b1 b2 b3 .
c1 c2 c3
(iv) ϵijk ϵilm = 3δjl δkm + δil δjm δki + δim δji δkl − δil δji δkm − 3δjm δkl − δim δjl δki
= δjl δkm − δjm δkl .
Chapter 3
Vector Spaces
Linear vector space. A set of objects called vectors forms a vector space V if there
are two operations defined on the elements of the set called addition and multiplication by
scalars, which obey the following simple rules (the axioms of the vector space):
We say that the vector space V is closed with respect to addition and scalar multipli-
cation.
iv) There exists an inverse element −v such that v + (−v) = 0 for all v.
v) u + v = v + u.
where u, v, w are vectors and α, β are scalars. If the scalars α are real V is called a real
vector space, otherwise V is called a complex vector space.
12
13
(i) R3 . Yes.
(iv) The set of real functions f (x) with no restriction on the values of x and with
the usual addition and scalar multiplication. Yes.
(v) The set of matrices of size (n × m) with real entries and with the usual addition
and scalar multiplication. Yes.
(vi) The set of 2-dimensional vectors with real entries and the usual addition but
the following definition of scalar multiplication
x αx
α = ,
y 0
(vii) The set of solutions of the following second order, linear, homogeneous differ-
ential equation
d2 f df
p(x) 2 + q(x) + r(x) f = 0,
dx dx
where p, q, r are given functions. Yes.
x
(viii) The set of vector u = y in the 3-dimensional space for which
z
2x − 3y + 11z + 2 = 0.
No.
Linear combinations:
α1 v1 + α2 v2 + · · · αk vk = αi vi ,
(i) What is a span of a single vector in R3 ? It is the set of all scalar multiples
of this vector. It is a line in the direction of the vector.
α1 v1 + α2 v2 + · · · + αk vk = 0
is satisfied if and only if all αi = 0. Otherwise, the vectors are said to be linearly
dependent. That is, they are linearly dependent if the expression
α1 v1 + α2 v2 + · · · + αk vk = 0
Example 3 Indicate whether the following sets of vectors are linearly dependent
or independent.
(i)
0 0 1
v1 = 1 , v2 = 1 , v3 = 1 .
1 2 −1
α3
By definition: α1 v1 + α2 v2 + α3 v3 = α+ α2 + α3 = 0,
α1 + 2α2 − α3
This implies, α1 = α2 = α3 = 0. Hence the vectors are linearly indepen-
dent.
15
(ii)
−2 1 0
v1 = 0 , v2 = 1 , v3 = 2 .
1 1 3
We can see that v3 = v1 + 2v2 . Hence the vectors are linearly depen-
dent.
(iiii)
{1 + x + x2 , 1 − x + 3x2 , 1 + 3x − x2 }.
By definition: α1 (1 + x + x2 ) + α2 (1 − x + 3x2 ) + α3 (1 + 3x − x2 ) =
x2 (α1 + 3α2 − α3 ) + x(α1 − α2 + 3α3 ) + (α1 + α2 + α3 ) = 0.
It follows that α1 = −2α2 , α2 = α3 . Hence the ‘vectors’ are linearly
dependents.
Basis: A basis is a minimal set of vectors that span a vector space. In other words,
a set of vectors v1 , v2 , · · · vk , in V is called a basis of V if and only if v1 , v2 , · · · vk ,
are linearly independent and V = Span(v1 , v2 , · · · vk ). Then
i) The numbers of vector in a basis is called the dimension of the space V (dim
V ).
ii) If the set {v1 , v2 , · · · , vk } is a basis of the vector space V , then any vector v
in V can be written as a unique linear combination of the basis vectors and
the coefficients of the unique linear combination are called the components of v
with respect to that basis.
(i) R3 .
Basis: the set of vectors in Example 3 (i). Dim 3.
Dim 6.
16 CHAPTER 3. VECTOR SPACES
(iii) The set of polynomials of degree two or less with real coefficients.
Basis: {1, x, x2 }. Dim 3.
Inner (or scalar) product: Consider a vector space V . The inner product between
two elements of V is a scalar function denoted ⟨u|v⟩ that satisfies the following
properties
i) ⟨u|v⟩ = ⟨v|u⟩∗ .
ii) ⟨u|(λv + µw)⟩ = λ⟨u|v⟩ + µ⟨u|w⟩, λ, µ scalars.
iii) ⟨u|u⟩ > 0 if u ̸= 0.
Note that I have used the ‘physics’ convention, for which the expression ii) is linear
in the second argument and conjugate linear - or antilinear - in the first argument.
The inner product inducesp naturally the notion of lenght of a vector - or norm -
defined as follows: |u| = ⟨u|u⟩. Additionally, the inner product allows as to define
what we mean with orthogonality. In fact, two vectors are orthogonal if ⟨u|w⟩ = 0.
(i) In R3 :
⟨u|v⟩ = uT · v.
u1 v1
Take u = u2 , v = v2 .
u3 v3
For the first property: ⟨u|v⟩ = uT · v = (u1 v1 + u2 v2 + u3 v3 ) = vT · u =
(vT · u)∗ = ⟨v|u⟩∗ . Similar procedure for the other properties.
(ii) In C3 :
⟨u|v⟩ = u† · v.
u1 v1
Take u = u2 , v = v2 .
u3 v3
For the first property: ⟨u|v⟩ = u† ·v = (u∗1 v1 +u∗2 v2 +u∗3 v3 ) = (u1 v1∗ +u2 v2∗ +
u3 v3∗ )∗ = (v† · u)∗ = ⟨v|u⟩∗ . Similar procedure for the other properties.
Hilbert spaces, widely used in physics, are examples of vector spaces with a norm and an
inner product. Mind you, additionally, Hilber spaces also enjoy the property of completenss.
Chapter 4
From now on in the course, we will work in R3 /C3 . Please refer to the content in section
1.2.
The trace of a square matrix: It is the sum of the diagonal elements of the
matrix, i.e.
X
Tr A = Akk ≡ Akk .
k
Properties:
17
18CHAPTER 4. MATRICES: THE EIGENVALUE PROBLEM & MATRIX DIAGONALISATION
i) Symmetric matrices: AT = A.
Anti-symmetric or skew-symmetric matrices: AT = −A.
0 1 0 −i 1 0
σ1 = , σ2 = , σ3 = .
1 0 i 0 0 −1
Show that the Pauli matrices, together with the identity matrix, I, form a basis
for the vector space of the (2 × 2) hermitian matrices.
4.2. THE EIGENVALUE PROBLEM 19
Are there any vectors x ̸= 0 which are transformed by a matrix A into multiple of
themselves?
In other words: For which vectors x and scalar λ is the following eigenvalue equation
Ax = λx
satisfied?
iii) The eigenvalue equation, being a set of non homogeneous linear equations, has a non
trivial solution if and only if |A − λI| = 0.
iv) The eigenvalues of the matrix A are the roots of the characteristic polynomial.
v) The eigenvectors associated to the eigenvalue µ are the vectors x such that
(A − µ I)x = 0.
20CHAPTER 4. MATRICES: THE EIGENVALUE PROBLEM & MATRIX DIAGONALISATION
1 2 1
A = 2 1 1 .
1 1 2
1−λ 2 1
|A − λI| = 2 1−λ 1 = (1 − λ)2 (2 − λ) − 2(1 − λ) − 4(1 − λ) = 0.
1 1 2−λ
Hence λ1 = 1, λ2 = 4, λ3 = −1.
For λ1 = 1 :
0 2 1 x1 2x2 + x3
(A − I)x1 = 2 0 1 x2 = 2x1 + x3 = 0.
1 1 1 x3 x1 + x2 + x3
x1 1
Hence x1 = x1 . A possible eigenvector is: x1 = 1 .
−2x1 −2
1
For λ1 = 4 solve (A − 4I)x2 = 0 → x2 = 1 .
1
1
For λ1 = −1 solve (A + I)x3 = 0 → x3 = −1 .
0
If a matrix has an eigenvalue equal to zero, then the matrix is singular since its
determinant is zero.
−2 2 −3
A= 2 1 −6 .
−1 −2 0
4.2. THE EIGENVALUE PROBLEM 21
iv) Theorem: The eigenvectors of all special matrices are linearly independent. In
addition, they can always be chosen in such a way that they form a mutually
orthogonal set.
22CHAPTER 4. MATRICES: THE EIGENVALUE PROBLEM & MATRIX DIAGONALISATION
then the two representations for the vector x are related by x = S x′ since
n n n n
!
X X X X
x= xj ej = x′i e′ i = Sji x′i ej .
j=1 i=1 j=1 i=1
Consider now a linear operator A and the relation y = Ax. In the representation
associated with the basis {e1 , e2 , · · · , en }, it becomes y = A x. On the other hand,
in the basis {e′ 1 , e′ 2 , · · · , e′ n }, it is:
S y ′ = A S x′ → y ′ = S −1 AS x′ ,
hence A′ = S −1 AS.
Similar matrices A and A′ share basis-independent properties of the operator A they
represents such as determinant, trace and set of eigenvalues.
Theorem: Diagonalisation of a matrix: If the new basis is a set of eigenvectors of
A then A′ ≡ D is diagonal with
λ1 0 . . . 0
0 λ2 . . . 0 | | . . . |
D= x1 x2 . . . xn
... ... ... ... , S =
↓ ↓ ... ↓
0 0 . . . λn
4.3. MATRIX DIAGONALISAITON 23
1 0 3
A = 0 −2 0 .
3 0 1
Theorem: Two (n × n) matrices have the same set of eigenvectors if and only if they
commute. Note that the proof is not examinable and it will not be shown during
lectures.
AB x = BA x = λ Bx,
Then aP
vector z in the vector space spanned by the set of eigenvectors can be written
as z = ni=1 ci xi . Consider the two expressions below
n
X n
X
AB z = AB ci xi = ci µ(i) λ(i) xi ,
i=1 i=1
n
X n
X
BA z = BA ci xi = ci λ(i) µ(i) xi .
i=1 i=1
Subtract them and you get (AB − BA) z = 0 for an arbitrary z. Hence [A, B] = 0.
Note that, if the eigenvalues of one of the matrix are degenerate, then not all pos-
sible sets of eigenvectors of one matrix are eigenvectors of the other matrix as well.
However, provided that by taking linear combinations a set of common eigenvectors
can be found, the result above still applies.
i) n-power of A :
An = AA . . . A = (SDS −1 )(SDS −1 ) . . . (SDS −1 ) = SDn S −1 .
ii) Exponential of A :
∞
A
X An
e = ,
n=0
n!
then ∞
−1 )
X (SDS −1 )n
eA = e(SDS = = SeD S −1 .
n=0
n!
i) Show that U has the form U = eiH for some hermitian matrix H.
Since U is a special matrix, it can be diagonalised: U = SDS † with
iθ
e 1 0 0
0 eiθ2 0 iθi
D= · · · · · · · · · and e = λi .
0 0 eiθn
θ1 0 0
0 θ2 0
Then U = SeiΛ S † with Λ =
···
.
··· ···
0 0 θn
†
It follows that U = eiSΛS where SΛS † ≡ H is an hermitian matrix.
with
iλ
λ1 0 0 e 1 0 0
0 iλ2
λ2 0 0 e 0
D=
··· , and eiD = .
··· ··· ··· ··· ···
0 0 λn 0 0 eiλn
Then
= eiTr D = eiTr H .
P
|eiD | = Πnj=1 eiλj = ei j λj
Chapter 5
Fourier Series
where t0 is an arbitrary point along the t-axis. Apart from the term a0 , the other compo-
nents - the harmonics - have period T /n or frequency n/T. Because the frequencies of the
individual harmonics are integer multiples of the lowest frequency, the periods of the sum
is T.
It is convenient to write Fourier series using complex exponentials:
∞
a0 X 2πnt 2πnt
f (t) = + an cos + bn sin
2 n=1
T T
∞
a0 X i2πnt/T an bn −i2πnt/T an b n
= + e + +e − .
2 n=1
2 2i 2 2i
26
27
Set (an − ibn )/2 ≡ cn . Then, since an = a−n and bn = −b−n we get (an + ibn )/2 ≡ c−n . It
follows that
∞ ∞
a0 X i2πnt/T −i2πnt/T
X
cn ei2πnt/T .
f (t) = + cn e + c−n e =
2 n=1 n=−∞
Observations
iii) If f (t) is real and even then bn = 0 and coefficients cn are real and even. If f (t) is real
and odd then an = 0 and coefficients cn are purely imaginary and odd.
v) The set of frequencies present in a given periodic signal is the spectrum of the signal.
vi) The square of the magnitude of the coefficients, |cn |2 can be identified with the energy
of the single harmonics. They form the energy spectrum. It follows that the energy of
the signal is:
tZ
0 +T ∞
1 2
X
|f (t)| dt = |cn |2 .
T n=−∞
t0
Example 1 Calculate the Fourier series for the function sketched in the figure above.
The function is even, hence the coefficients bn = 0. The interval T = 2π. Consider
the function between −π and π then
−t if −π ≤ t ≤ 0
f (t) = ,
t if 0 ≤ t ≤ π.
0
Zπ Zπ
2 (−1)n − 1
Z
1 2
an = (−t) cos nt dt + t cos nt dt = t cos nt dt = .
π π π n2
−π 0 0
Spectrum: |cn|2
Figure 5.3: Spectrum in the frequency domain for the function in Example 1.
Observations
i) The larger the period in time, the small the spacing of the spectrum. If T → ∞ you
can imagine the frequencies to form a continuous spectrum.
ii) We need hight frequencies to describe sharp corners such as in the triagle function.
30 CHAPTER 5. FOURIER SERIES
−1 if −π < x < 0
f (x) =
1 if 0 < x < π.
The function is odd, hence the coefficients an = 0. The interval T = 2π. The Fourier
coefficients are:
0
Zπ Zπ
2 1 − (−1)n
Z
1 2
bn = (−1) sin nt dt + sin nt dt = sin nt dt = .
π π π n
−π 0 0
The function is discontinuous at t = 0, ±π, ±2π, . . . and its value, at these points, is
zero.
Observations
ii) We can use fourier sereis to represent periodic fucntions with a finite number of finite
discontinuities in a given period. Note that this is not possible by using Taylor series.
The value of the Fourier series at the point of the discontinuity, t0 , is the average of
the upper and lower values i.e.
f (t− +
0 ) + f (t0 )
f (t0 ) = ,
2
where f (t− +
0 ) and f (t0 ) are the left and right limits of the function at t0 , respectively.
iii) The overshooting at the points of discontinuities is called the Gibbs phenomenon. This
is the real phenomenon that does not go away in the limit. This is dues to the fact
that we have pointwise convergence but not uniform convergence.
iv) Fourier series evaluated at specific points can be used to calculate series of constant
terms. Consider the function in Example 2 and its Fourier series
4 sin 3t sin 5t
f (t) = sin t + + + ··· .
π 3 5
which implies
∞
π X (−1)n
= .
4 n=0
2n + 1
t2 if 0 < t < 2
f (t) =
0 otherwise.
All extensions below provide good representations of the function f (t) in the interval
0 ≤ t ≤ 2.
Since the Fourier series are functions, can we perform on them the common
operations of differentioation and integration?
Given a Fourier series, integration and differentiation can be used to obtain Fourier series
for other functions. However, while integration is always a safe operation in the sense that
convergence of the new series is always guaranteed, differentiation is not since an additional
power of n at the numerator reduces the rate of convergence of the new series.
t2 if 0 ≤ t ≤ 2
f (t) =
0 otherwise.
Write its Fourier series and by using the operations of integration and differentiation
find the Fourier series of the function
3
t if 0 ≤ t ≤ 2
g(t) =
0 otherwise.
Integrate f (t) :
∞
(−1)n t3
4 X πnt
t + 32 sin + c = (0 ≤ t ≤ 2),
3 n=1
(πn)3 2 3
where c is the constant of integration. We can replace the result for t into this
expression, then we get
∞ ∞
(−1)n (−1)n
X πnt X πnt
3
t = −16 sin + 96 sin + c′ (0 ≤ t ≤ 2).
n=1
πn 2 n=1
(πn)3 2
Since g(0) = 0, c′ = 0 and the expression above becomes the Fourier series of the
function g(t).
34 CHAPTER 5. FOURIER SERIES
The set of all periodic functions on the interval T that can be represented by Fourier series
forms a vector space.
i) Othonormal basis:
e2πint/T
en (t) = √ , n = 0, 1, 2, 3, . . . .
T
ii) Operations: standard addition and multiplication by a scalar.
Note that √
⟨en |em ⟩ = δmn , ⟨en |f ⟩ = T cn .
v) Parseval’s theorem:
ZT ∞
X ∞
X
2 2
|f (t)| dt = ⟨f |f ⟩ = T |cn | = |⟨en |f ⟩|2 .
0 n=−∞ n=−∞
The square length of the ‘vector’ f is equal to the sum of the squares of the vector
components with respect to the orthonormal basis. In fact
* ∞ ∞
+ ∞ ∞
X X X X
⟨f |f ⟩ = ⟨en |f ⟩ en | ⟨em |f ⟩ em = ⟨en |f ⟩∗ ⟨em |f ⟩⟨en |em ⟩ = T |cn |2 .
n=−∞ m=−∞ n,m=−∞ n=−∞
Chapter 6
Given I such that I[f ] = g, the inverse operator I −1 is also a linear operator and
I −1 [g] = f.
There are several types of integral functions. We are going to discuss the Fourier and the
Laplace transforms.
35
36 CHAPTER 6. INTEGRAL TRANSFORMS AND THE DIRAC DELTA FUNCTION
Observations
R∞
i) If −∞ |f (t)|dt is finite, then the integral transform exists and it is continuous (no
proof). Note that, this does not mean that the inverse Fourier transform exists. On
the other hand, we can say that if f is continuous and has a Fourier transform, then
its inverse Fourier transform exists.
Z∞
1
F[f (t)](ω) ≡ fˆ(ω) = f (t) e−iBωt dt,
A
−∞
with √
A = 1, B = ±1, or A = 2π, B = ±1, or A = 1, B = ±2π.
Note that the inverse Fourier transform should be defined consistently with the above
definitions.
iii) We need fourier trasnfrom because most functions are not periodic and Fourier sereis
cannot be used. Non-periodic functions can be seen as periodic functions defined over
an infinite interval.
How fourier transforms emerge from the fourier series in the limit
Consider the complex Fourier series with period T
T /2
X∞ ∞
X 1 Z
f (t) = cn ei2πnt/T = f (t) e−2πint/L dt ei2πnt/L .
T
n=−∞ n=−∞
−T /2
Z∞
∞
Z∞
Z
dω 1
f (t) = f (t) e−itω dt eitω = dω fˆ(ω) eitω .
2π 2π
−∞ −∞ −∞
We have shown that the scaled Fourier coefficent, T cn , of the function f tends to fˆ.
6.1. FOURIER TRANSFORMS 37
Example 1 Calculate the complex Fourier series for the following periodic function
0 −T /2 ≤ t ≤ −1/2
f (t) = 1 −1/2 < t < 1/2 , T > 1,
0 1/2 ≤ t ≤ −T /2
and the Fourier transform for the following non periodic function
1 −1/2 < t < 1/2
rect(t) ≡ g(t) =
0 otherwise
Then compare T cn from the Fourier series of f (t)) and ĝ(ω) by sketching them on
the same axis.
1
The coefficients for the complex Fourier series of f (t) are: cn = πn
sin(nπ/T ). Then
ZT /2
sin(nπ/T )
T cn = = dt f (t) ei2πnt/T .
nπ/T
−T /2
Z1/2 1/2
eiωt sin(ω/2)
ĝ(ω) = eiωt dt = = ≡ sinc(ω/2).
−iω −1/2 ω/2
−1/2
i) The spectrum of a periodic function is always discreate. On the other hand, the
Fourier transform of a non-periodic function produces a continuous spectrum.
ii) Note that the sinc-function is a continuous function even if the rect-function is not.
iv) The Fourier transform and its inverse allow us to see two different representations of
the same signal.
v) Parseval’s identity:
Z∞ Z∞
|f (t)|2 dt = 2π |fˆ(ω)|2 dω.
−∞ −∞
If f is even then its Fourier trasform is even. If f is odd its Fourier trasform is odd.
If f is real and even then its Fourier trasform is real and even. On the other hand,
if f is real and odd its Fourier trasform is purely imaginary and odd.
Translation or shift:
Exponential multiplication:
Scaling or stretch:
Z∞
F[f (at)](ω) = f (at) e−iωt dt,
−∞
Z∞
1 ′ 1 ω
F[f (at)](ω) = f (t′ ) e−iωt /a dt = fˆ .
|a| a a
−∞
Note that a function squeezed in the time domain is streached out in the frequency
domain and viceversa.
6.1. FOURIER TRANSFORMS 39
Example 2 Calculate the Fourier transform of f (at + b), where a and b are
constants, in terms of the Fourier transform of f (t). Then, apply the formula
to the function rect((t − 4)/3), where the rect function in defined in Example
1.
F[f (at + b)](ω) = F[f (a(t + b/a)](ω).
By using scaling and translation in this order, we get
1 ω 1 ω 1 ˆ ω iωb/a
F[f (t + b/a)] = F[f (t)] eiωb/a = f e .
|a| a |a| a |a| a
sinc(3 ω/2)
F[rect((t − 4)/3)](ω) = 3 e−i4 ω .
3 ω/2
Z∞
F[f ′ (t)](ω) = f ′ (t) e−iωt dt
−∞
Z∞
∞
e−iωt
f (t) −∞
+ (iω) f (t) e−iωt dt = (iω)fˆ(ω).
−∞
R∞
In fact, since −∞
|f (t)|dt is finite, f (t) −→ 0 when t → ±∞.
For a derivative of order n we have
Z∞ Z∞
fˆ(ω)ĝ(ω) = dt f (t) e −iωt
dz g(z) e−iωz .
−∞ −∞
40 CHAPTER 6. INTEGRAL TRANSFORMS AND THE DIRAC DELTA FUNCTION
Z∞ Z∞ Z∞ Z∞
Hence, the result of such an operation is h and such an operation is called convolution.
It is denoted by a start ∗.
Z∞
h(y) = f (t)g(y − t) dt ≡ (f ∗ g)(y) = (g ∗ f )(y).
−∞
ĥ(ω)(ω) = fˆ(ω)ĝ(ω).
Observations
Let us see an example of the use of the convolution in the context of filters. A filters
modifies the spectral content of an input signal. The filtering is realised by a fixed function
in the frequency domain called transfer function ĥ.
Example 3: lawpass filter Consider an input signal u and a lawpass filter. This type
of filter elimitates all frequencies greater than |ω0 |. A suitable transfer function is:
1 |ω| < ω0
ĥ(ω) = , ω0 > 0.
0 otherwise
6.1. FOURIER TRANSFORMS 41
and the output signal v is given by the convolution of u, the input signal, and h
Z∞
v(y) = (u ∗ h)(y) = (ω0 /π) u(y − t) sinc(tω0 ) dt.
−∞
r
p2 1 k
H(p, x) = + mω 2 x2 = E, ω=
2m 2 m
and the Schrödinger equation associated with it i.e
h̄2 d2 1
− ψ(x) + mω 2 x2 ψ(x) = E ψ(x),
2m dx2 2
where ψ(x) represents the wave function of the harmonic oscillator in coordinate
space. The solution for the ground state is:
2 h̄ω
ψ0 (x) = e−(mω/2h̄)x , E0 = .
2
p
This is a Gaussian with width ∆x = h̄/mω. We want to find out the ground
state wave function in momentum space. In order to do so, calculate the Fourier
transform of ψ0 (x). The variable in Fourier space is k = p/h̄ (see workshops for
Fourier transform of a Gaussian.) Then, calculate ∆p. What is the meaning of the
quantity ∆x∆p?
42 CHAPTER 6. INTEGRAL TRANSFORMS AND THE DIRAC DELTA FUNCTION
1
− 2ε < x < 2ε
1 x
ε
δε (x) = rect = , ε > 0.
ε ε 0 otherwise
If we take the duration of the pulse to decrease, while retaining a unit area, then, in the
limit, we are led to the notion of the Dirac δ-function.
Epsilon:= 1
Epsilon:= 0.5
Epsilon:= 0.125
Epsilon:= 0.0625
Epsilon:= 0.03125
In order to define the Dirac δ-function, we need to pair it with a test function, f , by means
of an integration i. e.
Z∞
δε (x)f (x) dx.
−∞
The test function f is a smooth function near the origin so that we can use Taylor expansion
6.2. THE DIRAC DELTA FUNCTION 43
to write
Z∞ Zε/2 Zε/2
1 1
δε (x)f (x) dx = f (x) dx = (f (0) + f ′ (0) x + · · · + O(x2 )) dx
ε ε
−∞ −ε/2 −ε/2
2
= f (0) + O(ε ).
In the limit
Z∞
lim δε (x)f (x) dx = f (0).
ε→0
−∞
Z∞ Z∞
δ(x) f (x) dx = f (0), δ(x) dx = 1.
−∞ −∞
The Dirac delta function δ(x − a) - with a a constant - is a generalised function (or
distribution) and it is defined as the limit of a sequence (not unique) of functions. Its
defining property is:
Zβ
f (a) α < a < β
f (x)δ(x − a) dx =
0 otherwise
α
R4
i) δ(x − π) cos x dx = cos π = −1.
−4
R∞
ii) δ̂(ω) = δ(t) e−iωt dt = 1.
−∞
Note that in the last example we have calculated the Fourier transform of the Dirac δ-
function. If F[δ(t)](ω) = 1, then it must be that F −1 [1](t) = δ(t). Indeed. This is called
the integral representation of the Dirac delta function i.e.
Z∞
1
δ(t) = eiωt dω.
2π
−∞
44 CHAPTER 6. INTEGRAL TRANSFORMS AND THE DIRAC DELTA FUNCTION
Z∞ Z∞
1 −iωx −ita 1
ita
eit(−ω+a) + e−it(ω+a) dt
F [cos(ta)] (ω) = e e +e dt =
2 2
−∞ −∞
= π (δ(−ω + a) + δ(−ω − a)) = π (δ(ω − a) + δ(ω + a)) .
Calculate the inverse and verify that you get back the cosine function.
R∞
Example 7 Calculate I = dt δ(x2 − b2 ) f (x) dx, where b is a constant.
−∞
δ(x − b) δ(x + b)
δ(x2 − b2 ) = + ,
|2b| | − 2b|
then
Z∞ Z∞
1 1 1
I= dt δ(x − b) f (x) + dt δ(x + b) f (x) = (f (b) + f (−b)) .
2b 2b 2b
−∞ −∞
R∞
iii) f (x)δ ′ (x − a)dx = −f ′ (a).
−∞
Example 8 Calculate the Laplace transform of the functions t and cosh(kt), where k
is a constant.
Z∞ ∞
−st e−st 1
L[t](s) = te dt = = for s > 0.
−s2 0 s2
0
Z∞ ∞ ∞
e(k−s) e−(k+s)
−st 1 s
L[cosh(kt)](s) = cosh(kt) e dt = − =
2 k−s 0 k+s 0 s2 − k 2
0
for s > |k|.
46 CHAPTER 6. INTEGRAL TRANSFORMS AND THE DIRAC DELTA FUNCTION
Delay rule:
Exponential multiplication:
Scaling:
1 ¯ s
L[f (at)](s) = f , a ̸= 0 constant.
|a| a
Polynomial multiplication:
dn f¯(s)
L[tn f (t)](s) = (−1)n , n = 1, 2, 3 . . . .
dsn
Z∞ Z∞
∞
′
L[f (t)](s) = ′
f (t) e −st
dt = f (t) e−st 0 +s f (t) e−st dt = −f (0)+sf¯(s), s > 0.
0 0
L[f (n) (t)](s) = sn f¯(s) − sn−1 f (0) − sn−2 f (1) (0) − · · · − f (n−1) (0), s > 0,
Example 9 Using the properties of the Laplace transforms and the result
L[cosh(kt)](s) = s/(s2 − k 2 ) with s > |k|, calculate the Laplace transform of the
following functions
i) sinh(kt).
ii) t sinh(kt).
d k 2ks
L [t sinh(kt)] (s) = (−1) = for s > |k|.
ds s − k2
2 (s2 − k 2 )2
Set (u + v) = t, then
Z∞ Z∞
f¯(s)ḡ(s) = du f (u) dt e−st g(t − u).
0 u
Swapping the order of integration, and being careful with the new limits of integration, we
have
Z∞
t t
Z Z
f¯(s)ḡ(s) = dt e−st du f (u)g(t − u) = L f (u)g(t − u) du (s),
0 0 0
which implies
Zt
(f ∗ g)(t) = f (u)g(t − u) du.
0
48 CHAPTER 6. INTEGRAL TRANSFORMS AND THE DIRAC DELTA FUNCTION
Formally
L−1 [f¯(s)] = f (t).
The general method for calculating inverse Laplace transforms requires notions of complex
analysis. Nevertheless, in some cases it is possible to calculate an inverse Laplace transforms
by means of
convolution theorem,
together with the Laplace transform properties and tables of known Laplace transforms
(see table on page 455 in Riley.) In this course we are going to limit ourselves to the use
of these two techniques.
Example 10 Use partial fraction decomposition and the table at page 455 in order
to calculate f (t) given that
s+3
f¯(s) = .
s(s + 1)
3 2
f¯(s) = − = f¯1 (s) + f¯2 (s).
s s+1
Using the tables we have L−1 f¯1 (s) (t) = 3 for s > 0 and L−1 f¯2 (s) (t) = −2 e−t
for s > 0.
Example 11 Use the convolution theorem and the table at page 455 in order to
calculate f (t) given that
2
f¯(s) = .
s2 (s − 1)2
2 1
f¯(s) = 2 = f¯1 (s)f¯2 (s).
s (s − 1)2
Using the tables we have L−1 f¯1 (s) (t) = 2t for s > 0 and L−1 f¯2 (s) (t) = t et for
s > 1 hence
6.3. LAPLACE TRANSFORMS 49
Zt
L−1 f¯(s) (t) = 2(t − u) u eu du = 2 et (t − 2) + 2 (t + 2),
for s > 1.
Example 12 Use the Laplace transform in order to find a solution, i.e. f (t), for the
following ODE
df
+ 2 f (t) = e−t , f (0) = 3.
dt
Start by taking the Laplace transform of the ODE.
df
(s) + 2 L [f ] (s) = L et (s),
L
dt
which becomes: −f (0) + s f¯(s) + 2 f¯(s) = 1/(s + 1) →
3s + 4 1 2
f¯(s) = = .
(s + 2)(s + 1) s+1s+2
50
7.1. THE DEL OPERATOR 51
∇ϕ = 2x i + 2y j + 2z k = 2 r.
i) ∇ · (a + b) = ∇ · a + ∇ · b
ii) ∇ · (ϕ a) = ∇ϕ · a + ϕ(∇ · a), ∇ · (a × b) = b · (∇ × a) − a · (∇ × b)
iii) Special case: ∇ · r = 3
iv) If ∇ · a = 0, a is said to be solenoidal.
∇ · (a × b) = b · (∇ × a) − a · (∇ × b).
i) ∇ × (a + b) = ∇ × a + ∇ × b
ii) ∇ × (ϕ a) = (∇ϕ) × a + ϕ(∇ × a),
∇ × (a × b) = (b · ∇)a − (∇ · a)b − (a · ∇)b + (∇ · b)a
iii) Special case: ∇ × r = 0
iv) If ∇ × a = 0, a is said to be irrotational.
52 CHAPTER 7. VECTOR CALCULUS: DEL OPERATOR & INTEGRALS
∇ · a ̸= a · ∇, ∇ × a ̸= a × ∇.
Let us apply the nabla operator on gradient, divergence and curl. We got five possible
combination quite common in physics, for instance in electromagnetism. They are:
∂ 2ϕ ∂ 2ϕ ∂ 2ϕ
∇ · (∇ϕ) = ∇2 ϕ = + + 2,
∂x2 ∂y 2 ∂z
iv) ∇ × (∇ × a) = ∇(∇ · a) − ∇2 a.
(a) ∇ · B = 0, (b) ∇ · E = 0,
∂E ∂B
(c) ∇ × B = ϵ0 µ0 , (d) ∇ × E = − .
∂t ∂t
i) Derive the Laplace equation of electrostatic.
∂B ∂(∇ × B)
∇ × (∇ × E) = −∇ × =− .
∂t ∂t
Take the time derivative of (c):
∂(∇ × B) ∂ 2E
= −ϵ0 µ0 2 = ∇(∇ · E) − ∇2 E
∂t ∂t
Combine the two results
∂ 2E 1 ∂ 2E
2 −2 2
∇ E = ϵ0 µ0 2 , (ϵ0 µ0 ) = c → − ∇ E.
∂t c2 ∂t2
7.2. LINE INTEGRALS 53
r(u) = u i − u j, −1 ≤ u ≤ 1
This is clearly a circle with centre at the point (2, 0), hence
r(u) = 2 + cos u i + sin u j, 0 ≤ u ≤ 2π.
i) The derivative r′ (u) ≡ t(u) is a vector tangent to the curve at each point.
ii) The arch length s measured along the curve satisfies:
2 2
r
ds dr dr dr dr dr
= · = , ds = ± · du,
du du du du du du
where the sign fixes the direction of measuring s, for increasing or decreasing u.
Note that ds is the line element of the curve.
Definition: The line integral (or path integral) of a vector field a(r) along the
curve C is:
Z uZmax
dr
a(r) · dr = a(r(u)) · du,
du
C umin
i) C1 : r(u) = u i + u j + u k, 0 ≤ u ≤ 1.
hence
Z Z1
5
a · dr = (u eu + 2 u2 ) du = .
3
C1 0
ii) C2 : r(u) = u i + u2 j + u3 k, 0 ≤ u ≤ 1.
hence
Z Z1
e 1
a · dr = (u eu2 + 2 u7 + 3u5 ) du = + .
2 4
C2 0
Properties/Observations.
Z Z Z Z
ϕ dr, a × dr, ϕ ds, a ds.
C C C C
7.2. LINE INTEGRALS 55
R
Example 6 Evaluate C
ϕ ds where ϕ = (x − y)2 and r(u) = a cos u i +
a sin u j, 0 ≤ u ≤ π, a constant.
p
ds = ( dr/du · dr/du) du = a du, then
Z Zπ
ϕ ds = (a cos u − a sin u)2 a du = π a3 .
C 0
R
Theorem: Consider the integral I = C a · dr, where the path C is in a simply
connected region D. Then, the following statements are equivalent:
i) The line integral I is independent of the path C. It only depends on the end-
points of the path C.
iii) ∇ × a = 0.
The vector field a is said to be conservative (or irrotational ) and ϕ is its potential.
In addition:
R
i) I = ∇ϕ · dr = ϕ(B) − ϕ(A) where A and B are the endpoints of the path C.
C
∂ϕ x2 y 2
= ax = xy 2 + z → ϕ = + zx + f (y, z),
∂x 2
∂ϕ ∂f
= ay = x 2 y + 2 = x 2 y + → f = 2y + g(z),
∂y ∂y
∂ϕ dh
= az = x = x + → h = c.
∂z dz
It follows that ϕ = (xy)2 /2 + xz + 2y + c.
R
ii) Evaluate the integral C a · dr along the curve r(u) = u i + 1/u j + k with
end points A = (1, 1, 1) and B = (3, 1/3, 1).
Z
2
a · dr = ϕ(B) − ϕ(A) = .
3
C
Definition: The surface integrals of vector functions a(r) over a smooth surface
S, defined by r(u, v) with orientation given by the normal n̂, is:
Z Z umax
Z Zvmax
∂r ∂r
a(r) · dS = a(r) · n̂dS = a(r(u.v)) · × du dv.
∂u ∂v
S S umin vmin
R
Example 8 Evaluate the integral I = S
a · dS over the surface defined by
where a = z j + xy k. We need
∂r ∂r
= −2 sin u i + 2 cos u j, = k.
∂u ∂v
Hence
∂r ∂r
dS = × dudv = (2 cos u i + 2 cos u j) du dv,
∂u ∂v
and a(r(u, v)) = v j + 4 sin u cos u k with a · dS = (2v sin u) du dv. It follows
that
Zπ Z2
I = 2 du sin u dv v = 6.
0 −1
Observation.
i) The integral depends on the orientation of the surface S since the sign of dS
depends on the orientation of S.
ii) If the surface is closed, by convention, the vector n is pointed outwards the
volume enclosed.
iii) In order to parametrise the surface is often useful to use alternative coordinates
systems. For instance:
58 CHAPTER 7. VECTOR CALCULUS: DEL OPERATOR & INTEGRALS
R
Example 9 Evaluate the integral S
ϕ dS where S is the surface of the hemi-
sphere x2 + y 2 + z 2 = a2 with z ≥ 0, a constant and ϕ = z 2 . Using spherical
polar coordinates we have:
∂r ∂r
= a cos θ cos ϕ i+a cos θ sin ϕ j−a sin θ k, = −a sin θ sin ϕ i+a sin θ cos ϕ j.
∂θ ∂θ
Hence
∂r ∂r
dS = × dθdϕ = a sin θr dθdϕ dS = |dS| = a2 sin θ dθ dϕ,
∂θ ∂ϕ
Z Zπ/2
4 2
ϕ dS = 2π a dθ cos2 θ sin θ = a4 π.
3
S 0
Observation
Theorems of integration
ZZZ ZZ
(∇ · a) dV = a · dS,
V S
Example 1 Use the divergence theorem to show that the Gauss’s law of elec-
trostatic for a point-like charge q is equivalent to the Maxwell’s equation
∇ · E = ρ/ϵ0 .
Consider the point-like charge at the origin. Then
ZZZ
qr
E= , with q = ρ dV,
4πϵ0 r3
V
where ρ is the charge density. On the other hand, Gauss’ law states:
RR
S
= E · dS = q/ϵ0 . It follows, by using the divergence theorem, that
ZZ ZZZ ZZZ
1
E · dS = (∇ · E) dV = ρ dV.
ϵ0
S V V
60
61
For the integrals on the right hand side use spherical polar coordinates.
From the Example 9 in the previous chapter, we know that dS1 = a sin θ r dθdϕ.
Also
hence
ZZ Zπ/2
5
a · dS1 = a3 2π (cos2 θ + sin θ cos θ) dθ = πa3 .
3
S1 0
For the second integral on the right hand side a suitable parametrisation is
r2 (ϕ) = r cos ϕ i + r sin ϕ j. Hence
ZZ Za
∂r ∂r
dS1 = × drdϕ = −r k drdϕ → a·dS2 = −a2π r dr = −πa3 .
∂ϕ ∂r
S2 0
It follows that the divergence theorem reads: 2/3 πa3 = 5/3πa3 − πa3 .
62 CHAPTER 8. THEOREMS OF INTEGRATION
Example 3 Derive Gauss’s law for a general surface S. Then use the divergence
theorem to show that
21
∇ = −4πδ(r),
r
where δ(r) is the 3-dimensional delta function
ZZZ
f (r) a ∈ V
f (r)δ(r − a) dV = .
0 otherwise
V
In fact, ∇ · (r/r3 ) = 0 for r ̸= 0, i.e. if the origin is not inside the surface S.
Then consider the volume between the surface S and a small sphere around
the origin S ′ . Because of the divergence theorem
ZZ ZZ
r r
3
· dS − · dS′ = 0.
r r3
S S′
We can calculate easily the second integral, since dS′ = r2 r̂ sin θdθdϕ, hence
ZZ Zπ
r
· dS′ = 2π sin θdθ = 4π.
r3
S′ 0
It follows that
ZZ ZZ
q r q q
E · dS = · dS = 4π = .
4πϵ0 r3 4πϵ0 ϵ0
S S
Since ZZ
r 4π r = 0
· dS = ,
r3 0 r= ̸ 0
S
we can write
ZZZ r ZZZ ZZZ
2 1
∇ · 3 dV = − ∇ dV = 4πδ(r) dV.
r r
V V V
I ZZ
∂Q ∂P
(P dx + Qdy) = − dxdy,
∂x ∂y
C R
where P (x, y) and Q(x, y) are two functions whose derivatives are continuous and
single-valued inside and on a boundary of a simple connected region R in the xy-
plane and C = ∂R is a closed, anticlockwise oriented curve.
Green’s theorem is also called the divergence theorem in two dimensions. In fact,
consider such a theorem in Cartesian coordinates for a vector function a. Then in
two dimensions it reads
ZZZ ZZ I I
∂ax ∂ay
∇·a= + dxdy = (a · n̂)dS = (ax dy − ay dx),
∂x ∂y
V R ∂V C
where C is the boundary of the triangle with vertices (0, 0), (1, 0), (1, 2).
Set F = (P, Q) = (y − sin x, cos x), then
ZZ ZZ
∂Q ∂P
I= − dxdy = − (sin x + 1) dx dy,
∂x ∂y
R R
Z1 Z2x Z1
I=− dx dy (sin x + 1) = − dx (sin x + 1) 2x = 2 cos(1) − 2 sin(1) − 1.
0 0 0
Observation
i) Note that Green’s theorem holds in multiply connected regions as well. In this
case the integrals must be calculated over all boundaries of the regions suitably
oriented (positive oriented).
ii) Green’s theorem can be used to evaluate the area A of a region R. In fact, set
F = (P, Q), then choose P and Q such that
∂Q ∂P
− = 1,
∂x ∂y
that is F = (−y/2, x/2) or F = (0, x) or F = (−y, 0). Then Green’s theorem
implies I I I
1
A= (xdy − ydx) = xdy = − ydx,
2
C C C
respectively, where C = ∂R.
iii) It can be shown that
∂Q ∂P
=
∂x ∂y
is a necessary and sufficient condition for the field F = (P, Q) to be conservative.
In this case Green’s theorem implies
I I
(P dx + Qdy) = F · dr = 0.
C
65
Z2π Z2π
1 ab
A= (ba cos ϕ cos ϕ + ab sin ϕ sin ϕ) dϕ = dϕ = πab.
2 2
0 0
Stokes’ theorem: ZZ Z
(∇ × a) · dS = a · dr,
S C
where S is a bounded smooth surface with boundary ∂S = C and S is a piecewise
smooth curve. C and S must have compatible orientation.
Compatible orientation: Imagine you are walking on the surface (side with the
normal pointing out). If you walk near the edge of the surface in the direction
corresponding to the orientation of C, then the surface must be to your left.
ZZ Z Z
(∇ × a) · dS = a · dra + a · drb
S Ca Cb
then Z Z 2π
3
a · drb = b cos2 ϕ dϕ = b3 π.
0
Cb
Given the position vector r expressed in cartesian coordinates x, y, z we can use a change
of variable to express this vector in terms of a new set of coordinates u, v, w
r(u, v, w) = x(u, v, w) i + y(u, v, w) j + z(u, v, w) k,
where x, y, z are continuous and differentiable functions.
The line element is:
∂r ∂r ∂r
dr = du + dv + dw.
∂u ∂v ∂w
where the vectors ∂r/∂u, ∂r/∂v, ∂r/∂w are linearly independent. If these vectors are
orthogonal, then the coordinates u, v, w are said to be orthogonal curvilinear coordi-
nates.
Properties
New basis:
∂r ∂r ∂r
= hu êu , = hv êv , = hw êw ,
∂u ∂v ∂w
where hu , hv hw positive and called scale factors. In an orthogonal curvilinear coor-
dinate system these vectors are orthogonal and êu , êv , êw form an orthonormal basis
of the three dimensional vector space R3 .
Line element:
dr = hu êu du + hv êv dv + hw êw dw.
The scale factors determine the changes in length along each orthogonal direction
resulting from changes in u, v, w.
Arc length:
ds2 = dr · dr = h2u (du)2 + h2v (dv)2 + h2w (dw)2
67
68CHAPTER 9. CHANGE OF VARIABLES: ORTHOGONAL CURVILINEAR COORDINATES
Volume element:
∂r ∂r ∂r
dV = · × du dv dw = hu hv hw dudvdw.
∂u ∂v ∂w
Example 1 Derive the the scale factors, basis vector and volume elements for
1) Cartesian coordinates.
r(x, y, z) = x i + y j + z k, hence
∂r ∂r ∂r
= i, = j, =k → hx = hy = hz = 1, êx = i, êy = j, êz = k,
∂x ∂y ∂z
and dV = dxdydz.
∂r ∂r ∂r
= cos ϕ i + sin ϕ j, = −ρ sin ϕ i + ρ cos ϕ j, = k, →
∂ρ ∂ϕ ∂z
hρ = 1, hϕ = ρ, hz = 1, êρ = cos ϕ i+sin ϕ j, êϕ = − sin ϕ i+cos ϕ j, êz = k
and dV = ρ dρdϕdz.
∂f ∂f ∂f
df = du + dv + dw = ∇f · dr.
∂u ∂v ∂w
In cartesian coordinates this becomes
∂ ∂ ∂
∇f · dr = i +j +k · (i dx + j dy + k dz) .
∂x ∂y ∂z
69
∇f · dr = ∇f · (hu eu du + hv ev dv + hw ew dw) ,
which implies
êu ∂f êv ∂f êw ∂f
∇f = + + .
hu ∂u hv ∂v hw ∂w
This is the gradient of the function f in general curvilinear coordinates. It follows that
the del operator is:
êu ∂ êv ∂ êw ∂
∇= + + .
hu ∂u hv ∂v hw ∂w
Without derivation, we also have
Divergence:
1 ∂ ∂ ∂
∇·a= (hv hw au ) + (hw hu av ) + (hu hv aw ) ,
hu hv hw ∂u ∂v ∂w
where a = au êu + av êv + aw êw .
Curl:
hu êu hv êv hw êw
1 ∂ ∂ ∂
∇×a= ∂u ∂v ∂w
hu hv hw
hu au hv av hw aw .
Laplacian:
2 1 ∂ hv hw ∂ϕ ∂ hw hu ∂ϕ ∂ hu hv ∂ϕ
∇ ϕ= + + .
hu hv hw ∂u hu ∂u ∂v hv ∂v ∂w hw ∂w
Example 2 Find the position vector r in cylindrical polar coordinates and verify that
∇ · r = 3.
From Example 1, we have the unit vectors for the cylindrical polar coordinates. By
inverting those relations we obtain:
Then
r = ρ cos ϕ(cos ϕ êρ − sin ϕ êϕ ) + ρ sin ϕ(sin ϕ êρ + cos ϕ êϕ ) + z êz = ρ êρ + z êz
and
1 ∂ 2
∂
∇·r= ρ + (ρ z) = 3.
ρ ∂ρ ∂z
70CHAPTER 9. CHANGE OF VARIABLES: ORTHOGONAL CURVILINEAR COORDINATES
Example 3 A rigid body is rotating about a fixed axis with a constant angular velocity
ω. Take ω to lie along the z-axis. Use cylindrical polar coordinates to compute
1) v = ω × r.
The position vector has been found in Example 2. Then ω = ω êz . Then
2) ∇ × v.
êρ ρ êϕ êz
1 ∂ ∂ ∂
∇×v = ∂ρ ∂ϕ ∂z = 2ω êz = 2 ω.
ρ 2
0 ωρ 0
iii) dV = ρ dρdϕdz.
Spherical polar coordinates:
r(r, θ, ϕ) = r sin θ cos ϕ i+r sin θ sin ϕ j+r cos θ k, r ≥ 0, 0 ≤ ϕ < 2π, 0≤θ≤π
hr = 1, êr = sin θ cos ϕ i + sin θ sin ϕ j + cos θ k,
i) hθ = r, êθ = cos θ cos ϕ i + cos θ sin ϕ j − sin θ k,
hϕ = r sin θ, êϕ = − sin ϕ i + cos ϕ j.
êr r2 sin θ dθdϕ (r = const)
ii) dS = êθ r sin θ drdϕ (θ = const)
êϕ r drdθ (ϕ = const).
Introduction to probability
71
72 CHAPTER 10. INTRODUCTION TO PROBABILITY
2. s = 2, s∈S outcome
A or B → A ∪ B, Union
A and B → A ∩ B, Intersection
A implies B → A ⊆ B
i) P (S) = 1, P (∅) = 0
In general
∞
! ∞
[ X X X
P Aj = P (Aj ) − P (Ai ∩ Aj ) + P (Ai ∩ Aj ∩ Ak ) −
j=1 j=1 i<j i<j<k
n+1
. . . (−) P (A1 ∩ · · · ∩ An ).
Let A be an event for an experiment with a finite space S with equally likely outcome,
then
number of outcomes favourable to A
P (A) = .
number of outcomes in S
This definition is based on relative frequency over a large number of repeated trials.
Suppose you want to know the long-run relative frequency of setting head from a fair coin.
For each trial you will get an H or a T. We perform n trials and count the number of times
H appears. Then we estimate the probability of H, P (H), by the relative frequency. From
the figure 10.1, we can note as the probability of H approaches 1/2.
74 CHAPTER 10. INTRODUCTION TO PROBABILITY
1.0
Probability of getting heads vs Number of trials
Sequence 1
Sequence 2
Sequence 3
Sequence 4
True probability (0.5)
0.8
Probability of heads
0.6
0.4
0.2
0.0
1 2 5 10 20 50 100 200 500 1000 3000 10000
Number of trials (log scale)
Example 2 Find the probability of drawing from a pack of card one that has at least
one of the following properties (Note that the total number of cards is 52. There are
2 black suits - clubs, spades, and 2 red suits - hearts, diamonds. There are 13 cards
in each suit. Each card in a single suit has a different rank. See figure 10.2):
4 26 13
P (A) =
, P (B) = , P (C) = .
52 52 52
We are interested in the following event: A ∪ B ∪ C.
Since
2 1
P (A ∪ B) = , P (A ∪ C) = , P (B ∪ C) = 0, P (A ∪ B ∪ C) = 0,
52 52
we have
40
P (A ∪ B ∪ C) = ∼ 0.77 = 77%.
52
Sampling without replacement and the order matter. Consider n objects and
consider making k choices from them one at a time without replacement. The order
matter. Then the number of outcomes is:
n!
n(n − 1)(n − 2) . . . (n − k + 1) = Permutation of size k on n.
(n − k)!
76 CHAPTER 10. INTRODUCTION TO PROBABILITY
Sampling without replacement and the order does not matter. Consider n
objects and consider making k choices from them one at a time without replacement.
The order does not matter. Then the number of outcomes is:
n n(n − 1)(n − 2) . . . (n − k + 1) n!
= = The binomial coefficient.
k k! (n − k)!k!
Note the division by k! with respect to the previous case. We must take into account
the permutation of k objects because now they are indistinguishable.
Note that at k = 23 the probability already exceeds 1/2 while at k = 57 the probability
exceeds 99%
10.2. COUNTING THE NUMBER OF OUTCOMES IN AN EVENT 77
1.0
Probability of Birthday matches against the number of people
Probability: P(k)
k = 23
k = 57
0.8
Probability of Birthday matches
0.6
0.4
0.2
0.0
0 20 40 60 80 100
k
Example 4 Consider a college with n students. Count the number of ways to choose
a president, a vice president and a treasurer. This is a situation of sampling without
replacements in which the order matters. We assume that the 3 roles are distinct.
Then, the number of ways is:
Now, let us now suppose that we want to choose the 3 candidates without predeter-
mined titles. In this case we need to consider overcounting and make adjustments
accordingly. Hence, the number of ways becomes:
n n(n − 1)(n − 2)
=
3 3!
Let us now suppose that we want to create a committee of 5 people out of the
remaining number of students. How many possibilities are there? Answer:
n n−3
.
3 5
78 CHAPTER 10. INTRODUCTION TO PROBABILITY
Since there are 13 choices for the rank we have 3 of and 12 choices for the rank we
have 2 of, the probability is:
13 · 43 12 · 42
P (full house) = 52
≈ 0.00144.
5
All probabilities are conditional. There is always background knowledge built into every
probability. Previously we said that probability allows us to express our belief or uncer-
tainty about events. The conditional probability allows us to answer the question of how
to update our beliefs in light of new evidence.
Definition: Conditional probability
If A and B are events, then the conditional probability of A given B, denoted P (A|B) is
defined as
P (A ∩ B)
P (A|B) = .
P (B)
Independence of events
If the events A and B are independent, then
B = (B ∩ A1 ) ∪ (B ∩ A2 ) ∪ · · · ∪ (B ∩ An ) −→
P (B) = P (B ∩ A1 ) + P (B ∩ A2 ) + · · · + P (B ∩ An )
= P (B|A1 )P (A1 ) + P (B|A2 )P (A2 ) + · · · + P (B|An )P (An ).
This tells us that to get the unconditional probability of B, we can divide the sample space
into disjoint slices Ai , find the conditional probability of B within each of the slices, then
take a weighted sum of the conditional probabilities where the weights are the probabilities
P (Ai ).
Example 6 Let us suppose that we have 3 containers with some black and red balls
as in the figure 10.5. Let us choose a ball. What is the probability that the ball is
red?
80 CHAPTER 10. INTRODUCTION TO PROBABILITY
Then
P (A) = P (A|B1 )P (B1 ) + P (A|B2 )P (B2 ) + P (A|B3 )P (B3 ).
Since
1 2 3 1
P (B1 ) = P (B2 ) = P (B3 ) = , P (A|B1 ) = , P (A|B2 ) = , P (A|B3 ) = .
3 3 4 2
Then
2 3 1 1 23
P (A) = + + = = 0.638.
3 4 2 3 36
Bayes’ rule. Take the formula of conditional probability and rearrange it, that is
P (B|A)P (A)
P (A ∩ B) = P (A|B)P (B) = P (B|A)P (A) =⇒ P (A|B) = .
P (B)
Suppose A is just an event in a collection of events which form a partition of the sample
space S (Ai with i=1,2,. . . , n) and relabel it Aj . Then
This is still Bayes’ rule in a particularly useful form. Note that Bayes’ rule lies at the core
of Bayesian inference, which is heavily used in data analysis.
Example 7a Suppose a screening test for doping in sport is claimed to be 95% accu-
rate, meaning that 95% of dopers, and 95% of non-dopers, will be correctly classified.
Assume 1 in 50 (2%) athletes are truly doping at anytime. If an athlete tests positive,
what is the probability that they are truly doping? Let us use Bayes’ rule.
- partition: A ∩ Ā = ∅.
Hence
P (B|A)P (A)
P (A|B) = .
P (B|A)P (A) + P (B|Ā)P (Ā)
Since
- P (B|Ā) = 0.05.
Then
0.95 · 0.02
P (A|B) = ≃ 28%.
0.95 · 0.02 + 0.05 · 0.98
Note that P (A|B) = 28% ̸= P (B|A) = 95%.
a
From The art of Statistics, D. Spiegelhalter
82 CHAPTER 10. INTRODUCTION TO PROBABILITY
Suppose that the athletes who tests positive is forced to take another test. assume
the two test s are independent. We want to update out probability based on this
new piece of information.
Then
P (B1 ∩ B2 |A)P (A)
P (A|B1 ∩ B2 ) =
P (B1 ∩ B2 |A)P (A) + P (B1 ∩ B2 |Ā)P (Ā)
(0.95)2 · 0.02
= ≃ 88%.
(0.95)2 · 0.02 + (0.05)2 · 0.98
Note that, looking at the frequency tree in figure 10.6 we can infer
19 + 49
P (athletes test positive) = ∼ 68%,
1000
19
P (athletes test positive and they are truly doping) = ∼ 28.%
1000
P (A) odds(A)
odds(A) = =⇒ P (A) = .
P (Ā) 1 + odds(A)
Alternative form of Bayes’ rule. Take Bayes’ rule and divide it by P (Ā|B). Then
P (B|A) 0.95
= = 19.
P (B|Ā) 0.05
Hence the positive result is 19 times more likely to happen if the athlete is doping.