even and odd extensions
A function defined only on the half-interval 0 to L is missing half its domain. Before you can hand it to a Fourier series — which needs a full periodic function — you must decide how to fill in the missing left half from -L to 0. The two cleanest choices are to reflect it like a mirror (even extension) or to flip it upside-down across the origin (odd extension). Your choice secretly decides whether you get a cosine series or a sine series.
The even extension copies the function across the vertical axis: f(-x) = f(x), folding it back like a butterfly's wings. An even function has only cosine terms, so its Fourier series is a cosine series — and because cosines have zero slope at the ends, this matches Neumann (insulated) boundary conditions. The odd extension flips the sign as it reflects: f(-x) = -f(x), so the graph spins 180 degrees about the origin. An odd function has only sine terms, giving a sine series — and sines vanish at the ends, matching Dirichlet (zero-value) boundary conditions. Same original data on 0 to L, two different completions, two different series.
This is the secret behind 'half-range' Fourier expansions: you are free to choose the extension that respects your boundary conditions, then run the ordinary Fourier machinery on the extended, periodic function. The choice has consequences for smoothness too. The even extension usually meets itself continuously at x = 0 (no jump), so its series converges nicely; the odd extension can create an artificial jump there if f(0) is not zero, triggering Gibbs ringing. Picking the extension that matches both the boundary conditions AND the function's end values gives the best-behaved series.
Take f(x) = x on 0 to L. Its odd extension is the straight line y = x on -L to L (continuous through the origin, but jumping at x = L when made periodic). Its even extension is the V-shape y = |x| (a corner at the origin, but continuous when made periodic). The odd one gives a sine series with a jump-driven Gibbs spike at x = L; the even one gives a smoother, faster-converging cosine series.
Even extension matches Neumann (cosines); odd extension matches Dirichlet (sines) — and affects how cleanly the series converges.
The choice of extension is dictated by the boundary conditions, not by taste: Dirichlet data wants the odd extension (sines), Neumann data wants the even extension (cosines). Picking the wrong one gives a series satisfying the wrong boundary condition.