= Solution
Assume $L>0$. For any nonzero integer $k$,
$$
\int_{-L}^{L}\cos(k\pi x/L)\,dx
=\frac{L}{k\pi}[\sin(k\pi x/L)]_{-L}^{L}=0.
$$
For $m\ne n$, the product-to-sum identity expresses the integrand as one half the sum of cosines with nonzero frequencies $m-n$ and $m+n$, so the integral is zero. For $m=n>0$, use $\cos^2u=(1+\cos2u)/2$ to get $L$. Finally, for $m=n=0$ the integrand is one. The complete <Fourier orthogonality> formula is
$$
\boxed{\int_{-L}^{L}\cos\frac{m\pi x}{L}\cos\frac{n\pi x}{L}\,dx
=\begin{cases}2L,&m=n=0,\\L,&m=n\geq1,\\0,&m\ne n.\end{cases}}
$$
The constant mode has twice the squared norm of a positive-frequency <cosine> mode.
Back to article page