Fourier cosine coefficients of a sine mode (source code)

= Fourier cosine coefficients of a sine mode
{c}
{title2=$a_n=4m/[\pi(m^2-n^2)]\text{ when }m,n\text{ have opposite parity}$}

For a positive integer $m$, take $f(x)=\sin(mx)$ on $0<x<\pi$ and form its <half-range Fourier cosine series>. The product-to-sum identity gives
$$
a_n=\frac1\pi\left[\frac{1-(-1)^{m+n}}{m+n}+\frac{1-(-1)^{m-n}}{m-n}\right],\qquad n\geq0,\ n\ne m.
$$
Thus $a_n=4m/[\pi(m^2-n^2)]$ for opposite parity and zero for the same parity. The exceptional integral $a_m=(2/\pi)\int_0^\pi\sin(mx)\cos(mx)dx$ is zero. The constant term is $a_0/2$, not $a_0$. These coefficients represent the even periodic extension, not the original sine wave on negative arguments. Their quadratic decay gives <absolute convergence>.