Evaluating the improper integral $\int\limits_{0}^{\infty} \frac{x^{a-1} - x^{b-1}}{1-x} \ dx $ How does one evaluate the integral $$\int\limits_{0}^{\infty} \frac{x^{a-1} - x^{b-1}}{1-x} \ dx \quad \text{for} \ a,b \in (0,1)$$

Here's a sketch of how we can evaluate the integral without complex analysis.
$$\text{Let} \quad I(a) = \int_0^\infty \frac{x^{a-1}}{1-x} dx.$$
Split the range into two intervals $(0,1)$ and $(1,\infty)$ then use the substitution $x=1/t$ in the latter part to obtain
$$I(a) = \int_0^1 \frac{x^{a-1}-x^{-a}}{1-x} dx.$$
Expand the integrand as a power series using $(1-x)^{-1} = \sum_{n=0}^\infty x^n$ and integrate to obtain
$$I(a) = \frac{1}{a} + \sum_{n=1}^\infty \left( \frac{1}{a+n} + \frac{1}{a-n} \right).$$
Now, by differentiating logarithmically the product formula for $\sin x,$
$$\sin \pi x = \pi x \prod_{n=1}^{\infty} \left( 1 - \frac{x^2}{n^2} \right),$$
we note that
$$\pi \cot \pi x = \frac{1}{x} + \sum_{n=1}^\infty \left( \frac{1}{x+n} + \frac{1}{x-n} \right).$$
Thus $$I(a) = \pi \cot(\pi a)$$ and the result follows since the integral in question is $I(a)-I(b).$
