0% found this document useful (0 votes)
92 views57 pages

Fourier - Notes - Part123

notes for fourier series

Uploaded by

Ela Tekan
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)
92 views57 pages

Fourier - Notes - Part123

notes for fourier series

Uploaded by

Ela Tekan
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/ 57

PHYS2004 Wave phenomena (PHYS2008 Fourier methods)

Fourier methods summary*

2023-2024

Contents
1 Introduction to Fourier analysis 3
1.1 Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.2 Textbooks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.3 Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.4 Some useful maths . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.4.1 Trigonometric functions . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.4.2 exp (iθ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.4.3 Powers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.4.4 Integration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.5 Appendices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

2 Fourier series (RHB 12) 6


2.1 Periodicity and harmonics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.2 Trigonometric form (RHB 12.2) . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.3 Dirichlet conditions (RHB 12.1 & 12.4) . . . . . . . . . . . . . . . . . . . . . . 9
2.4 Odd and even functions (RHB 12.3) . . . . . . . . . . . . . . . . . . . . . . . . 9
2.5 Analytic continuation (RHB 12.5) . . . . . . . . . . . . . . . . . . . . . . . . . 11
2.6 Complex form (RHB 12.7) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
2.7 Parseval’s theorem (RHB 12.8) . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
2.8 Graphical representation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
2.A Appendix: Products of odd and even functions and their integrals . . . . . . . 15
2.B Appendix: Relationship between coefficients of complex and trigonometric Fourier
series . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
2.C Appendix: Derivation of Parseval’s theorem for complex Fourier series . . . . . 15
*
The original notes were written by Prof. Anne Green, who led the module in the previous years

1
3 Fourier transforms (RHB 13.1) 17
3.1 Introduction and definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
3.2 Dirac delta-function (RHB 13.1.3) . . . . . . . . . . . . . . . . . . . . . . . . . 21
3.3 Fourier transform of an infinite monochromatic wave . . . . . . . . . . . . . . . 22
3.4 Some properties of Fourier transforms (RHB 13.1.5) . . . . . . . . . . . . . . . 22
3.5 Fourier transform of a finite wave train . . . . . . . . . . . . . . . . . . . . . . . 23
3.6 Fourier transform of a gaussian (RHB 13.1.1) . . . . . . . . . . . . . . . . . . . 23
3.7 Fourier transform of an exponential . . . . . . . . . . . . . . . . . . . . . . . . . 24
3.8 Fourier transform pairs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
3.9 Parseval’s theorem (RHB 13.1.9) . . . . . . . . . . . . . . . . . . . . . . . . . . 26
3.A Appendix: The pre-factors in the definition of Fourier transform and the inverse
Fourier transform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
3.B Appendix: Relationship between the Heaviside step function and the Dirac delta-
function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
3.C Appendix: Calculation of the Fourier transform of a gaussian . . . . . . . . . . 27

4 Convolution (RHB 13.1.7) 28


4.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
4.2 Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
4.3 Convolution theorem (RHB 13.1.8) . . . . . . . . . . . . . . . . . . . . . . . . . 32

5 Discrete Fourier transforms 33


5.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
5.2 Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
5.3 Fast Fourier transform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
5.A Appendix: More on the Fast Fourier Transform . . . . . . . . . . . . . . . . . . 36

6 Optics (and other) applications 37


6.1 Recap of plane and spherical waves (H 2.5 and 2.7) . . . . . . . . . . . . . . . . 37
6.A More on the Fast Fourier Transform . . . . . . . . . . . . . . . . . . . . . . . . 37
6.2 Fraunhofer diffraction (PPP 16 & 25.1, RHB 13.1.2, H 11) . . . . . . . . . . . . 38
6.3 Single slit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
6.4 Double slit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
6.5 Multiple slits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
6.6 3d Fourier transform (RHB 13.1.10) . . . . . . . . . . . . . . . . . . . . . . . . 44
6.7 Rectangular aperture (PPP 25.1) . . . . . . . . . . . . . . . . . . . . . . . . . . 45
6.8 Fourier transform of the charge distribution of the hydrogen atom . . . . . . . 46
6.A Appendix: 3d spherically symmetric Fourier transform . . . . . . . . . . . . . . 47

7 Solving differential equations 47


7.1 Ordinary differential equations . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
7.2 Partial differential equations: general solution (RHB 20.3.3) . . . . . . . . . . . 49
7.3 Partial differential equations: separation of variables (RHB 21.1 & 22.2) . . . . 49
7.4 Partial differential equations: using Fourier transforms (RHB 21.4) . . . . . . . 52

8 Summary 56

2
1 Introduction to Fourier analysis
Fourier analysis involves writing a function as a superposition of waves of different frequencies.
We will first look at Fourier series (writing periodic functions as a sum of waves) before moving
on to Fourier transforms (writing functions as an integral of waves).

1.1 Applications
Fourier analysis has applications in many areas of science (including physics, engineering, chem-
istry and materials science) and also everyday life (digital phones, DVDs, JPEGs...).

The physics related applications include

ˆ Optics
Light can be decomposed into spectral components and certain colours filtered out. We
will also see in Sec. 6 that Fraunhofer diffraction calculations are easier using Fourier
techniques.

ˆ Acoustics
Notes played on different instruments are made up of different frequency components (not
just a pure sine wave with a single frequency), see e.g.
https://pages.mtu.edu/˜suits/sax sounds/index.html for a comparison of saxophone sounds.
If you know what frequencies a particular real instrument produces you can electronically
reproduce its sound. You can also design speakers or auditoria suited to the music played
through or in them. We saw in Fourier 1 how Fourier analysis allows you to filter out
unwanted noises (i.e. a vuvuzuela) and is behind the operation of touch-tone phones.

ˆ Electronics
Any desired signal (e.g. square wave, sawtooth) can be generated from a sum of harmonic
(sin and cos) waves. Filters can be used to modify signals. For instance a low pass filter
removes high frequency components (i.e. it lets low frequencies pass, hence the name).
The web-site http://www.falstad.com/dfilter/ lets you see (and hear) the effect of various
filters on different signals.

ˆ Image processing
Images can be enhanced by manipulating their frequency components. For instance a
low pass filter reduces noise (which tends to occur on small scales, and hence has a high
frequency). A high pass filter enhances edges (which are also a small scale feature and
hence correspond to high frequencies). This has many applications, in areas ranging from
the real world (removing noise from images of bar codes) to astronomy (deblurring images
of galaxies). We’ll see how this works in Fourier 8.

1.2 Textbooks
The lectures are mainly based on chapters 12 and 13 of the recommended 2nd year maths
textbook: ‘Mathematical methods for physics and engineering’, K. F. Riley, M. P. Hobson and

3
S. J. Bence (available from the library as an e-book).

There are many other relevant textbooks:

ˆ ‘Mathematical methods in the physical sciences’, M. L. Boas

ˆ ‘Lectures on Fourier series’, L. Solymar

ˆ ‘Fourier analysis’, H. P. Hsu

ˆ ‘Fourier analysis’, M. R. Spiegel

ˆ ‘A student’s guide to Fourier transforms’, J. F. James

which you might find useful for alternative/additional explanations and problems. However
beware that different books sometimes have different conventions/definitions (e.g. for the
normalization of the Fourier transform).
The optics textbooks (‘Introduction to optics’, Pedrotti, Pedrotti and Pedrotti and ‘Optics’,
Hecht) will be useful for the optics applications towards the end of the module.

1.3 Problems
The only way to learn how to solve physics problems is to practise (this is especially true of more
mathematical topics, like Fourier analysis). There are plenty of practice problems available:
‘homework’ problems in lectures, problem sheets, textbooks and past exam papers (available
from Moodle). Fourier analysis was previously covered in PHYS1006: Basic Mathematical
Methods for Physics. See Moodle for a list of recommended problems from textbooks.
Answers to the workshop questions and examples sheets will be available from Moodle.
You’ll get far more benefit from the questions if you try them yourself first before looking at
the answers.

1.4 Some useful maths


Fourier analysis will use maths techniques and results which you covered in first year. You will
need to be familiar with using them to be able to do Fourier analysis calculations. WolframAl-
pha (http://www.wolframalpha.com/) is useful for checking integrals (and other calculations).
However you need to be able to do the calculations on your own: you won’t have access to
WolframAlpha in the exam!

1.4.1 Trigonometric functions


Cosine is an even function, cos (−θ) = cos (θ), while sine is odd, sin (−θ) = − sin (θ). The
values of sin θ and cos θ at integer multiples of π are given by

sin (nπ) = 0 , (1)


n
cos (nπ) = (−1) . (2)

4
Products of trigonometric functions can be expressed in terms of sums of trigonometric func-
tions (and vice versa) using:

sin (A ± B) = sin A cos B ± cos A sin B , (3)


cos (A ± B) = cos A cos B ∓ sin A sin B . (4)

The integral of sine or cos over a period is zero i.e.:


Z L  
2πx
sin dx = 0 . (5)
0 L

1.4.2 exp (iθ)


Euler’s equation tells us that
exp (iθ) = cos θ + i sin θ , (6)
and cos θ and sin θ can be written in terms of exponentials:
exp (iθ) + exp (−iθ)
cos θ = , (7)
2
exp (iθ) − exp (−iθ)
sin θ = . (8)
2i
You should memorize these expressions (as they come up repeatedly in Fourier analysis calcu-
lations), however if you forget them you can derive them quickly (see week 19 coursework).
The value of exp (iθ) at integer multiples of π is given by

exp (iπn) = (−1)n . (9)

1.4.3 Powers
Products of power can be combined into a single power e.g.

xa xb = x(a+b) , exp (a) exp (b) = exp (a + b) . (10)

This is useful in particular when integrating. It’s also sometime useful to split a power up (we’ll
do this when we study the orthogonality of exponentials in Fourier 4).

1.4.4 Integration
Fourier analysis involves a lot of integration (in particular of functions multiplied by an expo-
nential or cos or sine).
The integral of the exponential function is the exponential function:
Z x2
exp x dx = [exp x]xx21 = exp x2 − exp x1 . (11)
x1

The definite integral of zero is zero:


Z x2
0 dx = [c]xx21 = (c − c) = 0 , (12)
x1

5
(c is a constant). You will sometimes need to use integration by parts:
Z Z
dv du
u dx = uv − v dx . (13)
dx dx
When you integrate a function of the integration variable times a constant, the result is the
integral of the function, divided by the constant:
Z
1
f ′ (ax) dx = f (ax) , (14)
a
where a is a constant and f ′ ≡ df /dx. You can show this by making the substitution y = ax,
so that dy = adx and
Z Z
′ 1 1 1
f (ax) dx = f ′ (y) dy = f (y) = f (ax) . (15)
a a a
An example of this sort of integral, which we’ll encounter in Fourier analysis, is f = sin (ax)
and a = 2π/L:
2πx x2
Z x2     
2πx L
sin dx = − cos . (16)
x1 L 2π L x1
When doing calculations yourself you can use as many steps and substitutions as you like,
but in lectures we will use these results without going through all the steps. A way of checking
that you’ve got an integral right is to differentiate your result (and check that you get the
function you were originally trying to integrate).

1.5 Appendices
The appendices of these notes contain additional derivations or calculations, which are outside
the syllabus (and hence non-examinable), but may be of interest.

2 Fourier series (RHB 12)


2.1 Periodicity and harmonics
A spatial function is periodic if f (x) = f (x + L) for all x, where L is the period of the function.
A function of time is periodic if f (t) = f (t + T ) for all t, where T is the time period of the
function. For instance sin θ is periodic with period 2π since sin θ = sin (θ + 2π) for all θ.
Consider the function f (x) = sin (2πrx/L) where r is a integer. We showed in Fourier 1
that this has period L/r. It’s sometimes useful to define a fundamental wavenumber

k0 = , (17)
L
or, for a function of time, a fundamental frequency

ω0 = . (18)
T
The function f (x) above can then be rewritten as f (x) = sin (kr x) where kr = rk0 . These
waves with wavenumbers that are an integer multiple of the fundamental wavenumber are
called harmonics. The function f (x) and its first two harmonics (r = 2 and 3) are shown in
Fig. 1.

6
Figure 1: f (x) = sin (πx) and its first two harmonics (sin (rπx) with r = 2 in red and r = 3 in
blue).

2.2 Trigonometric form (RHB 12.2)


Most 1 periodic functions can be written as a sum of harmonic waves (i.e. sine and cos) with
different frequencies:
∞     
a0 X 2πrx 2πrx
f (x) = + ar cos + br sin , (19)
2 L L
r=1

or equivalently

a0 X
f (x) = + [ar cos (rk0 x) + br sin (rk0 x)] , (20)
2
r=1

with the fundamental wavenumber k0 defined in eq. (17) above. This is known as the trigono-
metric form of the Fourier series. The waves making up the Fourier series are harmonics of the
fundamental wavenumber; they have wavenumbers that are integer multiples of the fundamen-
tal wavenumber: kr = rk0 . Exactly the same thing can be done for functions of time, rather
than space, with x → t, k → ω and L → T .

The coefficients of the Fourier series are calculated using

2 x0 +L
Z  
2πrx
ar = f (x) cos dx , (21)
L x0 L
2 x0 +L
Z  
2πrx
br = f (x) sin dx , (22)
L x0 L
1
There are some conditions which the function has to be satisfy, we’ll look at these in Sec. 2.3.

7
or equivalently
Z x0 +L
2
ar = f (x) cos (rk0 x) dx , (23)
L x0
Z x0 +L
2
br = f (x) sin (rk0 x) dx . (24)
L x0

x0 is arbitrary (the integration just has to be done over a period). You can chose x0 to be
whatever you like, however it often makes the calculations easier to chose x0 = 0 or −L/2. The
expression for a0 can be found by setting r = 0 in the equation for ar :

2 x0 +L
Z
a0 = f (x) dx . (25)
L x0
The first term in the Fourier series, a0 /2, is the average value of the function over a period.

We derived the expression for ar in Fourier 2 by multiplying the Fourier series for f (x),
eq. (19), by cos (2πpx/L), integrating over a period and using the orthogonality of sine and
cos: 
Z x0 +L 
2πrx
 
2πpx
 0 if r = p = 0 ,

sin sin dx = L2 if r = p > 0 , (26)
x0 L L 
0 if r ̸= p ,


Z x0 +L 
2πrx
 
2πpx
 L if r = p = 0 ,

cos cos dx = L2 if r = p > 0 , (27)
x0 L L 
0 if r ̸= p ,

Z x0 +L    
2πrx 2πpx
sin cos dx = 0 . (28)
x0 L L
These formulae can themselves be derived using the trigonometric identities in eqs. (3) and
(4). We derived eq. (26) in Fourier 2.

As an example we looked at a square wave


(
0 if −1 < x < 0 ,
f (x) = (29)
1 if 0 < x < 1 .

In Fourier 3 we found that its Fourier coefficients are a0 = 1, ar = 0 for r ̸= 0 and


(
0 r even ,
br = 2 (30)
πr r odd ,

i.e. b1 = 2/π, b2 = 0, b3 = 2/(3π) and so on. In other words it can be built up from a constant
plus a sum of sine waves:
  
1 2 sin (3πx)
f (x) = + sin (πx) + + ....... , (31)
2 π 3πx

8
which can be written more compactly as a sum:
 X ∞
1 2 sin [(2j + 1)πx]
f (x) = + . (32)
2 π (2j + 1)
j=0

If j = 0, 1, 2, ..., then (2j + 1) = 1, 3, 5, ... so that we get odd multiples of πx in the sum, as
required. We could have used (2j − 1) instead. In that case the sum would start at j = 1,
so that (2j −1) = 1, 3, 5, ... still. In Sec. 2.4 we’ll see why only sine waves are needed in this case.

The web-site http://www.falstad.com/dfilter/ allows you to experiment and see how differ-
ent functions can be made from sine and cosine waves (and you will do (or did) this yourself
using Matlab, you can find examples in the problem sheet available on Moodle).

2.3 Dirichlet conditions (RHB 12.1 & 12.4)


If a function f (x)
1. is periodic,

2. is single valued and continuous (except possibly at a finite number of finite discontinuities
per period),

3. has only a finite number of maxima and minima within one period,

4. the integral over one period of |f (x)| converges,


then it can be expanded as a Fourier series which converges to f (x) at all points where f (x) is
continuous.

At discontinuities the value of the Fourier series converges to the mean of the values of the
function either side of the discontinuity i.e. if a discontinuity occurs at x = xd then
1
f (xd ) → limϵ→0 [f (xd + ϵ) + f (xd − ϵ)] . (33)
2
Close to the discontinuity the series overshoots the value of the function. This is known as
Gibbs’ phenomenon. As the number of terms included in the Fourier series is increased the
position of the overshoot moves closer to the discontinuity, but it never disappears, even in the
limit of an infinite number of terms. Fig. 2 shows the sum of the first 20 terms of the Fourier
series of our square wave. The Gibbs’ phenomenon is visible at x = ±n.

2.4 Odd and even functions (RHB 12.3)


Even functions: A function is even if f (x) = f (−x). Examples of even functions include
f (x) = x2 and cos x (we can show that x2 is even easily: f (−x) = (−x)2 = x2 = f (x)). For an
even function the graph for negative x is the graph for positive x reflected in the y-axis.

Odd functions: A function is odd if f (x) = −f (−x). Examples of odd functions include
f (x) = x and sin x (we can show that x is odd easily: f (−x) = (−x) = −x = −f (x)). For

9
Figure 2: Sum of the first 20 terms of the Fourier series of our square wave.

an odd function the graph for negative x is the graph for positive x reflected in the x and the
y-axes (one after the other).
Some functions are neither odd nor even. In other words they satisfy neither f (x) = f (−x)
nor f (x) = −f (−x). Fig. 3 shows examples of functions that are odd, even and neither odd
nor even.

Figure 3: An example of an odd function, f (x) = x, (left) and an even function, f (x) = x2
(middle). The function in the right hand panel, f (x) = x + x2 , is neither odd nor even.

Since cos is even and sine is odd, the Fourier series of an even function only contains cosine
terms, while the Fourier series of an odd function only contains sine terms. The properties of
the products of odd and even functions and their integrals (see Appendix 2.A) also allow us to
simplify the calculation of the non-zero coefficients:

10
Even function
Z L/2  
4 2πrx
ar = f (x) cos dx , (34)
L 0 L
br = 0. (35)

Odd function

ar = 0 , (36)
Z L/2  
4 2πrx
br = f (x) sin dx . (37)
L 0 L
Thinking about whether a function is odd or even before calculating the Fourier
series will save you doing unnecessary calculations (i.e. calculating coefficients
which must be zero).

2.5 Analytic continuation (RHB 12.5)


If a function is only specified over a finite range we need to extend it outside the specified
range to make it periodic. This is known as analytic continuation. The Fourier series then
correctly represents the original function over the originally specified range. In some cases we
can choose to make the extended function odd or even (which reduces the number of calcula-
tions required). The period of the function (e.g. L or 2L) depends on how it’s extended. The
extension should ideally be continuous at the end-points (otherwise the Fourier series won’t
converge to the required values at these points).

2.6 Complex form (RHB 12.7)


Since sine and cos can be expressed in terms of exponentials, eqs. (7) and (8), the Fourier series
can also be written as a sum of exponential waves:
∞  
X 2πirx
f (x) = cr exp , (38)
r=−∞
L

or equivalently

X
f (x) = cr exp (ik0 rx) , (39)
r=−∞

where the fundamental wavenumber k0 is defined in eq. (17) as before. This is known as
the complex form, as the coefficients of the series, cr , are in general complex. Calculations
are typically easier using the complex form, however it is easier to visualise the trigonometric
Fourier series. Note that the sum over r runs from −∞ to ∞ (rather than 0 to ∞ as in the
case of the trigonometric Fourier series).
The coefficients of the complex Fourier series are calculated using

1 x0 +L
Z  
2πirx
cr = f (x) exp − dx . (40)
L x0 L

11
We derived this expression in Fourier 4 by multiplying the Fourier series for f (x), eq. (38), by
exp (2πipx/L), integrating over a period and using the orthogonality of exponentials (homework
from Fourier 4):
Z x0 +L     (
2πipx 2πirx L if r = p ,
exp − exp dx = (41)
x0 L L 0 if r ̸= p .

It can be shown (see Appendix 2.B) using eqs. (7) and (8), that the complex form of the
Fourier series is equivalent to the trigonometric form with:
a0
c0 = , (42)
2
1
cr = (ar − ibr ) , (43)
2
1
c−r = (ar + ibr ) . (44)
2
If

ˆ f (x) is even then the cr are real (br = 0).

ˆ f (x) is odd then the cr are imaginary (ar = 0).

ˆ f (x) is neither even nor odd then the cr are complex.

ˆ f (x) is real then c−r = c⋆r , where ⋆ denotes the complex conjugate.

In Fourier 4 we found the co-efficients of the complex Fourier series of our square wave,
eq. (29): c0 = 1/2 and
(
i 0 if r is even ,
cr = [(−1)r − 1] = i
(45)
2πr − πr if r is odd ,

so the complex Fourier series can be written as


 
1 i 1
f (x) = − (exp (iπx) − exp (−iπx)) + (exp (3iπx) − exp (−3iπx)) + .... , (46)
2 π 3
 

1 i X exp (−(2j + 1)iπx) − exp ((2j + 1)iπx) 
= +  . (47)
2 π 2j + 1
j=0

Using eq. (7) we can rewrite this as



 X
1 2 sin ((2j + 1)πx)
f (x) = + , (48)
2 π (2j + 1)
j=0

recovering the trigonometric Fourier series, eq. (32).

12
2.7 Parseval’s theorem (RHB 12.8)
Parseval’s theorem relates the mean, over a period, of the modulus squared of the function to
the sum of the squares of the moduli of the Fourier co-efficients:
Z x0 +L ∞ ∞
1 X  a 2
0 1X 2
|f (x)|2 dx = |cr |2 = ar + b2r .

+ (49)
L x0 r=−∞
2 2
r=1

This is useful for finding the intensity of a sound wave or the energy dissipated in an electrical
circuit (both of which are proportional to the square of the amplitude of the wave/signal).
Instead of integrating the expression for the square of the pressure or current directly you
can use Parseval’s theorem and a known expression for the sum of the squares of the Fourier
co-efficients.
It can also be used (in the opposite direction) to find the sum of a series. If you know
the function whose Fourier co-efficients squared are the series you want to sum, then you can
integrate the square of the function directly and use Parseval’s theorem to evaluate the sum of
the series (see e.g. Fourier series problem sheet q10c).
The derivation of Parseval’s theorem for the complex form, which we went through in
Fourier 4, involves taking the complex conjugate of the expression for the Fourier series of
f (x), multiplying this by the Fourier series of f (x) and integrating over a period.

13
2.8 Graphical representation
This involves simply plotting the coefficients of the Fourier series as a function of r. Since
the coefficients of the complex Fourier series are complex the real and imaginary parts have to
be plotted separately. The coefficients of the trigonometric Fourier series of our square wave,
eq. (30), are plotted in Fig. 4 and the coefficients of the complex Fourier series, eq. (45), are
plotted in Fig. 5. The dotted line shows the envelope of the coefficients. Don’t forget that the
coefficients are discrete (i.e. r only takes integer values).

Figure 4: Coefficients of the trigonometric Fourier series, ar left and br right, of our square
wave, eq. (30). The dotted blue line shows the envelope of the coefficients.

Figure 5: Real (left) and imaginary (right) parts of the coefficients of the complex Fourier series
of our square wave, eq. (45).

14
2.A Appendix: Products of odd and even functions and their integrals
The product of two even functions is even: f (x) = fe1 (x)fe2 (x). fe1 (−x) = fe1 (x) and
fe2 (−x) = fe2 (x). Therefore f (−x) = fe1 (−x)fe2 (−x) = fe1 (x)fe2 (x) = f (x).

The product of two odd functions is also even: f (x) = fo1 (x)fo2 (x). fo1 (−x) = −fo1 (x)
and fo2 (−x) = −fo2 (x). Therefore f (−x) = fo1 (−x)fo2 (−x) = (−fo1 (x))(−fo2 (x)) = f (x).

R A The integralR 0of an even function


RA from −A to +A is twice the integral from 0 to A:
fe (x) dx = −A fe (x) dx + 0 fe (x) dx and
R−A
0 R −A RA RA RA
−A fe (x) dx = − 0 fe (x) dx = − 0 fe (−x̃) d(−x̃) = 0 fe (x̃) dx̃ = 0 fe (x) dx. Therefore
RA RA
−A fe (x) dx = 2 0 fe (x) dx .

This allows us to simply the calculation of the trigonometric Fourier coefficients of odd and
even functions (see Sec. 2.4).

2.B Appendix: Relationship between coefficients of complex and trigono-


metric Fourier series
Inserting eqs. (7) and (8) into eq. (19) we get
"∞           #
a0 1 X 2πrx 2πrx 1 2πrx 2πrx
f (x) = + ar exp + exp − + br exp − exp − ,
2 2 L L i L L
r=1
"∞    #
a0 1 X 2πrx 2πrx
= + (ar − ibr ) exp + (ar + ibr ) exp − ,
2 2 L L
r=1
∞   −∞  
a0 1 X 2πrx 1 X 2πrx
= + (ar − ibr ) exp + (ar + ibr ) exp ,
2 2 L 2 L
r=1 r=−1
∞  
X 2πrx
= cr exp , (50)
r=−∞
L

with
a0
c0 = , (51)
2
1
cr = (ar − ibr ) , (52)
2
1
c−r = (ar + ibr ) . (53)
2

2.C Appendix: Derivation of Parseval’s theorem for complex Fourier series


Z x0 +L Z x0 +L
1 2 1
|f (x)| dx = f (x)f ⋆ (x) dx , (54)
L x0 L x0

15
where ⋆ denotes the complex conjugate. Using the definition of the complex Fourier series,
eq. (38), and its complex conjugate:
" ∞ # " X ∞ #
1 x0 +L 1 x0 +L X
Z Z  
2 2πrx ⋆ 2πpx
|f (x)| dx = cr exp cp exp − dx ,
L x0 L x0 r=−∞
L p=−∞
L
" ∞ " ∞ Z x0 +L     ##
1 X X 2πrx 2πpx
= cr c⋆ exp exp − dx (, 55)
L r=−∞ p=−∞ p x0 L L

and using eq. (41) we get


Z x0 +L ∞ ∞
1 1 X X
|f (x)|2 dx = Lcr c⋆r = |cr |2 , (56)
L x0 L r=−∞ r=−∞

as required.

16
3 Fourier transforms (RHB 13.1)
3.1 Introduction and definitions
We saw in the previous section that periodic functions can be written as a Fourier series, a
sum of waves with frequencies that are integer multiples of the fundamental frequency. How-
ever most functions that appear in nature are non-periodic (for instance a voltage pulse in a
circuit, wave trains in optics and wave functions in quantum mechanics). We’ll now see that
for non-periodic functions we can generalise the Fourier series to the Fourier transform.

First let’s consider a rectangular wave with unequal peaks and troughs:
(
1 if nT − ∆/2 ≤ t ≤ nT + ∆/2 ,
f (t) = (57)
0 otherwise ,

where n is an integer, T is the period of the rectangular wave and ∆ is the width of the peaks.
We found in Fourier 5 that the coefficients of the complex Fourier series of this function are
 
∆ ωr ∆
cr = sinc , (58)
T 2

where ωr = rω0 = 2πr/T and


sin x
sinc(x) ≡ . (59)
x
At this point we’ll take a slight diversion and study the properties of the sinc function. As
x→0
3
!
x − x3 + .... x2
 
limx→0 (sinc(x)) = limx→0 = limx→0 1 − + .... = 1 . (60)
x 2

Alternatively this can be seen using l’Hopitals rule: if f (x) = g(x)/h(x) and limx→x0 (g(x)) → 0
and limx→x0 (h(x)) → 0 then
 
limx→x0 dg(x) dx
limx→x0 (f (x)) =  . (61)
limx→x0 dh(x) dx

In this case we have


d sin x

limx→0 dx limx→0 (cos x)
limx→0 (sinc(x)) = = = 1. (62)
limx→0 dx

dx
limx→0 (1)

For x ̸= 0, sinc(x) = 0 when sin x = 0 i.e. when x = nπ with n = ±1, ±2, ... (but not n = 0).
The sinc function is plotted in Fig. 6. The width of the sinc function (i.e. the gap between the
first zeros) is ∆x = 2π.

17
Figure 6: The sinc function.

Returning to the square wave with uneven peaks and troughs, if we increase T the gaps
between the peaks get larger. What happens to the coefficients of the Fourier series? The pre-
factor in the expression for cr , (∆/T ), will get smaller, and the gap between the frequencies
ωr+1 − ωr = (r + 1)ω0 − rω0 = ω0 = 2π/T will get smaller (see plots in Fig. 7).
If we take T → ∞ the square wave will become a single pulse of width ∆ (i.e. a non-periodic
top-hat function). What happens to the coefficients of the Fourier series? The shape of the
envelope of cr stays the same but its amplitude tends to zero. The envelope of the coefficients
multiplied by T remains constant
 
ωr ∆
cr T = sinc , (63)
2
as it is independent of T 2 . The gap between the frequencies ωr+1 − ωr = 2π/T tends to zero.
Therefore in the limit T → ∞ instead of a series of discrete values of ωr we get a continuous
function of ω.
If we take the expression for the coefficients of the Fourier series and multiply it by T :
Z t0 +T
cr T = f (t) exp (−iω0 rt) dt , (64)
t0

and make the substitutions ωr = rω0 → ω and cr T → 2πF (ω) 3 we get the definition of the
Fourier transform: Z ∞
1
F (ω) = √ f (t) exp (−iωt) dt . (65)
2π −∞
Similarly from the definition of the Fourier series

X
f (t) = cr exp (iω0 rt) , (66)
r=−∞
2
If our initial function had had a different shape, then the shape of the envelope would have been different.
The general behaviour, in particular the fact that cr T is independent of T√, would have been the same however.
3
See the paragraph beneath eq. (69) for the explanation of where the 2π comes from.

18
Figure 7: The coefficients, cr , (left) and products cr T (right) of the complex Fourier series of
the square wave with unequal peaks and troughs, eq. (57), for ∆ = 1 and (from top to bottom)
T = 2, 4 and 8.

19
we get the definition of the inverse Fourier transform:
Z ∞
1
f (t) = √ F (ω) exp (iωt) dω . (67)
2π −∞
Note that there are different conventions for the pre-factors in the definitions of the Fourier
transform and its inverse. In general
Z ∞
F (ω) = A f (t) exp (−iωt) dt , (68)
−∞
Z ∞
f (t) = B F (ω) exp (iωt) dω , (69)
−∞

where we must have AB = 1/(2π) if the original function f (t) is to be recovered when F (ω)
calculated using eq. (68) is inserted in eq. (69) (see Appendix 3.A for a derivation which uses
some of the properties of the Dirac delta-function which we derive in Fourier 6). We have
followed Riley, Hobson and Bence and ‘divided’ the (2π) symmetrically between the Fourier
transform and its inverse. Some other textbooks use A = 1, B = 2π or A = 2π, B = 1 (so take
care if using results or equations from different sources). As with the Fourier series, the same
relations hold for spatial functions with t → x and ω → k.

Our original rectangular wave with unequal peaks and troughs could be written as a complex
Fourier series with coefficients  
∆ ωr ∆
cr = sinc . (70)
T 2
As T → ∞ we get a single ‘top-hat’ pulse of width ∆:
(
1 if −∆/2 ≤ t ≤ ∆/2 ,
f (t) = (71)
0 otherwise ,

which has Fourier transform  


τ ω∆
F (ω) = √ sinc . (72)
2π 2
n.b. to illustrate how the Fourier transform arises from for the Fourier series we’ve calculated
the Fourier transform of the top-hat function by taking the T → ∞ limit of the Fourier series
of a rectangular wave with unequal peaks and troughs. However this is not how you calculate
Fourier transforms in general. You take whatever function you’re interested it and insert it in
the definition of the Fourier transform, eq. (65).

To summarise, a Fourier series expresses a periodic function as a sum of exponential waves,


weighted by discrete coefficients, cr . A Fourier transform expresses a function as an integral
of exponentials, weighted by a continuous function F (ω). Both cr and F (ω) are, in general,
complex.

20
3.2 Dirac delta-function (RHB 13.1.3)
If we normalise the single ‘top-hat’ pulse of width ∆ so that its integral equals one:
(
1
if −∆/2 ≤ t ≤ ∆/2 ,
f (t) = ∆ (73)
0 otherwise ,
then its Fourier transform is given by
 
1 ω∆
F (ω) = √ sinc . (74)
2π 2

What happens to f (t) and F (ω) as ∆ is decreased?√ The width of f (t) decreases and its
amplitude increases. F (0) remains constant (F (0) = 1/ 2π independent of ∆) and the peaks
in the sinc function spread out (the first zeros are at ω = ±2π/∆).
In the limit that ∆ → 0 the single top-hat pulse tends to something called the Dirac
delta-function: (
∞ if t = 0 ,
f (t) → δ(t) = (75)
0 otherwise ,
and its Fourier transform tends towards a constant
1
F (ω) → √ . (76)

In general a Dirac delta-function centered at t = t0 is written as
(
∞ if t = t0 ,
δ(t − t0 ) = (77)
0 otherwise ,
subject to the normalisation condition
Z ∞
δ(t − t0 ) dt = 1 . (78)
−∞

Note that δ(t − t0 ) = δ(t0 − t) (a delta-function is only non-zero when its argument is zero and
t − t0 = 0 and t0 − t = 0 are equivalent).

A useful alternative definition


√ of the Dirac delta-function can be found by inserting its
Fourier transform, F (ω) = 1/ 2π, into the definition of the inverse Fourier transform, eq. (67),
which gives: Z ∞
1
δ(t) = exp (iωt) dω . (79)
2π −∞

Integrating the product of a function with a Dirac delta-function centered at x0 gives us


the function evaluated at x0
Z ∞
δ(x − x0 )g(x) dx = g(x0 ) . (80)
−∞

21
This is sometimes known as the ‘sifting’ property of the Dirac delta-function (and we derived
it in Fourier 6 by considering the delta-function as the limit of the normalised top-hat function
as its width tends to zero).
The Heaviside step function is defined as
(
1 if t > 0 ,
h(t) = (81)
0 it t < 0 .

As h(t) is discontinuous at t = 0, it’s conventional to take h(0) = 1/2. The differential of the
Heaviside step function is the Dirac delta-function

dh(t)
= δ(t) . (82)
dt
Intuitively this makes sense since for t = 0, h(t) is discontinuous and hence its derivative is
infinite, while for t ̸= 0, h(t) is constant and hence its derivative is zero. See RHB 13.1.3 and
Appendix 3.B for a mathematical proof of this relationship.

3.3 Fourier transform of an infinite monochromatic wave


We showed in Fourier 7 that the Fourier transform of an infinite monochromatic wave with
frequency ω0
f (t) = exp (iω0 t) , (83)
is a delta-function centered at ω = ω0 :

F (ω) = 2πδ(ω − ω0 ) , (84)

since the wave is composed of a single frequency ω0 .

3.4 Some properties of Fourier transforms (RHB 13.1.5)


Notation: ‘FT’ is short-hand for Fourier Transform, and we will use small letters to de-
note functions, and the corresponding capital letter to denote their Fourier transform. i.e.
F T [f (x)] = F (k).

The Fourier transform of a sum is the sum of the individual Fourier transforms:

F T [f1 (t) + f2 (t)] = F1 (ω) + F2 (ω) . (85)

The Fourier transform of a constant times a function is the constant times the Fourier transform
of the function:
F T [af (t)] = aF (ω) . (86)
The Fourier transform has some other properties which can be used to simplify calculations:

22
ˆ Differentiation
 
df (t)
FT = iωF (ω) , (87)
dt
 n 
d f (t)
FT = (iω)n F (ω) , (88)
dtn

where n is an integer.

ˆ Translation
F T [f (t − t0 )] = exp (−iωt0 )F (ω) . (89)

ˆ Multiplication by an exponential

F T [exp (iω0 t)f (t)] = F (ω − ω0 ) , (90)

where ω0 and t0 are constants. We derived these relations in Fourier 6 and 7. They also hold
for functions of position with t → x and ω → k.

3.5 Fourier transform of a finite wave train


A finite wave (
exp (iω0 t) for −∆/2 ≤ t ≤ ∆/2 ,
f˜(t) = (91)
0 otherwise ,
can be written as an infinite monochromatic wave, eq. (83), multiplied by a top-hat function,
eq. (71). In Fourier 7 we used the ‘multiplication by an exponential’ relation, eq. (90), to
calculate the Fourier transform of the finite wave
 
∆ (ω − ω0 )∆
F (ω) = √ sinc , (92)
2π 2

i.e. a sinc function centered at ω = ω0 . A range of frequencies, centered on ω0 , contribute to


the Fourier transform. Contrast this with the Fourier transform of the infinite wave, where
F (ω) = 0 for ω ̸= ω0 . The first zeros of the FT of the finite wave occur at ω = ω0 ± (2π/∆),
so that its width is proportional to 1/∆ i.e. inversely proportional to the width of the original
finite wave, f˜(t). Fig 8 shows the Fourier transform of a finite wave with ω0 = 2 s−1 and ∆ = 5
s.

3.6 Fourier transform of a gaussian (RHB 13.1.1)


Gaussian distributions are very common in physics. The Fourier transform of a gaussian 4 with
width ∆,
t2
 
1
f (t) = √ exp − 2 , (93)
2π∆ 2∆
4
This gaussian is normalized to unity...

23
Figure 8: The Fourier transform of a finite wave with ω0 = 2 s−1 and ∆ = 5 s, eq. (92).

is another gaussian5 :

∆2 ω 2 ω2
   
1 1
F (ω) = √ exp − = √ exp − , (94)
2π 2 2π 2(∆ω )2

with width ∆ω = 1/∆ i.e. their widths are inversely proportional to each other. The derivation
of this result (which uses a cunning technique, ‘completing the square’) is in Appendix 3.C.
Fig. 9 shows gaussians of varying widths and their Fourier transforms.

3.7 Fourier transform of an exponential


We showed in Fourier 7 that the Fourier transform of an exponential function
(
exp (−αt) if t ≥ 0 ,
f (t) = (95)
0 otherwise ,

is
1 1
F (ω) = √ . (96)
2π α + iω
This will be useful later on.

3.8 Fourier transform pairs


A function, f (t), and its Fourier transform F T [f (t)] = F (ω), form a Fourier transform pair.
For some Fourier transform pairs, it’s easier to calculate the Fourier transform than the
Inverse Fourier Transform. An example of this is the exponential in Sec. 3.7. It’s far, far easier
to calculate the FT of the exponential than the Inverse FT of 1/(α + iω). Therefore lists of
Fourier transform pairs are useful. Table 1 contains a list of the Fourier transform pairs that
we’ve encountered so far.
5
... but this gaussian isn’t.

24
Figure 9: A gaussian, eq. (93), with width ∆ = 1 (red), 2 (blue) and 4 (green) (left) and its
Fourier transform, eq. (94) (right).

Table 1: A list of Fourier transform pairs.


top hat sinc
1 τ τ 1 ωτ

τ for 2 < t < 2


sinc 2
Dirac delta-function constant
δ(t) √1

gaussian
  gaussian
 
√1 t2 √1
2 2

2π∆
exp − 2∆ 2

exp − ∆ 2ω
exponential
exp (−αt) for t > 0 √1 1
2π α+iω

25
The narrower the function, the wider its Fourier transform and vice versa. Physically, to
make a narrow function you need to add up waves with a wide range of frequencies (and to
make a broad function you need a narrow range of frequencies).

3.9 Parseval’s theorem (RHB 13.1.9)


The equivalent of eq. (49) for the Fourier transform is
Z ∞ Z ∞
2
|f (x)| dx = |F (k)|2 dk . (97)
−∞ −∞

|F (k)|2 is often referred to as the power spectrum. Physically it is the energy per unit wavenum-
ber (or for a function of time, frequency). As well as being useful for calculating the total energy
of a signal it can be used to calculate mathematical results, such as
Z ∞
sin2 (ω)
dω = π , (98)
−∞ ω2
(see Fourier 7).

3.A Appendix: The pre-factors in the definition of Fourier transform and


the inverse Fourier transform
The definitions of the Fourier transform and its inverse both contain constant pre-factors, A
and B:
Z ∞
F (ω) = A f (t) exp (−iωt) dt , (99)
−∞
Z ∞
f (t) = B F (ω) exp (iωt) dω . (100)
−∞

We will now show that if the original function f (t) is to be recovered when F (ω) calculated
using eq. (99) is inserted in eq. (100), we must have AB = 1/(2π).
Inserting eq. (99) into eq. (100) we get
Z ∞ Z ∞ 
f (t) = A B f (t̃) exp (−iω t̃) dt̃ exp (iωt) dω . (101)
−∞ −∞

Rearranging the order of the integrals (and taking the constant B outside) we get
Z ∞ Z ∞ 
f (t) = AB f (t̃) exp (iω(t − t̃))dω dt̃ . (102)
−∞ −∞

In Sec. 3.2 we met an alternative definition of the Dirac delta-function:


Z ∞
1
δ(t) = exp (iωt) dω , (103)
2π −∞
or equivalently, with t → t − t̃,
Z ∞
1
δ(t − t̃) = exp (iω(t − t̃)) dω . (104)
2π −∞

26
Inserting this in eq. (102) we get
Z ∞
f (t) = AB f (t̃)2πδ(t − t̃) dt̃ , (105)
−∞

and using the sifting property of the Dirac delta-function


Z ∞
δ(x − x0 )g(x) dx = g(x0 ) , (106)
−∞

with x → t̃, x0 → t and g → f (and remembering that δ(t) = δ(−t)) we get

f (t) = AB2πf (t) , (107)

so that AB = 1/(2π).

3.B Appendix: Relationship between the Heaviside step function and the
Dirac delta-function
If h(t) is the Heaviside step function (as defined in Eq. (81)) then comparing the integral:
Z ∞   Z ∞ 
dh(t) ∞ df (t)
f (t) dt = [f (t)h(t)]−∞ − h(t) dt ,
−∞ dt −∞ dt
Z ∞  
df (t)
= f (∞) − dt ,
0 dt
= f (∞) − [f (t)]∞0 = f (0) , (108)

with the Dirac delta-function sifting property, eq. (80), with t0 = 0


Z ∞
δ(t)f (t) dt = f (0) , (109)
−∞

gives us
dh(t)
= δ(t) , (110)
dt
i.e. the differential of the Heaviside step function is equal to the Dirac delta-function.

3.C Appendix: Calculation of the Fourier transform of a gaussian


Inserting the gaussian, eq. (93), into the definition of the Fourier transform, eq. (65), we get
Z ∞
t2
   
1 1
F (ω) = √ √ exp − 2 exp (−iωt) dt ,
2π 2π∆ −∞ 2∆
 Z ∞   2 
1 1 t
= √ √ exp − + iωt dt . (111)
2π 2π∆ −∞ 2∆2

To solve this we ‘complete the square’. Multiplying by exp (−A2 ω 2 ) exp (A2 ω 2 ) we get
 Z ∞   2  
1 2 2 1 t 2 2
F (ω) = √ exp (−A ω ) √ exp − + iωt − A ω dt . (112)
2π 2π∆ −∞ 2∆2

27
We want to choose A so that
2
t2

t
√ + iAω = + iωt − A2 ω 2 , (113)
2∆ 2∆2

i.e.

t2 2iAωt t2
+ − A2 ω 2 = + iωt − A2 ω 2 ,
2∆2 ∆ √ 2∆2
2iAωt
= iωt ,


A = √ , (114)
2
and then 2 2 2
t + i∆2 ω
 
t t i∆ω
√ + iAω = √ + √ = , (115)
2∆ 2∆ 2 2∆2
so that the Fourier transform becomes
Z ∞
∆2 ω 2 (t + i∆2 ω)2
    
1 1
F (ω) = √ exp − √ exp − dt ,
2π 2 2π∆ −∞ 2∆2
∆2 ω 2
 
1
= √ exp − , (116)
2π 2

since
∞ ∞
(t + i∆2 ω)2 y2
Z   Z  
1 1
√ exp − dt ≡ √ exp − 2 dy , (117)
2π∆ −∞ 2∆2 2πσ −∞ 2σ
6 with σ = ∆ and y = t + i∆2 ω and

y2
Z  
1
√ exp − 2 dy = 1 . (118)
2πσ −∞ 2σ

6
To show this properly requires results from complex variable theory (see RHB 24).

28
4 Convolution (RHB 13.1.7)
4.1 Introduction
Finite experimental resolution make it impossible to measure things perfectly. For instance in
astronomy the point spread function of the telescope blurs the image. How can we recover the
underlying distribution of a quantity from the measured distribution? For instance how can
we deblur images from telescopes?

4.2 Definition
The convolution (from the latin ‘to roll together’) of two functions, f (x) and g(x), is defined
as 7
Z ∞
h(x′ ) = f ⋆ g = f (x)g(x′ − x) dx . (120)
−∞

The physical interpretation of convolution is that the measured distribution of a quantity


h(x) is the convolution of the underlying distribution of the quantity, f (x), with the resolution
(or response function) of the instrument being used to make the measurement, g(x) 8 . This
happens frequently in physics and reality e.g. electronics (amplifier), optics (spectrograph,
telescope), mechanical systems, acoustics.

You can visualize convolution by plotting f (x) and g(−x) on separate pieces of paper. Then
move g(−x) incrementally across f (x) (i.e. vary x′ ). The convolution is the area under the
product of the two functions at each point.
Figs. 10 and 11 show this process for the convolution of a top-hat
(
1 if |x| ≤ 4 ,
f (x) = (121)
0 otherwise ,

with a triangular function (


x if 0 ≤ x ≤ 4 ,
g(x) = (122)
0 otherwise .
The resulting convolution, h(x′ ), is plotted in fig, 12. The website
http://www.jhu.edu/˜signals/convolve/ allows you to try this yourself. See also
http://mathworld.wolfram.com/Convolution.html.

7
This definition could also be written, by swapping x and x′ , as
Z ∞
h(x) = f ⋆ g = f (x′ )g(x − x′ ) dx′ . (119)
−∞

8
For an unrealistic perfect measuring instrument with perfect resolution, g(x) would be a delta-function and
h(x) = f (x) i.e. the measured distribution is identical to the underlying distribution.

29
f(x)

f(x)

f(x)

f(x)

Figure 10: Part one of calculating the convolution of a top-hat, eq. (121), and a triangular
function, eq. (122), graphically.

30
f(x)

f(x)

f(x)

f(x)

Figure 11: Part two of calculating the convolution of a top-hat, eq. (121), and a triangular
function, eq. (122), graphically.

31
Figure 12: The convolution of a top-hat, eq. (121), and a triangular function, eq. (122).

A special case is convolution with a delta-function:


Z ∞

h(x ) = δ(x − x0 ) ⋆ g = δ(x − x0 )g(x′ − x) dx . (123)
−∞
R∞
Using the sifting property of the delta-function, eq. (80), −∞ δ(x − x0 )g(x) dx = g(x0 ), this
becomes
h(x′ ) = g(x′ − x0 ) (124)
i.e. convolving a function with a delta-function centered at x0 produces the function centered
at x0 .

4.3 Convolution theorem (RHB 13.1.8)


Is it possible to ‘undo’ the experimental response and recover the underlying distribution f (x)
from the measured distribution h(x)? In Fourier 8 we derived the convolution theorem, which
relates the Fourier transforms of f (x), g(x) and h(x):

H(k) = 2πF (k)G(k) . (125)

Therefore if we know what the experimental response, g(x), is we can recover the original
distribution. The procedure is:

ˆ calculate G(k) and H(k) (the Fourier transforms of the experimental response and the
measured distribution respectively),

ˆ use eq. (125) to calculate F (k): F (k) = H(k)/( 2πG(k)),

ˆ recover the underlying distribution, f (x), by calculating the inverse Fourier transform of
F (k): f (x) = IF T [F (k)].

32
The convolution theorem also has several other useful applications:
i) As we’ll see in the final Waves/Fourier workshop, when doing numerical calculations it’s
quicker to do convolutions in Fourier space (i.e. take the Fourier transforms of the 2 func-
tions you want to convolve, multiply the Fourier transforms together and then take the inverse
Fourier transform).
ii) A signal can be improved by manipulating its frequency components e.g. you can remove
noise (which corresponds to high spatial frequencies) from an image by multiplying its Fourier
transform with a low-pass filter and then taking the inverse Fourier transform.

There’s another useful equation, sometimes referred to as the Frequency convolution theo-
rem, which relates the Fourier transform of the product of two functions to the convolution of
their Fourier transforms:
1
F T [f (x)g(x)] = √ F (k) ⋆ G(k) . (126)

5 Discrete Fourier transforms


5.1 Introduction
Fourier analysis is a powerful technique for finding out what frequencies a signal is made up
of. However even if an underlying quantity is continuous, data is in reality discrete i.e. mea-
surements are made at regular intervals in time or space, see Fig. 13.

Figure 13: A function f (t) sampled at regular intervals in time t = n∆t, with n = 0, 1, 2, ....

We showed in Fourier 9 that if data is sampled at time intervals t = n∆t then the Fourier
transform is periodic with period ωp = 2π/∆t. As illustrated in Fig. 14, frequencies greater
than ωp are indistinguishable from lower frequencies when discretely sampled. This is an ex-
ample of aliasing. Aliasing refers to signals being indistinguishable after sampling and also to
the distortions which occur when a signal is reconstructed from samples. Other examples of
aliasing include the wave like features which appear in low resolution images of objects with a

33
Figure 14: Waves with frequencies greater than ωp = 2π/∆t are indistinguishable when sampled
at discrete intervals t = n∆t, with n = 0, 1, 2, ....

regular pattern (e.g. a brick wall) or the wagon wheel effect.

The Nyquist frequency, ωc


ωp 2π
ωc = = , (127)
2 2∆t
is the maximum frequency which can be detected in sampled data. As shown in Fig. 15, sig-
nals with frequency above the Nyquist frequency can not be distinguished from signals with
frequency below the Nyquist frequency.

A function is referred to as being bandwidth limited if its Fourier transform is zero for all
frequencies greater than some value ωmax : F (ω) = 0 for ω > ωmax . In this case no information
is lost (i.e. the function is completely specified by discrete samples) provided the data is
sampled at a appropriate frequency. If the function is not bandwidth limited then aliasing is
inevitable. In practice this problem is solved by passing the signal through a low-pass filter
before sampling.

5.2 Definitions
The expressions for the Fourier transform and inverse Fourier transform involve integrals from
−∞ to ∞. In reality we typically have N measurements taken at intervals ∆t between t = 0
and some final time t = (N −1)∆t. Since the data is discrete (and to do numerical calculations)
we’d like the Fourier transform to be discrete too. We showed in Fourier 9 that the discrete
Fourier transform and discrete inverse Fourier transform can be defined as
N −1  
X 2πikn
Fk = fn exp − , (128)
N
n=0
N −1  
1 X 2πikn
fn = Fk exp . (129)
N N
k=0

34
Figure 15: Waves with frequencies above (ω2 = ωc + a, where a is a constant, in red) and
below (ω1 = ωc − a, in blue) the Nyquist frequency, ωc , by the same amount are identical when
sampled at times which are integer multiples of ∆t.

There are N data points, fn , separated by ∆t between t = 0 and (N − 1)∆t i.e. fn = f (n∆t)
with n = 0, ..., N − 1. The Fourier transform, Fk , has N frequencies separated by ∆ω between
ω = 0 and (N − 1)∆ω = (N − 1)2π/(N ∆t) i.e. Fk = F (k∆ω) with k = 0, ..., N − 1. n.b. Here
k is just a label for an integer, and not wavenumber.
Writing out (some of) the terms explicitly

F0 = f0 + f1 + f2 + ... + fN −1 ,
     
2πi 4πi 2(N − 1)πi
F1 = f0 + f1 exp − + f2 exp − + ... + fN −1 exp − ,
N N N
. ...
2(N − 1)2 πi
     
2(N − 1)πi 4(N − 1)πi
FN −1 = f0 + f1 exp − + f2 exp − + ... + fN −1 exp − .
N N N
(130)

The convolution of discrete data is given by


X
hn = fm g(n−m) , (131)
m

while the convolution theorem becomes

Hk = Fk Gk . (132)

5.3 Fast Fourier transform


Calculating the discrete Fourier transform of a data set consisting of N points requires of order
N 2 calculations. If N is very large this is very slow. The Fast Fourier transform (FFT) is a

35
clever algorithm for calculating the discrete Fourier transform quickly.

FFTs are frequently used in lots of areas of physics. Matlab has a FFT and IFFT command,
and we will use these in the final workshop of the module. If you’d like to find out more about
FFTs, then I’d suggest looking at Appendix 6.A for a little bit more detail or the chapter on
FFTs in one of the ‘Numerical methods in....’, series of books by Press et al. for a lot more
detail.

5.A Appendix: More on the Fast Fourier Transform


The discrete Fourier transform is defined as
N −1  
X 2πikn
Fk = fn exp − . (133)
N
n=0

If we define a complex number  


2πi
W ≡ exp − , (134)
N
so that  
kn 2πikn
W = exp − , (135)
N
then the DFT can be written as
N
X −1
Fk = W kn fn , (136)
n=0
i.e. a vector fn multiplied by a matrix whose (k, n)th element is W to the power of k × n.
To calculate one of the components of Fk takes N (complex) multiplications and N (complex)
additions:
Fi = W i0 f0 + ... + W i(N −1) fN −1 . (137)
In total N 2 operations are required and if N is large this is very slow.

The FFT is a clever algorithm for calculating the DFT quickly. The traditional (Cooley-
Tookey) algorithm involves dividing a Fourier transform of length 2n into sums of odd and
even terms repeatedly until it is written in terms of N Fourier transforms of the individual
data points:
(N/2)−1   (N/2)−1  
X 2πik(2j) X 2πik(2j + 1)
Fk = exp − f2j + exp − f2j+1 ,
N N
j=0 j=0
(N/2)−1     (N/2)−1  
X 2πik(j) 2πik X 2πikj
= exp − f2j + exp − exp − f2j+1 ,
(N/2) N (N/2)
j=0 j=0
(N/2)−1  (N/2)−1  
X 2πik(j) k
X 2πikj
= exp − f2j + W exp − f2j+1 ,
(N/2) (N/2)
j=0 j=0

= Fke +W k
Fk0 . (138)

36
If N = 2n this process can be repeated until the data is divided into N DFTs of length 1.
And the DFT of a number is just the number. So the elements of the original data need to
be combined into 2-point FTs, and then 4-point FTs and so on to calculate the full DFT (the
elements then need to be rearranged to get them in the right order. This reduces the number
of calculations required to ∼ N log2 N , which is much smaller (and therefore faster) than the
original ∼ N 2 . This algorithm only works if the number of data points is an integer power of
2, N = 2n . There are now other algorithms which work for N = 3n , 5n , and 7n .

37
6 Optics (and other) applications
6.1 Recap of plane and spherical waves (H 2.5 and 2.7)
For a plane wave the surfaces of constant phase, ϕ = kx − ωt + ϕ0 , are planes which are perpen-
dicular to the direction of travel of the wave. Plane waves occur frequently in optics; optical
devices often produce plane waves and a long way from its source a spherical wave resembles a
plane wave. See animations at: http://www.falstad.com/ripple/index.html.

A harmonic plane wave propagating in the +r direction has the form

ψ(r, t) ∝ exp [i(k.r − ωt)] . (139)

A spherically symmetric harmonic wave has the form


a
ψ(r, t) = exp [ik(r ∓ vt)] . (140)
r
The − sign corresponds to a wave travelling radially outwards (and the + sign radially inwards).

6.A More on the Fast Fourier Transform


The discrete Fourier transform is defined as
N −1  
X 2πikn
Fk = fn exp − . (141)
N
n=0

If we define a complex number  


2πi
W ≡ exp − , (142)
N
so that  
kn 2πikn
W = exp − , (143)
N
then the DFT can be written as
N
X −1
Fk = W kn fn , (144)
n=0

i.e. a vector fn multiplied by a matrix whose (k, n)th element is W to the power of k × n.
To calculate one of the components of Fk takes N (complex) multiplications and N (complex)
additions:
Fi = W i0 f0 + ... + W i(N −1) fN −1 . (145)
In total N 2 operations are required and if N is large this is very slow.

The FFT is a clever algorithm for calculating the DFT quickly. The traditional (Cooley-
Tookey) algorithm involves dividing a Fourier transform of length 2n into sums of odd and

38
even terms repeatedly until it is written in terms of N Fourier transforms of the individual
data points:
(N/2)−1   (N/2)−1  
X 2πik(2j) X 2πik(2j + 1)
Fk = exp − f2j + exp − f2j+1 ,
N N
j=0 j=0
(N/2)−1    (N/2)−1  
X 2πik(j) 2πik X 2πikj
= exp − f2j + exp − exp − f2j+1 ,
(N/2) N (N/2)
j=0 j=0
(N/2)−1   (N/2)−1  
X 2πik(j) X 2πikj
= exp − f2j + W k exp − f2j+1 ,
(N/2) (N/2)
j=0 j=0

= Fke +W k
Fk0 . (146)
If N = 2n this process can be repeated until the data is divided into N DFTs of length 1.
And the DFT of a number is just the number. So the elements of the original data need to
be combined into 2-point FTs, and then 4-point FTs and so on to calculate the full DFT (the
elements then need to be rearranged to get them in the right order. This reduces the number
of calculations required to ∼ N log2 N , which is much smaller (and therefore faster) than the
original ∼ N 2 . This algorithm only works if the number of data points is an integer power of
2, N = 2n . There are now other algorithms which work for N = 3n , 5n , and 7n .

6.2 Fraunhofer diffraction (PPP 16 & 25.1, RHB 13.1.2, H 11)


Fraunhofer (or far-field) diffraction occurs when a plane wave passes through an aperture, and
the diffraction pattern is (effectively) observed far enough away that the diffracted light also
has planar wavefronts. This is usually achieved by either
i) placing the source at the focal point of a lens and the observation screen in the focal plane
of another lens (see fig. 16)
or ii) using a parallel light source (e.g. a laser) and placing the screen at a large distance from
the aperture.

Consider a plane wave which has passed through a 1d aperture. According to the Hugyens-
Fresnel principle each element ds of the aperture acts as a source of spherical wavelets with
amplitude, at a distance r away,
 
EL ds
dEP = exp [i(kr − ωt)] , (147)
r
where EL is the amplitude per unit width of the slit. If we set r = r0 for the middle of the
aperture then for other points r = r0 −∆ = r0 −s sin θ (see Fig. 17) and in the far field limit (r
much bigger than aperture width):
 
EL
dEP ≈ exp [i(kr0 −ks sin θ − ωt)] ds , (148)
r0
and integrating over the entire aperture the total amplitude is
 Z 
EL
EP ≈ exp (−iks sin θ) ds exp [i(kr0 − ωt)] . (149)
r0 aperture

39
Figure 16: The Fraunhofer diffraction pattern can be viewed by placing the observations screen
in the focal plane of a lens. Positions on the screen are related to angles by y = f tan θ and
since θ is small y ≈ f θ.

If we define the aperture (or transmission) function, A(s), as 9

A(s) = EL , (150)

within the aperture, and zero elsewhere, then


exp [i(kr0 − ωt)]
Z
EP ≈ A(s) exp (−ik̃s) ds , (151)
r0

where k̃ = k sin θ (k is the wavenumber and θ is the viewing angle) i.e. the total amplitude can
be written in terms of the Fourier transform of the aperture function:
√ exp [i(kr0 − ωt)]
EP ≈ 2π F T [A(s)] , (152)
r0
since by definition Z
1
F T [A(s)] = √ A(s) exp (−ik̃s) ds . (153)

The irradiance (flux density incident on a surface) is given by
ϵ c
0 2
I= ER , (154)
2
where ER is the amplitude of the radiation (i.e. EP = ER exp [i(kr0 − ωt)]), and it can therefore
be written in terms of the Fourier transform of the aperture function:
 ϵ c   2π 
0
I(θ) = |F T [A(s)]|2 . (155)
2 r02

9
There are different definitions, some textbooks use A(s) = EL /r0 .

40
Figure 17: Zoom in to aperture.

Therefore to calculate a Fraunhofer diffraction pattern you ‘just’ need to calculate the
Fourier transform of the aperture. Often we can do this fairly easily using standard Fourier
transforms which we’ve already calculated (e.g. the Fourier transform of a top-hat function)
combined, in some cases, with the relations in Sec 3.4 and/or the convolution theorem.

6.3 Single slit


A single slit with width b centered at x = 0 has aperture function:
(
EL if − 2b ≤ x ≤ 2b ,
A(s) = (156)
0 otherwise ,

i.e. a top-hat function with width b and amplitude EL , which has Fourier transform
!
bEL k̃b
F T [A(s)] = √ sinc , (157)
2π 2

and hence, using eq. (155), the irradiance is


!  
2 k̃b 2 kb sin θ
I = I0 sinc = I0 sinc = I0 sinc2 β , (158)
2 2

with
kb sin θ
β= , (159)
2
and
 ϵ c   E b 2
0 L
I0 = . (160)
2 r0
The resulting Fraunhofer diffraction pattern is shown in Fig. 18 as a function of k̃ for b = 1. 10

10
Strictly speaking we should specify what units b is measured in. In fact the diffraction pattern will look the
same, provided k̃ is measured in the same units, i.e. if b is in µm then k is in (µm)−1 as β must be dimensionless.

41
Figure 18: The Fraunhofer diffraction pattern from a single slit with width b = 1, eq. (158).

6.4 Double slit


Consider a double slit, where each slit has width b and the slit separation is a. To calculate the
diffraction pattern we need to calculate the Fourier transform of the double slit. We can make
the calculation easier by realising that the double slit is the convolution of a top-hat function
with two Dirac delta-functions, i.e. h = g ∗ f where h is the double slit, g a top-hat function
of width b and f a pair of delta-functions centered at x = x0 = ±a/2. Using the definition of
a convolution, eq. (119), and the delta-function sift property, eq. (80),
Z ∞ Z ∞
′ ′
h(x ) = f (x)g(x −x) dx = [δ(x+a/2)+δ(x−a/2)]g(x′ −x) dx = g(x′ +a/2)+g(x′ −a/2) .
−∞ −∞
(161)
The convolution theorem,
√ eq. (125), tells us that the Fourier transform of the convolution is
given by H(k) = 2πF (k)G(k). The Fourier transform of the top-hat function is
!
b k̃b
G(k̃) = √ sinc , (162)
2π 2

where k̃ = k sin θ. The Fourier transform of a delta-function centered at x = 0 is


1
F T [δ(x)] = √ , (163)

and the ‘translation’ relation tells us that F T [f (x − x0 )] = exp (−ikx0 )F (k) so that the Fourier
transform of the pair of delta-functions centered at ±a/2 is
" ! !# !
1 ik̃a ik̃a 2 k̃a
F (k) = √ exp − + exp = √ cos . (164)
2π 2 2 2π 2
Putting this together we get:
 ϵ c   2π   ϵ c   2π 2
0 2 0
I = |H(k̃)| = F 2 (k̃)G2 (k̃) ,
2 r02 2 r0
= 4I0 sinc2 (β) cos2 (γ) , (165)

42
where
k̃b kb sin θ
β= = , (166)
2 2
k̃a ka sin θ
γ= = . (167)
2 2

Interference between the two slits gives the cos2 (γ) term, and the overall intensity is mod-
ulated by the sinc2 (β) diffraction term. Missing orders occur when an interference maximum
coincides with a diffraction minimum (and also us to deduce the ratio of the slit width and sep-
aration). The resulting irradiance distribution is shown in Fig. 19 as a function of k̃ = k sin θ
for a = 5b and b = 1, in which case the central diffraction maximum contains nine bright
fringes.

Figure 19: The Fraunhofer diffraction pattern from a double slit with separation a = 5b and
width b = 1, eq. (165). The dotted (red) line shows the diffraction envelope from a single slit.

6.5 Multiple slits


Multiple slits are the generalisation of a double slit to N slits. Just like the double slit could
be written as the convolution of a top-hat with a pair of Dirac delta-functions, multiple slits
can be written as the convolution of a top-hat with a row of Dirac delta-functions (known as a
Dirac comb 11 ) i.e. h = g ∗ f where h is the multiple slits, g a top-hat function of width b and
f a row of delta-functions centered at x0 = ja with j = 0, ..., N − 1 (i.e. x0 = 0, a, 2a, ...):
N
X −1
f (x) = δ(x − ja) . (168)
j=0

11
Technically a Dirac comb consists of an infinite number of delta-functions.

43
In this case, using the translation rule, F T [f (x − x0 )] = exp (−ikx0 )F (k), once more, the
Fourier transform of our row of Delta-functions is
 
N
X −1 N
X −1
F (k̃) = F T  δ(x − ja) = (F T [δ(x − ja)]) ,
j=0 j=0
N −1 h i NX−1  
X 1
= exp (−ik̃ja)F T [δ(x)] = exp (−ik̃ja) √ ,
j=0 j=0

N −1 N −1
1 X 1 Xh ij
= √ exp (−ik̃ja) = √ exp (−ik̃a) . (169)
2π j=0 2π j=0

since exp (−ik̃ja) = [exp (−ik̃a)]j . The sum in the final expression is a geometric progression
(a + ar + ar2 + ...) with a = 1 and r = exp (−ik̃a). The sum of the first N terms of a geometric
progression is
1 − rN
 
SN = a , (170)
1−r
and hence
" #
1 1 − exp (−ik̃aN ) 1 sin (k̃aN/2)
F (k̃) = √ = √ exp (−ik̃a(N − 1)/2) . (171)
2π 1 − exp (−ik̃a) 2π sin (k̃a/2)

The irradiance is proportion to the square of√ the Fourier transform of the aperture function
and using the convolution theorem, H(k) = 2πF (k)G(k), we get:
 ϵ c   2π   ϵ c   2π 2
0 2 0
I = |H(k̃)| = F 2 (k̃)G2 (k̃) ,
2 r02 2 r0
sin2 (γN )
= I0 sinc2 (β) , (172)
sin2 (γ)
with β and γ defined as before in eqs. (166) and (167). The first term is the diffraction envelope
from a single slit and the second term is due to the intereference between the multiple slits. The
numerator and denominator of the intereference term both tend to zero as γ → nπ, therefore
we need to use l’Hopital’s rule, eq. (61) to study its behaviour in this limit:

sin (γN ) limγ→nπ [N cos (γN )]


limγ→nπ = = ±N . (173)
sin (γ) limγ→nπ [cos (γ)]
The left panel of Fig. 20 shows the diffraction and interference terms separately, the right panel
the resulting irradiance distribution.

Sometimes a diffraction grating is covered with an apodizing mask (from the Greek ‘without
feet’). In this case the aperture function is no longer constant. This is done in order to reduce
the intensity of side lobes so faint satellite lines don’t get swamped by side lobes of the main
line and can be identified. For instance in astronomy this allows a faint binary companion to
be observed.

44
Figure 20: The Fraunhofer diffraction pattern from N = 8 multiple slits with separation a = 3b,
and width b = 1 eq. (172). In the left hand panel the dotted (red) line shows the diffraction
envelope from a single slit and the dashed (blue) line the intereference term. The right panel
shows the resulting irradiance distribution.

6.6 3d Fourier transform (RHB 13.1.10)


The Fourier transform can easily be generalised to 3d (x → r = (x, y, z) and wave-number k →
wave-vector k = (kx , ky , kz ))
Z
1
F (k) = f (x, y, z) exp (−ikx x) exp (−iky y) exp (−ikz z) dx dy dz , (174)
(2π)3/2
Z
1
f (r) = F (kx , ky , kz ) exp (ikx x) exp (iky y) exp (ikz z)dkx dky dkz , (175)
(2π)3/2

or equivalently, but more compactly,


Z
1
F (k) = f (r) exp (−ik.r) d3 r , (176)
(2π)3/2
Z
1
f (r) = F (k) exp (ik.r) d3 k . (177)
(2π)3/2

For a spherically symmetric function, f (r), using spherical polar coordinates d3 r = r2 sin θdr dθ dϕ
and k.r = cos θ, eq. (176) becomes
Z ∞ Z π Z 2π
1
F (k) = dr dθ f (r)r2 sin θ exp (−ikr cos θ) dϕ , (178)
(2π)3/2 0 0 0

and after carrying out the θ and ϕ integrals (see Appendix 6.A)
Z ∞  
1 2 sin (kr)
F (k) = 4πr f (r) dr . (179)
(2π)3/2 0 kr

45
6.7 Rectangular aperture (PPP 25.1)
In 2d each element dx dy of the aperture acts as a source of spherical wavelets with amplitude,
at a distance r away,  
Es dx dy
dE = exp [i(kr − ωt)] , (180)
r
where Es is the amplitude per unit area. In 2d the difference in path length between a general
point in the aperture and the centre of the aperture becomes

r − r0 ≈ x sin θ + y sin ϕ , (181)

and hence the diffraction amplitude is


 Z 
Es
EP ≈ exp [−i(k̃x x + k̃y y)] dx dy exp [i(kr0 − ωt)] . (182)
r0 aperture

where k̃x = k sin θ and k̃y = k sin ϕ. This can be written in terms of the 2d aperture function,
defined as
A(x, y) = Es , (183)
within the aperture and zero elsewhere, as

exp [i(kr0 − ωt)]


Z
EP ≈ A(x, y) exp (−i(k̃x x + k̃y y)) dx dy ,
r0
exp [i(kr0 − ωt)]
≈ (2π) F T [A(x, y)] , (184)
r0
where Z
1
F T [A(x, y)] = A(x, y) exp (−i(k̃x x + k̃y y)) dx dy . (185)

The irradiance is then proportional to the square of the 2d Fourier transform:
 ϵ c   2π 2
0
I(θ, ϕ) = |F T [A(x, y)]|2 . (186)
2 r0

The aperture function of a rectangular (a by b) aperture can be written as:


(
Es if −b/2 ≤ x ≤ b/2 and −a/2 ≤ y ≤ a/2 ,
A(x, y) = (187)
0 otherwise ,

i.e. the aperture is proportional to the product of a top-hat of width b in the x direction with a
top-hat of width a in the y direction. Therefore the Fourier transform of the aperture function
is Es times the product of the FTs of two top-hat functions with unit amplitude and hence the
irradiance is:
I = I0 sinc2 (β) sinc2 (α) , (188)

46
where
k̃x b kb sin θ
β = = , (189)
2 2
k̃y a ka sin ϕ
α = = , (190)
2 2
and in this case
 ϵ c   E ab 2
0 s
I0 = . (191)
2 r0

The diffraction patterns from a square aperture (a special case of a rectangular aperture
with a = b) and a hexagonal aperture are shown in Fig. 21. This demonstrates that by looking
at the properties of the diffraction pattern we could deduce the shape of the aperture. As
you’ll see in solid state physics in 3rd year something similar happens with X-ray diffraction:
the diffraction pattern is proportional to the Fourier transform of the crystal (and hence you
can deduce the crystal structure from the diffraction pattern).

Figure 21: The diffraction pattern a square aperture (left) and a hexagonal aper-
ture (right), courtesy of http://en.wikipedia.org/wiki/File:Square diffraction.jpg and
http://www1.union.edu/newmanj/lasers/Light as a Wave/light as a wave.htm

6.8 Fourier transform of the charge distribution of the hydrogen atom


You’ll see in solid state physics that the X-ray diffraction pattern is proportional to the structure
function, which in turn is proportional to the Fourier transform of the charge distribution. The
hydrogen atom has electron number density
1
f (r) = exp (−2r/a0 ) . (192)
πa30
Inserting this into the definition of the 3d spherically symmetric Fourier transform gives
1
F (k) ∝   2  2 . (193)
ka0
1+ 2

47
6.A Appendix: 3d spherically symmetric Fourier transform
For a spherically symmetric function, f (r), using spherical polar coordinates d3 r = r2 sin θdr dθ dϕ
and k.r = cos θ and eq. (176) becomes
Z ∞ Z π Z 2π
1
F (k) = dr dθ dϕf (r)r2 sin θ exp (−ikr cos θ) ,
(2π)3/2 0 0 0
Z ∞ Z π
1
= dr dθf (r)r2 sin θ exp (−ikr cos θ) [ϕ]2π0 ,
(2π)3/2 0 0
Z ∞ Z π
1 2
= dr2πr f (r) dθ sin θ exp (−ikr cos θ) ,
(2π)3/2 0 0
exp (−ikr cos θ) π
Z ∞  
1 2
= dr2πr f (r) ,
(2π)3/2 0 ikr θ=0
Z ∞  
1 2 exp (ikr) − exp (−ikr)
= dr2πr f (r) ,
(2π)3/2 0 ikr
Z ∞  
1 2 sin (kr)
= dr4πr f (r) . (194)
(2π)3/2 0 kr

7 Solving differential equations


Differential equations are ubiquitous in physics.

Ordinary differential equations (ODEs) contain functions of only one independent variable
and one or more of their derivatives with respect to that variable (in other words they only
contain ordinary, total derivatives). For example the equation of simple harmonic motion:

d2 x
= −ω 2 x , (195)
dt2
is an ODE.

Partial differential equations contain functions of more than one independent variable and
one or more of their partial derivatives with respect to these variables (in other words they
contain partial derivatives). For example the wave equation:

∂2ψ 2
2∂ ψ
= v , (196)
∂t2 ∂x2
and the heat flow equation
∂u ∂2u
=α 2, (197)
∂t ∂x
are PDEs.

7.1 Ordinary differential equations


Fourier transforms can be used to solve some ODEs. Consider, for instance, the current flow,
i(t) in a RL circuit with voltage source v(t). Using Kirchoff’s 2nd law (around a closed loop

48
voltages sum to zero) we find
di(t)
v(t) = i(t)R + L . (198)
dt
We showed in Fourier 12 that by taking the Fourier transform of both sides of this equation
and using the differentiation relation, eq. (87), we get
V (ω)
I(ω) = . (199)
R + iωL
So if we can calculate the Fourier transform of the voltage source, V (ω) = F T [v(t)], we can
use this equation to calculate the Fourier transform of the current, I(ω), and then calculate
the current itself by taking the inverse Fourier transform, i(t) = IF T [I(ω)].
If v(t) is a voltage spike at t = 0: v(t) = V0 δ(t) then
V0
V (ω) = V0 F T [δ(t)] = √ , (200)

and therefore
V0 1 V0 1
I(ω) = √ =√ . (201)
2π R + iωL 2πL (R/L) + iω
Taking the IFT of this directly (by substituting it into the definition of the IFT) would be
tricky, however remember that in Fourier 7 we showed that if
(
exp (−αt) if t > 0 ,
f (t) = (202)
0 otherwise ,
then
1 1
F (ω) = √ . (203)
2π α + iω
Here we have
V0
I(ω) = F (ω) , (204)
L
with α = R/L and therefore
(
V0
exp − Rt

L L if t ≥ 0 ,
i(t) = (205)
0 otherwise ,
i.e. a delta-function voltage spike in this circuit produces an exponentially decaying current.

To summarise, to find the current flowing in a RL circuit, i(t), due to a voltage input v(t)
we
ˆ Took the FT of the ODE relating i(t) and v(t).
ˆ Calculated V (ω) = F T [v(t)].
ˆ Used the FT of the ODE to calculate I(ω).
ˆ Calculated i(t) = IF T [I(ω)].
The success of this approach depends on whether it is possible to calculate the IFT of the
FT of the solution. In this case the FT was part of a common FT pair, so we didn’t need to
do the calculation explicitly.

49
7.2 Partial differential equations: general solution (RHB 20.3.3)
In Intro 1 we stated than the general solution of the 1d wave equation

∂2ψ 1 ∂2ψ
= , (206)
∂x2 v 2 ∂t2
has the form
ψ(x, t) = a1 f (x − vt) + a2 g(x + vt) , (207)
where a1 and a2 are constants, and f and g are any function of (x−vt) and (x+vt) respectively.

We can in fact show that this is the general solution. The strategy to do this is to write
ψ(x, t) = f (p) where p is some function of x and t. The idea is that when we substitute this
into the wave equation and then deduce the form p has to take in order for the terms containing
f (p) to cancel. Differentiating twice with respect to x and t respectively we find

∂2ψ df ∂ 2 p d2 f ∂p 2

= + 2 ,
∂x2 dp ∂x2 dp ∂x
∂2ψ df ∂ 2 p d2 f ∂p 2
 
= + 2 , (208)
∂t2 dp ∂t2 dp ∂t

and substituting these expressions into the wave-equation we get


"   #
df ∂ 2 p d2 f ∂p 2 1 df ∂ 2 p d2 f ∂p 2
 
+ 2 = 2 + 2 . (209)
dp ∂x2 dp ∂x v dp ∂t2 dp ∂t

In order for the f (p) dependent terms to cancel we need either the derivatives multiplying
∂p ∂2p ∂2p
df /dp or d2 f /dp2 to be zero. If we had ∂x = 0 and ∂p∂t = 0, then ∂x2 and ∂t2 would be zero
too, and we’d be left with 0 = 0 (which is a solution, but not a particularly interesting one).
∂2p ∂2p
So what we want is ∂x 2 = 0 and ∂t2 = 0. This tells us p must have the form p = ax + bt where
∂p
a and b are constants. Then ∂x = a and ∂p
∂t = b so that eq. (209) reduces to

d2 f b2 d2 f
a2 = , (210)
dp2 v 2 dp2

which gives us a = ±b/v. We can take a = 1, hence b = ±v and therefore p = x ± vt so that


the general solution is indeed given by eq. (207).

7.3 Partial differential equations: separation of variables (RHB 21.1 & 22.2)
A function is separable if it can be written as the product of functions of a single variable
e.g. f (x, t) = x2 t is separable as it can be written as f (x, t) = X(x)T (t) with X(x) = x2 and
T (t) = t, while f (x, t) = x2 t + xt2 is not separable as it can’t be written in this form.

50
The separation of variables method of solving pdes involves looking for solutions which are
separable. For the 1d wave equation, we look for solutions with the form ψ(x, t) = X(x)T (t).
This gives
∂2ψ d2 X
= T,
∂x2 dx2
∂2ψ d2 T
= X. (211)
∂t2 dt2
Substituting into the wave equation and dividing by XT gives
1 d2 X 1 d2 T
= . (212)
X dx2 v 2 T dt2
This can only be true for all x and t if both sides of the equation are equal to a constant. It’s
useful to write this constant as −m2 , so that
d2 X
= −m2 X ,
dx2
d2 T
= −m2 v 2 T . (213)
dt2
These equations have solutions X(x) = a cos (mx) + b sin (mx) and T (t) = c cos (mvt) +
d sin (mvt) (where a, b, c, d are constants). Therefore the general separable solution to the
1d wave equation has the form
ψ(x, t) = A sin (mx) sin (mvt)+B sin (mx) cos (mvt)+C cos (mx) sin (mvt)+D cos (mx) cos (mvt) .
(214)
The values of the constants A, B, C, D depend on the boundary conditions. If we’d taken the
separation constant to be +m2 (instead of −m2 ) we would have got a solution composed of
exponentials instead of sine and cos. Which you should choose to use depends on the physical
system you’re considering. For waves on a string, where the amplitude is zero at either end, it’s
easier to apply the boundary conditions if you use sine and cos. For a system which extends
to infinity exponentials may be more appropriate, see Differential equations problem sheet q5.

Consider a string which is fixed at x = 0 and x = l. In this case ψ(0, t) = ψ(l, t) = 0.


Applying the first of these boundary conditions we have
ψ(0, t) = C sin (mvt) + D cos (mvt) = 0 . (215)
This expression can only be zero for all t if C = D = 0. The second boundary condition gives
us
ψ(l, t) = A sin (ml) sin (mvt) + B sin (ml) cos (mvt) = 0 . (216)
This expression only be zero for all t if sin (ml) =0 i.e.  m = nπ/l where n is an integer. The
∂ψ
string is initially stationary so we must also have ∂t = 0 for all x
t=0
   nπv      
∂ψ  nπx  nπvt  nπx  nπvt
= A sin cos − B sin sin ,
∂t L l l l l
 
∂ψ  nπv   nπx 
= A sin , (217)
∂t t=0 L l

51
so we need A = 0.
The general solution is the superposition of the solutions for all possible values of n:
∞  nπx   
X nπvt
ψ(x, t) = Bn sin cos . (218)
l l
n=1

To determine Bn we need to know the shape of the string at t = 0, ψ(x, 0) = f (x). We then
need to find the values of the coefficients Bn such that
X∞  nπx 
ψ(x, 0) = Bn sin = f (x) . (219)
l
n=1

This is the Fourier series of an odd function. Our initial condition f (x) must be analytically
continued outside of the region 0 < x < l, so that it is odd (and has period L = 2l). The
coefficients of the (odd) Fourier series are then given by
4 L/2 2 l
Z   Z
2πnx  πnx 
Bn = f (x) sin dx = f (x) sin dx . (220)
L 0 L l 0 l
The shape of a string plucked in the middle (with maximum height h) can be approximated
by a triangle: (
2h
l x if 0 < x ≤ l/2 ,
f (x) = 2h (221)
l (l − x) if l/2 < x ≤ l ,
We showed in q5 of the Fourier series problem sheet that the coefficients of the Fourier series
of the odd analytic continuation of this function are
   
8h 8h 1
B1 = 2
, B2 = 0 , B3 = − B4 = 0 , ... . (222)
π π2 9
(this calculation isn’t difficult, but you need to be very careful with signs etc. to get the
right answer). Inserting these coefficients into eq. (218), which we found by applying the other
boundary conditions (ends are fixed so that ψ(0, t) = ψ(l, t) = 0 and string is initially stationary
so that (∂ψ/∂t)t=0 = 0), we find the final solution
         
8h πx πvt 1 3πx 3πvt
ψ(x, t) = 2 sin cos − sin cos + ... . (223)
π l l 9 l l
If we’d
  hit the string rather than plucking it, the initial conditions would have been ψ(x, 0) =
∂ψ
0 and ∂t = g(x) where g(x) is the initial velocity.
t=0

We’ve focused on the wave equation, but these techniques can be used to solve other partial
differential equations, e.g. Laplace’s equation in 2d
∂2u ∂2u
+ 2 = 0, (224)
∂x2 ∂y
which arises in various branches of physics (gravity, electrostatics, fluid dynamics). See the
differential equations problem sheet and questions from past exam papers.

52
7.4 Partial differential equations: using Fourier transforms (RHB 21.4)
FTs can be used to turn a PDE in real space into an ODE in Fourier space (which is easier to
solve). Consider the heat flow equation:

∂u(x, t) ∂ 2 u(x, t)
=α , (225)
∂t ∂x2
where u(x, t) is the temperature at position x at time t and α is the thermal diffusivity 12 .
If an infinitely long bar is touched in the middle with a heat source, what is the subsequent
temperature distribution?

Taking the FT of both sides of eq. (225) with respect to x 13


Z ∞
1
U (k, t) = √ u(x, t) exp (−ikx) dx , (226)
2π −∞
and applying the differentiation property
 n 
∂ u
FT = (ik)n F T [u] , (227)
∂xn
we get
∂U (k, t)
= −αk 2 U (k, t) , (228)
∂t
which has solution
U (k, t) = U (k, 0) exp (−αk 2 t) , (229)
where U (k, 0) is the FT of the initial temperature distribution
Z ∞
1
U (k, 0) = √ u(x, 0) exp (−ikx) dx . (230)
2π −∞
Finally to find the solution in real space we would take the IFT of U (k, t):
Z ∞ Z ∞
1 1
u(x, t) = √ U (k, t) exp (ikx) dk = √ U (k, 0) exp (−αk 2 t) exp (ikx) dk . (231)
2π −∞ 2π −∞
This is easier than solving the initial PDE, but (in general) still not straightforward.

In this case (for the heat flow equation) we can however use the convolution theorem to
find the solution, u(x, t). exp (−αk 2 t) is a gaussian and we saw in Sec. 3.6 that the Fourier
transform of a gaussian is another gaussian (with width inversely proportional to that of the
original gaussian) i.e. if
x2
 
1
f (x) = √ exp − 2 , (232)
2π∆ 2∆
12
In thermal physics the thermal diffusivity is often called λ, but we’ve called it α here to avoid confusion
with wavelength.
13
The FT involves integrating with respect to x from −∞ to +∞, so this method is only strictly valid if the
bar is infinite.

53
then  2 2
1 k ∆
F (k) = √ exp − . (233)
2π 2
We have ∆2 = 2αt, and so

x2
  
1
exp (−αk 2 t) = F T √ exp − . (234)
2αt 4αt

Remember that U (k, 0) = F T [u(x, 0)]. Therefore the FT of our solution, U (k, t) = F T [u(x, t)],
is the product of two Fourier transforms:
√ x2
  
1 1
U (k, t) = ( 2π)F T [u(x, 0)]F T √ √ exp − . (235)
2π 2αt 4αt

From Sec. 4, if h is the convolution of f and g


Z ∞

h(x ) = f ⋆ g = f (x)g(x′ − x) dx , (236)
−∞

then the convolution theorem tells us that



H(k) = 2πF (k)G(k) . (237)

Comparing this with eq. (235) we have

F (k) ≡ F T [u(x, 0)] , (238)


x2
  
1 1
G(k) ≡ F T √ √ exp − . (239)
2π 2αt 4αt

Therefore our solution, h(x′ ) = u(x′ , t), is the convolution of f (x) = u(x, 0) and

x2
 
1 1
g(x) = √ √ exp − . (240)
2π 2αt 4αt

So using the convolution definition



(x′ − x)2
Z  
′ 1 1
u(x , t) = √ √ u(x, 0) exp − dx . (241)
2π 2αt −∞ 4αt

If our initial heat source is a delta-function centered at x = 0: u(x, 0) = δ(x) then


Z ∞
(x′ − x)2
 
′ 1 1
u(x , t) = √ √ δ(x) exp − dx′ . (242)
2π 2αt −∞ 4αt

Remembering the sifting property of the delta-function


Z ∞
δ(x − x0 )g(x)dx = g(x0 ) , (243)
−∞

54
(here we have x0 = 0). Therefore

(x′ )2
 
1 1
u(x′ , t) = √ √ exp − , (244)
2π 2αt 4αt

and the final step is to change our label for the x co-ordinate back to x:

x2
 
1 1
u(x, t) = √ √ exp − . (245)
2π 2αt 4αt

Therefore for t > 0 the temperature distribution is a gaussian with width which increases with
time (see Fig. 22). It is sometimes referred to as the point spread function (it tells us how a
point source of heat spreads out) or Green’s function.

Figure 22: The temperature function in an infinitely long metal bar with thermal diffusivity
α = 1 m2 s−1 at t = 1, 2, 3 s after it has been touched instantaneously with a heat source at
x = 0 m at t = 0 s.

To summarise, to find the temperature distribution, u(x, t) in an infinitely long metal bar
we

ˆ Took the FT of the PDE which u(x, t) obeys.

ˆ Solved the resulting ODE.

ˆ Took the FT of the initial conditions U (k, 0) = F T [u(x, t)].

ˆ Calculated u(t) = IF T [U (k, t)].

This process is shown in Fig. 23. For the heat flow equation the solution in the Fourier domain
(or in Fourier space) is a gaussian, therefore the solution u(x, t) is a convolution of a gaussian
and the initial condition. If the initial condition is a delta-function, the solution is a gaussian
with width that increases with time.

55
Figure 23: A graphical illustration of how using FTs turns solving a PDE from a hard calcu-
lation (top) into a series of less difficult calculations (bottom).

56
8 Summary
Fourier analysis involves writing a function as a superposition of waves of different frequencies.
Periodic functions can be written as a sum of waves (a Fourier series).

The Fourier series comes in two, equivalent, forms; trigonometric with real coefficients ar
and br

a0 X
f (x) = + [ar cos (rk0 x) + br sin (rk0 x)] , (246)
2
r=1

and complex, with complex coefficients cr ,



X
f (x) = cr exp (irk0 x) , (247)
r=−∞

where, in both cases k0 = 2π/L is the fundamental wavenumber.

Non-periodic functions can be written as an integral of waves (a Fourier transform) weighted


by a (in general complex) function F (k)
Z ∞
1
f (x) = √ F (k) exp (ikx) dk . (248)
2π −∞
For functions of time x → t, k → ω and T → L.

Fourier analysis has applications in many areas of science including physics, engineering and
chemistry. For instance it allows us to generate signals in electronics, remove the experimental
response from data (e.g. blurring of an astronomical image), calculate Fraunhofer diffraction
patterns in optics and solve differential equations.

57

You might also like