You have already found this Fourier series without realising it!

In fact, it is correct to say that foralmostevery value of k. But you should look more carefully to see what happens if k=2 or k=–2. In those cases, the calculation of the integral is a bit different, and you should find that . Those are the only nonzero Fourier coefficients, so the Fourier series of is (an equation that you had already written down without noticing that it gives the answer to the problem).