I'm trying to find the complex fourier coefficient of cos(ax) with $a \in \mathbb{Z}$
The formula is given by
$$c_n = \frac{1}{2} \cdot \pi \int_{\pi}^\pi f(x) \cdot e^{-inx} \, dx $$
I know that I can write cos(ax) as
$$\frac{e^{iax} - e^{-iax}}{2}$$
This gives me
$$c_n = \frac{1}{2} \cdot \pi \int_{\pi}^\pi \frac{e^{iax} - e^{-iax}}{2} \cdot e^{-inx} \, dx $$
$$c_n = \frac{1}{2} \cdot \pi \int_{\pi}^\pi \frac{e^{iax - inx} - e^{-iax -inx}}{2} \, dx $$
Antidervivative with $\pi$ yields: $$ \frac{\pi}{4} \cdot \left(\frac{e^{ia\pi - in\pi}}{ (ia-in)} - \frac{e^{-ia\pi -in\pi}}{(-ia-in)}\right) $$
Antidervivative with -$\pi$ yields: $$ \frac{\pi}{4} \cdot \left(\frac{e^{-ia\pi + in\pi}}{ (ia-in)} - \frac{e^{ia\pi +in\pi}}{(-ia-in)} \right) $$
How can I simplify this any further?