In this excercise we show how the symmetries of a function imply certain properties of its Fourier coefficients. Let $f$ be a 2$\pi$ Riemann integrable function defined on $R$.
(a) Show that the Fourier series of the function $f$ can be written as $$f(\theta) \thicksim \hat{f}(0) + \sum_{n\ge1}[\hat{f}(n) + \hat{f}(-n)]\ cos n\theta + i[\hat{f}(n) - \hat{f}(-n)]\ sin n\theta. $$
(b)Prove that if $f$ is even, then $ \hat{f}(n)= \hat{f}(-n) $ , and we get a cosine series.
(c)Prove that if $f$ is odd, then $ \hat{f}(n)= -\hat{f}(-n) $, and we get a sine series.[This hint is helpful here Series Of Sines.
(d)Suppose that $f(\theta + \pi )$ = $f(\theta)$ for all $\theta \in R$. Show that $\hat{f}(n)$ = 0 for all odd n.(Its answer is here Effect of Symmetry of a Function on its Fourier Series)
(e)Show that $f$ is real-valued iff $\bar{\hat{f}}(n) =\hat{f}(-n)$ for all n.
For (e), we have two steps to prove 1- If $f$ is real valued, then $\bar{\hat{f}}(n) =\hat{f}(-n)$ for all n.Which is sooo easy by using the definition of Fourier Coeffient.
2- If $\bar{\hat{f}}(n) =\hat{f}(-n)$ for all n, Then $f$ is real valued.I reached this step,$$\int_{-\pi}^{\pi}\overline{f}(\theta)e^{in\theta} d\theta = \int_{-\pi}^{\pi}f(\theta)e^{in\theta} d\theta$$, Does this means that f is real valued ? If so what is the justification.
Let's solve (a).
The Fourier series of the function $f$ is $$ \sum_{n=-\infty}^{\infty}\hat{f}(n)e^{in\theta} $$
By definition, this is $$ \sum_{n=0}^{\infty}\hat{f}(n)e^{in\theta} + \sum_{n=1}^{\infty}\hat{f}(-n)e^{i(-n)\theta} $$
Taking out the $n=0$ term in the first series, this is $$ \hat{f}(0)+\sum_{n=1}^{\infty}\hat{f}(n)e^{in\theta} + \sum_{n=1}^{\infty}\hat{f}(-n)e^{i(-n)\theta}\tag{1} $$
Applying Euler's formula we have $$ e^{in\theta}=\cos(n\theta)+i\sin(n\theta)\\ e^{i(-n)\theta}=\cos((-n)\theta)+i\sin((-n)\theta) $$
Since $\cos$ is an even function and $\sin$ is an odd function, this is $$ e^{in\theta}=\cos(n\theta)+i\sin(n\theta)\\ e^{i(-n)\theta}=\cos(n\theta)-i\sin(n\theta) $$ Substituting in $(1)$, we obtain $$ \hat{f}(0)+\sum_{n=1}^{\infty}\hat{f}(n)[\cos(n\theta)+i\sin(n\theta)] + \sum_{n=1}^{\infty}\hat{f}(-n)[\cos(n\theta)-i\sin(n\theta)] $$ But this equals $$ \hat{f}(0)+\sum_{n=1}^{\infty}\left\{\hat{f}(n)[\cos(n\theta)+i\sin(n\theta)] + \hat{f}(-n)[\cos(n\theta)-i\sin(n\theta)]\right\} $$ which is nothing more than $$ \hat{f}(0)+\sum_{n=1}^{\infty}\left\{[\hat{f}(n) + \hat{f}(-n)]\cos(n\theta) + i[\hat{f}(n) - \hat{f}(-n)]\sin(n\theta)\right\} $$