Evaluating $\int_{0}^{\infty}\frac{\mathrm{d}x}{x^{\alpha}(x + 1)}$

I think we will need some complex analysis here.

Take a branch of $1/z^a$ defined in $\mathbb{C}\setminus [0,+\infty)$ and consider the integral $$\int_{\gamma}\frac{dz}{z^a(z+1)}$$ where $\gamma$ is a close path composed by an arc of a inner circle of radius $0<r<1$, an arc of an outer circle of radius $R>1$ and two parallel segments over and under the segment $[r,R]$. Then by the residue theorem $$\int_{\gamma}\frac{dz}{z^a(z+1)}=2\pi i\mbox{Res}\left(\frac{1}{z^a(z+1) },-1\right)=2\pi i e^{-i\pi a}.$$ Now we take the limit as $R\to+\infty$ and $r\to 0^+$. It is easy to see that the integrals along the arcs of the circles goes to $0$. Hence $$\int_0^{+\infty}\frac{dx}{x^a(x+1)}-\int_0^{+\infty}\frac{dx}{x^ae^{2\pi ia}(x+1)}=2\pi i e^{-i\pi a}$$ which implies that $$\int_0^{+\infty}\frac{dx}{x^a(x+1)}=\frac{2\pi i e^{-i\pi a}}{1-e^{-2i\pi a}}=\frac{\pi}{\sin (\pi a)}.$$


Recalling that the Beta function can be written in the form $$B\left(a,b\right)=\int_{0}^{\infty}\frac{x^{a-1}}{\left(1+x\right)^{a+b}}dx,\,\textrm{Re}\left(a\right)>0,\,\textrm{Re}\left(b\right)>0 $$ we have that $$\begin{align} \int_{0}^{\infty}\frac{x^{-\alpha}}{1+x}dx= & \int_{0}^{\infty}\frac{x^{1-\alpha-1}}{\left(1+x\right)^{1-\alpha+\alpha}}dx \\= &B\left(1-\alpha,\alpha\right) \\ = & \Gamma\left(1-\alpha\right)\Gamma\left(\alpha\right) \\ = & \color{red}{\frac{\pi}{\sin\left(\pi\alpha\right)}} \end{align}$$ where the last identity follows from the Gamma reflection formula.


There is a way using complex analysis. You make a cut along the positive real axis. Then define for $z=re^{i\phi}$, $r>0$, $\phi \in (0,2\pi)$: $$ z^a = r^a e^{i\phi a}$$

Make a closed contour that consists of twice going along the positive real axis (once above, the other below) $ z(t) = t+i\epsilon , 0<t\leq R$, $z(t)=t-i\epsilon, R\geq t>0$, a small halfcircle $ z(t)=\epsilon e^{it}, 3\pi/2>t>\pi/2$ and a large circle $z(t) = R e^{it}, \ 0<t<2\pi$. (A drawing would obviously help). Show that the circle contributions go to zero when $\epsilon\rightarrow 0$ and $R\rightarrow \infty$ and that there is a residue for $z=-1$, to obtain:

$$ 2\pi i e^{-i a\pi} = \int_0^\infty \frac{1}{x^a(1+x)} dx \left( 1- e^{-2\pi i a}\right) $$ from which you get the result $\frac{\pi}{\sin(\pi a)}$, if I didn't mess up somewhere.