Question: Integrate$$I=\int\limits_0^{\infty}dx\,\frac {x^a}{1-x^b}$$
I started off with the substitution $u=x^b$ so $du=bx^{b-1}$. Therefore, $I$ is equal as$$I=\frac 1b\int\limits_0^{\infty}du\, (1-u)^{-1}u^{(a-b+1)/b}$$Next I made the substitution $v=(1-u)^{-1}$ so $dv=-(1-u)^{-2}\ du$. Now, $I$ is equal to$$I=\frac 1b\int\limits_0^{1}dv\, v^{-1}\left(\frac {v-1}{v}\right)^{(a-b+1)/b}=\frac 1b(-1)^{(a-b+1)/b}\int\limits_0^1dv\, (1-v)^{(a-b+1)/b}v^{-(a-b+1)/b-1}$$However, evaluating the beta function on the right-hand side gives$$I=\frac {\pi}b\color{red}{(-1)^{(a-b+1)/b}\csc}\left(\frac {\pi(a+1)}b\right)$$Which is definitely wrong because the answer is supposed to be$$I=\frac {\pi}b\cot\left(\frac {\pi(a+1)}b\right)$$Can anybody help me figure out what I did wrong in my work?
The only mistake I see is in the first substitution, the exponent of $u$ should be $a/b-b+1$.