Fourier Series

Decompose any periodic function into sines and cosines

Any Periodic Function = Sum of Sines

Even a wave with sharp corners, like a square wave, is secretly a sum of smooth sine waves. Add them one at a time and watch the corners appear.

Building a Square Wave

Raise the Number of Terms slider and watch the flat tops and steep edges sharpen. Turn on Show Harmonics to see the individual sine waves, and look for the small overshoot that never goes away at each jump.

Square Wave Fourier Series:

f(x) = (4/π) [sin(x) + sin(3x)/3 + sin(5x)/5 + sin(7x)/7 + ...]

Only odd harmonics are present. More terms = sharper corners.

Go deeper:Any Periodic Function = Sum of Sines

One of the most remarkable discoveries in mathematics: any periodic function can be written as a sum of sine and cosine functions. This is the Fourier Series, named after Joseph Fourier who developed it while studying heat conduction.

This means that complicated waves like square waves, sawtooth waves, or even the waveform of a musical instrument can all be broken down into simple sinusoidal components.

Go deeper:The Gibbs Phenomenon

Notice the "ringing" or overshoot near the discontinuities? This is called the Gibbs phenomenon. No matter how many terms you add, there will always be about a 9% overshoot at jump discontinuities.

This is a fundamental property of Fourier series when approximating discontinuous functions - smooth sine waves struggle to perfectly capture instantaneous jumps.

Go deeper:The Mathematical Form

The Fourier series of a periodic function f(x) with period 2L is:

f(x) = a₀/2 + Σ[aₙcos(nπx/L) + bₙsin(nπx/L)]

Where the coefficients are:

aₙ = (1/L) ∫f(x)cos(nπx/L)dx
bₙ = (1/L) ∫f(x)sin(nπx/L)dx
Go deeper:Why This Works: Orthogonality

The key mathematical insight is that sine and cosine functions at different frequencies are orthogonal - when you multiply two different harmonics and integrate over a period, you get zero:

∫sin(mx)sin(nx)dx = 0 when m ≠ n

This orthogonality allows us to extract each coefficient independently by multiplying by the corresponding sine or cosine and integrating.

Go deeper:Real-World Applications

Audio & Music: Musical timbre is determined by the harmonic content - a trumpet and flute playing the same note have different Fourier coefficients.

Signal Processing: Filtering, compression, and analysis of signals all rely on the Fourier representation.

Heat & Vibration: Fourier developed the series to solve the heat equation - each term decays at its own rate.

Quantum Mechanics: Wave functions are decomposed into energy eigenstates using similar techniques.

Spot a mistake or have an idea?

Search