Loading [MathJax]/jax/output/CommonHTML/jax.js
up to Schedule & Notes

Real Fourier Series

Wavenumbers

The cosine function coskx has angular wavenumber k.

k is the number of cycles per 2π (see the figures below).

If a 1-dimensional image, I(x), has width N and we want a single cycle to occur across the image, we can map

x2πxN

So that, for x[0,N), the corresponding 2πxN[0,2π) and cos2πxN goes through one cycle.

Fourier basis functions

Fourier realized that any periodic or bounded-domain function can be written as a linear combination of sine and cosine functions at different frequencies.

The Fourier basis functions are

sinkx,coskx for k0,1,2,

sin0x,cos0x,sin1x,cos1x,sin2x,cos2x,sin3x,cos3x,

These basis functions are orthogonal. For all mn:

sinmxsinnx=0cosmxcosnx=0

and

sinmxcosnx=0sinmxcosmx=0

Projection onto basis functions

Let f(x) be an arbitrary function that is periodic in [0,2π). (If f(x) is instead periodic in [0,N), we reparameterize it as f(2πxN).)

We can project f(x) onto all of these basis functions and get the Real Fourier Series:

f(x)=k=0akcoskx  +  k=0bksinkx=a0+k=1akcoskx  +  k=1bksinkx

The ak and bk show how much of coskx and sinkx are present in f(x).

To get ak and bk, project f(x) onto the basis functions:

ak=f(x)  coskxcoskx  coskx=2π0f(x)coskx dx2π0cos2kx dx=2π0f(x)coskx dxπ=1π2π0f(x)coskx dxbk=f(x)  sinkxsinkx  sinkx=2π0f(x)sinkx dx2π0sin2kx dx=2π0f(x)sinkx dxπ=1π2π0f(x)sinkx dx

Note that

a0=2π0f(x) dx2πb0=0

So a0 is the average of f(x) on the interval [0,2π].

Alternative interpretation

Given acosx+bsinx, what is the corresponding Acos(xθ) ?

Recall that Acos(xθ)=(Acosθ)cosx+(Asinθ)sinx.

So, given the a and b in acosx+bsinx, we can find the A and θ of the corresponding Acos(xθ):

a=Acosθb=Asinθa2+b2=A2(cos2θ+sin2θ)=A2A=a2+b2ba=AsinθAcosθ=tanθθ=arctanba

This works for any wavenumber, k.

So the kth sin/cos pair can be thought of as a shifted, modulated sinusoid of wavenumber k.

akcoskx+bksinkx=Akcos(kxθk)
where ak=Akcoskθk and bk=Aksinkθk.

In other words, it's a single sinusoid where Ak=a2k+b2k is the amplitude and θk=arctanbkak is the phase shift.

up to Schedule & Notes