In the problem I'm working at now, I have encountered some integrals of the form:
$$\int_0^{2\pi} \frac{e^{i k \theta}}{a + \cos(\theta)}d\theta,k\in\Bbb Z,a>1$$
I have no guarantee that they can be done by hand, so I'm asking this here, as maybe someone has seen such a beast before.
Edit: Sorry, I forgot to write $d\theta$. (I wrote the post late at night) I also thank you all for your answers.
Let $k>0$. You can try the following substitution:
$$ \cos\theta = \frac{z+z^{-1}}{2}$$ $$ e^{i\theta} = z$$
$$ d\theta = \frac{dz}{iz}$$
Your integral is transformed in a contour integral round the unit complex circle counterclockwise:
$$I=\int_0^{2\pi} \frac{e^{i k \theta}}{a + \cos(\theta)}d\theta =\frac{2}{i} \oint_{|z|=1}\frac{z^{k}}{2az+z^2+1}dz $$
The function
$$f(z) = \frac{z^{k}}{2az+z^2+1}$$
Has two singularities:
$$z_{1}= \sqrt{a^2-1}-a$$
$$z_{2} = -\sqrt{a^2-1}-a$$
The residue will be zero if there is no singularity inside the circe. Then we need:
$$|z_{1}|= |\sqrt{a^2-1}-a|<1 \Longrightarrow a> 1$$
$$|z_{2}| = |-\sqrt{a^2-1}-a|<1 \Longrightarrow a< -1 $$
Hence, if $a>1$ $z_{2}$ is outside the circle and its residue is zero. Therefore,
$$I= \frac{2}{i} \oint_{|z|=1}\frac{z^{k}}{2az+z^2+1}dz = 4\pi \operatorname{Res}(f,z_{1})$$
Then
$$\operatorname{Res}(f,z_{1}) = \lim_{z \to z_{1}} (z-z_{1})f(z) = \frac{(\sqrt{a^2-1}-a)^k}{2\sqrt{a^2-1}}$$
Therefore
$$\boxed{\int_0^{2\pi} \frac{e^{i k \theta}}{a + \cos(\theta)}d\theta=2\pi \frac{(\sqrt{a^2-1}-a)^k}{\sqrt{a^2-1}} \quad a>1,k>0}$$
As pointed out by @Sangchul Lee the case $k<0$ follows by taking the complex conjugate.
$$\int_0^{2\pi} \frac{e^{-i k \theta}}{a + \cos(\theta)}d\theta= \overline{\int_0^{2\pi} \frac{e^{i k \theta}}{a + \cos(\theta)}d\theta}=\overline{2\pi \frac{(\sqrt{a^2-1}-a)^k}{\sqrt{a^2-1}} } $$