<s>[INST] An integral with logarithm and rational function Can someone solve:
$ \int_0^\infty dx \frac{\log (x)}{(x-1)(x+a)}\;,$
for $a$ say a positive real (or presumably any non real-negative complex number). Note there is no pole at $x=1$.
I can easily find the solution on mathematica, but I can't find a `proof'. My instinct is to use some nice contour, or bring the integral limits to [0,1] and expand the log, but I can't make either work!
Edit: Sorry I should have added the following. I know that the above integral is easily evaluated via partial fractions and using properties of dilogarithms, but I am wondering out of curiosity whether a simpler proof is possible. Certainly the result (see below) looks as if there should be an extremely elementary argument.
 [/INST] Let $a>0$,
\begin{align}
J=\int_0^\infty \frac{\ln x}{(x-1)(x+a)} \,dx
\end{align}
Perform the change of variable $y=\dfrac{x-1}{x+a}$,
\begin{align}
J&=\frac{1}{1+a} \int_{-\frac{1}{a}}^1 \frac{\ln\left( \frac{1+ax}{1-x} \right)}{x}dx\\
&=\frac{1}{1+a}\int_{-\frac{1}{a}}^1 \frac{\ln\left( 1+ax\right)}{x}\,dx-\frac{1}{1+a}\int_{-\frac{1}{a}}^1 \frac{\ln\left( 1-x\right)}{x}dx
\end{align}
In the first integral perform the change of variable $y=-ax$,
\begin{align}
J&=-\frac{1}{1+a}\int_{-a}^1 \frac{\ln\left( 1-x\right)}{x}dx-\frac{1}{1+a}\int_{-\frac{1}{a}}^1 \frac{\ln\left( 1-x\right)}{x}dx\\
&=-\frac{2}{1+a}\int_0^1 \frac{\ln(1-x)}{x}dx-\frac{1}{1+a}\int_{-a}^0 \frac{\ln\left( 1-x\right)}{x}dx-\frac{1}{1+a}\int_{-\frac{1}{a}}^0 \frac{\ln\left( 1-x\right)}{x}dx
\end{align}
In the last two integrals perform the change of variable $y=-x$,
\begin{align}J&=-\frac{2}{1+a}\int_0^1 \frac{\ln(1-x)}{x}dx+\frac{1}{1+a}\int_{0}^a \frac{\ln\left( 1+x\right)}{x}dx+\frac{1}{1+a}\int_0^{\frac{1}{a}} \frac{\ln\left( 1+x\right)}{x}dx\\
&=\frac{2}{1+a}\int_0^1 \frac{\ln\left(\frac{1+x}{1-x}\right)}{x}dx+\frac{1}{1+a}\int_{1}^a \frac{\ln\left( 1+x\right)}{x}dx+\frac{1}{1+a}\int_1^{\frac{1}{a}} \frac{\ln\left( 1+x\right)}{x}dx
\end{align}
In the latter integral perform the change of variable $y=\dfrac{1}{x}$,
\begin{align}J&=\frac{2}{1+a}\int_0^1 \frac{\ln\left(\frac{1+x}{1-x}\right)}{x}dx+\frac{1}{1+a}\int_{1}^a \frac{\ln\left( 1+x\right)}{x}dx-\frac{1}{1+a}\int_1^{a} \frac{\ln\left( \frac{1+x}{x}\right)}{x}dx\\
&=\frac{2}{1+a}\int_0^1 \frac{\ln\left(\frac{1+x}{1-x}\right)}{x}dx+\frac{1}{1+a}\int_{1}^a \frac{\ln x}{x}dx\\
&=\frac{2}{1+a}\int_0^1 \frac{\ln\left(\frac{1+x}{1-x}\right)}{x}dx+\frac{\ln^2 a}{2(1+a)}
\end{align}
In the first integral perform the change of variable $y=\dfrac{1-x}{1+x}$,
\begin{align}
J&=-\frac{4}{1+a}\int_0^1 \frac{\ln x}{1-x^2}dx+\frac{\ln^2 a}{2(1+a)}\\
&=\frac{4}{1+a}\int_0^1 \frac{x\ln x}{1-x^2}dx-\frac{4}{1+a}\int_0^1 \frac{\ln x}{1-x}dx+\frac{\ln^2 a}{2(1+a)}
\end{align}
In the first integral perform the change of variable $y=x^2$,
\begin{align}J&=\frac{4}{1+a}\left( \frac{1}{4}-1\right) \int_0^1 \frac{\ln x}{1-x}dx+\frac{\ln^2 a}{2(1+a)}\\
&=\frac{\ln^2 a}{2(1+a)}-\frac{3}{1+a}\int_0^1 \frac{\ln x}{1-x}dx\\
&=\boxed{\frac{\ln^2 a}{2(1+a)}+\frac{\pi^2}{2(1+a)}}
\end{align}
NB: I assume,
\begin{align}\int_0^1 \frac{\ln x}{1-x}dx=-\frac{\pi^2}{6}\end{align}
</s>