# Evaluate the contour integral: $\int_0^{2\pi} \frac{\cos mx}{x^2-1} dx$

$$\int_0^{2\pi} \dfrac{\cos mx}{x^2-1} dx$$

I can calculate this as $\int_{-\infty}^{\infty}$ using residue theorem by indenting the real axis at the poles $x=1,-1$ and taking the radius of these semi-circles as $r\to 0$ and that of the bigger semi-circle as $R \to \infty$

I can calculate $\int_0^{2\pi} f(\theta) d\theta$ by taking contour around unit circle and putting $z=\cos\theta+i\sin\theta$

This seems to be a hybrid of these 2 types.

How do I do contour integral on this?

• This integral is divergent because of the singularity at $1$. The only way to make it convergent is to put $m= \pi/2$. – Crostul Apr 9 '17 at 16:52