This problem was taken from Stein's Introduction to Fourier analysis, and it goes like this:
Let $f$ be a $2\pi$-periodic Riemann integrable function defined on $\mathbb{R}$.
Show that the Fourier series of the function $f$ can be written as:
$$f(\theta)\sim \widehat{f}(0)+\sum_{n \geq 1}[\widehat{f}(n)+\widehat{f}(-n)]\cos(n\theta)+i[\widehat{f}(n)-\widehat{f}(-n)]\sin(n\theta)$$
My attempt:
$$f(\theta)\sim \sum_{n=-\infty}^{\infty}\widehat{f}(n)e^{-in\theta}=\sum_{n=0}^{\infty}[\widehat{f}(n)+\widehat{f}(-n)]e^{-in\theta}$$
But from there I don't know how to arrange this sum to have the result, well in fact I don't know why this term $\widehat{f}(n)-\widehat{f}(-n)$ appear.
I don't think your step is correct, rather $$ \sum_{n=-\infty}^{\infty}\widehat{f}(n)e^{-in\theta}=\widehat{f}(0) + \sum_{n=1}^{\infty}[\widehat{f}(n)e^{-in\theta}+\widehat{f}(-n)e^{in\theta}]$$