I was wondering if anyone could help me with this fourier series problem?
Expand the following function in Fourier cosine series: $f(x) = \sin(ax)$ $(0\le x \le \pi)$ , where $a$ is not an integer.
The answer I came up with is:
$\frac{1-\cos(a\pi)}{\pi}\left(\frac{1}{a}+2a \sum_{n=1}^{\infty}\frac{\cos(2nx)}{a^2-4n^2}\right)$
But the book I'm working from got:
$\sin(ax)=\frac{1-\cos(a\pi)}{\pi}\left(1+2a \sum_{n=1}^{\infty}\frac{\cos(2nx)}{a^2-4n^2}\right) +2a\frac{1+\cos(a\pi)}{\pi}\sum_{n=0}^{\infty}\frac{\cos[(2n+1)x]}{a^2-(2n+1)^2}$ for $(0\le x\le \pi)$
Thanks in advance :)