0% found this document useful (0 votes)
20 views18 pages

Fourier Lectures Part1

This document provides an introduction to Fourier Analysis, focusing on the representation of continuous signals as a superposition of waves. It covers Fourier series, periodic functions, orthogonality, and the calculation of Fourier components, emphasizing the importance of these concepts in various branches of physics. The document also discusses techniques for solving ordinary and partial differential equations and explores the implications of digital signal sampling.

Uploaded by

kbshfdha
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)
20 views18 pages

Fourier Lectures Part1

This document provides an introduction to Fourier Analysis, focusing on the representation of continuous signals as a superposition of waves. It covers Fourier series, periodic functions, orthogonality, and the calculation of Fourier components, emphasizing the importance of these concepts in various branches of physics. The document also discusses techniques for solving ordinary and partial differential equations and explores the implications of digital signal sampling.

Uploaded by

kbshfdha
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/ 18

N I V ER

U S

IT
TH

Y
O F

H
G
E

R
D I U
N B

School of Physics and Astronomy

Fourier Analysis
Prof. John A. Peacock
[email protected]

Session: 2013/14

1
1 Introduction
Describing continuous signals as a superposition of waves is one of the most useful concepts in
physics, and features in many branches - acoustics, optics, quantum mechanics for example. The
most common and useful technique is the Fourier technique, which were invented by Joseph Fourier
in the early 19th century. In many cases of relevance in physics, the waves evolve independently,
and this allows solutions to be found for many ordinary di↵erential equations (ODEs) and partial
di↵erential equations (PDEs). We will also explore some other techniques for solving common
equations in physics, such as Green’s functions, and separation of variables, and investigate some
aspects of digital sampling of signals.
As a reminder of notation, a single wave mode might have the form

(x) = a cos(kx + ). (1.1)

Here, a is the wave amplitude; is the phase; and k is the wavenumber, where the wavelength is
= 2⇡/k. Equally, we might have a function that varies in time: then we would deal with cos !t,
where ! is angular frequency and the period is T = 2⇡/!. In what follows, we will tend to assume
that the waves are functions of x, but this is an arbitrary choice: the mathematics will apply equally
well to functions of time.

2 Fourier Series

Learning outcomes
In this section we will learn how Fourier series (real and complex) can be used to represent functions
and sum series. We will also see what happens when we use truncated Fourier series as an approx-
imation to the original function, including the Gibbs phenomenon for discontinuous functions.

2.1 Overview
Fourier series are a way of expressing a function as a sum, or linear superposition, of waves of
di↵erent frequencies: X
f (x) = ai cos(ki x + i ). (2.1)
i

This becomes more well specified if we consider the special case where the function is periodic with
a period 2L. This requirement means that we can only consider waves where a whole number of
wavelengths fit into 2L: 2L = n ) k = n⇡/L. Unfortunately, this means we will spend a lot of
time writing n⇡/L, making the formulae look more complicated than they really are.
A further simplification is to realize that the phase of the waves need not be dealt with explicitly.
This is because of the trigonometric identity (which you should know)

cos(A + B) = cos(A) cos(B) sin(A) sin(B). (2.2)

Thus a single wave mode of given phase can be considered to be the combination of a sin and a cos
mode, both of zero phase.

2
• Fourier Series deal with functions that are periodic over a finite interval. e.g. 1 < x < 1.
The function is assumed to repeat outside this interval.
• Fourier Series are useful if (a) the function really is periodic, or (b) we only care about the
function in a finite range (e.g. ⇡ < x < ⇡). We’ll discuss this more in Sec. 2.7.
• If the range is infinite, we can use a Fourier Transform (see section 3).
• We can decompose any function we like in this way (well, any that satisfy some very mild
mathematical restrictions).
• The sines and cosines are said to form a complete set. This means the same as the last bullet
point. We won’t prove this.
• One can decompose functions in other complete sets of functions (e.g. powers: the Taylor
series is an example of this), but the Fourier Series is perhaps the most common and useful.
Most of this course will be concerned with Fourier Series and Fourier Transforms (see later).

2.2 Periodic Functions


Periodic functions satisfy
f (t + T ) = f (t) (2.3)
for all t. T is then the period. Similarly, a function can be periodic in space: f (x + X) = f (x).
Exercise: Show that if f (t) and g(t) are periodic with period T , then so are af (t) + bg(t) and
cf (t)g(t), where a, b, c are constants.
Note that a function which is periodic with a period X is also periodic with period 2X, and indeed
periodic with period nX, for any integer n. The smallest period is called the fundamental period.
Note also that the function does not have to be continuous.
Examples:

• sin x and cos x both have a fundamental period of 2⇡.


n⇡x
• sin L
has a period of 2L/n, where n is an integer.
n⇡x n⇡x
• So sin L
and cos L
all have periods 2L as well as 2L/n (for all integer n).
• Note that the boundary of the period can be anything convenient: 0  x  2L for example,
or a  x  a + 2L for any a. Since it is periodic, it doesn’t matter.

2.3 The Fourier expansion


Within the interval L  x  L, we can write a general (real-valued) function as a linear superpo-
sition of these Fourier modes:
1 X1 ⇣ n⇡x ⌘ X 1 ⇣ n⇡x ⌘
f (x) = a0 + an cos + bn sin
2 n=1
L n=1
L
1 Xh
1 ⇣ n⇡x ⌘ ⇣ n⇡x ⌘i
= a0 + an cos + bn sin (2.4)
2 n=1
L L

3
where an and bn are (real-valued) expansion coefficients, also known as Fourier components. The
reason for the unexpected factor 1/2 multiplying a0 will be explained below.

2.3.1 What about n < 0?

We don’t need to include negative n because the Fourier modes have a well defined symmetry (even
or odd) under n ! n: let’s imagine we included negative n and that the expansion coefficients
are An and Bn :
A0 X h ⇣ n⇡x ⌘ ⇣ n⇡x ⌘i
f (x) = + An cos + Bn sin (2.5)
2 ±n
L L
1  ⇣ n⇡x ⌘ ✓ ◆ ⇣ n⇡x ⌘ ✓ ◆
A0 X n⇡x n⇡x
= + An cos + A n cos + Bn sin + B n sin .
2 n=1
L L L L
(2.6)
n⇡x n⇡x n⇡x n⇡x
Now, cos L
= cos L
and sin L
= sin L
, so we can rewrite this as

A0 X h ⇣ n⇡x ⌘ ⇣ n⇡x ⌘i
1
f (x) = + (An + A n ) cos + (Bn B n ) sin . (2.7)
2 n=1
L L

At this point An and A n are unknown constants. As they only appear summed together (rather
than separately) we may as well just rename them as a single, unknown constant a0 = A0 , an ⌘
An + A n , (n 1). We do the same for bn ⌘ Bn B n . So, overall it is sufficient to consider just
positive values of n in the sum.

2.4 Orthogonality
Having written a function as a sum of Fourier modes, we would like to be able to calculate the
components. This is made easy because the Fourier mode functions are orthogonal i.e. for non-zero
integers m and n,
Z L ⇣ m⇡x ⌘ ⇣ n⇡x ⌘ ⇢ 0 m 6= n
dx cos cos = (2.8)
L L L L m=n
Z L ⇣ m⇡x ⌘ ⇣ n⇡x ⌘ ⇢ 0 m 6= n
dx sin sin = (2.9)
L L L L m=n
Z L ⇣ m⇡x ⌘ ⇣ n⇡x ⌘
dx cos sin =0. (2.10)
L L L
You can do the integrals using the trigonometry identities in Eqn. (2.14) below. Note that one of
the Fourier modes is a constant (the a0 /2 term), so we will also need
Z L ⇣ n⇡x ⌘ ⇢ 0 n 6= 0
dx cos = (2.11)
L L 2L n = 0
Z L ⇣ n⇡x ⌘
dx sin =0 (2.12)
L L
Note the appearance of 2L here, rather than L in the n > 0 cases above.

4
FOURIER ANALYSIS: LECTURE 2
The orthogonality is the fact that we get zero in each case if m 6= n. We refer to the collected
Fourier modes as an orthogonal set of functions.
Let us show one of these results. If m 6= n,
Z L ⇣ m⇡x ⌘ ⇣ n⇡x ⌘ Z  ⇢ ⇢
1 L (m + n)⇡x (m n)⇡x
dx cos cos = dx cos + cos
L L L 2 L L L
2 n o n o 3L
(m+n)⇡x
1 4 L sin L
L sin (m Ln)⇡x
= + 5
2 (m + n)⇡ (m n)⇡
L
= 0 if m 6= n. (2.13)

If m = n, the second cosine term is cos 0 = 1, which integrates to L.

ASIDE: useful trigonometric relations To prove the orthogonality, the following formulæ are
useful:

2 cos A cos B = cos(A + B) + cos(A B)


2 sin A cos B = sin(A + B) + sin(A B)
2 sin A sin B = cos(A + B) + cos(A B)
2 cos A sin B = sin(A + B) sin(A B) (2.14)

To derive these, we write ei(A±B) = eiA e±iB , and rewrite each exponential using e±i✓ = cos ✓ ± i sin ✓.
Add or subtract the two ± expressions and take real or imaginary parts as appropriate to get each
of the four results. Alternatively, the orthogonality can be proved using the complex representation
directly: cos(kx) = [exp(ikx) + exp( ikx)]/2, so a product of cosines always generates oscillating
terms like exp( ix k); these always integrate to zero, unless k = 0.

2.5 Calculating the Fourier components


The Fourier basis functions are always the same. When we expand di↵erent functions as Fourier
series, the di↵erence lies in the values of the expansion coefficients. To calculate these Fourier
components we exploit the orthogonality proved above. The approach will be the same as we follow
when we extractPcomponents of vectors, which are expressed as a sum of components times basis
functions: v = i ai ei . The basis vectors are orthonormal, so we extract the j th component just
by taking the dot product with ej to project along that direction:
X
ej · v = ej · ai e i = aj . (2.15)
i

This works because all the terms in the series give zero, except the one we want. The procedure
with Fourier series is exactly analogous:

1. Choose which constant we wish to calculate (i.e. am or bm for some fixed, chosen value of m)
m⇡x
2. Multiply both sides by the corresponding Fourier mode (e.g. cos L
if we are interested in
am or sin m⇡x
L
if we are trying to find bm )

5
3. Integrate over the full range ( L  x  L in this case)
4. Rearrange to get the answer.

So, to get am :
Z L ⇣ m⇡x ⌘
dx cos f (x) (2.16)
L L
Z L ⇣ m⇡x ⌘
1
= a0 dx cos (2.17)
2 L L
X1  Z L ⇣ m⇡x ⌘ ⇣ n⇡x ⌘ Z L ⇣ m⇡x ⌘ ⇣ n⇡x ⌘
+ an dx cos cos + bn dx cos sin (2.18)
n=1 L L L L L L
1
X
= a0 .L m0 + L an mn (2.19)
n=1
= L am . (2.20)
(2.21)

mn is the Kronecker delta function:



1 m=n
mn = (2.22)
0 m <> n
Rearranging:
Z L ⇣ m⇡x ⌘
1
am = dx cos f (x) (2.23)
L L L
Z L ⇣ m⇡x ⌘
1
Similarly, bm = dx sin f (x) . (2.24)
L L L
So this is why the constant term is defined as a0 /2: it lets us use the above expression for am for
all values of m, including zero.

2.6 Even and odd expansions


What if the function we wish to expand is even:f ( x) = f (x), or odd: f ( x) = f (x)? Because the
Fourier modes are also even (cos n⇡x
L
) or odd (sin n⇡x
L
), we can simplify the Fourier expansions.

2.6.1 Expanding an even function

Consider first the case that f (x) is even:


Z ⇣ m⇡x ⌘ Z ⇣ m⇡x ⌘ Z ⇣ m⇡x ⌘
1 L 1 L 1 0
bm = dx sin f (x) = dx sin f (x) + dx sin f (x) (2.25)
L L L L 0 L L L L
In the second integral, make a change of variables y = x ) dy = dx. The limits on y are L ! 0,
and use this minus sign to switch them round to 0 ! L. f (x) = f ( y) = +f (y) because it is an
m⇡y
even function, whereas sin L
= sin m⇡y L
as it is odd. Overall, then:
Z L ⇣ m⇡x ⌘ Z ⇣ m⇡y ⌘
1 1 L
bm = dx sin f (x) dy sin f (y) = 0 (2.26)
L 0 L L 0 L

6
1.0

0.8

0.6

0.4

0.2

x
-1.0 -0.5 0.0 0.5 1.0

|x|
Figure 2.1: e in 1 < x < 1.

i.e. the Fourier decomposition of an even function contains only even Fourier modes. Similarly, we
can show that
Z ⇣ m⇡x ⌘ Z ⇣ m⇡y ⌘ Z ⇣ m⇡x ⌘
1 L 1 L 2 L
am = dx cos f (x) + dy cos f (y) = dx cos f (x). (2.27)
L 0 L L 0 L L 0 L

2.6.2 Expanding an odd function

For an odd function we get a similar result: all the am vanish, so we only get odd Fourier modes,
and we can calculate the bm by doubling the result from integrating from 0 ! L:

am = 0 (2.28)
Z L ⇣ m⇡x ⌘
2
bm = dx sin f (x) (2.29)
L 0 L
We derive these results as before: split the integral into regions of positive and negative x; make
a transformation y = x for the latter; exploit the symmetries of f (x) and the Fourier modes
cos m⇡x
L
, sin m⇡x
L
.
|x|
Example: f (x) = e for 1 < x < 1. The fundamental period is 2.

7
1.0

0.8

0.6

0.4

0.2

x
-1.0 -0.5 0.0 0.5 1.0

|x|
Figure 2.2: Fourier Series for e in 1 < x < 1 summed up to m = 1 and to m = 5.

The function is symmetric, so we seek a cosine series, with L = 1:


Z ⇣ m⇡x ⌘
2 L
am = dx cos f (x)
L 0 L
Z 1
= 2 dx cos(m⇡x)e x
Z0 1
1
= 2 dx eim⇡x + e im⇡x e x
2
Z 10
= dx eim⇡x x + e im⇡x x
0
 1
e(im⇡ 1)x
e (im⇡+1)x
= + (2.30)
im⇡ 1 (im⇡ + 1) 0
(2.31)

Now eim⇡ = (ei⇡ )m = ( 1)m , and similarly e im⇡


= ( 1)m , so (noting that there is a contribution
from x = 0)

( 1)m e 1
( 1)m e 1 1
1
am =
im⇡ 1  im⇡ + 1
1 1
= [( 1)m e 1 1]
im⇡ 1 im⇡ + 1
2
= [( 1)m e 1 1]
(im⇡ 1)(im⇡ + 1)
m 1
2[( 1) e 1]
=
m2 ⇡ 2 1
2[1 ( 1)m e 1 ]
= . (2.32)
1 + m2 ⇡ 2

8
f(x)=x 2

x
−3π −π π 3π

Figure 2.3: f (x) = x2 as a periodic function.

FOURIER ANALYSIS: LECTURE 3

2.7 Periodic extension, or what happens outside the range?


To discuss this, we need to be careful to distinguish between the original function that we expanded
f (x) (which is defined for all x) and the Fourier series expansion fFS (x) that we calculated (which
is valid only for L  x  L.
Inside the expansion range fFS (x) is guaranteed to agree exactly with f (x). Outside this range, the
Fourier expansion fFS (x) will not, in general, agree with f (x).
As an example, let’s expand the function f (x) = x2 between L and L (L is some number, which we
might decide to set equal to ⇡). This is an even function so we know bn = 0. The other coefficients
are:
Z Z
1 L 2 2 L 2 L3 2L2
a0 = dx x = dx x2 = =
L L L 0 L 3 3
Z L ⇣ ⌘ Z L ⇣ m⇡x ⌘
1 m⇡x 2 2L2 ⇥ ⇤m⇡
am = dx x2 cos = dx x2 cos = 3 3 y 2 sin y + 2y cos y 2 sin y 0
L L L L 0 L m⇡
2 2 m
2L 4L ( 1)
= 3 3 ⇥ 2m⇡( 1)m = (2.33)
m⇡ m2 ⇡ 2
For details, see below.
So, overall our Fourier series is
1
L2 4L2 X ( 1)n ⇣ n⇡x ⌘
fFS (x) = + 2 cos . (2.34)
3 ⇡ n=1 n2 L

Inside the expansion range fFS (x) agrees exactly with the original function f (x). Outside, however,
it does not: f (x) keeps rising quadratically, whereas fFS (x) repeats with period 2L. We say the
Fourier series has periodically extended the function f (x) outside the expansion range. This is shown
in Fig. 2.3.

9
Figure 2.4: The Fourier spectrum an (with y-axis in units of L2 ) for function f (x) = x2 .

There are some special cases where fFS (x) does agree with f (x) outside the range. If f (x) is itself
periodic with period 2L/p (i.e. the size of the range divided by some integer p s.t. f (x + 2L/p) =
f (x)), then fFS (x) will agree with f (x) for all x.
Another special case is where f (x) is only defined in the finite range of expansion e.g. because we
are only considering a string extending from 0 to L. Physically, then it does not matter if fFS (x)
deviates from f (x) outside the range.
A plot of the coefficients, {cn } versus n, is known as the spectrum of the function: it tells us how
much of each frequency is present in the function. The process of obtaining the coefficients is often
known as spectral analysis. We show the spectrum for f (x) = x2 in Fig. 2.4.

Choice of periodic extension There is no unique way of casting f (x) as a periodic function,
and there may be good and bad ways of doing this. For example, suppose we were interested in
representing f (x) = x2 for 0 < x < L: we have already solved this by considering the even function
x2 over L < x < L, so the periodicity can be over a range that is larger than the range of interest.
Therefore, we could equally well make an odd periodic function by adopting +x2 for 0 < x < L and
x2 for L < x < 0. This is then suitable for a sin series. The coefficients for this are
Z ⇣ m⇡x ⌘ 1 Z 0 ⇣ m⇡x ⌘
1 L 2
bm = dx x sin + dx ( x2 ) sin
L 0 L L L L
Z L ⇣ ⌘ 2 ⇥
2 m⇡x 2L ⇤m⇡
= dx x2 sin = 3 3 y 2 cos y + 2y sin y + 2 cos y 0
L 0 L m⇡
2
2L
= 3 3 ⇥ [( 1)m+1 m2 ⇡ 2 + 2( 1)m 2] (2.35)
m⇡

So now we have two alternative expansions, both of which represent f (x) = x2 over 0 < x < L. To

10
lowest order, these are
L2 4L2 ⇣ ⇡x ⌘
cos : f (x) = cos + ··· (2.36)
3 ⇡2 L
2L2 ⇣ ⇡x ⌘
sin : f (x) = sin + ··· . (2.37)
⇡ L
It should be clear that the first of these works better, since the function does behave quadratically
near x = 0, whereas the single sin term is nothing like the target function. In order to get comparable
accuracy, we need many more terms for the sin series than the cos series: the coefficients for the
former decline as 1/m2 , as against only 1/m for the latter at large m, showing very poor convergence.

Doing the integrals for the x2 expansion We need to do the integral


Z ⇣ m⇡x ⌘
2 L
am = dx x2 cos (2.38)
L 0 L
The first stage is to make a substitution that simplifies the argument of the cosine function:
m⇡x m⇡
y= ) dy = dx (2.39)
L L
which also changes the upper integration limit to m⇡. So
Z m⇡ Z m⇡
2 L L2 y 2 2L2
am = dy 2 2 cos y = 3 3 dy y 2 cos y . (2.40)
L 0 n⇡ m⇡ m⇡ 0
We now solve this simplified integral by integrating by parts. An easy way of remembering integra-
tion by parts is Z Z
dv du
u dx = [uv] v dx (2.41)
dx dx
and in this case we will make u = y 2 and dv/dy = cos y. Why? Because we want to di↵erentiate y 2
to make it a simpler function:
Z Z
2 2
dy y cos y = y sin y dy 2y sin y . (2.42)

We now repeat the process for the integral on the RHS, setting u = 2y for the same reason:
Z  Z
2 2
dy y cos y = y sin y 2y cos y + dy 2 cos y = y 2 sin y + 2y cos y 2 sin y . (2.43)

So, using sin m⇡ = 0 and cos m⇡ = ( 1)m :


2L2 ⇥ 2 ⇤m⇡ 2L2 m 4L2 ( 1)m
am = y sin y + 2y cos y 2 sin y 0
= ⇥ 2m⇡( 1) = . (2.44)
m3 ⇡ 3 m3 ⇡ 3 m2 ⇡ 2

2.8 Complex Fourier Series


Sines and cosines are one Fourier basis i.e. they provide one way to expand a function in the interval
[ L, L]. Another, very similar basis is that of complex exponentials.
1
X
f (x) = cn n (x) where n (x) = e+ikn x = ein⇡x/L (2.45)
n= 1

11
kn = n⇡/L is the wavenumber.
This is a complex Fourier series, because the expansion coefficients, cn , are in general complex
numbers even for a real-valued function f (x) (rather than being purely real as before). Note that
the sum over n runs from 1 in this case. (The plus sign in phase of the exponentials is a convention
chosen to match the convention used for Fourier Transforms in Sec. 3.)
Again, these basis functions are orthogonal and the orthogonality relation in this case is
8 9
Z L Z L < [x]L L = 2L (if n = m)=
dx m (x) ⇤n (x) = dx ei(km kn )x = h exp(i(km kn )x) iL = 2L mn .
L L : i(km kn )
= 0 (if n 6= m);
L
(2.46)
Note the complex conjugation of m (x): this is needed in order to make the terms involving k
cancel; without it, we wouldn’t have an orthogonality relation.
For the case n 6= m, we note that m n is a non-zero integer (call it p) and

exp[i(km kn )L] exp[i(km kn )( L)] = exp[ip⇡] exp[ ip⇡] (2.47)


= (exp[i⇡])p (exp[ i⇡])p = ( 1)p p
( 1) = 0 .

For p = m n = 0 the denominator is also zero, hence the di↵erent result.


We can use (and need) this orthogonality to find the coefficients. If we decide we want to calculate
cm for some chosen value of m, we multiply both sides by the complex conjugate of m (x) and
integrate over the full range:
Z L 1
X Z L X1
⇤ ⇤
dx m (x)f (x) = cn dx m (x) n (x) = cn .2L mn = cm .2L (2.48)
L n= 1 L n= 1
Z L Z L
1 ⇤ 1 ikm x
) cm = dx m (x)f (x) = dx e f (x) (2.49)
2L L 2L L

As before, we exploited that the integral of a sum is the same as a sum of integrals, and that cn are
constants.

2.8.1 Relation to real Fourier series

The complex approach may seem an unnecessary complication. Obviously it is needed if we have
to represent a complex function, but for real functions we need to go to some trouble in order to
make sure that the result is real:
1
X 1
X
f (x) = cn ein⇡x/L ) f (x) = f ⇤ (x) = c⇤n e in⇡x/L
(2.50)
n= 1 n= 1

Equating the coefficients of the eim⇡x/L mode, we see that the Fourier coefficients have to be Her-
mitian:
c⇤ m = cm . (2.51)
This shows why it was necessary to consider both positive and negative wavenumbers, unlike in the
sin and cos case.
But the advantage of the complex approach is that it is often much easier to deal with integrals
involving exponentials. We have already seen this when discussing how to prove the orthogonality

12
relations for sin and cos. Also, doing things this way saves having to do twice the work in obtaining
coefficients for sin and cos series separately.
The fact that complex exponentials contain both the sin and cos series in a single term also makes
sense of the extra factor of 12 everywhere in the orthogonality relations, relative to the real Fourier
series: this arises from the definition of sine and cosine in terms of complex exponentials.

FOURIER ANALYSIS: LECTURE 4

2.8.2 Example

To show the complex Fourier approach in action, we revisit our example of expanding f (x) = x2
for x 2 [ L, L] (we could choose L = ⇡ if we wished). The general expression for the Fourier
coefficients, cm , takes one of the following forms, depending on whether or not m is zero:
Z L
1 L2
cm=0 = dx x2 = (2.52)
2L L 3
Z L
1 2L2 ( 1)m
cm6=0 = dx x2 e im⇡x/L = (2.53)
2L L m2 ⇡ 2

See below for details of how to do the second integral. We notice that in this case all the cm are
real, but this is not the case in general.

ASIDE: doing the integral We want to calculate


Z L
1
cm ⌘ dx x2 e im⇡x/L
(2.54)
2L L

To make life easy, we should change variables to make the exponent more simple (whilst keeping y
real) i.e. set y = m⇡x/L, for which dy = (m⇡/L) dx. The integration limits become ±m⇡:
Z m⇡ Z m⇡
1 L L2 y 2 iy L2
cm = dy ⇥ e = dy y 2 e iy . (2.55)
2L m⇡ m⇡ m2 ⇡ 2 2m3 ⇡ 3 m⇡

Now we want to integrate by parts. We want the RHS integral to be simpler than the first, so we
set u = y 2 ) du = 2y dy and dv/dy = e iy ) v = e iy /( i) = ie iy (multiplying top and
bottom by i and recognising i ⇥ i = 1). So
⇢ Z m⇡ ⇢ Z m⇡
L2 ⇥ 2 iy ⇤m⇡ iy L2 ⇥ 2 iy ⇤m⇡
cm = iy e m⇡
dy 2y.ie = iy e m⇡
2i dy ye iy
2m3 ⇡ 3 m⇡ 2m 3⇡3
m⇡
(2.56)

13
The integral is now simpler, so we play the same game again, this time with u = y ) du/dy = 1
to get:
⇢ ✓ Z m⇡ ◆
L2 ⇥ 2 iy ⇤m⇡ ⇥ ⇤
iy m⇡ iy
cm = iy e m⇡
2i iye m⇡
dy ie (2.57)
2m3 ⇡ 3 m⇡
L2 n⇥ 2 iy ⇤m⇡ ⇣⇥ ⇤
iy m⇡
⇥ iy ⇤m⇡ ⌘o
= iy e m⇡
2i iye m⇡
i ie m⇡
(2.58)
2m3 ⇡ 3
L2 ⇥ 2 iy ⇤m⇡
= 3 3
iy e 2i.i.ye iy + 2i.i.i e iy m⇡ (2.59)
2m ⇡
L2 ⇥ iy ⇤m⇡
= 3 3
e iy 2 + 2y 2i m⇡ (2.60)
2m ⇡
We can now just substitute the limits in, using eim⇡ = e im⇡ = ( 1)m (so e iy has the same value
at both limits). Alternately, we can note that the first and third terms in the round brackets are
even under y ! y and therefore we will get zero when we evaluate between symmetric limits
y = ±m⇡ (N.B. this argument only works for symmetric limits). Only the second term, which is
odd, contributes:
L2 ⇥ ⇤
iy m⇡ L2 ⇥ im⇡

cm = 2ye m⇡
= 2m⇡e ( 2m⇡)eim⇡
2m3 ⇡ 3 2m3 ⇡ 3
L2 m 2L2 ( 1)m
= ⇥ 4m⇡( 1) = . (2.61)
2m3 ⇡ 3 m2 ⇡ 2

2.9 Comparing real and complex Fourier expansions


There is a strong link between the real and complex Fourier basis functions, because cosine and
sine can be written as the sum and di↵erence of two complex exponentials:
8
> cos n⇡x = 1 [ n (x) + n (x)]
>
>
⇣ n⇡x ⌘ ⇣ n⇡x ⌘ < L
2
n (x) = cos + i sin ) (2.62)
L L >
> 1
>
:sin L = [ n (x)
n⇡x
n (x)]
2i
so we expect there to be a close relationship between the real and complex Fourier coefficients.
Staying with the example of f (x) = x2 , we can rearrange the complex Fourier series by splitting
the sum as follows:
X 1 X 1
fFS (x) = c0 + cn ein⇡x/L + cn ein⇡x/L (2.63)
n=1 n= 1

we can now relabel the second sum in terms of n0 = n:


1
X 1
X
in⇡x/L in0 ⇡x/L
fFS (x) = c0 + cn e + c n0 e (2.64)
n=1 n0 =1

Now n and n0 are just dummy summation indices with no external meaning, so we can now relabel
n0 ! n and the second sum now looks a lot like the first. Noting from Eqn. (2.61) that in this case
c m = cm , we see that the two sums combine to give:
X1 X1 ⇣ n⇡x ⌘
fFS (x) = c0 + cn [ n (x) + n (x)] = c0 + 2cn cos (2.65)
n=1 n=1
L
So, this suggests that our real and complex Fourier expansions are identical with an = 2cn (and
bn = 0). Comparing our two sets of coefficients in Eqns. (2.33) and (2.61), we see this is true.

14
2.10 Some other features of Fourier series
In this subsection, we’re going to look at some other properties and uses of Fourier expansions.

2.10.1 Di↵erentiation and integration

If the Fourier series of f (x) is di↵erentiated or integrated, term Rby term, the new series (if it
converges, and in general it does) is the Fourier series for f 0 (x) or dx f (x), respectively (in the
latter case, only if a0 = 0; if not, there is a term a0 x/2, which would need to be expanded in sin
and cos terms).
This means that we do not have to do a second expansion to, for instance, get a Fourier series for
the derivative of a function.
It can also be a way to do a difficult integral. Integrals of sines and cosines are relatively easy, so
if we need to integrate a function it may be more straightforward to do a Fourier expansion first.

FOURIER ANALYSIS: LECTURE 5

2.10.2 Solving ODEs

Fourier Series can be very useful if we have a di↵erential equation with coefficients that are constant,
and where the equation is periodic1 . For example

d2 z dz
2
+ p + rz = f (t) (2.66)
dt dt
where the driving term f (t) is periodic with period T . i.e. f (t + T ) = f (t) for all t. We solve this
by expanding both f and z as Fourier Series, and relating the coefficients. Note that f (t) is a given
function, so we can calculate its Fourier coefficients.
Writing
X1 X1
1
z(t) = a0 + an cos (n!t) + bn sin (n!t) (2.67)
2 n=1 n=1
X1 X1
1
f (t) = A0 + An cos (n!t) + Bn sin (n!t)
2 n=1 n=1

where the fundamental frequency is ! = 2⇡/T .


1
X 1
X
dz
= n!an sin (n!t) + n!bn cos (n!t) (2.68)
dt n=1 n=1
X1 X1
d2 z(t)
= n2 ! 2 an cos (n!t) n2 ! 2 bn sin (n!t)
dt2 n=1 n=1

1
For non-periodic functions, we can use a Fourier Transform, which we will cover later

15
Then the l.h.s. of the di↵erential equation becomes
X1
d2 z dz r ⇥ ⇤
2
+p +rz = a 0 + n2 ! 2 an + pn!bn + ran cos(n!t) + n 2 ! 2 bn pn!bn + rbn sin(n!t) .
dt dt 2 n=1
(2.69)
Now we compare the coefficients with the coefficients of expansion of the r.h.s. driving term f (t).
The constant term gives
A0
ra0 = A0 ) a0 = . (2.70)
r
Equating the coefficients of cos(n!t) and sin(n!t) gives:

n2 ! 2 an + pn!bn + ran = An (2.71)


n2 ! 2 bn pn!an + rbn = Bn

This is a pair of simultaneous equations for an , bn , which we can solve, e.g. with matrices:
✓ 2 2 ◆✓ ◆ ✓ ◆
n ! +r pn! an An
= (2.72)
pn! n2 ! 2 + r bn Bn

Calculating the inverse of the matrix gives


✓ ◆ ✓ 2 2 ◆✓ ◆
an 1 n ! +r pn! An
= 2 2 (2.73)
bn D pn! n ! +r Bn

where
D ⌘ (r n2 ! 2 ) 2 + p2 n2 ! 2 . (2.74)
So for any given driving term the solution can be found. Note that this equation filters the driving
field: p
p A2n + Bn2
a2n + b2n = (2.75)
D
For large n, equation 2.74 gives D / n4 , so the high frequency harmonics are severely damped.
Discussion: If we set p = 0 and r > 0 we see that p we have a Simple Harmonic Motion problem
00 2
(z + !0 z = f (t)), with natural frequency !0 = r. p represents damping of the system. If the
forcing term has a much higher frequency (n! !0 ) then D is large and the amplitude is suppressed
– the system cannot respond to being driven much faster than its natural oscillation frequency. In
fact we see that the amplitude is greatest if n! is about !0 (if p is small) – an example of resonance.
Let us look at this in more detail. If we drive the oscillator at a single frequency, so An = 1 say, for
a single n, and we make Bn = 0 (by choosing the origin of time). All other An , Bn = 0.
The solution is
1 2 1
an = (w0 n2 ! 2 ); bn = pn! (2.76)
D D
If the damping p is small, we can ignore bn for our initial discussion.
So, if the driving frequency is less than the natural frequency, n! < !0 , then an and An have the
same sign, and the oscillations are in phase with the driving force. If the driving frequency is higher
than the natural frequency, n! > !0 , then an < 0 and the resulting motion is out of phase with the
driving force.

16
1.0

0.8

0.6

0.4

0.2

0.0
0 5 10 15 20

Figure 2.5: The amplitude of the response of a damped harmonic oscillator (with small damping) to
driving forces of di↵erent frequencies. The spike is close to the natural frequency of the oscillator.

2.10.3 Resonance

If the driving frequency is equal to the natural frequency, n! = !0 , then an = 0, and all the motion
is in bn . So the motion is ⇡/2 out of phase (sin(n!t) rather than the driving cos(n!t)). Here we
can’t ignore p.

2.10.4 Other solutions

Finally, note that we can always add a solution to the homogeneous equation (i.e. where we set
the right hand side to zero). The final solution will be determined by the initial conditions (z and
dz/dt). This is because the equation is linear and we can superimpose di↵erent solutions.
For the present approach, this presents a problem: the undriven motion of the system will not
be periodic, and hence it cannot be described by a Fourier series. This explains the paradox of
the above solution, which implies that an and bn are zero if An and Bn vanish, as they do in the
homogeneous case. So apparently z(t) = 0 in the absence of a driving force – whereas of course
an oscillator displaced from z = 0 will show motion even in the absence of an applied force. For a
proper treatment of this problem, we have to remove the requirement of periodicity, which will be
done later when we discuss the Fourier transform.

2.11 Fourier series and series expansions


We can sometimes exploit Fourier series to either give us series approximations for numerical quan-
tities, or to give us the result of summing a series.
Consider f (x) = x2 , which we expanded as a Fourier series in Eqn. (2.34) above, and let’s choose
the expansion range to be ⇡ ! ⇡ (i.e. we’ll set L = ⇡). At x = 0 we have f (x) = fFS (x) = 0.

17
N ⇡N ⇡N ⇡
1 3.4641016151 0.3225089615
2 3.0000000000 0.1415926536
3 3.2145502537 0.0729576001
4 3.0956959368 0.0458967168
5 3.1722757341 0.0306830805
6 3.1192947921 0.0222978615
7 3.1583061852 0.0167135316
8 3.1284817339 0.0131109197
9 3.1520701305 0.0104774769
10 3.1329771955 0.0086154581
100 3.1414981140 0.0000945396
1000 3.1415916996 0.0000009540
10000 3.1415926440 0.0000000095
100000 3.1415926535 0.0000000001

Table 1: A series approximation to ⇡ from Eqn. (2.79)

Substituting into Eqn. (2.34) we have


1 1 1
⇡ 2 X 4( 1)n ⇡2 X ( 1)n X ( 1)n+1
0= + ) = = (2.77)
3 n=1
n2 12 n=1
n2 n=1
n2
This result can be useful in two ways:
P1 ( 1)n+1
1. We solve a physics problem, and find the answer as a sum n=1 n2
. Using the above
2
result we can replace the sum by ⇡12 .
2. We need a numerical approximation for ⇡. We can get this by truncating the sum at some
upper value n = N [as in Eqn. (2.84)] and adding together all the terms in the sum.
⇡2 1 1 1
=1 + + ... (2.78)
12 4 9 16
Let’s call this approximation ⇡N :
v
u N
u X ( 1)n+1
t
⇡N ⌘ 12 (2.79)
n=1
n2

Table 1 shows how ⇡N approaches ⇡ as we increase N .

We can get di↵erent series approximations by considering di↵erent values of x in the same Fourier
series expansions. For instance, consider x = ⇡. This gives:
1 1
⇡ 2 X 4( 1)n ⇡2 X 1
⇡2 = + 2
( 1)n ) = 2
⌘ ⇣(2) (2.80)
3 n=1
n 6 n=1
n

This is an example of the Riemann zeta function ⇣(s) which crops up a lot in physics. It has limits:
1
(
X 1 1 as s ! 1
⇣(s) ⌘ s
! (2.81)
n=1
n 1 as s ! 1

18

You might also like