We will do many examples today to get intuition for what's Fourier transform is doing.
Discrete Fourier Transform
General Formula
Let N be a positive integer.
Let 'x-space' be Vx=Z/NZ={0,1,⋯,N−1}, and then (rescaled) 'p-space' is also Vp=Z/NZ, then we can build the Fourier transformation kernel
K(x,p)=e2πi(xp/N):Vx×Vp→U(1)
where U(1) is the unit circle in complex number.
The kernel satisfies the orthonormal condition in both x and p variable.
N1x∈Vx∑K(x,p1)K(x,p2)=δ(p1,p2)N1p∈Vp∑K(x1,p)K(x2,p)=δ(x1,x2)
Given a function f(x):Vx→C, we can expand it as
f(x)=p∈Vp∑K(x,p)F(p)
for some function F(p):Vp→C. Using the orthonormal condition, we get, for any q∈Vp, we have
(1/N)x∈Vx∑f(x)K(x,q)=(1/N)x∈Vx∑p∈Vp∑K(x,p)F(p)K(x,q)=F(q).
that is
F(q)=(1/N)x∈Vx∑f(x)K(x,q).
Fourier Transformation is a linear map between two function spaces
Let Fun(Vx,C) be the space of functions from Vx to C. Similarly define Fun(Vp,C). Concretely Fun(Vx,C)=CN and Fun(Vp,C)=CN.
Fourier transformation FT, sends an element f(x)∈Fun(Vx,C) to an element F(p)∈Fun(Vp,C). FT is a linear map.
If we define hermitian inner product on Fun(Vx,C) as
⟨f,g⟩x=(1/N)x∈Vx∑f(x)g(x),
and we define hermitian inner product on Fun(Vp,C) as
⟨F,G⟩p=p∈Vp∑F(p)G(p).
then we find that Fourier transformation is compatible with the two inner products, namely
⟨f,g⟩x=⟨F,G⟩p,F=FT(f),G=FT(g).
Example 1: N = 2
A function f(x) is determined by its values f(0),f(1). Similarly for F(p).
We have relations
F(0)=(1/2)(f(0)+f(1)),F(1)=(1/2)(f(0)−f(1)).
So, we can reconstruct f(x) from F(p), by
f(0)=F(0)+F(1),f(1)=F(0)−F(1).
An important equality
1+(−1)=0.
and less obviously
1+e2πi/3+e2πi(2/3)=0
more generally
j=0∑N−1e2πi(j/N)=0
How to see this? You can say, this is the sum of all the N-th roots of unity, and we have
zN−1=j=0∏N−1(z−e2πi(j/N)).
hence by looking at the coefficient of zN−1, we see the sum of all the roots is 0.
Or, draw these roots as vectors on the complex plane, they show up as evenly distributed on the unit circle, since the summands are invariant under rotation by 2π/N, hence the result is invariant under such a rotation. And the only possible number is 0.
Interpretation of complex vector space, hermitian inner product, orthonormal basis.
Inversion Formula
Suppose you started from f(x), and did some hard work to get the Fourier transformation F(p). Can you recover f(x) from F(p)? Did you lose information when you throw away f(x) and only keep F(p)?
If f(x) is continuous and absolutely integrable, we can recover f(x) from F(p) by
f(x)=2π1∫p∈RF(p)eipxdp
The proof of this theorem is beyond the scope of this class. You might be happy to just accept the formal 'rule' that
2π1∫Reipx−ipydp=δ(x−y).
and that
f(x)=∫δ(x−y)f(y)dy
We can try some example to see if it works.
Fourer Series
If the function f(x) is a periodic function, of period L, meaning f(x)=f(x+L), then we cannot do Fourier transform (why?), but instead, we need to do Fourier series.
We are not going to use all eipx for all p, but only those that satisfies eipx=eip(x+L) have the same periodicity. Which mean p needs to satisfy
p=(2π/L)n for some integer n.
So, we define
en(x)=ei(2π/L)nx.
We define the Fourer series coefficient as
cn=L1∫0Lf(x)en(x)dx
Given these coefficient cn, can we recover f(x)? Yes, under some smoothness condition of f(x), we have
f(x)=n∈Z∑cnen(x).
Fourier transform. Given f(x), we want to express f(x)=∫eikxg(k)dk, since eikx is easy to deal with.
Laplace transform. Given f(t), on t∈[0,∞), we want to write f(t)=∫c+iReptF(p)dp.
Gamma function, Stirling Formula
What is Fourier Transformation
When we solve equation of the form
dxdf(x)=λf(x),
the general soluition is
f(x)=ceλx.
We say eλx is an eigenfunction for the operator d/dx with eigenvalue λ, here λ can be any complex number.
For λ purely imaginary, λ=ik, the function eikx, which has constant size ∣eikx∣=1.
For λ purely real, λ∈R, the function eλx, which is real, and has exponential growth (if λ>0) or exponential decay.
For λ general complex number, say λ=a+ib for a,b∈R, then eλx=eaxeibx has both oscillation factor eibx and exponential growth/decay eax.
If you give me a function f(x), we can try to write it as a linear combination of these easy to understand pieces eλx. Say
f(x)=∫Cc(λ)eλxdλ
The benefit for doing this? If a differential operator d/dx walk to it, we would have
(d/dx)f(x)=∫λc(λ)(d/dx)eλxdλ=∫λc(λ)λeλxdλ.
Of course, you would immediately complain:
what is this integration contour C? Is it along the real axis of λ? Is it along the imaginary axis of λ?
Why we can switch the order of integration and differentiation?
Let's keep these questions in our head, we will return to those.
So, what is Fourier transformation? If you go on wiki, or open some textbook, you see the following definition: given a function f(x) (with some condition on it), we can define
F(p):=∫x∈Rf(x)e−ipxdx.
This is called the Fourier transformation.
Let's throw in some input and see what we get.
Example 1
f(x)=cosh(x)=(ex+e−x)/2.
This function grows to infinity when x→±∞, indeed, when x→+∞, ex dominate, and x→−∞ we have e−x dominate. Either way, you blow up. Good luck when integrating ∫Rf(x)dx.
But, let's try to do the Fourier transformation anyway. We get
F(p)=∫xf(x)e−ipxdx=(1/2)∫Re(1−ip)xdx+(1/2)∫Re(−1−ip)xdx.
OK, we cannot continue.
Lesson 1
f(x) need to have sufficient 'decay' near infinity for the Fourier transformation to make sense. More precisely, a sufficient condition is that f(x) is 'absolutely integrable', which means
∫R∣f(x)∣dx<∞.
Given this condition, we know
∣F(p)∣=∣∫Re−ipxf(x)dx∣≤∫R∣e−ipxf(x)∣dx=∫R∣f(x)∣dx<∞.
so we are safe.
Example 2
The Gaussian. f(x)=e−x2. It decays pretty nicely in both directions.
Since we learned our lesson, we need to do a check first
∫Re−x2dx=π.
Great, it is finite.
Now, let's Fourier transform.
F(p)=∫e−ipx−x2dx=∫Re−(x−ip/2)2−p2/4dx=e−p2/4∫u∈−ip/2+Re−u2du
where we used the new variable u=−ip/2+x.
We can move the contour for u as long as the integral is convergent. Recall from last Wednesday's lecture, e−u2 decays fast to 0 when ∣u∣→∞ in the sectors arg(u)∈(−π/4,π/4) and arg(u)∈π+(−π/4,π/4). So, we are going to move the integration contour of u from the shifted real line −ip/2+R back to R. We get
∫u∈−ip/2+Re−u2du=∫u∈Re−u2du=π.
Thus, we get
F(p)=πe−p2/4.
Success!
Example 3
Let f(x)=1/(1+x2). Let's check that f(x) is absolutely integrable first
∫Rf(x)dx=∫CRf(z)dz=2πiResz=if(z)=2πi2i1=π.
where C+,R is the contour consist of two part
[−R,R]
a semi-circle in the upper half plane of radius R.
Equivalently, we can choose a different contour C−,R, which also consist of two part
[−R,R]
a semi-circle in the lower half plane of radius R.
Note that when we go around C−,R it goes around the singularity of f(z) at z=−i in the 'negative' (clockwise) direction, hence we get
∫C−,Rf(z)dz=(−2πi)Resz=−if(z)=−2πi−2i1=π.
Whew! the two minus sign cancels, we get the same answer.
Now, let's compute the little variation
F(p)=∫Re−ipxf(x)dx.
We first take the 'truncation' approximation, which recovers the original limit under the limit R→∞.
F(p)=R→∞lim∫−RRe−ipxf(x)dx.
Then, we try to 'close the contour', by connecting the point R to −R along some way. Due to this exponential factor e−ipz, it matters whether we close the contour in the upper half-plane, or the lower one. Indeed, we have
∣e−ipz∣=eRe(−ip(x+iy))=eRe(−ipx+py)=epy=epIm(z).
So,
if p≥0, to avoid ∣e−ipz∣ blow up to infinity, we need to keep Im(z) bounded from above on the contour.
if p≤0, to avoid ∣e−ipz∣ blow up to infinity, we need to keep Im(z) bounded from below on the contour.
Thus, for p≥0, we can complete the by the lower-half-semicircle C−,R. We get
(p≥0)F(p)=∫C−,R1+z2e−ipzdz=(−2πi)Resz=−i1+z2e−ipz=πe−p.
Similarly, for p≥0, we get
(p≤0)F(p)=∫C+,R1+z2e−ipzdz=(2πi)Resz=i1+z2e−ipz=πep.
We can write the result in a cool way as
F(p)=πe−∣p∣.
So when ∣p∣→∞, we see F(p)→0 very quickly.
Exercise
warm up:Does the function f(x)=1 admits Fourier transformation? Why? How about f(x)=1/(1+∣x∣)?
Find the Fourier transformation of the following functions.
f(x)={100<x<1else
We will do many examples today to get intuition for what's Fourier transform is doing.
Discrete Fourier Transform
General Formula
Let N be a positive integer.
Let 'x-space' be Vx=Z/NZ={0,1,⋯,N−1}, and then (rescaled) 'p-space' is also Vp=Z/NZ, then we can build the Fourier transformation kernel
K(x,p)=e2πi(xp/N):Vx×Vp→U(1)
where U(1) is the unit circle in complex number.
The kernel satisfies the orthonormal condition in both x and p variable.
N1x∈Vx∑K(x,p1)K(x,p2)=δ(p1,p2)N1p∈Vp∑K(x1,p)K(x2,p)=δ(x1,x2)
Given a function f(x):Vx→C, we can expand it as
f(x)=p∈Vp∑K(x,p)F(p)
for some function F(p):Vp→C. Using the orthonormal condition, we get, for any q∈Vp, we have
(1/N)x∈Vx∑f(x)K(x,q)=(1/N)x∈Vx∑p∈Vp∑K(x,p)F(p)K(x,q)=F(q).
that is
F(q)=(1/N)x∈Vx∑f(x)K(x,q).
Fourier Transformation is a linear map between two function spaces
Let Fun(Vx,C) be the space of functions from Vx to C. Similarly define Fun(Vp,C). Concretely Fun(Vx,C)=CN and Fun(Vp,C)=CN.
Fourier transformation FT, sends an element f(x)∈Fun(Vx,C) to an element F(p)∈Fun(Vp,C). FT is a linear map.
If we define hermitian inner product on Fun(Vx,C) as
⟨f,g⟩x=(1/N)x∈Vx∑f(x)g(x),
and we define hermitian inner product on Fun(Vp,C) as
⟨F,G⟩p=p∈Vp∑F(p)G(p).
then we find that Fourier transformation is compatible with the two inner products, namely
⟨f,g⟩x=⟨F,G⟩p,F=FT(f),G=FT(g).
Example 1: N = 2
A function f(x) is determined by its values f(0),f(1). Similarly for F(p).
We have relations
F(0)=(1/2)(f(0)+f(1)),F(1)=(1/2)(f(0)−f(1)).
So, we can reconstruct f(x) from F(p), by
f(0)=F(0)+F(1),f(1)=F(0)−F(1).
An important equality
1+(−1)=0.
and less obviously
1+e2πi/3+e2πi(2/3)=0
more generally
j=0∑N−1e2πi(j/N)=0
How to see this? You can say, this is the sum of all the N-th roots of unity, and we have
zN−1=j=0∏N−1(z−e2πi(j/N)).
hence by looking at the coefficient of zN−1, we see the sum of all the roots is 0.
Or, draw these roots as vectors on the complex plane, they show up as evenly distributed on the unit circle, since the summands are invariant under rotation by 2π/N, hence the result is invariant under such a rotation. And the only possible number is 0.
Interpretation of complex vector space, hermitian inner product, orthonormal basis.
Inversion Formula
Suppose you started from f(x), and did some hard work to get the Fourier transformation F(p). Can you recover f(x) from F(p)? Did you lose information when you throw away f(x) and only keep F(p)?
If f(x) is continuous and absolutely integrable, we can recover f(x) from F(p) by
f(x)=2π1∫p∈RF(p)eipxdp
The proof of this theorem is beyond the scope of this class. You might be happy to just accept the formal 'rule' that
2π1∫Reipx−ipydp=δ(x−y).
and that
f(x)=∫δ(x−y)f(y)dy
We can try some example to see if it works.
Fourer Series
If the function f(x) is a periodic function, of period L, meaning f(x)=f(x+L), then we cannot do Fourier transform (why?), but instead, we need to do Fourier series.
We are not going to use all eipx for all p, but only those that satisfies eipx=eip(x+L) have the same periodicity. Which mean p needs to satisfy
p=(2π/L)n for some integer n.
So, we define
en(x)=ei(2π/L)nx.
We define the Fourer series coefficient as
cn=L1∫0Lf(x)en(x)dx
Given these coefficient cn, can we recover f(x)? Yes, under some smoothness condition of f(x), we have
f(x)=n∈Z∑cnen(x).
Fourier transform. Given f(x), we want to express f(x)=∫eikxg(k)dk, since eikx is easy to deal with.
Laplace transform. Given f(t), on t∈[0,∞), we want to write f(t)=∫c+iReptF(p)dp.
Gamma function, Stirling Formula
What is Fourier Transformation
When we solve equation of the form
dxdf(x)=λf(x),
the general soluition is
f(x)=ceλx.
We say eλx is an eigenfunction for the operator d/dx with eigenvalue λ, here λ can be any complex number.
For λ purely imaginary, λ=ik, the function eikx, which has constant size ∣eikx∣=1.
For λ purely real, λ∈R, the function eλx, which is real, and has exponential growth (if λ>0) or exponential decay.
For λ general complex number, say λ=a+ib for a,b∈R, then eλx=eaxeibx has both oscillation factor eibx and exponential growth/decay eax.
If you give me a function f(x), we can try to write it as a linear combination of these easy to understand pieces eλx. Say
f(x)=∫Cc(λ)eλxdλ
The benefit for doing this? If a differential operator d/dx walk to it, we would have
(d/dx)f(x)=∫λc(λ)(d/dx)eλxdλ=∫λc(λ)λeλxdλ.
Of course, you would immediately complain:
what is this integration contour C? Is it along the real axis of λ? Is it along the imaginary axis of λ?
Why we can switch the order of integration and differentiation?
Let's keep these questions in our head, we will return to those.
So, what is Fourier transformation? If you go on wiki, or open some textbook, you see the following definition: given a function f(x) (with some condition on it), we can define
F(p):=∫x∈Rf(x)e−ipxdx.
This is called the Fourier transformation.
Let's throw in some input and see what we get.
Example 1
f(x)=cosh(x)=(ex+e−x)/2.
This function grows to infinity when x→±∞, indeed, when x→+∞, ex dominate, and x→−∞ we have e−x dominate. Either way, you blow up. Good luck when integrating ∫Rf(x)dx.
But, let's try to do the Fourier transformation anyway. We get
F(p)=∫xf(x)e−ipxdx=(1/2)∫Re(1−ip)xdx+(1/2)∫Re(−1−ip)xdx.
OK, we cannot continue.
Lesson 1
f(x) need to have sufficient 'decay' near infinity for the Fourier transformation to make sense. More precisely, a sufficient condition is that f(x) is 'absolutely integrable', which means
∫R∣f(x)∣dx<∞.
Given this condition, we know
∣F(p)∣=∣∫Re−ipxf(x)dx∣≤∫R∣e−ipxf(x)∣dx=∫R∣f(x)∣dx<∞.
so we are safe.
Example 2
The Gaussian. f(x)=e−x2. It decays pretty nicely in both directions.
Since we learned our lesson, we need to do a check first
∫Re−x2dx=π.
Great, it is finite.
Now, let's Fourier transform.
F(p)=∫e−ipx−x2dx=∫Re−(x−ip/2)2−p2/4dx=e−p2/4∫u∈−ip/2+Re−u2du
where we used the new variable u=−ip/2+x.
We can move the contour for u as long as the integral is convergent. Recall from last Wednesday's lecture, e−u2 decays fast to 0 when ∣u∣→∞ in the sectors arg(u)∈(−π/4,π/4) and arg(u)∈π+(−π/4,π/4). So, we are going to move the integration contour of u from the shifted real line −ip/2+R back to R. We get
∫u∈−ip/2+Re−u2du=∫u∈Re−u2du=π.
Thus, we get
F(p)=πe−p2/4.
Success!
Example 3
Let f(x)=1/(1+x2). Let's check that f(x) is absolutely integrable first
∫Rf(x)dx=∫CRf(z)dz=2πiResz=if(z)=2πi2i1=π.
where C+,R is the contour consist of two part
[−R,R]
a semi-circle in the upper half plane of radius R.
Equivalently, we can choose a different contour C−,R, which also consist of two part
[−R,R]
a semi-circle in the lower half plane of radius R.
Note that when we go around C−,R it goes around the singularity of f(z) at z=−i in the 'negative' (clockwise) direction, hence we get
∫C−,Rf(z)dz=(−2πi)Resz=−if(z)=−2πi−2i1=π.
Whew! the two minus sign cancels, we get the same answer.
Now, let's compute the little variation
F(p)=∫Re−ipxf(x)dx.
We first take the 'truncation' approximation, which recovers the original limit under the limit R→∞.
F(p)=R→∞lim∫−RRe−ipxf(x)dx.
Then, we try to 'close the contour', by connecting the point R to −R along some way. Due to this exponential factor e−ipz, it matters whether we close the contour in the upper half-plane, or the lower one. Indeed, we have
∣e−ipz∣=eRe(−ip(x+iy))=eRe(−ipx+py)=epy=epIm(z).
So,
if p≥0, to avoid ∣e−ipz∣ blow up to infinity, we need to keep Im(z) bounded from above on the contour.
if p≤0, to avoid ∣e−ipz∣ blow up to infinity, we need to keep Im(z) bounded from below on the contour.
Thus, for p≥0, we can complete the by the lower-half-semicircle C−,R. We get
(p≥0)F(p)=∫C−,R1+z2e−ipzdz=(−2πi)Resz=−i1+z2e−ipz=πe−p.
Similarly, for p≥0, we get
(p≤0)F(p)=∫C+,R1+z2e−ipzdz=(2πi)Resz=i1+z2e−ipz=πep.
We can write the result in a cool way as
F(p)=πe−∣p∣.
So when ∣p∣→∞, we see F(p)→0 very quickly.
Exercise
warm up:Does the function f(x)=1 admits Fourier transformation? Why? How about f(x)=1/(1+∣x∣)?
Find the Fourier transformation of the following functions.
f(x)={100<x<1else