let $-\pi \leq x\leq \pi$ and $$f(x)=\begin{cases}-x-\pi, & \text{ if} -\pi \leq x\leq -\pi/ 2\\ \;\;\;x, & \text{ if } -\pi/2 \leq x\leq \pi/2\\ -x+\pi, & \text{ if } \pi/2 \leq x\leq \pi\end{cases}$$
it's easy to see that $f$ is odd so $a_0=a_n=0$ and $b_k=2\int _0^{\pi}f(x)\sin(kx)$for all positive integers $n$.
To compute $b_k$ I use the following auxiliar computations: aux 1, aux2
and get $b_k=\frac{4}{k^2}\sin \left(\frac{k\pi}{2}\right)$.
So the fourier series should be $$\sum _{k=1}^{+\infty}\frac{4}{k^2}\sin \left(\frac{k\pi}{2}\right)\sin(kx)$$ but when I check for $x=\pi /2$ I get $\pi ^2/2$ instead of $\pi /2$. It also fails for $x=1$ which seems to yield $\pi$ (I did a finite sum for this one because wolfram alpha cant find the sum of the series). And for $x=\pi$ it gives $0$ instead of $\pi$. EDIT: I just realised it supposed to give $0$ instead of $\pi$, so there's nothing wrong at $x=\pi$. Second EDIT: I did a mistake in the input in wolfram alpha. I now updated the links
what am I doing wrong?