Integrate $\int_0^1 \ln(x)\ln(b-x)\,\mathrm{d}x$, for $b>1$? Let $b>1$. What's the analytical expression for the following integral?
$$\int_0^1 \ln(x)\ln(b-x)\,\mathrm{d}x$$
Mathematica returns the following answer:
$$2-\frac{\pi^{2}}{3}b+\left(b-1\right)\ln\left(b-1\right)-b\ln b+\mathrm{i}b\pi\ln b+\frac{1}{2}b\ln^{2}b+b\mathrm{Li}_{2}\left(b\right)$$
which contains the imaginary term $\mathrm{i}b\pi\ln b$. But the actual answer is real, so this term should cancel somehow with the dilogarithm function. But I don't know how to do this.

The following is an evaluation in terms of $ \displaystyle \text{Li}_{2} \left(\frac{1}{b} \right)$, which is real-valued for  $b > 1$.
$$\begin{align}  \int_{0}^{1} \log(x) \log(b-x) \ dx &= \log(b) \int_{0}^{1} \log(x) +  \int_{0}^{1}\log(x) \log \left(1- \frac{x}{b} \right) \ dx \\ &= - \log(b) - \int_{0}^{1} \log(x) \sum_{n=1}^{\infty} \frac{1}{n} \left( \frac{x}{b}\right)^{n} \ dx \\ &= - \log(b) - \sum_{n=1}^{\infty} \frac{1}{nb^{n}} \int_{0}^{1} \log(x) x^{n} \ dx \\ &= - \log(b) + \sum_{n=1}^{\infty} \frac{1}{nb^{n}} \frac{1}{(n+1)^{2}} \\ &= - \log(b) - \sum_{n=1}^{\infty} \frac{1}{n+1} \frac{1}{b^{n}} - \sum_{n=1}^{\infty} \frac{1}{(n+1)^{2}} \frac{1}{b^{n}} + \sum_{n=1}^{\infty} \frac{1}{n} \frac{1}{b^{n}} \\ &= - \log(b) - \left(-\frac{\log(1-\frac{1}{b})}{\frac{1}{b}}-1\right) - \left(\frac{\text{Li}_{2}(\frac{1}{b})}{\frac{1}{b}} -1\right) - \log \left(1- \frac{1}{b} \right) \\ &= - \log(b) +2 + (b-1) \log \left(1-\frac{1}{b} \right) - b \ \text{Li}_{2} \left( \frac{1}{b}\right) \end{align}$$
EDIT:
The answer can be written in the form
$$-b \ \text{Li}_{2} \left( \frac{1}{b}\right) +2 + (b-1) \log(b-1) - b \log(b) $$
which is what Wolfram Alpha returns for specific integer values of $b$ greater than $1$.
For non-integer values of $b$ greater than $1$, it manipulates the answer a bit differently.
