the Fourier series
/ Fourier: FOOR-ee-ay /
A single pure tone is a sine wave — smooth, endlessly repeating. But the sound of a violin, or a square electrical pulse, or the lumpy temperature profile along a bar, is anything but a pure tone. Joseph Fourier's astonishing claim was that almost ANY repeating shape, however jagged, can be built as a sum of pure sine and cosine waves of higher and higher frequency, each weighted just right. The Fourier series is that recipe: a periodic function written as an infinite sum of sines and cosines.
For a function f with period 2L, the series is f(x) = a_0/2 + sum over n of [ a_n cos(n pi x / L) + b_n sin(n pi x / L) ]. The constant term a_0/2 is the average value; each cosine and sine of frequency n adds a finer ripple. The coefficients a_n and b_n say HOW MUCH of each frequency is present — they are computed by the Fourier coefficient formulas, which work because the sines and cosines are mutually orthogonal, so each one can be 'measured' without interference from the others. Low n captures the broad shape; high n captures sharp corners and fine detail.
Fourier series is the natural partner of separation of variables. When you separate a PDE the spatial eigenfunctions turn out to be exactly sines and cosines, and superposing the modes to fit an initial condition IS expanding that initial condition in a Fourier series — the coefficients are the amounts of each mode you need. It is also a foundational tool far beyond PDEs: signal processing, music, image compression, and quantum mechanics all live on the idea that a complicated wave is a sum of simple ones. Honesty check: the series equals f where f is nice, but at jumps it converges to the midpoint and overshoots (the Gibbs phenomenon), and convergence comes in several flavours.
A square wave (value +1 on the first half of the period, -1 on the second) has the Fourier series (4/pi)[ sin x + (1/3) sin 3x + (1/5) sin 5x + ... ] — only odd sine harmonics, with amplitudes dying like 1/n. Add the first few terms and a recognisable square shape emerges, with wiggles that the higher terms iron out (except near the jumps).
Slowly-decaying coefficients (here 1/n) are the signature of sharp corners and jumps in the function.
A Fourier series represents a PERIODIC function. If you feed it a function only defined on an interval, it actually represents the PERIODIC EXTENSION of that function — which can introduce artificial jumps at the interval ends. Choosing sine, cosine, or full series amounts to choosing odd, even, or general periodic extension.