The fourier series I obtained was

$$x(\pi-|x|)=\frac{4}{\pi}\sum\_{n\in\mathbb{N}}\frac{(-1)^{n+1}+1}{n^3}\sin(nx),\tag1$$

which I checked is correct by plotting RHS and LHS. I'm not sure what to set $x$ as when evaluating the RHS, since I often get $0$ due to the sine.

I'm also having trouble converting the denominator in the sum fom $n^3$ to $(2n-1)^3$.

Some have noted that my Fourier expansion is wrong. I'm not sure about its correctness but based on the plots on Maple, it seems correct. The blue is the original function and the red is the Fourier series.

[![enter image description here](https://i.stack.imgur.com/lAKpd.jpg)](https://i.stack.imgur.com/lAKpd.jpg)