Assume that $f$ is a $2\pi$−periodic and integrable function defined on $\mathbb{R}$, and suppose that $f(\theta + \pi) = f(\theta)$ for all $\theta \in \mathbb{R}$. Show that $\hat{f}(n) = 0$ for all odd $n$.
Using here that $$\hat{f}(n) = \frac{1}{2\pi} \int_{-\pi}^\pi f(x) e^{-inx}dx$$
I tried expanding this to $$\hat{f}(n) = \frac{1}{2\pi} \int_{-\pi}^\pi f(x) \big(\cos(nx) + i\sin(nx)\big)dx$$ but I don't see how the expression changes for odd $n$.
Note that $$\int_{0}^\pi f(x)e^{-inx}dx=\int_{-\pi}^0 f(x+\pi)e^{-in(x+\pi)}dx=-\int_{-\pi}^0f(x)e^{-inx}dx$$ since $e^{-in(x+\pi)}=e^{-inx}e^{-in\pi}=-e^{-inx}$ as $n$ is odd. Hence $$\int_{-\pi}^\pi f(x)e^{-inx}dx=0$$