Solution (source code)

= Solution

With <inner product> $\langle u,v\rangle=\int_{-\pi}^\pi u(x)v(x)dx$, <orthogonality> means
$$
\boxed{\int_{-\pi}^\pi e_n(x)e_m(x)\,dx=0\quad(m\ne n)}.
$$
The constant function has squared <norm> $2\pi$, and each sine or cosine has squared <norm> $\pi$. Thus the displayed family is orthogonal but not normalized; these different lengths determine the coefficient factors.