# Fourier Series: Square Wave

## Formula

The square wave has a faster decay towards higher partials than the sawtooth. It can be found in spectra of wind instruments.

• only odd harmonics

• constant sign

\begin{equation*} X(t) = \frac{4}{\pi} \sum\limits_{i=0}^{N} \frac{\sin(2 \pi (2i+1)ft)}{(2i + 1)} \end{equation*}

## Interactive Example

Pitch (Hz):

Number of Harmonics:

Output Gain:

Time Domain:

Frequency Domain:

Like the sawtooth, the square wave shows the occurrence of ripples at the steep edges of the waveform. The higher the number of partials, the denser the ripples. This is referred to as the Gibbs phenomenon.