Exercise from Fourier Analysis: An Introduction by Stein and Shakarchi:
Let $f$ be a $2\pi$-periodic Riemann integrable function defined on $\Bbb R$ with $f(θ + π) = f(θ)$ for all $θ \in \Bbb R$. Prove that $\hat f(n) = 0$ for all odd $n$.
Where $\hat f(n)$ is defined as $\hat f(n) = \frac{1}{2\pi} \int_{-\pi}^{\pi} f(x) e^{-inx} dx$.
My approach:
$\int_{-\pi}^{\pi} f(x) e^{-inx} dx = \int_{-\pi}^{0} f(x) e^{-inx} dx + \int_{0}^{\pi} f(x) e^{-inx}$
I guess these two integrals should cancel each other out, i.e.,
$\int_{0}^{\pi} f(x) e^{-inx} dx = \int_{-\pi}^{0} f(x + \pi) e^{-inx} e^{-in\pi} dx$
But how do I proceed from here? And what has this to do with odd $n$?
If $n$ is odd, $e^{-in\pi} = -1$. Hence
$$\int_{-\pi}^0 f(x + \pi)e^{-inx}e^{-in\pi}\,dx = -\int_{-\pi}^0 f(x + \pi)e^{-inx}\, dx = -\int_{-\pi}^0 f(x)e^{-in x}\, dx,$$
which cancels with the term $\int_{-\pi}^0 f(x)e^{-in x}\, dx$ in your first equation.