I tried to determine the Fourier series of the function:
$$ f(x) = \begin{cases} x+\pi, & -\pi \le x < -\frac{\pi}{2} \\ \frac{\pi}{2}, & -\frac{\pi}{2} \le x <\frac{\pi}{2} \\ \pi-x, & \frac{\pi}{2} \le x <\pi \end{cases}$$
on Wolfram (LINK) Alpha and for some reason there are no $\cos{4x}$, $\cos{8x},..$ terms. When calculating the coefficients of this series by hand I get: $$a_n =\frac{2 (-1)^{n-1}}{\pi n^2} \\b_n=0 $$
Which sort of reproduces what Wolfram Alpha says but I am not sure why terms are missing and why some of the coefficients don't match. Any ideas?
The terms are there but have coefficients $0$, so they're omittted.
Your Wolfram results also lists no $\sin(nx)$ terms, also corresponding to your $b_n=0$.
The $a_n$ that don't match must be your own calculation errors.