Sie sind auf Seite 1von 7

Fourier Series and Transforms -- an Introduction

In math, you're used to the notion that any periodic function can be represented as an infinite series
of sines and cosines, with each sine and cosine having a different frequency. This is, of course the
idea behind Fourier series.
Let's start with an example to refresh your memory. Consider a sawtooth wave. Below we've
plotted one with a period of 2 .
Wave[x_, L_] := SawtoothWave[{- 1, 1}, x / L]
Plot[Wave[x, 2 ], {x, - 10, 10}, PlotRange {- 2, 2}, AxesLabel {x}]
2

-10

-5

10

-1

-2

Since the sawtooth wave is periodic, we can expand it as a Fourier series. The series consists of an
infinite series of sines and cosines, but we can get a pretty good approximation by just taking the
first few terms. Plotted below in dark blue/purple is the exact sawtooth function, and shown in dark
pink is our approximation to it.
ApproximateWave[x_, L_] := FullSimplify[Expand[FourierSeries[Wave[x, L], x, 8]]]
ApproximateWave[x, 2 ]
-

1 2 7 60 Sin[x] + 30 Sin[2 x] + 20 Sin[3 x] + 15 Sin[4 x] + 12 Sin[5 x] + 10 Sin[6 x] +


420
60 Sin[7 x] + 105 Sin[8 x]

Plot[{Wave[x, 2 ], %}, {x, - 10, 10}, PlotRange {- 2, 2}, AxesLabel {x}]


2

-10

-5

10

-1

-2

Plotting the function and its Fourier series like we did above is one way to understand Fourier
series. Another way is to plot the "strength" of each sine (or cosine) term as a function of the fre-

Exploring_Fourier_Transforms.nb

quency/wavenumber (k). This is shown in the spiky plot *below*. Let's step through how to read a
plot like this. The spike at k=5 has a height of about 0.06. This means that the sin(5 x) term in the
Fourier series has an amplitude of 0.06 multiplied in front of it. Similarly, the spike at k=3 has a
height of about 0.11, which means the sin(3x) term has an amplitude of 0.11. In words, what this
Fourier representation (i.e. this graph of spikes) is telling us is that if we want to assemble a
sawtooth wave from a series of sines and cosines, we need to add together sine and cosine
"ingredients" in various amounts. In this case, we need 0.11 parts of sin(3x), 0.06 parts of sin(5x)
and so on. The fact that the graph is a series of spikes means that we don't need any "in-between"
frequencies like sin(1.5x). The Fourier representation contains all the information contained in the
original function, because given this "recipe" I can reconstruct the function by adding together the
"ingredients" in the right amounts. Incidentally, the graph below also "explains" why we can get a
pretty decent approximation to our original function by just considering the first few terms in the
Fourier series. Notice that the amplitude of the function is large for small wavenumbers k and gets
smaller as we go to larger and larger k. This means that the very high frequency terms (the highest
"k" terms) in the Fourier series contribute only very small quantities to the sum, and so we don't lose
too much be ignoring them.
There's a tendency to think that the squiggly graph of the sawtooth shown above as "the" function,
and the spiky Fourier representation below as some silly way of doing things, but both are valid. We
can think of any function as some abstract thing that we can choose to represent as a function in
"real space x" (the wiggly function above) or as a function in "fourier space k" (the spiky function
below). Both are equally valid ways of thinking about a function, and which representation is more
"natural" is just a matter of application. For instance, if I'm trying to describe to you what a set of
ocean waves looks like, it makes sense for me to use a real space representation, where waves are
actually "wavy". On the other hand, our auditory sensations operate in Fourier space -- when you
hear a musical chord, what your brain perceives isn't a waveform, but rather a mixture of frequencies, i.e. pitches ("Ah yes...I hear about equal mixtures of 'A', 'C#' and 'E'").
FourierCoefficient[Wave[x, 2 ], x, n, FourierParameters {0, - 1}];
DiscretePlot[Abs[%], {n, - 10, 10}, PlotRange All, AxesLabel {k}] // Quiet
0.8

0.6

0.4

0.2

-10

-5

10

Let's do another example to get some intuition for this. I'd like to compare two sawtooth waves and
their Fourier representations. Shown below are two sawtooth waves, one with a period of 2 (in
blue) and one with a period of /2 (in red).

Exploring_Fourier_Transforms.nb

PlotWave[x, 2 ], Wavex, 2 , {x, - 20, 20},


PlotRange {- 2, 2}, PlotStyle {{RGBColor[0, 0, 1]}, {RGBColor[1, 0, 0]}}
2

-20

10

-10

20

-1

-2

We can once again approximate the waves using Fourier series, and below we've plotted things in
real space.
Wave[x, 2 ], ApproximateWave[x, 2 ], Wavex, 2, ApproximateWavex, 2;
Plot[%, {x, - 20, 20}, PlotRange {- 2, 2}, PlotStyle
{{RGBColor[0, 0, 1]}, {RGBColor[0, 0, 1]}, {RGBColor[1, 0, 0]}, {RGBColor[1, 0, 0]}}]
2

-20

10

-10

-1

-2

Here is the Fourier representation:

20

Exploring_Fourier_Transforms.nb

FourierCoefficient[Wave[x, 2 ], x, n, FourierParameters {0, - 1}],


FourierCoefficientWavex, 2, x, n, FourierParameters {0, - 1};
DiscretePlot[Abs[%], {n, - 20, 20}, PlotRange All, AxesLabel {k},
PlotStyle {{RGBColor[0, 0, 1]}, {RGBColor[1, 0, 0]}}] // Quiet
0.8

0.6

0.4

0.2

-20

10

-10

20

This is interesting! Remember how this graph tells us what mixtures of sinusoids to use, and notice
how function with the shorter period (red) doesn't "use" all of the wavenumbers available to it. In
other words, whereas to construct the shorter period (red) wave, we only need to use sin(4x),
sin(8x), sin(12x), and so on, we need to use a more complete set of sines (sin x, sin 2x, sin3x, ...) in
order to construct the longer period (blue) wave. To see if this is mere coincidence, we can repeat
this experiment for waves of even shorter periods:
FourierCoefficient[Wave[x, ], x, n, FourierParameters {0, - 1}],
FourierCoefficientWavex, 3, x, n, FourierParameters {0, - 1},
FourierCoefficient[Wave[x, / 5], x, n, FourierParameters {0, - 1}],
FourierCoefficient[Wave[x, / 7], x, n, FourierParameters {0, - 1}];
DiscretePlot[Abs[%], {n, - 50, 50}, PlotRange All,
AxesLabel {k}, PlotStyle {{RGBColor[0, 0, 1]},
{RGBColor[1, 0, 0]}, {RGBColor[0, 1, 0]}, {RGBColor[0, 0, 0]}}] // Quiet
0.8

0.6

0.4

0.2

-40

-20

20

40

Shown above are the Fourier representations of sawtooth waves of period /7 (in black), /5 (in
green), /3 (in red) and (in blue). It's true! The shorter the period, the sparser the Fourier representation. Conversely, the longer the period of the function we're trying to represent, the denser the
Fourier representation -- the spikes populate the gaps more completely, and as a whole the tall
spikes are more "centrally condensed" towards the smaller values of k. This makes a lot of sense
intuitively if you think about what a Fourier representation is. Remember that the graph of spikes is

Exploring_Fourier_Transforms.nb

a recipe that tells us how much of each sine to add to our mixture that becomes the original function, and that the smaller the wave number of a sine wave, the longer its period (e.g. sin x has a
period of 2 whereas sin 2x --which has a larger wavenumber of 2 -- has a period of ). What this
pattern tells us is that if my original function has a long period, then to reconstruct it with sines and
cosines I need to use sinusoids with longer periods i.e. smaller wavenumber k. Thus, the more
"stretched out" a function is in real space (the longer its period in real space), the more centralized/"squished" it is in Fourier space.
Now here's the big conceptual leap. Let's suppose we go crazy with this exercise, and keep increasing the period of the function that we're find Fourier series for. As we keep doing this, the spikes
populate the k-axis in Fourier space more and more densely (imagine the blue dots in the plot
above getting more and more squished together so that they're like trees in a thick forest). What if
we increase the period of the wave to infinity? Huh? What does it mean to have a period equal to
infinity? A period, remember, is how far we have to go in real space before the wave repeats itself.
If the period is infinity, then it takes infinitely long before the wave repeats itself, which is another
way of saying that it never repeats itself. A "periodic" function with an infinite period is just an
aperiodic function.
So what does happen to the Fourier representation as we increase the period to infinity? As we
increase the period of the wave to infinity, the spikes get closer to closer together, and what used to
be a discrete set of spikes gets infinitely squished together and get so dense that they form a continuous function. All the gaps between the spikes disappear as the limit to infinity is taken. What this
means is that whereas a periodic function can be represented by a discrete set of sines and
cosines (e.g. sin x, sin 2x, sin 3x, and so on, but not anything like sin 1.3x), an aperiodic function
(i.e. functions in general) can only be formed from sums of sines and cosines if we add together a
continuous mixture (i.e. we need not only sin x and sin 2x, but also sin 1.5x, sin 1.01x, sin 1.0001x
-- everything).
What we've just described is the idea behind Fourier Transforms. The continuous function that
came out of squishing the spikes together is known as the Fourier transform of the original function.
Let's look at a few examples. We'll start with a sine wave:
Plot[Sin[x], {x, - 10, 10}, AxesLabel {x}]
1.0

0.5

-10

-5

-0.5

-1.0

Now we take the Fourier transform:

10

Exploring_Fourier_Transforms.nb

FourierTransform[Sin[x], x, k, FourierParameters {0, - 1}]


-

DiracDelta[- 1 + k] +
2

DiracDelta[1 + k]
2

What are we to make of this? Recall that the Fourier transform is a function that tells us how much
of each type of sinusoid to take. This Fourier transform consists of delta functions at k=1 and k= -1.
This means that to reconstruct sin x, we just need k= +/-1 sinusoids (sin x and sin(-x) )and nothing
else, which makes sense -- the point of a Fourier series/transform is to represent a function in terms
of sinusoids, and if the original function is already a sine then the only ingredient we need from our
arsenal of sines and cosines is "itself". (Don't worry about the fact that we need both sin x and sin (x), and the funny imaginary amplitudes -- those are just artifacts of the fact that Fourier transforms
are defined using complex exponentials instead of sines and cosines).
Let's try another example. What about a constant?
Plot[1, {x, - 10, 10}, AxesLabel {x}]
2.0

1.5

1.0

0.5

-10

-5

10

FourierTransform[1, x, k, FourierParameters {0, - 1}]


2 DiracDelta[k]

This time we get a delta function centered at k=0, which means that our recipe for reconstructing the
constant function y =1 is to take a sinusoid with wavenumber k=0 i.e. a sinusoid that doesn't vary at
all. That sounds like a constant! (Again, don't worry about the constant factor up front).

Exploring_Fourier_Transforms.nb

Examples of Fourier Series and Transforms


Fourier Series: Superposing Plane Waves makes a Sharply Peaked Function
Manipulate
nMax

PlotRe

n x , {x, , 3 * }, PlotRange All,

2 nMax

n=1
nMax

PlotAbs

n x , {x, , 3 * }, PlotRange All

2 nMax

n=1

, {nMax, 1, 40, 1}

nMax

0.4

0.30
0.25

0.2

-0.2
-0.4

0.20
0.10

0.05
0.00

Fourier Transforms: A Discontinuous Example (One Small Step for a


Wavefunction)
Fourier Transforms: A Continuous but Non-Smooth Example (A Speedbump)
Fourier Transforms: A Smooth Approximation to a Step

Das könnte Ihnen auch gefallen