Evaluate $P.V. \int^{\infty}_{0} \frac{x^\alpha }{x(x+1)} dx $ where $0 < \alpha <1$ Evaluate
$$P.V. \int^{\infty}_{0} \frac{x^\alpha }{x(x+1)} dx   $$
where $0 < \alpha <1$

Thm
  Let $P$ and $Q$ be polynomials of degree $m$ and $n$,respectively, where $n \geq m+2$. If $Q(x)\neq 0$. for $Q$ has a zero of order at most 1 at the origin and $f(z)= \frac{z^\alpha P(z)}{Q(z)}$, where $0 < \alpha <1$ then 
$$P.V, \int^{\infty}_0 \frac{x^ \alpha  P(x)}{Q(x)} dx= \frac{2 \pi i}{1- e^{i \alpha 2 \pi }}  \sum^{k}_{j=1} Res [f,z_j] $$
where $z_1,z_2 ,\dots , z_k$ are the nonzero poles of $\frac{P}{Q}$

Attempt
Got that $P(x)=1$ where its degree $m=1$ and $q(x)=x(x+1)$ its degree is $n=1$ so it is not the case that $n \geq  m+2$ because $2 \geq 1+2$
 A: 
METHODOLOGY $1$:  COMPLEX ANALYSIS

Let $f(z)=\frac{z^\alpha}{z(z+1)}$, defined with branch cut along the positive real axis.  Let $C$ be the classical "keyhole" contour with the keyhole taken around the branch cut.  Then, the residue theorem guarantees that 
$$\begin{align}
\oint_C f(z)\,dz&=\int_0^\infty \frac{x^\alpha}{x(x+1)}\,dx+\int_\infty^0\frac{x^\alpha\,e^{i2\alpha\pi}}{x(x+1)}\,dx\\\\
&=(1-e^{i2\alpha\pi})\int_0^\infty \frac{x^\alpha}{x(x+1)}\,dx\\\\
&=2\pi i \,\text{Res}\left(\frac{z^\alpha}{z(z+1)}, z=e^{i\pi}\right)\\\\
&=-2\pi i\,e^{i\alpha\pi}
\end{align}$$
Hence, we have

$$\int_0^\infty \frac{x^\alpha}{x(x+1)}\,dx=\frac{-2\pi i\,e^{i\alpha\pi}}{1-e^{i2\alpha\pi}}=\frac{\pi}{\sin(\alpha \pi)}$$



METHODOLOGY $2$:  REAL ANALYSIS

Alternatively, using the Beta function, we have
$$\begin{align}
\int_0^\infty \frac{x^\alpha}{x(x+1)}\,dx&=B\left(\alpha, 1-\alpha\right)\\\\
&=\frac{\Gamma(\alpha)\Gamma(1-\alpha)}{\Gamma(1)}\\\\
&=\frac{\pi}{\sin(\alpha \pi)}
\end{align}$$
where we used the relationship between the Gamma and Beta functions along with the Euler's Reflection Formula for the Gamma function.
A: We assume $0<\alpha<1$. We have

$$
P.V. \int^{\infty}_{0} \frac{x^\alpha }{x(x+1)} dx =\frac{\pi}{\sin(\alpha \pi)}.
$$

Hint. One may prove that
$$
\begin{align}
& \int^{\infty}_{0} \frac{x^\alpha }{x(x+1)} dx
\\\\&=\int^1_{0} \frac{x^\alpha }{x(x+1)} dx+\int^{\infty}_{1} \frac{x^\alpha }{x(x+1)} dx
\\\\&=\int^1_{0} \frac{x^{\alpha-1} }{x+1} dx+\int^0_{1} \frac{x^{\alpha-1}  }{1+\frac1x}\cdot \left(- \frac{dx}{x^2}\right)
\\\\&=\int^1_{0} \frac{x^{\alpha-1} }{1+x} dx+\int^1_{0} \frac{x^{-\alpha}  }{1+x}dx
\\\\&=\int^1_{0} \frac{x^{\alpha-1} (1-x)}{1-x^2} dx+\int^1_{0} \frac{x^{-\alpha}(1-x)  }{1-x^2}dx
\\\\&=\int^1_{0} \frac{x^{\alpha-1} (1-x)}{1-x^2} dx+\int^1_{0} \frac{x^{-\alpha}(1-x)}{1-x^2}dx
\\\\&=\frac12\psi\left(\frac{\alpha+1}2\right)-\frac12\psi\left(\frac{\alpha}2\right)+\frac12\psi\left(1-\frac{\alpha}2\right)-\frac12\psi\left(\frac{1-\alpha}2\right)
\\\\&=\frac{\pi}{\sin(\alpha \pi)}
\end{align}
$$ where we have used the classic integral representation of the digamma function
$$
\int^1_{0} \frac{1-t^{a-1}}{1-t} dt=\psi(a)+\gamma, \quad a>-1,\tag 1
$$ and the properties
$$
\psi(a+1)-\psi(a)=\frac1a,\qquad \psi(a)-\psi(1-a)=-\pi\cot(a\pi).
$$
