Visual walkthrough — Full Fourier series — coefficients derivation
We build from zero. If a symbol shows up, it gets a picture first.
Step 0 — The vocabulary, as pictures
Before any derivation, three words, three pictures.
A function is just a height at each horizontal position . Imagine a wiggly curve drawn above a ruler.
"Periodic with period " means the curve repeats every distance . Here is the width of one full copy; is half that width, so the repeating window runs from (left edge) to (right edge).
The basis waves are pure ripples: and . The whole number counts how many full up-down wiggles fit inside the window : is one slow wiggle, twice as fast, and so on.

Our whole job: find the numbers .
Step 1 — "Integrate" means "signed area", and it is our measuring tool
WHAT. We will constantly write . That symbol just means: the area between the curve and the ruler, counting area above the line as positive and area below as negative.
WHY this tool and not another. We want a machine that can measure the average level of a wave and detect cancellation. A pure ripple spends exactly as much time above the line as below, so its signed area over a full window is . Signed area is the perfect "does this wave cancel itself?" detector — no other operation gives that clean zero.
PICTURE. Look at : the mint hump above cancels the coral dip below, total signed area . But a wave times itself, like , is never negative — it sits entirely above the line, so its area is genuinely positive. That difference is the engine of everything below.

Step 2 — Two different waves are "perpendicular" (orthogonality, seen)
WHAT. Take two different waves, multiply them point-by-point to get a new curve, then take its signed area. Claim: the answer is whenever the two waves differ.
WHY. This is the property that lets us isolate one coefficient at a time. If different waves did not cancel, projecting onto one would drag in contributions from all the others — hopeless. The parent note calls a "dot product"; orthogonality is the statement that our basis waves are mutually perpendicular axes.
PICTURE. The product wiggles in a way that has equal purple-above and purple-below area — total zero. Contrast with (same wave times itself), whose area is a genuine positive .

Why the always for sine×cosine? Sine is odd (mirror-flips upside down about ), cosine is even (mirror-symmetric). Odd×even is odd, and an odd curve's left area cancels its right area. See Even and odd functions for that reflection picture, and Orthogonality of functions for the general principle.
Step 3 — The projection trick, drawn
WHAT. Assume really equals its series. Multiply the whole equation by one chosen wave, say , then integrate.
WHY. Steps 1–2 guarantee that after integrating, every term dies except the one that matches our chosen wave. It is exactly like reading off one coordinate of a vector by dotting it with one axis — every perpendicular axis contributes nothing.
PICTURE. Picture an infinite row of terms. We shine the " filter" on all of them. Every mismatched term collapses to (grey); only the term lights up and returns .

- the constant term ::: dies by Step 1 (a lone cosine has zero area).
- the sine sum ::: dies by the "always " rule (sine×cosine).
- the cosine sum ::: one survivor at , worth .
Step 4 — Read off
WHAT. Only survived on the right, so the equation is now trivial to solve.
WHY. The messy infinite sum has been squeezed down to a single unknown times . Divide by and we are done.
PICTURE. All bars but one are flattened to zero; the single surviving bar has height . The area we measured on the left is that bar.

Step 5 — Read off (same trick, sine filter)
WHAT. Repeat Step 3–4 but multiply by instead.
WHY. Nothing changes conceptually: now the sine filter kills all cosines (odd×even) and all mismatched sines, leaving the lone .
PICTURE. Mirror image of Step 4: the sine filter picks out exactly one sine bar.

Step 6 — The constant term , and why we hid a
WHAT. Use the flat filter — multiply by — and integrate.
WHY. The flat line is the only wave that does not cancel over a period (Step 1), so integrating measures its sea level directly.
PICTURE. Every wiggle cancels to zero; only the constant slab of height over width survives, area .

Step 7 — The degenerate & edge cases (never leave a gap)
Four scenarios the reader will eventually meet:
(a) is odd (flips upside-down across ). Then is odd → all , including . Only sines survive. The square wave and do exactly this.
(b) is even (mirror-symmetric). Then is odd → all . Only cosines survive. This is the cosine half-range situation.
(c) is itself a basis wave, e.g. . Then the filter matches at exactly : , all else . The series of a building block is just that block.
(d) has a jump (like the square wave at ). The coefficients still exist (the integrals are finite), but the series converges to the midpoint of the jump there. That's the content of Convergence of Fourier series (Dirichlet conditions).

The one-picture summary
Everything on this page is one sentence: multiply by a wave, take the signed area, divide by — orthogonality guarantees only the matching amount survives.

Recall Feynman retelling of the whole walkthrough
You are handed a song mixed from many tuning forks, each humming a steady note (our waves). You want to know how loud each fork was (the coefficients). Here is the trick you just watched in pictures: hold up one matching fork next to the song and take the "running average" over a full beat. Every other fork's note spends as much time pushing up as down, so it averages to nothing and disappears. Only the fork that matches yours reinforces itself and leaves a clean, positive amount behind — that amount, scaled by , is its coefficient. Do it once with each fork (each cosine, each sine, and the silent "flat" fork for the average) and you have recovered every ingredient of the song. That is all a Fourier coefficient is: the volume of one pure tone, measured by cancellation.
Recall Quick self-test
Why does multiplying by isolate ? ::: Orthogonality: every other wave times integrates to , only survives (giving ). Why is the average of equal to and not ? ::: The constant term is written ; the average of a period equals that constant, so average . If is odd, which coefficients vanish? ::: All the cosine coefficients (including ); only sines remain.
Related next steps: Complex (exponential) Fourier series (same trick, one wave ), Parseval's theorem (the "energy" version of orthogonality), and Separation of variables for the heat equation (where these coefficients become the initial data).