# MultiFunction Plotter: Fourier Series

Description| Fourier Series| Loan RepaymentsWe will use the multifunction plotter to show how a square wave can be represented as a sum of sine waves using the Fourier series. A square wave of amplitude of 2 and length 2L can be written as

(See this page for details of the equation.)

In the multifunction plotter, we key in the functions as follows:

Function 1 = 0.5-mod(int(x),2)

Function 2 = 2/pi()*sin(pi()*x) +

2/pi()*sin(pi()*x*3)/3 +

2/pi()*sin(pi()*x*5)/5

Function 3 = B5 + 2/pi()*sin(pi()*x*7)/7 +

2/pi()*sin(pi()*x*9)/9 +

2/pi()*sin(pi()*x*11)/11 +

2/pi()*sin(pi()*x*13)/13 +

2/pi()*sin(pi()*x*15)/15 +

2/pi()*sin(pi()*x*17)/17

The first function generates a square wave of amplitude 1, the second adds the first 3 terms of the Fourier expansion while the third adds the next 7 terms.

The result is shown below. The first equation is plotted in orange, the second in pink and the third in blue.

## Contribution from Visitors

Alexander Weiner from Germany used the Multifunction plotter tool and an Active-X control to create this file which allows the generation of the Fourier series plot with a large number of coefficients. He has kindly agreed to share his work on this site.His file can be downloaded here.

A screen shot of his work is shown below, this shows a series with 100 coefficients. This is a nice illustration of Gibbs phenomenon, according to which the spikes at the discontinuities cannot be removed by increasing the number of coefficients.

## Also See:

Discrete Fourier TransformFilter Analysis and Simulation

FIR Filter Analysis