⚠ Learning tool: waveforms are drawn by a browser script and may be imperfect
(floating-point rounding, finite-term truncation/Gibbs, rendering quirks). Treat as a visual aid, not an
authoritative reference; cross-check against a textbook or established software (Wolfram, MATLAB, SciPy).
Reference: Wikipedia — Fourier series.
Original formulation: Fourier, J. (1822), op. cit. Modern derivation in
Tolstov, G. P. (1976). Fourier Series, Dover, §1.
Preset:
Move any slider and the synthesized wave reshapes instantly. Press a preset to load coefficients that approximate
the named waveform using only N = 5 harmonics — useful for comparing how close 5 terms gets you.
Frequently asked questions
What can I actually do on this page?
You set the Fourier coefficients yourself — a₀, a₁...a₅ and b₁...b₅ — and watch the wave they build. It is a sandbox: try to recreate a square or sawtooth from scratch, or invent a shape no standard wave makes. The presets load the recipes for the classic waves so you can reverse-engineer them.
What is the difference between the a-n and b-n coefficients?
The a-n multiply cosines and the b-n multiply sines. Cosines are 'even' (symmetric about t=0) and sines are 'odd' (antisymmetric). A wave that is symmetric needs only cosines; an antisymmetric one needs only sines. Most real waves mix both.
How would an engineer find these coefficients for a real signal?
By integration: aₙ and bₙ each come from multiplying the signal by the matching cosine or sine and averaging over one period (the integral formulas shown on the page). In practice this is done numerically with a Fast Fourier Transform — the same idea, computed in milliseconds.
Why does a₀ get divided by two?
a₀/2 is the average value of the signal — its DC offset. The factor of two is a bookkeeping convention that makes the integral formula for a₀ look like all the others. Slide a₀ here and watch the whole wave shift up or down.
What is this used for beyond the classroom?
This is the core of audio synthesis, vibration analysis, and signal compression. JPEG and MP3, for example, store sounds and images as Fourier-like coefficients and simply throw away the ones too small to notice — which is exactly the kind of intuition you build by sliding these bars.