# Compute the integral with use of complex analysis techniques

Compute the integral: $$\int_0^{\infty} \frac{x^p}{x^2 + 2x\cos\lambda+1}dx, (-1 < p < 1, -\pi < \lambda < \pi)$$ with complex analysis techinques.
What I've tried in this problem (because the problem is located among other problems that I've solved using the $\textit{circle that avoids positive part of x-axes}$) is to find residues in the singularities and that would give me solution. But, in case of $0 < p < 1$ this integral does not have same properties as in case $- 1 < p < 0$ (we had classified them as separate types), so I am clueless here. Any help is appreciated. Should I use any particular curve that is non-standard, or I am missing something? Thank you.

$\textbf{Edit:}$ Also, it is clear to me that the $p$ is chosen in such way that the integral converges.

• See this answer from this link: math.stackexchange.com/a/890358/349501 – Shashi Jan 24 '18 at 0:38
• What you also can do is to consider the same integral but with $(-x) ^p$ and do the integration on a dog bone contour with the "bone" on the positive real axis. Use the Principal Log for that. – Shashi Jan 24 '18 at 0:45
• It might be worth to have a look at the following answer for the latter suggestion. The exponent is imaginary but the technique remains the same. math.stackexchange.com/questions/2529614/… – Shashi Jan 24 '18 at 0:51
• @Shashi that is idea and contour I was looking for. Thank you. – Nemanja Beric Jan 24 '18 at 5:33

$$\int_{0}^{+\infty}\frac{x^p}{x^2+2x\cos\lambda+1}=\frac{\Gamma(p+1)}{\sin\lambda}\int_{0}^{+\infty}s^{-p-1}e^{-s\cos\lambda}\sin(s\sin\lambda)\,ds$$ and by the integral representation for the $\Gamma$ function and the reflection formula the RHS equals $$\frac{-\Gamma(p+1)\,\Gamma(-p)\sin(p\lambda)}{\sin\lambda}=\frac{\pi\sin(p\lambda)}{\sin(\lambda)\sin(\pi p)}.$$