Sums of Sine Waves with Several Step Sizes (Sawtooth or Square Approximations)

Initializing live version
Download to Desktop

Requires a Wolfram Notebook System

Interact on desktop, mobile and cloud with the free Wolfram Player or other Wolfram Language products.

This Demonstration shows the functions , for values of that run from 1 to the maximum frequency in steps of size in the bottom plot, and their sum in the top plot. This illustrates an approximation of standard waves (sawtooth, square, etc.) by adding sine waves (Fourier method).


Adding 30 waves with step size , the graph of the sum approximates a sawtooth curve:

With 30 waves and step size , the graph of the sum approximates a square wave:

With 15 waves and step size :

In general, for the step size :


The step size parameter gives interesting artificial waves such as natural harmonics.


Contributed by: Arthur Stammet (March 2011)
Open content licensed under CC BY-NC-SA



Feedback (field required)
Email (field required) Name
Occupation Organization
Note: Your message & contact information may be shared with the author of any specific Demonstration for which you give feedback.