A wild claim, and why it should bother you
Here is the claim this whole rung rests on: take a function that repeats with period 2L — a square wave that snaps between +1 and -1, the jagged sawtooth of a violin string, anything periodic, however cornered and ugly — and it equals an infinite sum of plain sines and cosines. Not approximately. Equal, where the function is well-behaved. That a smooth, rounded sine could ever add up to a sharp vertical jump ought to feel impossible the first time you hear it, and your unease is healthy: it is exactly the subtlety we will have to be honest about later.
This idea — the trigonometric Fourier series — reshaped physics and engineering precisely because so many of the systems we care about are linear and respond simply to a single pure tone. A pendulum, an electrical circuit, a heated rod, a vibrating membrane: feed each a single sine and it answers with a clean sine of the same frequency. So if you can shatter a complicated input into its sine pieces, you can solve for each piece on its own and add the answers — the superposition principle you met when solving linear differential equations. Fourier series is the tool that does the shattering.
The catalogue of harmonics
First, which sines and cosines are even allowed in the sum? Only those that themselves repeat over the same period 2L, otherwise the total would not be periodic. On the interval from -L to L those are cos(n pi x / L) and sin(n pi x / L) for n = 1, 2, 3, ..., plus a constant term for n = 0. The n = 1 wave fits exactly one full ripple into the period; this slowest wave sets the fundamental frequency. The n = 2 wave fits two, n = 3 fits three, and so on — these faster ones are the harmonics. So the series is a weighted catalogue, one knob per harmonic.
Writing the catalogue out, the trigonometric Fourier series of a function f with period 2L is f(x) = a_0/2 + sum from n = 1 to infinity of [ a_n cos(n pi x / L) + b_n sin(n pi x / L) ]. The constant a_0/2 is the average level of f over one period — the offset around which everything oscillates. Each a_n says how much of the n-th cosine is mixed in, each b_n how much of the n-th sine. The whole problem of 'finding the Fourier series' boils down to one thing: pinning down those numbers a_0, a_1, b_1, a_2, b_2, ... — the amounts of each harmonic. The list of those amounts is the function's discrete spectrum, its fingerprint in frequency.
Orthogonality: the trick that lets us read one knob at a time
There seem to be infinitely many unknowns tangled together in that sum — how could we possibly solve for just b_7 without first knowing all the others? The escape is one beautiful fact called orthogonality. Take any two different waves from our catalogue, multiply them together, and integrate over one full period: the answer is exactly zero. For example the integral from -L to L of cos(2 pi x / L) sin(3 pi x / L) dx = 0, and so is the integral of cos(2 pi x / L) cos(5 pi x / L). Only when you multiply a wave by ITSELF does the integral come out nonzero (it equals L). The cosines and sines are mutually 'perpendicular' in the sense of integration.
Now watch the trap spring. Suppose f really is that infinite sum, and we want b_7. Multiply BOTH sides by sin(7 pi x / L) and integrate over one period. On the right, term by term, every product is one catalogue wave times sin(7 pi x / L) — and by orthogonality every one of those integrals collapses to zero, except the single term where the matching b_7 sin(7 pi x / L) meets its own twin. That lone survivor integrates to b_7 times L. The infinite traffic jam clears instantly, leaving one equation in one unknown. Orthogonality is the surgical knife that isolates each coefficient.
The Euler formulas: the recipe in three integrals
Run that isolation move once for cosines and once for sines and you have derived the whole recipe — the Euler formulas (also called the Euler-Fourier formulas) for the coefficients. They are just three definite integrals, each a projection of f onto one axis of the orthogonal family. Notice they ask only for f itself: you integrate the given function against a known wave, and out drops a number. No solving, no guessing — each coefficient is computed directly, in one honest definite integral.
Period 2L. Trig Fourier series:
f(x) = a_0/2 + sum_{n>=1} [ a_n cos(n pi x / L) + b_n sin(n pi x / L) ]
EULER (Euler-Fourier) FORMULAS -- each coefficient is one integral:
a_n = (1/L) * integral_{-L}^{L} f(x) cos(n pi x / L) dx (n = 0, 1, 2, ...)
b_n = (1/L) * integral_{-L}^{L} f(x) sin(n pi x / L) dx (n = 1, 2, 3, ...)
-> a_0 = (1/L) * integral_{-L}^{L} f(x) dx = 2 * (average of f)
which is why the constant term is written a_0/2.
WHY the 1/L: integral_{-L}^{L} cos^2(n pi x / L) dx = L (a wave dotted with itself),
every other cross term integrates to 0 (orthogonality).A huge amount of labour evaporates if you first check the symmetry of f, an idea worth its own term: even and odd functions. If f is even (a mirror across the vertical axis, like cos), every b_n integrand is odd and integrates to zero over the symmetric interval — so an even function is built from cosines alone. If f is odd (like sin, with f(-x) = -f(x)), every a_n vanishes and only sines survive. Recognizing this halves the work before you compute a single integral, and it is the seed of the half-range expansion you will use to make a Fourier series fit a non-periodic problem.
A worked picture: assembling the square wave
Let us actually build something. Take the square wave of period 2L that equals -1 on the left half (-L to 0) and +1 on the right half (0 to L). It is odd, so every cosine coefficient a_n is zero before we lift a finger — only sines appear. Plugging into the sine Euler formula and doing the elementary integral, the surviving coefficients are b_n = 4/(n pi) for odd n and exactly zero for even n. So the square wave is (4/pi) [ sin(pi x / L) + (1/3) sin(3 pi x / L) + (1/5) sin(5 pi x / L) + ... ] — odd harmonics only, each weaker than the last.
Picture the partial sums stacking up. The first sine alone is a fat rounded hump — a crude blob that already has the right up-down rhythm. Add the third harmonic and the hump squares off a little at its shoulders. Add the fifth, the seventh, and the flat top flattens, the sides steepen, the corners sharpen. Each new harmonic is a fine chisel correcting the leftover error of the ones before. Keep going and the rounded blob marches steadily toward the crisp rectangular wave. This is the whole philosophy in one image: complexity assembled from simple tones, each tone fixing what the cruder ones got wrong.
What you now hold, and where it goes next
- Identify the period 2L and, if you like, the symmetry: even f -> cosines only, odd f -> sines only. This can kill half the integrals before you start.
- Compute the coefficients from the Euler formulas: a_n = (1/L) integral of f cos(n pi x / L) over one period, b_n = (1/L) integral of f sin(n pi x / L). Each is one definite integral against a known wave.
- Assemble the series f(x) = a_0/2 + sum [ a_n cos + b_n sin ], and read the list of coefficients as the signal's spectrum — how much energy sits at each harmonic.
That is the engine of the entire rung. Once you can decompose a periodic input into harmonics, you can solve linear physics one harmonic at a time and superpose — which is exactly how the heat equation in a rod and the wave equation on a string get cracked open later in this volume. The same projection idea, freed from sines and cosines, becomes the complex exponential series (one tidy formula instead of two), then the Fourier transform for signals that never repeat, and finally the family of integral transforms that turn calculus problems into algebra. You have just learned to hear a function as a chord — and to name every note in it.