Calculate the principal value of $\int_{0}^\infty\frac{x^{(a-1)}}{1-x^b}dx$,where $0Could someone have any idea on how to solve the above integral.
On my last attempt I did the following:

*

*Change of variable $u=x^b \Rightarrow du=bx^{(b-1)}dx$


*The integral turned into:
$\frac{1}{b}\int_{0}^\infty\frac{1}{u^{\frac{b-a}{b}}(1-u)}dx$


*Extended this integral to the complex plane. This integral has two poles on $u=0$ and $u=1$


*Calculate the path integral over the closed contour $C$ (clockwise direction) composed of large $1/4$ of circle on the first quadrant ($C_R$) with radius $R$, and centered @ $0$, connected to two lines on the real and imaginary axis both with one end on @ $0$. The final path would be similar to a $1/4$ pizza shape. The poles would be contored by small arcs of cirles of radius $\epsilon$ around them. (Perhaps a drawing would be more appropriate :( )


*The contour integral would be:
$\oint_C=\int_{C_R}+PV\int^\infty_{0}+\int_\text{left small 1/4 circle centered @ (0,0)}+\int_\text{right small semicircle centered @ (1,0)}+\int^{Ri}_{\epsilon i}$
$\epsilon \to 0$
$R \to \infty$


*By the residue theorem $\oint_C$ is zero because there are no poles inside it.


*$\int_{C_R}$ is zero as $R \to \infty$.


*I tried to calculate the other remaining integrals but I did not get the correct answer which is
$\frac{\pi}{b}cot\frac{\pi a}{b}$
Thanks in advance.
 A: Too long for a comment
I'm afraid it would be difficult to evaluate the integral in the complex plane using a quarter of a big circle - because in this case you get another integral $\int_{Ri}^{\epsilon i}$, which should be evaluated as well.
The basic idea of the complex integration is to use available symmetries.
In your case I would recommend a keyhole contour with two small half-circles (clockwise direction) around $x=1$ on upper and lower banks of the cut (the cut is from $0$ to $\infty$).
Using this contour we can evaluate integral type $I(d)=\int_{0}^\infty\frac{1}{u^d(1-u)}dx$, where $d\in(0,1)$

$$\oint=I(d)+\int_{C_1}+\int_R\,\,-e^{-2\pi id}I(d)+\int_{C_2}+\int_r =2\pi i\sum Res$$
where $\int_{C_1}$ and $\int_{C_2}$ are integrals around $x=1$ on the upper and lower bank of the cut correspondingly.
It can be evaluated that integral along a big circle $\to0$ as $R\to\infty$, and integral around $x=0$ (small circle) $\to0$ as $r\to0$ (at given $d$).
Because there are no poles inside the closed contour, we get
$$I(d)\bigl(1-e^{-2\pi id}\bigr)=-\bigl(\int_{C_1}+\int_{C_2}\bigr)$$
where integral $\int_{C_2}$ has the additional phase (multiplier) $e^{-2\pi id}$.
Could you proceed from here?
A: $\newcommand{\d}{\mathrm{d}}$
$\newcommand{\e}{\mathrm{e}}$
$\newcommand{\i}{\mathrm{i}}$
Suppose $0<\Re s < 1$, and that it's given that
$$\int_0^{\infty}\frac{t^{s-1}\d t}{1+t} = \pi \csc \pi s\text{.}$$
Then for $a>0$, it's true that
$$\int_0^{\infty}\frac{t^{s-1}\d t}{a+t} = a^{s-1}\pi \csc \pi s\text{,}$$
and by the identity theorem equality holds for all $a$ not on the nonpositive real axis. So let $a=\e^{\i \theta}$ with $-\pi < \Re \theta < \pi$:
$$\int_0^{\infty}\frac{t^{s-1}\d t}{e^{\i\theta}+t} = \e^{\i(s-1)\theta}\pi \csc \pi s\text{.}$$
The even part of this equality is
$$\begin{align}
\int_0^{\infty}\frac{t^{s-1}(\cos\theta+t)\d t}{1 + 2t\cos\theta + t^2}
  &= \pi\cos{(s-1)\theta} \,\csc \pi s\text{.}
\end{align}$$
Take the limit $\theta\to\pi$. From
$$\lim_{\theta\to\pi}\frac{\cos \theta + t}{1+2t\cos\theta+t^2}=\mathrm{P}\frac{1}{t-1}$$
it follows that
$$\begin{split}
\mathrm{P}\int_0^{\infty}\frac{t^{s-1}\d t}{t-1}
  &= \pi\cos{(s-1)\pi} \,\csc \pi s \\
  &= -\pi \cot \pi s \text{.}
\end{split}$$
A: Consider
$$I(a)= PV\,\int_{0}^{\infty}\frac{x^{a-1}}{1-x}dx$$
$$I(a)=\int_{0}^{1}\frac{x^{a-1}}{1-x}dx+\int_{1}^{\infty}\frac{x^{a-1}}{1-x}dx$$
Let $x=\frac{1}{t}\, \Rightarrow \, dx=-\frac{dt}{t^2}$, then
$$I(a)=\int_{0}^{1}\frac{x^{a-1}}{1-x}dx+\int_{1}^{0}\frac{\frac{1}{t^{a-1}}}{\frac{t-1}{t}}\frac{(-dt)}{t^2}$$
$$I(a)=\int_{0}^{1}\frac{x^{a-1}}{1-x}dx+\int_{0}^{1}\frac{t^{-a}}{t-1}dt$$
$$I(a)=\int_{0}^{1}\frac{x^{a-1}}{1-x}dx-\int_{0}^{1}\frac{x^{-a}}{1-x}dx$$
$$I(a)=\int_{0}^{1}\frac{1}{\ln x}+\frac{x^{a-1}}{1-x}dx-\int_{0}^{1}\frac{1}{\ln x}+\frac{x^{-a}}{1-x}dx$$
each of these integrals is an integral representation of the Digamma function (see below), therefore
$$\boxed{PV\,\int_{0}^{\infty}\frac{x^{a-1}}{1-x}dx=\psi(1-a)-\psi(a)}\,\tag{1}$$
From the Digamma´s reflection formula we know
$$\psi(1-a)-\psi(a)=\pi \cot(a \pi)\,\tag{2}$$
Plugging $(2)$ in $(1)$ we obtain
$$\boxed{PV\,\int_{0}^{\infty}\frac{x^{a-1}}{1-x}dx=\pi \cot(a \pi)}\,\tag{3}$$

Now, let
$$J=\int_{0}^{\infty}\frac{x^{a}}{1-x^b}dx$$
substituting $x^b = t$ we obtain
$$J=\frac{1}{b}\int_{0}^{\infty}\frac{x^{\frac{a+1}{b}-1}}{1-x}dx \,\tag{4}$$
comparing $(4)$ with $(3)$ we conclude  that
$$\boxed{PV\,\int_{0}^{\infty}\frac{x^{a}}{1-x^b}dx=\frac{\pi}{b}\cot\left(\pi\frac{(a+1)}{b} \right)}\,\tag{5}$$
If you let $a \longmapsto a-1$ in $(5)$ you get the desired result

Now for the integral representation:
Recall the integral representation of the Digamma function proved here
$$\psi(z)=\int_{0}^{\infty} \frac{e^{-t}}{t}-\frac{e^{-z t}}{1-e^{-t}} d t \, \tag{6} $$
Letting $e^{-t}=x \Rightarrow d t=-\frac{d x}{x} $ in $(6)$, then
$$\psi(z)=\int_{1}^{0} \frac{x}{-\ln x}-\frac{x^{z}}{1-x} \frac{(-d x)}{x} $$
$$\boxed{\psi(z)=-\int_{0}^{1} \frac{1}{\ln x}+\frac{x^{z-1}}{1-x} d x} \, \tag{7}$$
