So the task is to integrate $${\frac{1}T}\int_0^{2\pi}tf(t)\,dt$$ where $T=2\pi$ and $$f(t) = \left\{ \begin{array}{ll} -t^2 & \quad -\pi < t < 0, \\ t^2 & \quad 0 < t < \pi \end{array} \right.$$ So I got $$-{\frac{1}{2\pi}}\int_0^{2\pi}tf(t)\,dt= -{\frac{1}{2\pi}}\left({\int_0^{\pi}t^3\,dt}-{\int_{-\pi}^0 t^3\,dt}\right)=-{\frac{1}4}\pi^3.$$ Since $f(t)$ is $2\pi$ periodic, I thought that $${\int_\pi^{2\pi}f(t)\,dt}={\int_{-\pi}^0 f(t)\,dt}.$$ When I looked up the solution, however, the integral was handled differently $$-{\frac{1}{2\pi}}{\int_0^{2\pi}tf(t)\,dt}=-{\frac{1}{2\pi}}\left({\int_0^\pi t^3\,dt} - {\int_\pi^{2\pi}t(t-2\pi)^2\,dt}\right)={\frac{\pi^3}{12}}.$$ Obviously, the result differs. I do understand, why it says $(t-2\pi)^2$ (shifting from $[\pi;2\pi]$ to $[-\pi;0]$).
As I stated above, I did believe that it does not matter whether I integrate $f(t)$ from $\pi$ to $2\pi$ or from $-\pi$ to $0$ (because of the periodicity, also considering $f(t)$ being uneven).
So where is my mistake causing the first result to be wrong?