fourier analysis - university of southamptonevans/ts/toolbox/fmodule.pdf · fourier analysis...
TRANSCRIPT
Self Learn Module
Fourier AnalysisContents
• Fourier Series for functions of period 2π
• Fourier Series for functions of period L
• Fourier Integrals
• Complex Fourier Integrals
• Fourier analysis of standing wave problems
Learning Outcomes
• Be able to follow derivations of Fourier Series coefficients, relations betweenFourier Series and Fourier Integrals etc.
• Know how to determine the coefficients a0, an, bn for a periodic function and beable to explicitly calculate them in the simple examples given.
• Know how to determine coefficients A(ω), B(ω), C(ω) in a Fourier integral rep-resentation of a function and be able to explicitly calculate them in the simpleexamples given.
• NOTE: you are not expected to learn by heart the formulae on the formulasheet at the end of these notes but you do need to be able to apply them.
• Be able to apply Fourier analysis to simple initial condition standing waveproblems and determine the resulting time evolution.
Reference Books
• Advanced Engineering Mathematics, E. Kreysig - has a throrough discussion,many sample questions and answers. (library reference - TA 150 KRE)
1
STAG
2
Fourier AnalysisThese notes are intended to help you learn Fourier Analysis, an essential technique
in wave analysis. This section of the course is structured differently from a normallecture course. You are expected to read and master the techniques explained in thesenotes on your own. Note that this material can (and will) be examined in the finalwritten examination! You will not be left totally on your own though. Included withinthe notes is a brief introduction to the computer maths package called Maple which isavailable on the physics computer cluster - it is a very easy way to perform integralsand plot functions and will make the analysis below much easier to master. As part ofthe course two of the lecture slots will be put aside for a session in the computer labduring which you can attempt the problems included below with help on hand froma member of staff. Finally there is a “Section C” question of the usual type whichyou must complete and hand in for marking as part of the continual assessment ofthe course.
1 Introduction
Fourier1 analysis is a technique which greatly simplifies the study of waves. Forexample consider the waves on a guitar string.
If the string has tension T and mass per unit length ρ then, as you saw in firstyear, waves on the string are solutions of the wave equation
∂2y
∂t2=
T
ρ
∂2y
∂x2(1)
This is a wave equation with the speed of the waves given by v =√
T/ρ.
1Joseph Fourier was a French mathematician who lived from 1768-1830 and pioneered these
techniques. Interestingly he was a mathematician to Napoleon’s army - Napoleon believed he was
spreading an enlightened culture and hence thought it important to have academics travel with
his forces. These academics, including Fourier, essentially invented the study of Egyptology whilst
Napoleon fought there. It was Fourier’s student Champollion who deciphered the Rosetta stone that
allowed the Egyptian heiroglyphs to be read.
3
If we firmly hold the string of length L at each end so there are boundary conditionsthat y(0) = y(L) = 0 then there are solutions of the form
yn(x, t) = A sin(
nπx
L
)
cos(ωnt + φ) (2)
where the integer n = 1, 2, 3.., A is the amplitude of the oscillation ωn is the frequencyand φ is an arbitrary phase. Substituting this solution into the wave equation we findthe relation
ωn = nπ
L
√
T
ρ(3)
Check this is a solution and also that the solution satisfies the boundary conditions atthe ends of the string.
Armed with a solution like this we can understand how an initial displacement ofthe wire will evolve with time. For example if at t = 0 the string is made to take theform
yn(x, t = 0) = sin(
nπx
L
)
(4)
Then we can match the subsequent evolution to the full time dependent solution (inthis case we must set φ = 0 so the cosine is a maximum at t = 0 since the string willhave its maximum displacement when it is released at time t = 0). We know howthe string will look at all future times - eg when ωnt = π/2 the cosine is zero and thestring is straight etc.
It is of course possible in principle to hold the string in any arbitrary shape andthen let it go - eg
Our solutions don’t appear to tell us how this shape evolves. Do we need to findnew solutions of the wave equation every time we consider a new initial shape? Theanswer is no - the solution we have and Fourier analysis will suffice to teach us aboutthe evolution of any initial condition. The magic is that we will show you can writeany function as a sum of different frequency sine and cosine functions. The timeevolution of each of the pieces in the sum is then known from the solutions above.We will return to this problem at the end of the notes but first we must learn somemathematics.
4
2 Periodic Functions
A periodic function is a function that repeats like:
Formallyf(t + nT ) = f(t) (5)
where n = 1, 2, 3... is any integer.
Sine and cosine are obvious examples with period T = 2π. Convince yourself ofthese facts:
• the sum of two periodic functions both with period T also has period T
• f(t) = constant has period T (in fact it has all possible periods!)
3 Even and Odd Functions
We will need to perform integrals in what follows over products of functions. Some-times it will be easy to see that the result is zero if we keep in mind that somefunctions are even and others odd. The definitions of even and odd functions are
f(t) is even if: f(−t) = f(t)f(t) is odd if: f(−t) = −f(t)
A number of basic functions are plotted over the page from which you can see ifthey’re even or odd. From the plots we can also see some consequences for integralsover these functions (remember the integral is just the area under the curve with achange of sign depending on whether the line is above or below the axis!)
∫ T
−Teven(t)dt = 2
∫ T
0even(t)dt (6)
∫ T
−Todd(t)dt = 0 (7)
Now think about the products of different functions; an even function multiplyingan odd function gives an odd function:
y(−t) = even(−t).odd(−t) = even(t). − odd(t) = −y(t) (8)
And similarly the product of two odd functions is even.
5
f(x) = const EV EN
f(x) = sin x ODD
f(x) = cos x EV EN
f(x) = sin nx ODD
f(x) = cos nx SIMILARLY IS EV EN
f(x) = x ODD
f(x) = x sin x ODD × ODD = EV EN
f(x) = sin nx cos mx ODD × EV EN = ODD
6
4 2π Periodic Fourier Series
Now we can introduce the idea of Fourier analysis. Firstly consider only functionswith the same period (T = 2π) as sine and cosine. The claim is that any function,f(t) of period 2π may be written as
f(t) = a0 +∑∞
n=1 [an cosnt + bn sin nt] (9)
In words this says that we may write our function as a sum of sine and cosine functionsof different frequencies where the an and bn are just constants determining how mucheach sin nt etc contributes. Lets accept this statement and show these coefficients canbe uniquely determined from the original function.
a0: A good trick is to integrate both sides of the above expression for f(t) from−π → π
∫ π−π f(t)dt =
∫ π−π a0dt +
∫ π−π
∑∞n=1 [an cos nt + bn sin nt] dt
This is clever since
∫ π−π cos ntdt =
[
1n
sin nt]π
−π= 0
∫ π−π sin ntdt =
[
− 1n
cos nt]π
−π= 0
The only non-zero bit on the right hand side is
∫ π−π a0dt = 2πa0
thus
a0 = 12π
∫ π−π f(t) dt (10)
7
an: here the trick is to multiply f(t) by cos mt (m a positive integer) and integratefrom −π → π
∫ π−π f(t) cos mt dt =
∫ π−π a0 cos mt dt +
∫ π−π
∑∞n=1 [an cos nt + bn sin nt] cos mt dt
This is smart since
∫ π−π a0 cos mt dt = 0
∫ π−π bn cos mt sin nt dt = 0
since sin nt is odd and cos mt is even so the product is odd. We’re left with∫ π−π cos nt cos mt dt = 1
2
∫ π−π cos(n + m)t dt + 1
2
∫ π−π cos(n − m)t dt
Both of these cos integrals are zero so we only get a contribution when m = n fromthe last term
∫ π−π an cos nt cos mt dt = am
2
∫ π−π dt = amπ
So
am = 1π
∫ π−π f(t) cosmt dt (11)
bn: Multiply series by sin mt (m a positive integer) and integrate from −π → π
∫ π−π f(t) sin mt dt =
∫ π−π a0 sin mt dt +
∫ π−π
∑∞n=1 [an cos nt + bn sin nt] sin mt dt
This is smart since
∫ π−π a0 sin mt dt = 0
∫ π−π an cos nt sin mt dt = 0
since sin mt is odd and cos nt is even so the product is odd. We’re left with
∫ π−π bn sin nt sin mt dt = bn
2
∫ π−π cos(n − m)t dt − bn
2
∫ π−π cos(n + m)t dt
Both of these cos integrals are zero so we only get a contribution when m = n fromthe first term
∫ π−π bn sin nt sin mt dt = bm
2
∫ π−π dt = bmπ
So
bm = 1π
∫ π−π f(t) sinmt dt (12)
8
4.1 Example: Square Wave Fourier Series
As an example lets find the Fourier series representation of a 2π periodic square wavefunction of the form
f(t) = −k −π ≤ t < 0= k 0 ≤ t ≤ π
(13)
Plotting this we get
We want to write this function in the form
f(t) = a0 +∞∑
n=1
[an cos nt + bn sin nt] (14)
Of course this contains an infinite number of terms! In real life the number of termsyou need to calculate depends on how accurately you need to reproduce the orginalfunction. In this case we can find an expression that tells us the answer for all n.
Firstly we use the equation for a0:
a0 =1
2π
∫ π
−πf(t)dt = 0 (15)
This integral is zero because the function we’re studying is an odd function.
Next
an =1
π
∫ π
−πf(t) cosnt dt = 0 (16)
These integrals are all zero too because cosine is even but our function is odd so thetotal function being integrated is odd.
9
So we only have to calculate the bn
bn = 1π
∫ π−π f(t) sin nt dt
= 1π
∫ 0−π(−k) sin nt d + 1
π
∫ π0 (k) sin nt d
= 1π
[
kn
cos nt]0
−π− 1
π
[
kn
cos nt]π
0
= knπ
(cos 0 − cos(−nπ) − cos(nπ) + cos0)
= 2knπ
(1 − cos(nπ))
(17)
Thus our function can be written as a Fourier Series
f(t) = 4kπ
(
sin t + 13sin 3t + 1
5sin 5t + ....
)
It’s interesting to plot the series including successively more terms to see how theseries builds up.. here are plots of f(t) vs t truncating the series after the first,second and third terms...
Even with this few terms you can see the original function emerging. To preciselyreproduce the original function you would need an infinite number of terms but inpractice one normally only needs a certain level of precision and the series can betruncated.
Exercise 1:
Find the first four terms in the Fourier Series expansion of the 2π periodic functionf(x) = x − π ≤ x ≤ π
Exercise 2:
Find the first four terms in the Fourier Series expansion of the 2π periodic functionf(x) = 0 − π ≤ x ≤ 0f(x) = sin x 0 ≤ x ≤ π
10
5 Fourier Series For Functions of Arbitrary Period
Many functions are periodic but not with period 2π. It’s easy to adapt the previousformalism to cover these cases. All one has to do is stretch the cosine and sinefunctions so they have period T .
For example if we want a cosine wave cos t to have period T instead of 2π thenwe define a new variable
t =2π
Tt′ (18)
Cosine of t is equal when for example t′ = 0 and t′ = T as we require. All wehave to do therefore is make this change of variables to the 2π periodic Fourier Seriesexpressions. We require
dt =2π
Tdt′, t = ±π → t′ = ±T
2(19)
The fourier expansion is therefore described by
f(t′) = a0 +∑∞
n=1(an cos 2nπT t′ + bn sin 2nπ
T t′) (20)
where
a0 = 1T
∫ T/2
−T/2 f(t)dt
an = 2T
∫ T/2
−T/2 f(t) cos 2nπtT dt
bn = 2T
∫ T/2
−T/2 f(t) sin 2nπtT dt
(21)
Example
We can find the fourier expansion of the following period 4 function:
= 0 −2 < t < −1f(t) = k −1 < t < 1
= 0 1 < t < 2(22)
which when sketched looks like
11
Note this function is even and hence the coefficients bn = 0. We may calculate an
as follows
a0 =1
T
∫ T/2
−T/2f(t)dt =
1
4
∫ 1
−1kdt =
k
2(23)
andan = 2
T
∫ T/2−T/2 f(t) cos 2nπt
Tdt
= k2
∫ 1−1 cos 2nπt
4dt
= 2knπ
sin nπ2
(24)
Thus we find the leading terms in the series are
f(t) =k
2+
2k
π
(
cosπt
2− 1
3cos
3πt
2+
1
5cos
5πt
2+ ...
)
(25)
Plotting to this order (with k = 1) we find the series looks like
Exercise 3:
Find the first four terms in the Fourier Series expansion of the period 4 functionf(x) = 2 0 ≤ x ≤ 2
f(x) = 0 − 2 ≤ x ≤ 0
Exercise 4:
Find the first five terms in the Fourier Series expansion of the period 2 functionf(x) = 0 − 1 ≤ x ≤ 0f(x) = x 0 ≤ x ≤ 1
12
6 Fourier Integrals
Non-periodic functions also have an expansion in terms of cos and sin waves. We candiscover it by starting with a periodic function and then taking the period larger andlarger. When the period is infinite the function essentially has no periodicity! So westart with the expansion for a period T function
f(t) = a0 +∑∞
n=1 (an cos ωnt + bn sin ωnt)
where ωn = 2nπ/T .
If we insert the expressions for ao, an, bn we have
f(t) = 1T
∫ T/2−T/2 f(x)dx + 2
T
∑∞n=1
(
cos ωnt∫ T/2−T/2 f(x) cos ωnx dx
+ sin ωnt∫ T/2−T/2 f(x) sin ωnx dx
)
We can suggestively write
∆ω = ωn+1 − ωn = 2(n+1)πT
− 2nπT
= 2πT
and rewrite the expansion in terms of this quantity as
f(t) = 1T
∫ T/2−T/2 f(x)dx + 1
π
∑∞n=1
(
cos ωnt∆ω∫ T/2−T/2 f(x) cos ωnx dx
+ sinωnt∆ω∫ T/2−T/2 f(x) sin ωnx dx
)
Now when we take T → ∞, ∆ω → 0 the first term is 0. But since we must sum overall ωn in the second two terms the sums become integrals leaving
f(t) = 1π
∫ ∞0
(
cos ωt∫ ∞−∞ f(x) cos ωx dx + sin ωt
∫∞−∞ f(x) sin ωx dx
)
dω
or re-writing
f(t) = 1π
∫∞0 (A(ω) cosωt + B(ω) sinωt) dω
A(ω) =∫∞−∞ f(x) cosωx dx
B(ω) =∫∞−∞ f(x) sinωx dx
Note the limits of integration in these expressions!
13
6.1 Example: Square Pulse
Consider the non-periodic single pulse
f(t) = k |t| ≤ 1= 0 |t| > 1
(26)
which looks like
The Fourier Integral has coefficients A(ω), B(ω). Since the function is even B(ω) = 0
A(ω) =∫ ∞−∞ f(x) cos ωx dx
=∫ 1−1 k cos ωxdx
= 2kω
sin ω
(27)
and thus
f(t) = 2kπ
∫ ∞0
1ω
sin ω cos ωx dω
The equivalent of truncating a Fourier Series after a set number of terms for theintegral representation of a function is to truncate the upper integration limit eg to4, 16, 32....
Exercise 5:
Find the Fourier Integral representation of the functionf(x) = x |x| ≤ 1f(x) = 0 |x| > 1
14
7 Complex Fourier Integral
The Fourier integral of a function f(t) can also be written in complex form as
f(t) = 1√2π
∫∞−∞ C(ω)eiωtdω (28)
where
C(ω) = 1√2π
∫∞−∞ f(v)e−iωvdv (29)
A few simple manipulations show this is just a rewrite of what we had in theprevious section. Firstly writing the integral with C(ω) explicitly written gives
f(t) =1
2π
∫ ∞
−∞
[∫ ∞
−∞f(v)e−iωvdv
]
eiωtdω (30)
Now grouping the exponentials and expanding as
eiω(t−v) = cos(ω(t− v)) + i sin(ω(t − v)) (31)
we have two terms. The complex piece
Im(f(t)) =1
2π
∫ ∞
−∞
∫ ∞
−∞sin(ω(t− v))f(v)dvdω (32)
is actually zero - if you consider the ω integral first and note that sin(ω(t− v)) is anodd function this is hopefully clear!
The real part
Re(f(t)) =1
2π
∫ ∞
−∞
∫ ∞
−∞cos(ω(t − v))f(v)dvdω (33)
becomes the result from the last section if we use the identity
cos(ω(t− v)) = cos ωt cosωv + sin ωt sinωv (34)
The complex form is therefore just a rewrite of the result from the previous section.
15
7.1 Example - Dirac Delta Function
The Dirac δ function is a contrived function with some useful properties. It is essen-tially a rectangle of width ∆x and height 1/∆x where ∆x is a infinitesimally smallinterval. Note that the area under the function is one. The function is written asδ(x − x0) where x0 is the position on the x axis where the delta function is centred.So it looks like
The reason this function is useful is because of the result∫ ∞
−∞f(x)δ(x − x0)dx = f(x0) (35)
This follows from the form of the δ function above. It is zero except in an in-finitessimal slice around x0. The area under the product of the curve f(x) and the δfunction is therfore only non-zero at x0 and is given by
area = ∆x × (f(x0) ×1
∆x) = f(x0) (36)
Thus the delta function is a way of projecting out a particular value of a function atsome point.
We can find the Fourier Integral form of the δ function as follows. We mustcalculate
C(ω) = 1√2π
∫ ∞−∞ f(v)e−iωvdv
= 1√2π
∫ ∞−∞ δ(v − x0)e
−iωvdv
= 1√2π
e−iωx0
(37)
Thus
δ(x − x0) =1
2π
∫ ∞
−∞eiω(x−x0)dω (38)
We shall see this form of the delta function frequently in the Quantum Mechanicssection of the course so its worth remembering.
Exercise 6:
Find the complex Fourier Integral representation off(x) = x − π ≤ x ≤ π
16
8 Waves On a String Reprise
We can now return to the physics problem we began with - waves on a guitar string.Remember the waves satisfy the equation
∂2y
∂t2=
T
ρ
∂2y
∂x2(39)
and we found the solutions
yn(x, t) = A sin(
nπx
L
)
cos(ωnt + φ), ωn = nπ
L
√
T
ρ(40)
Now we can answer the question of how an arbitrary initial condition evolves. Forexample suppose at time t = 0 we release the string from the held form
y(x, t = 0) = 2KxL
0 < x < L2
= 2KL
(L − x) L2
< x < L(41)
We knowy(x, t = 0) = Kn sin
nπx
L(42)
evolves toy(x, t) = Kn sin
nπx
Lcos(ωnt) (43)
(Note we have again set the phase φ = 0 because the string has maximum displace-ment at t = 0). Thus if we can rewrite the initial condition as a Fourier expansionwe will know how each term in the expansion evolves. Resuming the series at anygiven time t will give us the time evolution of the initial condition.
Actually the string has length L and therefore the y(x, t = 0) is not periodic. Thesolution sin nπx
Lis though an odd, periodic function if we extend it beyond the string.
It is natural therefore to make an odd continuation of the string outside 0 < x < Lwith the same periodicity, 2L
17
Now we can make a Fourier expansion. Since y(x) is odd the coefficients
a0 = an = 0 (44)
Our Fourier expansion will therefore take the form
y(x) =∑
n
bn sinnπx
L(45)
where
bn = 1L
∫ L−L y(x) sin nπx
Ldx
= 2L
∫ L0 y(x) sin nπx
Ldx
= 4KL2
∫ L/20 x sin nπx
Ldx + 4K
L2
∫ LL/2(L − x) sin nπx
Ldx
(46)
This integral is a little laborious but straight forward to evaluate. The result is
bn =8K
n2π2sin
nπ
2(47)
The Fourier expansion of our wave form is then given by (taking L=1m, v=1ms−1)
f(x, t) = 8π2 sin πx cos πt − 8
9π2 sin 3πx cos 3πt + 825π2 sin 5πx cos 5πt
− 849π2 sin 7πx cos 7πt + 8
81π2 sin 9πx cos 9πt + ....
Plotting for varying times reveals the evolution
t = 0 t = 0.2 t = 0.4
t = 0.6 t = 0.8 t = 1.0
18
Introduction To Maple
Maple is a mathematical manipulation program. It is available on
the computers in the physics clusters. We will only use it to performsome integrals and to plot some curves so we’ll get away with a very
limited number of commands:
Begin the maple session by double clicking the maple icon on thedesktop.
?command - a help screen will appear about command
int( f(x), x = a..b); - integrates f(x) with respect to x between the
limits a and b (note semi-colon!)
So for example
int(x * sin(x) / Pi , x=-Pi..Pi );
Evaluates:∫ π−π
xπ sin x dx
plot( cos(x), x=-Pi..Pi); - plots cosx between −π and π
evalf( function ); - forces the program to numerically evaluate afunction returning a number with decimal places rather than
fractions.
sum(function(n) ,n=1..10); - sums the series with n equal to thesequence 1 to 10.
If you’re interested in learning more about Maple then you willfind an introductory worksheet covering many more commands on the
PH316 web site - http://www.hep.phys.soton.ac.uk/∼evans/PH316.
19
Fourier Analysis - Formula Sheet
Periodic Functions: a function has period T if, for integers n = 1, 2..
f(t + nT ) = f(t)
Odd Functions: a function is odd if
g(−t) = −g(t)
and it follows that∫ a−a g(t) dt = 0
Even Functions: a function is even if
h(−t) = h(t)
and it follows that∫ a−a h(t) dt = 2
∫ a0 h(t) dt
Note: the product of an even and an odd function is odd. The productof two odd functions is even.
2π Periodic Fourier Series
A 2π periodic function may be expanded as
f(t) = a0 +∑∞
n=1 [an cos nt + bn sinnt]
with
a0 = 12π
∫ π−π f(t) dt
am = 1π
∫ π−π f(t) cos mt dt
bm = 1π
∫ π−π f(t) sinmt dt
20
T Periodic Fourier Series
A T periodic function may be expanded as
f(t) = a0 +∑∞
n=1
[
an cos 2nπT
t + bn sin 2nπT
t]
with
a0 = 1T
∫ T/2−T/2 f(t) dt
am = 2T
∫ T/2−T/2 f(t) cos 2mπ
Tt dt
bm = 2T
∫ T/2−T/2 f(t) sin 2mπ
T t dt
Fourier Integral
Any function may be expanded as
f(t) = 1π
∫∞0 (A(ω) cos ωt + B(ω) sin ωt) dω
A(ω) =∫∞−∞ f(x) cos ωx dx
B(ω) =∫∞−∞ f(x) sinωx dx
Complex Fourier Integral
The fourier integral of a function may be also be written
f(t) = 1√2π
∫∞−∞ C(ω)eiωt dω
C(ω) = 1√2π
∫∞−∞ f(x)e−iωx dx
21
Problem Sheet 4
Question 1
Find the first four terms in the Fourier Series expansion of the 2π periodic functionf(x) = x − π ≤ x ≤ π
(MAPLE session: Plot the series to see how successive terms build up.)
Question 2
Find the first four terms in the Fourier Series expansion of the 2π periodic functionf(x) = 0 − π ≤ x ≤ 0f(x) = sin x 0 ≤ x ≤ π
(MAPLE session: Plot the series to see how successive terms build up.)
Question 3
Find the first four terms in the Fourier Series expansion of the period 4 functionf(x) = 2 0 ≤ x ≤ 2
f(x) = 0 − 2 ≤ x ≤ 0
(MAPLE session: Plot the series to see how successive terms build up.)
Question 4
Find the first five terms in the Fourier Series expansion of the period 2 functionf(x) = 0 − 1 ≤ x ≤ 0f(x) = x 0 ≤ x ≤ 1
(MAPLE session: Plot the series to see how successive terms build up.)
Question 5
Find the Fourier Integral representation of the functionf(x) = x |x| ≤ 1f(x) = 0 |x| > 1
(MAPLE session: Plot the series with varying upper cut off to see how it builds up.)
22
Section C
This question is both a mock exam question and part of your course
work. You should hand in your answer to my pigeon hole by the 24th
March 2006.
An electronic wizard has designed a black box that may be connected into analternating circuit. He has discovered that if the input current is of the form
Iin(t) = I0 sin ωt
Then the output current is given by
Iout(t) =I0
ωsin ωt
.The box has been designed though to process a 2π periodic saw tooth input current
of the form
Iin(t) = t − π < t < π
(a) Explain how Fourier analysis allows the determination of the output current forthe saw tooth input given the data provided
[2 marks]
(b) Find the first four non-zero terms in the Fourier expansion of the saw toothwave form.
[4 marks]
(c) Find the output wave form to this order in the expansion.
[1 marks]
(d) If instead a single saw tooth pulse of the above form is incident on the blackbox between t = −π and t = π find a Fourier Integral representation of theinput and an expression for the output signal.
[3 marks]
Note: in a real exam you would be provided with the general expressions for thecoefficients of fourier series and integrals.
23