Given f(t) = cos(t) for 0 < t < pi and f(t)= 0 for -pi<t<0

Find it's fourier series?

In the solution it has 1/2 cos(t) + 2/pi (n/n^2-1) for no =2,4,6 ...

My only concern is how did they get 1/2 cos(t)???

Is the 1/2 cos(t) just a "fix up" term so that it covers aras such as t=0, t=pi etc ??

Thanks