ECEdge

Exam: GATE 2027 exams are on 6, 7, 13, 14, 20 and 21 February 2027. Official GATE 2027 site

Fourier series visualiser: build a square wave from sines

Add sine waves one at a time and watch them build a square, triangle or sawtooth wave.

How it works

  • Any periodic signal is a sum of sines at whole multiples (harmonics) of its fundamental frequency.
  • A square wave uses only odd harmonics, with amplitudes falling as 1/k.
  • A triangle wave also uses odd harmonics, but they fall as 1/k², so it converges much faster.
  • Near a sudden jump the sum always overshoots by about 9%: the Gibbs phenomenon.

Try this

  1. Choose Square and slide from 1 to 50 terms: the overshoot at each edge never goes away.
  2. Switch to Triangle: three terms already look close.
  3. Compare how much power the first term alone carries for each waveform.

Common questions

Why does a square wave only have odd harmonics?

It has half-wave symmetry: the second half of each period is the first half flipped. That cancels every even harmonic.

Where is this used?

Everywhere signals are analysed: audio, power electronics (harmonic distortion), communications and filter design.

More simulators