Some examples of Fourier approximation

The following are some pretty pictures to help visualize Fourier approximations, as discussed in Bill Faris' Math 511B (Real Analysis) course of spring 2006.

The context is real periodic functions on the interval from -π to π. For each of the eight functions below, the Fourier coefficients are estimated for n from -20 to 20:

Coefficient formula

The Nth approximation is

Function approximation
These approximations are plotted for N from 0 to 20, along with the original function.

Last, the Fourier coefficents cn are plotted vs. n, for n from -20 to 20. Color scheme:

All the computations here are done numerically using the following Python script: four1. In this script, Fourier coefficients are estimated using naive quadrature (on a mesh of 400 points uniformly spaced from -π to π), as familiar from freshman calculus. Plots were made by piping the output from the four1 script to the xgr program.

John Kerl, 2006-03-06


Here is the piecewise "hat" function which has value 1 between -π/2 and π/2, and 0 outside (with period 2 π).

Function and approximations:

Original function Approximations

Fourier coefficients:

Coefficients

Function data, approximation data, coefficient data.


Here is the function f(x)=x (with period 2 π).

Function and approximations:

Original function Approximations

Fourier coefficients:

Coefficients

Function data, approximation data, coefficient data.


Here is the function f(x)=π - |x| (with period 2 π).

Function and approximations:

Original function Approximations

Fourier coefficients:

Coefficients

Function data, approximation data, coefficient data.


Here is the function f(x)=1/(1+x2), with period 2 π.

Function and approximations:

Original function Approximations

Fourier coefficients:

Coefficients

Function data, approximation data, coefficient data.


Here is the function f(x)=cos(x).

Function and approximations:

Original function Approximations

Fourier coefficients:

Coefficients

Function data, approximation data, coefficient data.


Here is the function f(x)=cos(1.7x+0.4).

Function and approximations:

Original function Approximations

Fourier coefficients:

Coefficients

Function data, approximation data, coefficient data.


Here is a function which (very simplistically) represents John, Paul, George, and Ringo doing the "LAHH" of the "lah-lah-lah-LAHH" from Twist and Shout. This is f(x)=cos(4x) + cos(5x) + cos(6x) + 1.2cos(7x).

Function and approximations:

Original function Approximations

Fourier coefficients:

Coefficients

Function data, approximation data, coefficient data.


Here is the function f(x)=exp(-π x2), written with period 2 π.

Function and approximations:

Original function Approximations

Fourier coefficients:

Coefficients

Function data, approximation data, coefficient data.


Here is a photo, right-clicked from Dr. Faris' web site, along with its 2D discrete Fourier transform.

Technical notes:

Mathematical notes:

Image Transform magnitude Transform phase


See also: http://www.cs.unm.edu/~brayer/vision/fourier.html


← Back