Fourier orthogonality (source code)

= Fourier orthogonality
{c}
{title2=$\frac1{2\pi}\int_0^{2\pi}e^{i(n-m)t}\,dt=\delta_{nm}$}

The <complex exponential functions> $e^{int}$, for <integers> $n$, are <orthogonal> under the normalized <integral> <inner product> over a complete <period>. If $n=m$, the integrand $e^{i(n-m)t}$ is one; otherwise its <antiderivative> has equal endpoint values, giving zero. For the real modes, $\int_{-\pi}^{\pi}\cos^2(nt)\,dt=\int_{-\pi}^{\pi}\sin^2(nt)\,dt=\pi$ for $n\geq1$, while every mixed sine-cosine integral and every unequal-frequency pairing vanishes.

This makes the coefficient formulas useful: multiply a <trigonometric polynomial> by one mode and integrate, and all other modes cancel. For $f(x)=1/2+\cos x+\tfrac12\sin(2x)$, integration against $\cos x$ gives $\pi$, and against $\sin(2x)$ gives $\pi/2$, recovering $a_1=1$ and $b_2=1/2$. Division by the squared <norm> of the mode supplies the normalization. A full <period> matters; truncating the integration interval generally destroys these cancellations.