Given the figure above i have to show that the Fourier series of the functions is: $$f(t)=\frac{1}{2}+\frac{6}{\pi}(cos\omega_0t -\frac{1}{3}cos3\omega_0t+\frac{1}{5}cos5\omega_0t-\frac{1}{7}cos7\omega_0t+...)$$
I know that the function is even so bn=0, so : $$a_n=\frac{4}{T}\int_{0}^{T/2} f(2) cosn\omega_0dt+\frac{4}{T}\int_{T/4}^{T/2} f(-1) cosn\omega_0dt$$ $$=\frac{4}{T}[\frac{sinn\omega_0t}{n\omega_0}]_{0}^{T/4}+\frac{4}{T}[\frac{-sinn\omega_0t}{n\omega_0}]_{T/4}^{T/2}$$
$$=\frac{4}{T}[\frac{sinn\omega_0\frac{T}{4}}{n\omega_0}-\frac{sin(0)}{n\omega_0}]+\frac{4}{T}[-\frac{sinn\pi}{n\omega_0}+\frac{sinn\frac{\pi}{2}}{n\omega_0}]$$
I don't know how to continue from here.
