Derivation (Fourier coefficients for odd or even function)
Suppose an $L$-periodic function $f$ is even. Then $$ \begin{align*} b_n &= \frac{2}{L} \int_{0}^{L} f(\theta) \sin \frac{2\pi n \theta}{L} \d \theta \\ &= \frac{2}{L} \int_{-L/2}^{L/2} \underbrace{f(\theta)}_{\text{even}} \ \underbrace{\sin \frac{2\pi n \theta}{L}}_{\text{odd}} \d \theta \\ &= 0. \end{align*} $$ Similarly if $f$ is odd, then $$ \begin{align*} a_n &= \frac{2}{L} \int_{0}^{L} f(\theta) \cos \frac{2\pi n \theta}{L} \d \theta \\ &= \frac{2}{L}\int_{-L/2}^{L/2} \underbrace{f(\theta)}_{\text{odd}} \underbrace{\cos \frac{2\pi n\theta}{L}}_{\text{even}} \d \theta \\ &= 0. \end{align*} $$