I am stuck on the following question from Folland's Real Analysis book (chapter 2, problem 31b).
Derive the following formula by expanding part of the integrand into an infinite series and justifying the term-by-term integration. For p > -1, $$ \int_0^1 x^p (x-1)^{-1} dx = - \sum_{k=1}^{\infty} \frac{1}{(p+k)^2} $$
I can expand the second factor as a power series, but I don't see how that helps me. Worse yet, I don't even see how this can be correct. Taking for example $p=0$, I get
$$ \int_0^1 (x-1)^{-1} dx = \int_{-1}^0 \frac{du}{u} = - \int_{0}^1 \frac{dy}{y} $$
which as far as I know doesn't converge. I'm not sure then if Folland meant for $p \in (-1,0)$, or for $p > -1, p \neq 0$, or if the problem is just incorrect. Or maybe I am just missing something obvious. Any help would be appreciated!
For $p>-1$ we have
$$\int_0^1 x^{p+n}\log(x)\,dx=-\frac{1}{(p+n+1)^2}\tag1$$
Next, summing $(1)$ over $n$ reveals
$$\begin{align} -\sum_{n=1}^\infty \frac{1}{(p+n)^2}&=\sum_{n=0}^\infty \int_0^1 x^{p+n}\log(x)\,dx\\\\ &=\lim_{N\to \infty}\int_0^1 \frac{x^p(1-x^{N+1})}{1-x}\,\log(x)\,dx\tag 2 \end{align}$$
Noting that for $x\in [0,1]$, have $\left|\frac{x^p(1-x^{N+1})}{1-x}\,\log(x)\right|\le -2\frac{x^p}{1-x}\log(x)$ and that $0\le \int_0^1 -2\frac{x^p}{1-x}\log(x)\,dx<\infty$, the Dominated Convergence Theorem guarantees that we can interchange the limit with the integral on the right-hand side of $(2)$ yields
$$-\sum_{n=1}^\infty \frac{1}{(p+n)^2}=\int_0^1 \frac{x^p}{1-x}\,\log(x)\,dx$$
as was to be shown!