For a constant $0<A<\pi$, and natural $n$ I want to find the principal value of the integral:
$$\int_0^\pi \frac{\cos nt}{\cos t - \cos A} dt$$
First of all, I'm not certain what function in the complex plane I should look at. Using $$f(z) \equiv \frac{e^{inz}}{e^{iz}-\cos A}$$ or something similar doesn't work, because there is no obvious way to recover the original function from that (no simple relation of one being the imaginary part of the other etc). I tried expressing the difference of cosines as a product of sines, but I don't see how this gets me anywhere.
So: what $f(z)$ should I choose?
Then, I need to find an appropriate contour on the complex plane, and surround the singularity at $A$ with a (half?)circle of radius $\epsilon$, then take the limit $\epsilon \to 0$. I've tried a rectangle and a semicircle, but without an appropriate function to analyse, it's difficult to say what would work. In any case, for the function I tried (i.e. one with all the $t$'s replaced by $z$'s), I didn't get anywhere.
I'm not looking for an answer, just a hint on what function to consider, and on what contour.
Edit:
Following Mhenni Benghorbal's hint, I arrive at:
$$I=\frac{(-1)^{n+1}}{2i}\oint_{|z|=1} \frac{z^{2n}+1}{z^n (z+e^{iA})(z+e^{-iA})}dz$$
The problem is, the singularities are on the unit circle along which I'm integrating. I'm not sure how to deal with that.