1. ## Residue theorem troubles

Hi. I am trying to evaluate the following integral:
I = $\int_{0}^{\infty } \frac{x^{-p}}{1-2x\cos{\theta}+x^{2} }$

where -1 < p < 1 and 0 < $\theta$ < 2*Pi. One can easily show the following:

$1-2x\cos{\theta}+x^{2}=(x-e^{i \theta } )(x - e^{-i \theta })$

When we transfer this over to the complex plane this means we have a branch point at x = 0 and a couple of simple poles at x = $e^{i \theta }$ and x = $e^{-i \theta }$

I am attempting to apply the pacman or keyhole contour here where the branch cut is made along the positive real axis.

I end up with the following:

A = $\oint_{pacman} \frac{z^{-p}}{1-2z\cos{\theta}+z^{2} }dz$ = $\int_{0}^{\infty } \frac{r^{-p}}{1-2r\cos{\theta}+r^{2} }dr - \int_{0}^{\infty } \frac{e^{-i2\pi p}r^{-p}}{1-2r\cos{\theta}+r^{2} }dr$ = $(1 - e^{-i2 \pi p})$ I = $e^{-i \pi p}2i \sin (\pi p)$ I

But by the residue theorem we have:

A = $2 \pi i \sum Residues = 2 \pi i \frac{- \sin (\theta p)}{\sin (\theta )}$

which implies:

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

but this cannot be right since we are integrating a real valued function over the real line... it shouldnt have any imaginary components. What have I done wrong?

2. I didn't check all the details, but you probably know that $e^{i\pi}=-1$?

3. yes, but p is a fraction or irrational or zero so making that substitution doesnt help really. Youll have some fractional or irrational root of -1.

4. I believe you're using the wrong residue for the pole at $e^{-i\theta}$ based on the branch you're using: You define:

$z^{-p}=e^{-p\log(z)}=e^{-p(\ln(r)+i\arg(z))},\quad 0\leq \arg(z)\leq 2\pi$

Then for $z=e^{-i\theta}$

$\arg(z)=2\pi-\theta$

Also, try it first for $p=1/4$ and $\theta=\pi/4$ or something easy like this. Do it numerically first in Mathematica, then do it numerically via the Residue Theorem:

Code:
In[56]:=
p = 1/4;
t = Pi/4;
NIntegrate[1/(x^p*(1 - 2*x*Cos[t] +
x^2)), {x, 0, Infinity}]
r1 = Exp[-7*Pi*(I/16)]/
(Exp[(-Pi)*(I/4)] - Exp[Pi*(I/4)]);
r2 = Exp[(-Pi)*(I/16)]/(Exp[Pi*(I/4)] -
Exp[(-Pi)*(I/4)]);
N[((2*Pi*I)/(1 - Exp[-2*Pi*I*p]))*
(r1 + r2)]

Out[58]=
3.4907507252185646

Out[61]=
3.4907507252151033 +
3.487868498008632*^-16*I

5. Correct correct! My understanding of branch cuts was flawed. The final answer comes out to be:

$\frac {\pi \sin (p (\pi - \theta ))}{\sin (\pi p) \sin (\theta )}$