Evaluating improper integral $\int_0^1 \frac{\log(x)}{x+\alpha}\; dx$ for small positive $\alpha$ Let $\alpha$ be a small positive real number.
How do I obtain
$$ I = \int_0^1 \frac{\log(x)}{x+\alpha}\; dx = -\frac{1}{2}(\log\alpha)^2 - \frac{\pi^2}{6} - \operatorname{Li}_2(-\alpha)$$? Maxima told me the result, but I do not understand how to get it.
The appearance of $\pi^2/6$ suggests the necessity of complex analysis. I tried to relate it to some contour integral through the change of variables $x=e^{-t}$:
$$ I = -\int_{0}^{\infty} \frac{t e^{-t}}{e^{-t}+\alpha}\;dt, $$
but I could not find the next step.
 A: $$\int_0^1\frac{\ln(x)}{a+x}dx=\int_0^{1/a}\frac{\ln(ay)}{1+y}dy$$
$$=\underbrace{\ln(1+y)\ln(ay)|_0^{1/a}}_{0}-\int_0^{1/a}\frac{\ln(1+y)}{y}dx=\text{Li}_2(-y)|_0^{1/a}=\text{Li}_2(-1/a)$$
and the result follows on using the dilogarithm inversion formula:
$$\text{Li}_2(-1/z)=-\frac{\pi^2}{6}-\frac{1}{2}\ln^2(z)-\text{Li}_2(-z).$$
To prove the last identity, differentiate $\text{Li}_2(-1/z)$ then integrate back.
In geeneral we have
$$\int_0^1\frac{\ln^p(x)}{a+x}dx=(-1)^{p+1}\, p!\,\text{Li}_{p+1}(-1/a)$$
which follows from the integral represenation of the polylogarithm function
$$\text{Li}_{p+1}(z)=\frac{(-1)^{p}}{p!}\int_0^1\frac{z\ln^{p}(t)}{1-zt}dt$$
upon replacing $z$ by $-1/a$.
A: Changing the integration variable to $t := x/\alpha$, we get
$$ I = \int_0^{1/\alpha} \frac{\log\alpha+\log t}{1+t}\;dt. $$
The integration of the $\log\alpha$ term is easy:
$$ \int_0^{1/\alpha} \frac{\log\alpha}{1+t}\;dt = \log\alpha\log\frac{1+\alpha}{\alpha}. $$
For the $\log t$ term, changing the integration variable to $u := 1+t$,
$$ 
\begin{aligned}
\int_0^{1/\alpha} \frac{\log t}{1+t}\;dt &= \int_1^{1+1/\alpha} \frac{\log(u-1)}{u}\;du \\
&= -\left[\Phi\left(1+\frac{1}{\alpha}\right) - \Phi(1)\right]
\end{aligned}
$$
where $\Phi$ is defined as in this Wikipedia article:
$$ \Phi(x) := -\int_0^x \frac{|1-u|}{u}\;du
= \begin{cases}
\operatorname{Li}_2(x) & (x\le 1) \\
\frac{\pi^2}{3} - \operatorname{Li}_2\left(\frac{1}{x}\right) - \frac{1}{2}(\log(x))^2 & (x>1)
\end{cases} $$
Combining the two and using $\operatorname{Li}_2(1) = \pi^2/6$ yield
$$I = -\frac{1}{2}(\log\alpha)^2 - \frac{\pi^2}{6} + \operatorname{Li}_2\left(\frac{\alpha}{1+\alpha}\right)+\frac{1}{2}(\log(1+\alpha))^2. $$
Finally, this identity:
$$ \operatorname{Li}_2(z) + \operatorname{Li}_2\left(\frac{z}{z-1}\right) = -\frac{1}{2}(\log(1-z))^2 $$
simplifies the last two terms into $-\operatorname{Li}_2(-\alpha)$, giving the desired result.
A: Assuming, for $u\leq 1$,
\begin{align}\text{Li}_2\left(u\right)&=-\int_0^1 \frac{u\ln x}{1-ux}dx\\
\text{Li}_2\left(1\right)&=\zeta(2)=\frac{\pi^2}{6}
\end{align}
Therefore, $0<\alpha<1$
\begin{align}\int_0^1 \frac{\log(x)}{x+\alpha}\; dx+\text{Li}_2\left(-\alpha\right)&=\underbrace{\frac{1}{\alpha}\int_0^1 \frac{\log(x)}{1+\frac{x}{\alpha}}\; dx}_{u=\frac{x}{\alpha}}+\underbrace{\int_0^1 \frac{\alpha\log(x)}{1+\alpha x}\; dx}_{u=\alpha x}\\
&=\int_0^{\frac{1}{\alpha}}\frac{\ln(\alpha u)}{1+u}du+\int_0^{\alpha}\frac{\ln(\frac{u}{\alpha} )}{1+u}du\\
&=\int_0^{\frac{1}{\alpha}}\frac{\ln u}{1+u}du+\int_0^{\alpha}\frac{\ln u}{1+u}du-\ln^2 \alpha\\
&=\left(\int_0^1 \frac{\ln x}{1+x}dx+\underbrace{\int_1^{\frac{1}{\alpha}} \frac{\ln x}{1+x}dx}_{u=\frac{1}{x}}\right)+\left(\int_0^1 \frac{\ln x}{1+x}dx-\int_\alpha^1 \frac{\ln x}{1+x}dx\right)-\\&\ln^2 \alpha\\
&=2\int_0^1 \frac{\ln x}{1+x}dx-\int_\alpha^1\frac{\ln x}{x(1+x)}dx-\int_\alpha^1 \frac{\ln x}{1+x}dx-\ln^2\alpha\\
&=2\int_0^1 \frac{\ln x}{1+x}dx+\int_\alpha^1\frac{\ln x}{1+x}dx-\underbrace{\int_\alpha^1\frac{\ln x}{x}dx}_{=-\frac{1}{2}\ln^2\alpha}-\int_\alpha^1 \frac{\ln x}{1+x}dx-\ln^2\alpha\\
&=2\int_0^1 \frac{\ln x}{1+x}dx-\frac{1}{2}\ln^2\alpha\\
&=2\left(\int_0^1 \frac{\ln x}{1-x}dx-\underbrace{\int_0^1 \frac{2x\ln x}{1-x^2}dx}_{u=x^2}\right)-\frac{1}{2}\ln^2\alpha\\
&=2\left(\int_0^1 \frac{\ln x}{1-x}dx-\frac{1}{2}\int_0^1 \frac{\ln u}{1-u}du\right)-\frac{1}{2}\ln^2\alpha\\
&=\int_0^1 \frac{\ln x}{1-x}dx-\frac{1}{2}\ln^2\alpha\\
&=-\text{Li}_2(1)-\frac{1}{2}\ln^2\alpha\\
&=-\frac{\pi^2}{6}-\frac{1}{2}\ln^2\alpha\\
\end{align}
