Fourier Cosine and Sine Series
Half-range series are choices of extension, not new coefficient rules
A half-range problem supplies f(x) only on 0 less than x less than L. To use Fourier orthogonality on a symmetric interval, define the missing negative side.
An even extension satisfies f(-x) = f(x) and contains cosine modes; an odd extension satisfies f(-x) = -f(x) and contains sine modes.
On the positive interval, either expansion can represent the supplied function, but they encode different behavior across the origin.
For the even extension, f(x) is represented by a cosine series with a constant term and cosine coefficients obtained from integrals over the positive interval.
For the odd extension, f(x) is represented by a sine series with sine coefficients and no constant term.
The basis functions are cos(n pi x/L) and sin(n pi x/L), so the interval length L belongs in every mode argument.
Choose the extension from the intended symmetry or boundary condition rather than from a visual preference. A fixed-zero endpoint is naturally compatible with an odd continuation; a zero-slope symmetry plane is naturally compatible with an even continuation.
If the supplied function is nonzero at the origin, an odd extension has a jump there, which affects convergence near that endpoint without invalidating the interior expansion.
Do not confuse this topic with a full-range Fourier series, a Fourier transform, or a Fourier integral. The defining feature here is a function initially known only on a finite positive interval and a deliberate even or odd continuation.
For f(x) = x on 0 < x < pi, which coefficient formula is correct for its half-range sine series?
For f(x) = x on 0 < x < pi, what is the first cosine coefficient a1 in its half-range cosine series?