Download wave

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
Physics 2218
Fall 2021
Fourier Series/Transforms Supplement
The complex Fourier series for periodic functions of period L is
Z L
ỹm = (1/L)
0
y(x) exp(−ikm x)dx,
where km = 2π m/L. The Fourier series can be re-summed to retrieve the original function:
∞
y(x) =
∑
ỹm exp(ikm x).
m=−∞
The same can be expressed in terms of sine and cosine functions, which is sometimes more convenient. Then
Z
2 L
am =
y(x) cos(km x)dx
L 0
and
Z
2 L
bm =
y(x) sin(km x)dx
L 0
The original series is then given by
∞
1
y(x) = a0 + ∑ (am cos(km x) + bm sin(km x)) .
2
m=1
Note that you have to treat the a0 term differently using the sin and cos terms (i.e., there is no b0
term) – this is not required for the exponential form! The two are related by a0 = ỹ0 , am = ỹm +
ỹ−m , bm = i(ỹm − ỹ−m ) and similarly ỹm = 12 (am − ibm ) and ỹ−m = ỹ∗m , i.e., the complex conjugate.
If we define even functions such that f (x) = f (−x) we find that for even function, all terms
bm are zero. Similarly, for odd functions ( f (x) = − f (−x)), we find that all terms am = 0. You
should convince yourself of this; it is easiest to see that it is true if you take the integrals to be
from −L/2 < x < L/2 rather than 0 < x < L.
Example
Consider a square wave. We can define the square wave as follows:
a
if −L/2 < x ≤ 0;
f (x) =
−a if 0 < x < L/2.
Here we choose to use the second form (using sine and cosine functions) as the function is odd,
i.e., f (x) = − f (−x). This means that ony the bm terms contribute (try it: show that am = 0 for all
1
m.)
bm =
2
L
Z L/2
f (x) sin(km x)dx
a
2π mx
2π mx 0
= −
cos(
)
)
− cos(
mπ
L
L
−L/2
2a
= −
[1 − cos(mπ )]
m
π 4a
− mπ for m odd
=
0
for m even.
−L/2
L/2
0
Then the series is
1.25
n=1
n=3
n=5
n=5
n=7
n=50
1.00
y(x,0)
0.75
0.50
0.25
0.00
0.25
0
2
4
6
x[m]
8
10
0.50
Figure 1: Truncated fourier series expansion of the square wave.
y(x) = −
4a mmax sin(km x)
∑ m ,
π m=0
where we can vary mmax from its original setting (mmax = ∞) to see how the series develops. We
can plot the truncated series for m = 0..mmax where mmax = 1, 3, 10, 25. We see that with 25 terms,
we already have a good approximation of our square wave. We can also see that including higherfrequency terms gives us the steeper part of the square wave, and that there is an overshoot (the
so-called “Gibbs effect”) near the discontinuous edges of the square wave.
2
Orthogonality
The reason this works is due to orthogonality:
Z 2π
0
Z 2π
0
Z 2π
0
sin mθ sin nθ d θ
= π δmn
sin mθ cos nθ d θ
= 0
cos mθ cos nθ d θ
= π δmn
Z 2π
0
ei(m−n)θ d θ
= 2π δmn
The symbol δi j , the Kronecker delta, is defined as
0 if i ̸= j;
δi j =
1 if i = j.
Exercise: Prove these! These are useful tools for solving Fourier problems.
f(t)
1.0
Fourier Transform of square pulse with h = 1 and = 10
0.5
0.0
20
15
10
5
0
t
5
10
15
20
20
15
10
5
0
5
10
15
20
g( )
5.0
2.5
0.0
Figure 2: A square wave f (t) with its Fourier Transform g(ω ).
Fourier Transform
We can also consider non-periodic functions; this is the limit where the period of the Fourier
series goes to infinity and comes directly from this, and is called Fourier Transforms.
1
f (t) =
2π
Z ∞
−∞
g(ω ) exp(iω t)d ω
3
and
g(ω ) =
Z ∞
−∞
f (t) exp(−iω t)dt.
There are some ambiguities in the choice of the prefactor 12 π in different textbooks and different
communities – sometimes it’s split over the two functions. The important part is just a consistent
use such that you get a 1/2π when you multiply them together.
Let’s re-examine the square pulse above but now consider it a single pulse rather than a pulse
in a repeating series. The coefficients g(ω ) are now
g(ω ) = h
Z +τ /2
−τ /2
exp(iω t)dt = hτ
sin(ωτ /2)
.
ωτ /2
What is the meaning of the negative part of the g(ω ), i.e., ω < 0?
4