You are on page 1of 55

F32CO5 Wave phenomena (F32FOU Fourier methods)

4. Fourier methods summary


Dr. Anne Green
CAPT B107
anne.green@nottingham.ac.uk

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

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

3
3
3
4
4
4
5
5
6

2 Fourier series (RHB 12)


2.1 Periodicity and harmonics . . . . . . . .
2.2 Trigonometric form (RHB 12.2) . . . . .
2.3 Dirichlet conditions (RHB 12.1 & 12.4)
2.4 Odd and even functions (RHB 12.3) . .
2.5 Analytic continuation (RHB 12.5) . . .
2.6 Complex form (RHB 12.7) . . . . . . . .
2.7 Parsevals theorem (RHB 12.8) . . . . .
2.8 Graphical representation . . . . . . . . .

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

6
6
7
9
9
11
11
13
13

3 Fourier transforms (RHB 13.1)


3.1 Introduction and definitions . . . . . . . . . . . . . .
3.2 Dirac delta-function (RHB 13.1.3) . . . . . . . . . .
3.3 Fourier transform of an infinite monochromatic wave
3.4 Some properties of Fourier transforms (RHB 13.1.5)
3.5 Fourier transform of a finite wave train . . . . . . . .
3.6 Fourier transform of a gaussian (RHB 13.1.1) . . . .
3.7 Fourier transform of an exponential . . . . . . . . . .
3.8 Fourier transform pairs . . . . . . . . . . . . . . . . .
3.9 Parsevals theorem (RHB 13.1.9) . . . . . . . . . . .

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

14
14
18
19
19
20
21
21
22
22

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

4 Convolution (RHB 13.1.7)


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

23
23
23
24

5 Discrete Fourier transforms


5.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.2 Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.3 Fast Fourier transform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

27
27
29
30

6 Optics and other applications


6.1 Recap of plane and spherical waves (H 2.5 and 2.7) . . . . . . . . .
6.2 Fraunhofer diffraction (PPP 16 and 25.1, RHB 13.1.2, H 11) . . . .
6.3 Single slit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6.4 Double slit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6.5 Multiple slits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6.6 3d Fourier transform (RHB 13.1.10) . . . . . . . . . . . . . . . . .
6.7 Rectangular aperture (PPP 25.1) . . . . . . . . . . . . . . . . . . .
6.8 Fourier transform of the charge distribution of the hydrogen atom

.
.
.
.
.
.
.
.

30
30
31
33
34
35
37
37
39

.
.
.
.

39
40
41
42
44

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

7 Solving differential equations


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

.
.
.
.
.
.
.
.

.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.

8 Summary

47

A Products of odd and even functions and their integrals

49

B Relationship between coefficients of complex and trigonometric Fourier series


49
C Derivation of Parsevals theorem for complex Fourier series

50

D Relationship between the Heaviside step function and the Dirac delta-function 50
E Calculation of the Fourier transform of a gaussian

51

F More on the Fast Fourier Transform

52

G 3d spherically symmetric Fourier transform

53

H Calculation of Fourier transform of the hydrogen atom charge distribution 53


I

The pre-factors in the definition of Fourier transform and the inverse Fourier
transform
54

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, chemistry 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.
http://www.phy.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). Well 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 students 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 F32AM4: Elements of mathematical
physics. See Moodle for a list of recommended problems from textbooks.
Answers to the workshop questions and examples sheets will be available from Moodle.
Youll 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.
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)

Products of trigonometric functions can be expressed in terms of sums of trigonometric functions (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
2x
sin
dx = 0 .
L
0
1.4.2

(5)

exp (i)

Eulers equation tells us that


exp (i) = cos + i sin ,

(6)

and cos and sin can be written in terms of exponentials:


cos =
sin =

exp (i) + exp (i)


,
2
exp (i) exp (i)
.
2i

(7)
(8)

You should memorize these expressions (as they come up repeatedly in Fourier analysis calculations), however if you forget them you can derive them quickly. For cos you need to take a
combination of exp (i) and exp (i) so that the sin terms cancel:
exp (i) + exp (i) = cos + i sin + cos () + i sin () ,
= cos + i sin + cos () i sin () = 2 cos ,

(9)

while for sin you need the cos terms to cancel:


exp (i) exp (i) = cos + i sin cos () i sin () ,
= cos + i sin cos () + i sin () = 2i sin .

(10)

The value of exp (i) at integer multiples of is given by


exp (in) = (1)n .
1.4.3

(11)

Integration

Fourier analysis involves a lot of integration (in particular of functions multiplied by an exponential 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 .
(12)
x1

The definite integral of zero is zero:


Z x2
x1

0 dx = [c]xx21 = (c c) = 0 ,

(c is a constant). You will sometimes need to use integration by parts:


Z
Z
du
dv
dx = uv
v dx .
u
dx
dx
5

(13)

(14)

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 0 (ax) dx = f (ax) ,
(15)
a
where a is a constant and f 0 df /dx. You can show this by making the substitution y = ax,
so that dy = adx and
Z
Z
1
1
1
(16)
f 0 (ax) dx =
f 0 (y) dy = f (y) = f (ax) .
a
a
a
An example of this sort of integral, which well encounter in Fourier analysis, is f = sin (ax)
and a = 2/L:





Z x2
2x
L
2x x2
sin
dx =
cos
.
(17)
L
2
L
x1
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 youve 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
2.1

Fourier series (RHB 12)


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 (2rx/L) where r is a integer. We showed in Fourier 1
that this has period L/r. Its sometimes useful to define a fundamental wavenumber
k0 =

2
,
L

(18)

or, for a function of time, a fundamental frequency


0 =

2
.
T

(19)

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 (rx) 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:
f (x) =






2rx
2rx
a0 X
+
ar cos
+ br sin
,
2
L
L

(20)

r=1

or equivalently

f (x) =

a0 X
+
[ar cos (rk0 x) + br sin (rk0 x)] ,
2

(21)

r=1

with the fundamental wavenumber k0 defined in eq. (18) above. This is known as the trigonometric 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 fundamental 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


Z
2 x0 +L
2rx
ar =
f (x) cos
dx ,
L x0
L


Z
2 x0 +L
2rx
br =
f (x) sin
dx ,
L x0
L
1

There are some conditions which the function has to be satisfy, well look at these in Sec. 2.3.

(22)
(23)

or equivalently
ar =
br =

2
L
2
L

x0 +L

f (x) cos (rk0 x) dx ,

(24)

f (x) sin (rk0 x) dx .

(25)

x0
Z x0 +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 :
Z
2 x0 +L
a0 =
f (x) dx .
(26)
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. (20), by cos (2px/L), integrating over a period and using the orthogonality of sine and
cos:





Z x0 +L
0 if r = p = 0 ,
2px
2rx
sin
dx = L2
sin
(27)
if r = p > 0 ,

L
L
x0

0
if r 6= p ,





Z x0 +L
L if r = p = 0 ,
2rx
2px
cos
cos
dx = L2
(28)
if r = p > 0 ,

L
L
x0

0
if r 6= p ,




Z x0 +L
2px
2rx
sin
cos
dx = 0 .
(29)
L
L
x0
These formulae can themselves be derived using the trigonometric identities in eqs. (3) and
(4). We derived eq. (27) in Fourier 2.
As an example we looked at a square wave
(
0 if 1 < x < 0 ,
f (x) =
1 if 0 < x < 1 .
In Fourier 3 we found that its Fourier coefficients are a0 = 1, ar = 0 for r 6= 0 and
(
0
r even ,
br = 2
r odd ,
r

(30)

(31)

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 (3x)
f (x) = +
+ ....... ,
(32)
sin (x) +
2

3x
8

which can be written more compactly as a sum:


 X

1
2
sin [(2j + 1)x]
f (x) = +
.
2

(2j + 1)

(33)

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 well 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 different functions can be made from sine and cosine waves (and you will do (or did) this yourself
using Matlab in the first Waves/Fourier workshop this semester).

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),
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 ) lim0 [f (xd + ) + f (xd )] .
2

(34)

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 A) also allow us to
simplify the calculation of the non-zero coefficients:

10

Even function
ar
br

4
=
L
= 0.

L/2


f (x) cos

2rx
L


dx ,

(35)
(36)

Odd function
ar = 0 ,
br =

4
L

(37)
L/2


f (x) sin

2rx
L


dx .

(38)

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 calculations required). The period of the function (e.g. L or 2L) depends on how its extended. The
extension should ideally be continuous at the end-points (otherwise the Fourier series wont
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
2irx
f (x) =
cr exp
,
(39)
L
r=
or equivalently
f (x) =

cr exp (ik0 rx) ,

(40)

r=

where the fundamental wavenumber k0 is defined in eq. (18) 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


Z
1 x0 +L
2irx
cr =
dx .
(41)
f (x) exp
L x0
L
11

We derived this expression in Fourier 4 by multiplying the Fourier series for f (x), eq. (39), by
exp (2ipx/L), integrating over a period and using the orthogonality of exponentials (homework
from Fourier 4):
(




Z x0 +L
L if r = p
2ipx
2irx
exp
exp
dx =
(42)
L
L
0
if r 6= p
x0

It can be shown (see Appendix B) using eqs. (7) and (8), that the complex form of the
Fourier series is equivalent to the trigonometric form with:
c0 =
cr =
cr =

a0
,
2
1
(ar ibr ) ,
2
1
(ar + ibr ) .
2

(43)
(44)
(45)

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 cr = 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. (30): c0 = 1/2 and
(
0
if r is even ,
i
[(1)r 1] =
cr =
(46)
i
2r
r if r is odd ,
so the complex Fourier series can be written as


i
1
1
f (x) =

(exp (ix) exp (ix)) + (exp (3ix) exp (3ix)) + .... , (47)
2
3

X
1
i
exp ((2j + 1)ix) exp ((2j + 1)ix)
=
+
.
(48)
2
2j + 1
j=0

Using eq. (7) we can rewrite this as


1
f (x) = +
2

 X

2
sin ((2j + 1)x)
,

(2j + 1)
j=0

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


12

(49)

2.7

Parsevals theorem (RHB 12.8)

Parsevals 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

 a 2 1 X
X

1 x0 +L
0
|f (x)|2 dx =
+
a2r + b2r .
(50)
|cr |2 =
L x0
2
2
r=
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 Parsevals 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 Parsevals theorem to evaluate the sum of
the series (see e.g. Fourier series problem sheet q10c).
The derivation of Parsevals 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.

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. (31), are plotted in Fig. 4 and the coefficients of the complex Fourier series, eq. (46), are
plotted in Fig. 5. The dotted line shows the envelope of the coefficients. Dont 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. (31). The dotted blue line shows the envelope of the coefficients.

13

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

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. However 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). Well now see that
for non-periodic functions we can generalise the Fourier series to the Fourier transform.
First lets consider a rectangular wave with unequal peaks and troughs:
(
1 if nT /2 t nT + /2 ,
f (t) =
0 otherwise ,

(51)

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
,
(52)
cr = sinc
T
2
where r = r0 = 2r/T and
sin x
.
(53)
x
At this point well take a slight diversion and study the properties of the sinc function. As
x0
!


3
x x3 + ....
x2
limx0 (sinc(x)) = limx0
= limx0 1
+ .... = 1 .
(54)
x
2
sinc(x)

14

Figure 6: The sinc function.

Alternatively this can be seen using lHopitals rule: if f (x) = g(x)/h(x) and limxx0 (g(x)) 0
and limxx0 (h(x)) 0 then


limxx0 dg(x)
dx
.

(55)
limxx0 (f (x)) =
limxx0 dh(x)
dx
In this case we have
limx0 (sinc(x)) =

d sin x
dx

limx0 dx
dx

limx0


=

limx0 (cos x)
= 1.
limx0 (1)

(56)

For x 6= 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 (gap between the first
zeros) is x = 2.
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 prefactor in the expression for cr , (/T ), will get smaller, and the gap between the frequencies
r+1 r = (r + 1)0 r0 = 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
,
(57)
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 .
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.

15

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. (51), for = 1 and (from top to bottom)
T = 2, 4 and 8.

16

If we take the expression for the coefficients of the Fourier series and multiply it by T:
Z t0 +T
f (t) exp (i0 rt) dt ,
(58)
cr T =
t0

and make the substitutions r = r0 and cr T 2F () we get the definition of the


Fourier transform:
Z
1
F () =
f (t) exp (it) dt .
(59)
2
Similarly from the definition of the Fourier series
f (t) =

cr exp (i0 rt) ,

(60)

r=

we get the definition of the inverse Fourier transform:


Z
1
f (t) =
F () exp (it) d .
2

(61)

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 (it) dt ,
(62)

Z
f (t) = B
F () exp (it) d ,
(63)

where we must have AB = 1/(2) if the original function f (t) is to be recovered when F ()
calculated using eq. (62) is inserted in eq. (63) (see Appendix I 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
.
(64)
T
2
As T we get a single top-hat pulse of width :
(
1 if /2 t /2 ,
f (t) =
0 otherwise ,
which has Fourier transform

F () = sinc
2
17

(65)


.

(66)

n.b. to illustrate how the Fourier transform arises from for the Fourier series weve 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 youre interested it and insert it in
the definition of the Fourier transform, eq. (59).
To summarise, a Fourier series expresses a periodic function as 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.

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) =
0 otherwise ,

(67)

then its Fourier transform is given by


1
F () = sinc
2


.

(68)

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) =
(69)
0
otherwise ,
and its Fourier transform tends towards a constant
1
F () .
2
In general a Dirac delta-function centered at t = t0 is written as
(
if t = t0 ,
(t t0 ) =
0
otherwise .

(70)

(71)

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).

18

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. (61),
which gives:
Z
1
(t) =
exp (it) d .
(72)
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 ) .
(73)

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 Heavside step function is defined as
(
1 if t > 0 ,
h(t) =
(74)
0 it t < 0 .
As h(t) is discontinuous at t = 0, its conventional to take h(0) = 1/2. The differential of the
Heaviside step function is the Dirac delta-function
dh(t)
= (t) .
dt

(75)

Intuitively this makes sense since for t = 0, h(t) is discontinuous and hence its derivative is
infinite, while for t 6= 0, h(t) is constant and hence its derivative is zero. See RHB 13.1.3 and
Appendix D for a mathematical proof of this relationship.

3.3

Fourier transform of an infinite monochromatic wave

We showed in Fourier 6 that the Fourier transform of an infinite monochromatic wave with
frequency 0
f (t) = exp (i0 t) ,
(76)
is a delta-function centered at = 0 :
F () =

2( 0 ) ,

(77)

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 denote functions, and the corresponding capital letter to denote their Fourier transform. i.e.
19

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 () .

(78)

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



df (t)
FT
= iF () ,
dt
 n

d f (t)
FT
= (i)n F () ,
dtn

(80)
(81)

where n is an integer.
Translation
F T [f (t t0 )] = exp (it0 )F () .

(82)

Multiplication by an exponential
F T [exp (i0 t)f (t)] = F ( 0 ) ,

(83)

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 (i0 t) for /2 t /2 ,
f(t) =
0
otherwise ,

(84)

can be written as an infinite monochromatic wave, eq. (76), multiplied by a top-hat function,
eq. (65). In Fourier 7 we used the multiplication by an exponential relation, eq. (83), to
calculate the Fourier transform of the finite wave


( 0 )

F () = sinc
,
(85)
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 6= 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 s1 and = 5
s.
20

Figure 8: The Fourier transform of a finite wave with 0 = 2 s1 and = 5 s, eq. (85).

3.6

Fourier transform of a gaussian (RHB 13.1.1)

Gaussian distributions are very common in physics. The Fourier transform of a gaussian 3 with
width ,


t2
1
exp 2 ,
(86)
f (t) =
2
2
is another gaussian4 :




2 2
2
1
1
F () = exp
= exp
.
2
2( )2
2
2

(87)

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 E. 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) =
0
otherwise ,
is

1
1
F () =
.

+
i
2

This will be useful later on.


3
4

This gaussian is normalized to unity...


... but this gaussian isnt.

21

(88)

(89)

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

3.8

Fourier transform pairs

A function, f (t), and its Fourier transform F T [f (t)] = F (), form a Fourier transform pair.
In fact they are each others Fourier transform.

For instance weve seen that the Fourier transform of a Dirac delta-function is 1/ 2.
While if we take the Fourier transform of this constant
1
f (t) = ,
2

(90)

we get


Z 
1
1

F () =
exp (it) dt = (t) .
(91)
2
2
In some cases its easier to calculate the Fourier transform in one direction than the other
(e.g. the exponential in sec. 3.7) therefore lists of Fourier transform pairs are useful. Table 1
contains a list of the Fourier transform pairs that weve encountered so far.
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

Parsevals theorem (RHB 13.1.9)

The equivalent of eq. (50) for the Fourier transform is


Z
Z
|f (x)|2 dx =
|F (k)|2 dk .

(92)

|F (k)|2 is often referred to as the power spectrum. Physically it is the energy per unit wavenumber (or for a function of time, frequency). As well as being useful for calculating the total energy
22

Table 1: A list of Fourier transform pairs.


top hat
sinc
1
1

sinc( /2)
for /2 < t < /2
2
Dirac delta-function
(t)
gaussian


t2
exp 2
2

1
2

exponential
exp (t) for t > 0

constant
1
2
1
2

gaussian


2 2
exp 2
1
1
2 +i

of a signal it can be used to calculate mathematical results, such as


Z
sin2 ()
d = ,
2

(93)

(see Fourier 7).

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 5
Z
h(x0 ) = f ? g =
f (x)g(x0 x) dx .
(95)

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
5

This definition could also be written, by swapping x and x0 , as


Z
h(x) = f ? g =
f (x0 )g(x x0 ) dx0 .

23

(94)

(or response function) of the instrument being used to make the measurement, g(x) 6 . 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 x0 ). 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) =
(96)
0 otherwise ,
with a triangular function
(
x
g(x) =
0

if 0 x 4 ,
otherwise .

(97)

The resulting convolution, h(x0 ), 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.
A special case is convolution with a delta-function:
Z
0
h(x ) = (x x0 ) ? g =
(x x0 )g(x0 x) dx .

(98)

Using the sifting property of the delta-function, eq. (73),


becomes
h(x0 ) = g(x0 x0 )

(x

x0 )g(x) dx = g(x0 ), this


(99)

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) = 2F (k)G(k) .
(100)
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),
6

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.

24

f(x)

f(x)

f(x)

f(x)

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

25

f(x)

f(x)

f(x)

f(x)

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

26

Figure 12: The convolution of a top-hat, eq. (96), and a triangular function, eq. (97).

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


recover the underlying distribution, f (x), by calculating the inverse Fourier transform of
F (k): f (x) = IF T [F (k)].
The convolution theorem also has several other useful applications:
i) As well see in the final Waves/Fourier workshop, when doing numerical calculations its
quicker to do convolutions in Fourier space (i.e. take the Fourier transforms of the 2 functions 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.
Theres another useful equation, sometimes referred to as the Frequency convolution theorem, 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) .
(101)
2

5
5.1

Discrete Fourier transforms


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. measurements are made at regular intervals in time or space, see Fig. 13.
We showed in Fourier 9 that if data is sampled at time intervals t = nt then the Fourier
transform is periodic with period p = 2/t. As shown in Fig. 14, frequencies greater than
p are indistinguishable from lower frequencies when discretely sampled. This is an example of
27

Figure 13: A function f (t) sampled at regular intervals in time t = nt.

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

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 regular
pattern (e.g. a brick wall) or the wagon wheel effect.
The Nyquist frequency, c

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

A function is referred to as being bandwidth limited if its Fourier transform is zero for all
28

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.

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)
wed 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
Fk =

fn =

N
1
X


2ikn
fn exp
,
N
n=0


N 1
1 X
2ikn
Fk exp
.
N
N

(103)

(104)

k=0

There are N data points, fn , separated by t between t = 0 and (N 1)t i.e. fn = f (nt)
with n = 0, ..., N 1. The Fourier transform, Fk , has N frequencies separated by between
= 0 and p = 2/t = (N 1) i.e. Fk = F (k) with k = 0, ..., N 1. n.b. Here k is
just a label for an integer, and not wavenumber.

29

Writing out (some of) the terms explicitly


F0 = f0 + f1 + f2 + ... + fN 1 ,






2i
4i
2(N 1)i
F1 = f0 + f1 exp
+ f2 exp
+ ... + fN 1 exp
,
N
N
N
.
...






4(N 1)i
2(N 1)2 i
2(N 1)i
+ f2 exp
+ ... + fN 1 exp
.
FN 1 = f0 + f1 exp
N
N
N
(105)

The convolution of discrete data is given by


X
hn =
fm g(nm) ,

(106)

while the convolution theorem becomes


Hk = Fk Gk .

5.3

(107)

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
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 youd like to find out more about
FFTs, then Id suggest looking at Appendix F 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.

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 perpendicular 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)] .

(108)

A spherically symmetric harmonic wave has the form


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

6.2

Fraunhofer diffraction (PPP 16 and 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.

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 .

Consider a plane wave which has passed through a 1d aperture. According to the HugyensFresnel 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)] ,
(110)
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 ,
(111)
r0
and integrating over the entire aperture the total amplitude is


Z
EL
EP
exp (iks sin ) ds exp [i(kr0 t)] .
r0 aperture
If we define the aperture function, A(s), as

A(s) = EL ,
7

(112)

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

31

(113)

within the aperture, and zero elsewhere, then


exp [i(kr0 t)]
EP
r0

ds ,
A(s) exp (iks)

(114)

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:
EP

exp [i(kr0 t)]


F T [A(s)] ,
r0

(115)

since by definition
1
F T [A(s)] =
2

ds .
A(s) exp (iks)

The irradiance (flux density incident on a surface) is given by


 c
0
2
I=
ER
,
2

(116)

(117)

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 .
(118)
2
r02

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 weve 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.

32

6.3

Single slit

A single slit with width b centered at x = 0 has aperture function:


(
EL if 2b x 2b ,
A(s) =
0
otherwise ,
i.e. a top-hat function with width b and amplitude EL , which has Fourier transform
!

kb
bEL
,
F T [A(s)] = sinc
2
2
and hence, using eq. (118), the irradiance is
!



kb
2
2 kb sin
I = I0 sinc
= I0 sinc
= I0 sinc2 ,
2
2
with
=
and

kb sin
,
2

  c   E b 2
0
L
I0 =
.
2
r0

(119)

(120)

(121)

(122)

(123)

The resulting Fraunhofer diffraction pattern is shown in Fig. 18 as a function of k for b = 1.

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

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

33

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. (94), and the delta-function sift property, eq. (73),
Z
Z
0
0
[(x+a/2)+(xa/2)]g(x0 x) dx = g(x0 +a/2)+g(x0 a/2) .
f (x)g(x x) dx =
h(x ) =

(124)
The convolution theorem,
eq.
(100),
tells
us
that
the
Fourier
transform
of
the
convolution
is

given by H(k) = 2F (k)G(k). The Fourier transform of the top-hat function is


!

b
kb
= sinc
G(k)
,
(125)
2
2
where k = k sin . The Fourier transform of a delta-function centered at x = 0 is
1
F T [(x)] = ,
2

(126)

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
ka
ika
ika
2
F (k) =
exp
+ exp
= cos
.
(127)
2
2
2
2
2
Putting this together we get:
  c   2 
  c   2 2
0
0
2
2 (k)
,
F 2 (k)G
I =
H (k) =
2
2
2
r0
r0
= 4I0 sinc2 () cos2 () ,
where

(128)

kb
kb sin
=
,
2
2

ka
ka sin
=
=
.
2
2
=

(129)
(130)

Interference between the two slits gives the cos2 () term, and the overall intensity is modulated 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 separation). 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.
34

Figure 19: The Fraunhofer diffraction pattern from a double slit with separation a = 5b and
width b = 1, eq. (128). 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 9 ) 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, ...):
f (x) =

N
1
X

(x ja) .

(131)

j=0

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
1
N
1
X
X
= FT
F (k)
(x ja) =
(F T [(x ja)]) ,
j=0

N
1 h
X
j=0

j=0


1 
i NX
1

exp (ikja)F
T [(x)] =
exp (ikja)
,
2
j=0

N 1
N 1
ij
1 X
1 Xh

exp (ikja)
=
exp (ika)
.
2 j=0
2 j=0

(132)

j . The sum in the final expression is a geometric progression


since exp (ikja)
= [exp (ika)]
2

(a + ar + ar + ...) with a = 1 and r = exp (ika).


The sum of the first N terms of a geometric
progression is


1 rN
SN = a
,
(133)
1r
9

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

35

and hence
#
"
)

1
1
1

exp
(i
kaN
sin
(
kaN/2)
=

= exp (ika(N
.
F (k)
1)/2)

2 1 exp (ika)
2
sin (ka/2)

(134)

The irradiance is proportion to the square of


the Fourier transform of the aperture function
and using the convolution theorem, H(k) = 2F (k)G(k), we get:
  c   2 2
  c   2 
0
0
2
2 (k)
,
H (k) =
I =
F 2 (k)G
2
2
r0
r02
= I0 sinc2 ()

sin2 (N )
,
sin2 ()

(135)

with and defined as before in eqs. (129) and (130). 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 lHopitals rule, eq. (55) to study its behaviour in this limit:
limn

limn [N cos (N )]
sin (N )
=
= N .
sin ()
limn [cos ()]

(136)

The left panel of Fig. 20 shows the diffraction and interference terms separately, the right panel
the resulting irradiance distribution.

Figure 20: The Fraunhofer diffraction pattern from N = 8 multiple slits with separation a = 3b,
and width b = 1 eq. (135). 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.

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 dont 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.
36

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 ,
(137)
(2)3/2
Z
1
F (kx , ky , kz ) exp (ikx x) exp (iky y) exp (ikz z)dkx dky dkz , (138)
f (r) =
(2)3/2
or equivalently, but more compactly,
F (k) =
f (r) =

Z
1
f (r) exp (ik.r) d3 r ,
(2)3/2
Z
1
F (k) exp (ik.r) d3 k .
(2)3/2

(139)
(140)

For a spherically symmetric function, f (r), using spherical polar coordinates d3 r = r2 sin dr d d
and k.r = cos , eq. (139) becomes
F (k) =

1
(2)3/2

Z
dr

df (r)r2 sin exp (ikr cos ) ,

d
0

and after carrying out the and integrals (see Appendix G)




Z
1
sin (kr)
2
F (k) =
dr4r f (r)
.
kr
(2)3/2 0

6.7

(141)

(142)

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)] ,
(143)
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 ,
and hence the diffraction amplitude is
 Z

Es
exp [i(kx x + ky y)] dx dy exp [i(kr0 t)] .
EP
r0 aperture

(144)

(145)

where kx = k sin and ky = k sin . This can be written in terms of the 2d aperture function,
defined as
A(x, y) = Es ,
(146)

37

within the aperture and zero elsewhere, as


Z
exp [i(kr0 t)]
EP
A(x, y) exp (i(kx x + ky y)) dx dy ,
r0
exp [i(kr0 t)]
F T [A(x, y)] ,
(2)
r0
where
F T [A(x, y)] =

1
2

A(x, y) exp (i(kx x + ky y)) dx dy .

(147)

(148)

The irradiance is then proportional to the square of the 2d Fourier transform:


  c   2 2
0
I(, ) =
(F T [A(x, y)])2 .
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) =
0
otherwise ,

(149)

(150)

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 () ,
(151)
where
=
=
and in this case

kb sin
kx b
=
,
2
2
ky a
ka sin
=
,
2
2

  c   E ab 2
0
s
I0 =
.
2
r0

(152)
(153)

(154)

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
youll 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).

38

Figure 21: The diffraction pattern a square aperture (left) and a hexagonal aperture (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

Youll 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
f (r) =

1
exp (2r/a0 ) .
a30

(155)

Inserting this into the definition of the 3d spherically symmetric Fourier transform gives (see
Appendix H)
1
1
F (k) =
(156)


2  2 .
3/2
(2)
ka0
1+ 2

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 ,
dt2

(157)

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
39

contain partial derivatives). For example the wave equation:


2
2
2
=
v
,
t2
x2

(158)

u
2u
= 2,
t
x

(159)

and the heat flow equation

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 Kirchoffs 2nd law (around a closed loop
voltages sum to zero) we find
di(t)
v(t) = i(t)R + L
.
(160)
dt
We showed in Fourier 12 that by taking the Fourier transform of both sides of this equation
and using the differentiation relation, eq. (80), we get
I() =

V ()
.
R + iL

(161)

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

and therefore

V0
V () = V0 F T [(t)] = ,
2

(162)

1
V0
1
V0
=
.
I() =
R
+
iL
(R/L)
+ i
2
2L

(163)

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) =
(164)
0
otherwise ,
then

1
1
F () =
.
2 + i

Here we have
I() =

V0
F () ,
L

40

(165)

(166)

with = R/L and therefore


(
i(t) =

V0
L

exp Rt
L

if t 0 ,
otherwise ,

(167)

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 didnt need to
do the calculation explicitly.

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


1 2
2
=
,
x2
v 2 t2

(168)

(x, t) = a1 f (x vt) + a2 g(x + vt) ,

(169)

has the form


where a1 and a2 are constants, and f and g are any function of (xvt) 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 well get factors of df 2 /dp2 on both sides. These will cancel and the
remaining equation will tell us what form p must have. Differentiating twice with respect to x
and t respectively we find
2
x2

2
t2


p 2
,
x
 
df 2 p d2 f p 2
+ 2
.
dp t2
dp
t
df 2 p d2 f
+ 2
dp x2
dp

(170)

This approach (i.e. getting df 2 /dp2 factors on both sides which cancel) will only work if the
2p
2p
terms containing df /dp are zero i.e. if x
2 = 0 and t2 = 0. This tells us p must have the form

41

p = ax + bt where a and b are constants. Then


2
x2
2
t2

p
x

= a and

p
t

= b so that

d2 f
,
dp2
d2 f
= b2 2 ,
dp
= a2

(171)

and substituting these equations into the 1-d wave equation, eq. (168), gives
a2

b2 d2 f
d2 f
=
,
dp2
v 2 dp2

(172)

so that 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. (169).

7.3

Partial differential equations: separation of variables (RHB 21.1 and


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 cant be written in this form.
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
x2
2
t2

=
=

d2 X
T,
dx2
d2 T
X.
dt2

(173)

Substituting into the wave equation and dividing by XT gives


1 d2 X
1 d2 T
=
.
X dx2
v 2 T dt2

(174)

This can only be true for all x and t if both sides of the equation are equal to a constant. Its
useful to write this constant as m2 , so that
d2 X
dx2
d2 T
dt2

= m2 X ,
= m2 v 2 T .

(175)

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) .
(176)
42

The values of the constants A, B, C, D depend on the boundary conditions. If wed 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 youre considering. For waves on a string, where the amplitude is zero at either end, its
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 .

(177)

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 .
(178)
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




t


t=0





 nv  
 nx 
 nx 
nvt
nvt
=
A sin
cos
B sin
sin
,
L
l
l
l
l
 nv 
 nx 
=
A sin
,
(179)
L
l

so we need A = 0.
The general solution is the superposition of the solutions for all possible values of n:



 nx 
X
nvt
(x, t) =
Bn sin
cos
.
l
l

(180)

n=0

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, 0) =

Bn sin

n=0

 nx 
l

= f (x) .

(181)

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


Z
Z
 nx 
4 L/2
2nx
2 l
Bn =
f (x) sin
dx =
f (x) sin
dx .
(182)
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
if 0 < x l/2 ,
l x
f (x) = 2h
(183)
l (l x) if l/2 < x l ,
43

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 =
, B2 = 0 , B3 =
B4 = 0 , ... .
(184)
2
2 9
(this calculation isnt difficult, but you need to be very careful with signs etc. to get the
right answer). Inserting these coefficients into eq. (180), 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
  







8h2
x
1
3vt
vt
3x
(x, t) = 2 sin
sin
cos
+ ... .
(185)
cos

l
l
9
l
l
If wed
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

Weve focused on the wave equation, but these techniques can be used to solve other partial
differential equations, e.g. Laplaces equation in 2d
2u 2u
+ 2 =0
x2
y

(186)

which arises in various branches of physics (gravity, electrostatics, fluid dynamics). See the
differential equations problem sheet and questions from past exam papers.

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:
2 u(x, t)
u(x, t)
=
,
t
x2

(187)

where u(x, t) is the temperature at position x at time t and is the thermal diffusivity 10 .
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. (187) with respect to x 11
Z
1
U (k, t) =
u(x, t) exp (ikx) dx ,
2
10

(188)

In thermal physics the thermal diffusivity is often called , but weve called it here to avoid confusion
with wavelength.
11
The FT involves integrating with respect to x from to +, so this method is only strictly valid if the
bar is infinite.

44

and applying the differentiation property


 n 
u
FT
= (ik)n F T [u] ,
xn

(189)

we get
U (k, t)
= k 2 U (k, t) ,
t

(190)

U (k, t) = U (k, 0) exp (k 2 t) ,

(191)

which has solution


where U (k, 0) is the FT of the initial temperature distribution
Z
1

U (k, 0) =
u(x, 0) exp (ikx) dx .
2

(192)

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 . (193)
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


1
x2
f (x) =
exp 2 ,
(194)
2
2
then

 2 2
1
k
F (k) = exp
.
2
2

(195)

We have 2 = 2t, and so


2

exp (k t) = F T



1
x2
exp
.
4t
2t

(196)

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:




1
1
x2
U (k, t) = ( 2)F T [u(x, 0)]F T
.
(197)
exp
4t
2 2t
From Sec. 4, if h is the convolution of f and g
Z
0
h(x ) = f ? g =
f (x)g(x0 x) dx ,

45

(198)

then the convolution theorem tells us that


H(k) =

2F (k)G(k) .

(199)

Comparing this with eq. (197) we have


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



1
1
x2

G(k) F T
.
exp
4t
2 2t
Therefore our solution, h(x0 ) = u(x0 , t), is the convolution of f (x) = u(x, 0) and


1
1
x2
g(x) =
exp
.
4t
2 2t

(200)
(201)

(202)

So using the convolution definition


1
1
u(x , t) =
2 2t
0


(x0 x)2
u(x, 0) exp
dx .
4t

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




Z
1
1
(x0 x)2
0
dx0 .
u(x , t) =
(x) exp
4t
2 2t
Remembering the sifting property of the delta-function
Z
(x x0 )g(x)dx = g(x0 ) ,

(203)

(204)

(205)

(here we have x0 = 0). Therefore




1
1
(x0 )2
u(x , t) =
exp
,
4t
2 2t
0

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


1
x2
1
u(x, t) =
exp
.
4t
2 2t

(206)

(207)

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 Greens function.
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.
46

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

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.

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)] ,
(208)
2
r=1

and complex, with complex coefficients cr ,


f (x) =

cr exp (irk0 x) ,

r=

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

47

(209)

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

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

48

by a (in general complex) function F (k)


1
f (x) =
2

F (k) exp (ikx) dk .

(210)

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.

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).
from A to +A is twice the integral from 0 to A:
RA
R A The integralR 0of an even function
f
(x)
dx and
f
(x)
dx
+
f
(x)
dx
=
e
e
e
0
A
RA
RA
RA
R A
RA
0
x) d
x = 0 fe (x) dx. Therefore
x) d(
x) = 0 fe (
fe (x) dx = 0 fe (
A fe (x) dx = 0
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).

Relationship between coefficients of complex and trigonometric Fourier series

Inserting eqs. (7) and (8) into eq. (20) we get


"





 



#
a0 1 X
2rx
2rx
1
2rx
2rx
f (x) =
+
ar exp
+ exp
+ br
exp
exp
,
2
2
L
L
i
L
L
r=1
"



#
a0 1 X
2rx
2rx
=
+
(ar ibr ) exp
+ (ar + ibr ) exp
,
2
2
L
L
r=1





X
a0 1
2rx
1 X
2rx
=
+
(ar ibr ) exp
+
(ar + ibr ) exp
,
2
2
L
2
L
r=1
r=1



X
2rx
=
cr exp
,
(211)
L
r=

49

with
c0 =
cr =
cr =

a0
,
2
1
(ar ibr ) ,
2
1
(ar + ibr ) .
2

(212)
(213)
(214)

Derivation of Parsevals theorem for complex Fourier series


1
L

x0 +L

x0

1
|f (x)| dx =
L
2

x0 +L

f (x)f ? (x) dx ,

(215)

x0

where ? denotes the complex conjugate. Using the definition of the complex Fourier series,
eq. (39), and its complex conjugate:


# " X
#
Z
Z x0 +L " X

1 x0 +L
2px
1
2rx
c?p exp
|f (x)|2 dx =
cr exp
dx ,
L x0
L x0
L
L
p=
r=
" "


 ##

Z x0 +L
X
1 X
2px
2rx
?
=
exp
dx (216)
,
cr c
exp
L r= p= p x0
L
L
and using eq. (42) we get
Z

X
1 x0 +L
1 X
|f (x)|2 dx =
Lcr c?r =
|cr |2 ,
L x0
L r=
r=

(217)

as required.

Relationship between the Heaviside step function and the


Dirac delta-function

Comparing the integral:





Z 
Z
dh(t)
df (t)
dt = [f (t)h(t)]

h(t) dt ,
f (t)

dt
dt


Z 
df (t)
= f ()
dt ,
dt
0
= f () [f (t)]
0 = f (0) ,

(218)

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


Z
(t)f (t) dt = f (0) ,

(219)

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

(220)

Calculation of the Fourier transform of a gaussian

Inserting the gaussian, eq. (86), into the definition of the Fourier transform, eq. (59), we get




Z
1
t2
1

F () =
exp 2 exp (it) dt ,
2
2
2
  2


Z
1
t
1

=
exp
+
it
dt .
(221)
22
2
2
To solve this we complete the square. Multiplying by exp (A2 2 ) exp (A2 2 ) we get

  2
 
Z
1
1
t
2 2
2 2
F () = exp (A )
exp
dt .
+ it A
22
2
2
We want to choose A so that


+ iA
2

2
=

t2
+ it A2 2 ,
22

(222)

(223)

i.e.
t2
+
22

2iAt
t2
A2 2 =
+ it A2 2 ,

22
2iAt
= it ,

A = ,
2

and then


+ iA
2

2


=

t
i

+
2
2

2

t + i2
=
22

(224)

2
,

so that the Fourier transform becomes





 
Z
1
2 2
1
(t + i2 )2

F () =
exp
exp
dt ,
2
22
2
2


1
2 2
= exp
,
2
2
since
1

2
12

(t + i2 )2
exp
22

1
dt
2

(226)



y2
exp 2 dy ,
2

(225)

(227)

with = and y = t + i2 and

12

1
2



y2
exp 2 dy = 1 .
2

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

51

(228)

More on the Fast Fourier Transform

The discrete Fourier transform is defined as


Fk =

N
1
X
n=0

2ikn
fn exp
N


.

(229)

If we define a complex number




2i
,
W exp
N
so that
W

kn

(230)



2ikn
= exp
,
N

then the DFT can be written as


Fk =

N
1
X

(231)

W kn fn ,

(232)

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 .
(233)
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 (CooleyTookey) 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

Fk =

X
j=0




(N/2)1
X
2ik(2j)
2ik(2j + 1)
exp
f2j +
exp
f2j+1 ,
N
N


j=0

(N/2)1



 (N/2)1


X
X
2ik(j)
2ik
2ikj
exp
f2j + exp
exp
f2j+1 ,
(N/2)
N
(N/2)


j=0

j=0

(N/2)1




(N/2)1
X
X
2ik(j)
2ikj
k
exp
f2j + W
exp
f2j+1 ,
(N/2)
(N/2)


j=0

Fke

+W

j=0

Fk0 .

(234)

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 .
52

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. (139) becomes
F (k) =
=
=
=
=
=

1
(2)3/2
1
(2)3/2
1
(2)3/2
1
(2)3/2
1
(2)3/2
1
(2)3/2

dr
Z0

df (r)r2 sin exp (ikr cos ) ,

Z0

df (r)r2 sin exp (ikr cos ) []2


0 ,
0
0
Z
Z
2
d sin exp (ikr cos ) ,
dr2r f (r)
0
0


Z
exp (ikr cos )
2
dr2r f (r)
,
ikr
0
=0


Z
exp (ikr) exp (ikr)
2
dr2r f (r)
,
ikr
0


Z
sin (kr)
2
dr4r f (r)
.
kr
0
dr

(235)

Calculation of Fourier transform of the hydrogen atom charge


distribution

Inserting the electron number density of the hydrogen atom


f (r) =

1
exp (2r/a0 ) ,
a30

into the 3-d spherically symmetric Fourier transform:




Z
1
sin (kr)
2
F (k) =
dr4r f (r)
dr
kr
(2)3/2 0
gives
F (k) =

4
(2)3/2 a30 k



2r
r exp
sin (kr) dr , ,
a0

(236)

(237)

(238)

and using
sin (kr) =

exp (ikr) exp (ikr)


,
2i

(239)

this becomes
F (k) =

2
(2)3/2 a30 ki

Z
0

 
 
 
 
2
2
r exp
ik r r exp
ik r
,
a0
a0

which can be written as


F (k) =

2
(2)3/2 a30 ki

53

(IA IB ) ,

(240)

(241)

where

r exp (r) dr ,

I=

(242)

with
A =

2
ik ,
a0

Integrating by parts

B =

r exp (r) =
0

2
+ ik .
a0

1
,

(243)

(244)

and for complex , written as = 1 + i2 ,


12 22 2i1 2
1
,
=
2
(12 22 )2

(245)

so that


IA =

IB =

2

 
+ i2 a20 k
,
 
2
2
2
+ k2
a0

 
 
2
2
2
2

i2
a0
a0 k
,
 
2
2
2
2
+k
a0
2
a0

k2

(246)

(247)

and hence
F (k) =

i4

2
a0


(2)3/2 a30 ki  2 2
a0

k
2 ,

(248)

+ k2

1
1


2  2 .
3/2
(2)
ka0
1+ 2

(249)

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 (it) dt ,
(250)

Z
f (t) = B
F () exp (it) d .
(251)

54

We will now show that if the original function f (t) is to be recovered when F () calculated
using eq. (250) is inserted in eq. (251), we must have AB = 1/(2).
Inserting eq. (250) into eq. (251) we get

Z  Z
f (t) = A
B
f (t) exp (i t) dt exp (it) d .
(252)

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.

(253)

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


Z
1
(t) =
exp (it) d ,
2

(254)

or equivalently, with t t t,
1
(t t) =
2

exp (i(t t)) d .

(255)

Inserting this in eq. (253) we get


Z

f (t) = AB

f (t)2(t t) dt,

(256)

and using the sifting property of the Dirac delta-function


Z
(x x0 )g(x) dx = g(x0 ) ,

(257)

with x t, x0 t and g f (and remembering that (t) = (t)) we get


f (t) = AB2f (t) ,
so that AB = 1/(2).

55

(258)

You might also like