Hello everyone

I am considering the following equation:

$\displaystyle f(x) = - \sin( x)^2 - \cos( x)$

Which looks like this:

And need to expand it in terms of a Fourier series. I know the above function is continuous, differentiable and $\displaystyle 2 \pi$-periodic, hence there should exist a convergent Fourier series of the form:

$\displaystyle \frac{1}{2} a_0 + \sum \limits_{n=1}^{\infty}[a_n \cos(nx) + b_n \sin(nx)]$

With coefficients given as:

$\displaystyle a_n = \frac{1}{\pi} \int \limits_{- \pi}^{\pi} f(x) \cos(n x) \mathrm{d}x$

$\displaystyle b_n = \frac{1}{\pi} \int \limits_{- \pi}^{\pi} f(x) \sin(n x) \mathrm{d}x$

However I get, in both cases, $\displaystyle a_n = 0$ and $\displaystyle b_n=0$. The only thing I find to be non-zero is $\displaystyle a_0 = -1$.

Can anybody help me realizing where I am going wrong?

Kind Regards