Fourier Series of Periodic Functions

A two parts tutorial on Fourier series. In the first part an example is used to show how Fourier coefficients are calculated and in a second part you may use an applet to further explore Fourier series of the same function.
Fourier series may be used to represent periodic functions as a linear combination of sine and cosine functions. If f(t) is a periodic function of period T, then under certain conditions, its Fourier series is given by:

Fourier series of a periodic function f(t).

where n = 1 , 2 , 3 , ... and T is the period of function f(t). an and bn are called Fourier coefficients and are given by

Formula for a0.

Formula for coefficients an.

Formula for coefficients bn.

Example : Find the Fourier series of the periodic function f(t) defined by

Formula for function f(t).

Solution to the above example
Coefficient a0 is given by

Calculation of a0.

Coefficients an is given by
Calculation of an.

And coefficients bn is given by
Calculation of bn.

A computation of the above coefficients gives
0 = 0 , an = 0 and bn = [ 2 / (n*pi) ] [ 1 - cos (n pi) ]
Note that cos (n pi) may be written as
cos (n pi) = (-1)
and that bn = 0 whenever n is even.
The given function f(t) has the following Fourier series
Fourier series of f(t).

Now below is an applet that may be used to explore the Fourier series of f(t) defined above
Interactive Tutorial
Your browser is completely ignoring the <APPLET> tag!

click on the button above "click here to start" and MAXIMIZE the window obtained.
1 - When the applet is first started, only f(t) (in blue) is displayed.
2 - Use the slider N to increases the number of terms in the series and see how the Fourier series (in red) gives a close approximation to function f(t) as the number of terms N in the series increases. Note also how the amplitude and period of the harmonics (in black) change with N. Although Fourier series are infinite, only few harmonics (terms in the series) are enough for a good approximation of f(t).
3 - You may zoom in and out and see closely what happens where f(t) is discontinuous.
4 - You may use the slider b to change the period of function f(t). Period T is given by T = 2 pi / b.