Show that $\displaystyle{\int_{0}^{\infty}\!\frac{x^{a}}{x(x+1)}~\mathrm{d}x=\frac{\pi}{\sin(\pi a)}}$ Show that for $0<a<1$
$$\int_{0}^{\infty}\frac{x^{a}}{x(x+1)}~\mathrm{d}x=\frac{\pi}{\sin(\pi a)}$$
I want to solve this question by using complex analysis tools but I even don't know how to start. Any help would be great.

I know it's not technically a complex analysis route, but where would we be without the obligatory beta function route?
Rewrite
$$\begin{align}\int_0^{\infty} \frac{x^a}{x (x+1)} &=  \int_0^{\infty} \frac{x^{a-1}}{x+1}\\ &= \int_1^{\infty} dx \frac{(x-1)^{a-1}}{x} \\ &= \int_0^1 \frac{dy}{y} \left (\frac1{y}-1 \right )^{a-1} \\ &= \int_0^1 dv \, v^{-a} (1-v)^{-(1-a)}\\ &= \frac{\Gamma(1-a) \Gamma(a)}{\Gamma(1)} \\ &= \frac{\pi}{\sin{\pi a}}\end{align}$$
