Compute the Fourier series of the function on using the trig identities