# Evaluate $\int_{0}^{\infty} \frac{x^{-p}}{x^2+2x\cos\theta +1}\,dx$ [duplicate]

I have to show that:

$$\int_{0}^{\infty} \frac{x^{-p}}{x^2+2x\cos\theta +1}\,dx = \frac{\pi \sin (p\theta)}{\sin (p\pi) \sin(\theta)}$$

for $$0 and $$0 < \theta < \pi$$.

We can write the denominator as $$(x+e^{i\theta})(x+e^{-i\theta})$$ and I now want to evaluate this integral using contour integration. However, I have no idea how to do this...

• Have you tried $x=e^u$? – J.G. Aug 23 '19 at 13:57
• As one of the two sides of the "keyhole" in the Hankel contour? – K B Dave Aug 23 '19 at 14:02
• Duplicate of Symmetry of function defined by integral, or maybe it was better to mark it as a duplicate of this one. – Zacky Aug 23 '19 at 14:06