Fourier Series Explorer

There are three common parameterizations of a Fourier series. First is amplitude–phase form with A_n and \phi_n:

f(t)=\frac{a_0}{2}+\sum_{n=1}^{N} A_n\sin(2\pi n t+\phi_n)

Using \sin(\alpha+\beta)=\sin\alpha\cos\beta+\cos\alpha\sin\beta , each term expands as

A_n\sin(2\pi n t+\phi_n)=A_n\sin(2\pi n t)\cos\phi_n + A_n\cos(2\pi n t)\sin\phi_n

so the cosine–sine coefficients are a_n=A_n\sin\phi_n and b_n=A_n\cos\phi_n, yielding

f(t)=\frac{a_0}{2}+\sum_{n=1}^{N}\left(a_n\cos(2\pi n t)+b_n\sin(2\pi n t)\right)

Finally, the same series can be written using complex exponentials e^{i2\pi n t} with coefficients c_n:

f(t)=\sum_{n=-N}^{N} c_n e^{i2\pi n t}

where the conversions are c_n=\frac{1}{2}(a_n-i b_n) and c_{-n}=\frac{1}{2}(a_n+i b_n) for n>0.

Top-Bar Checkboxes

These checkboxes affect how the waveform is visualized and analyzed.

Presets: Intuition and Math

Each preset is a standard Fourier series with a specific pattern of harmonic coefficients. These patterns control the smoothness, symmetry, and sharpness of the waveform.

Global Controls (left column)

These settings shape the entire series before you edit any individual harmonic.

Partial Sums

Partial sums help visualize convergence and show how the waveform builds as harmonics are added.

Edit Mode

You can edit coefficients directly or via amplitude and phase.

Apply to All

These tools modify all harmonics at once to shape the spectrum quickly.

Audio bar (Play, f0, Volume, Remove DC)

The footer bar lets you hear the current Fourier series as a periodic sound. The shape of the waveform (and thus the timbre) is completely determined by your set of amplitudes A_n and phases \phi_n; nothing in the audio bar changes that shape.