<s>[INST] 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$
 [/INST] 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).
$$
</s>