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.

$\newcommand{\+}{^{\dagger}}
 \newcommand{\angles}[1]{\left\langle\, #1 \,\right\rangle}
 \newcommand{\braces}[1]{\left\lbrace\, #1 \,\right\rbrace}
 \newcommand{\bracks}[1]{\left\lbrack\, #1 \,\right\rbrack}
 \newcommand{\ceil}[1]{\,\left\lceil\, #1 \,\right\rceil\,}
 \newcommand{\dd}{{\rm d}}
 \newcommand{\down}{\downarrow}
 \newcommand{\ds}[1]{\displaystyle{#1}}
 \newcommand{\expo}[1]{\,{\rm e}^{#1}\,}
 \newcommand{\fermi}{\,{\rm f}}
 \newcommand{\floor}[1]{\,\left\lfloor #1 \right\rfloor\,}
 \newcommand{\half}{{1 \over 2}}
 \newcommand{\ic}{{\rm i}}
 \newcommand{\iff}{\Longleftrightarrow}
 \newcommand{\imp}{\Longrightarrow}
 \newcommand{\isdiv}{\,\left.\right\vert\,}
 \newcommand{\ket}[1]{\left\vert #1\right\rangle}
 \newcommand{\ol}[1]{\overline{#1}}
 \newcommand{\pars}[1]{\left(\, #1 \,\right)}
 \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}}
 \newcommand{\pp}{{\cal P}}
 \newcommand{\root}[2][]{\,\sqrt[#1]{\vphantom{\large A}\,#2\,}\,}
 \newcommand{\sech}{\,{\rm sech}}
 \newcommand{\sgn}{\,{\rm sgn}}
 \newcommand{\totald}[3][]{\frac{{\rm d}^{#1} #2}{{\rm d} #3^{#1}}}
 \newcommand{\ul}[1]{\underline{#1}}
 \newcommand{\verts}[1]{\left\vert\, #1 \,\right\vert}
 \newcommand{\wt}[1]{\widetilde{#1}}$
$\ds{\int_{0}^{1}\ln\pars{x}\ln\pars{b - x}\,\dd x:\ {\large ?}\,,\qquad b > 1}$.

With $\ds{0 < \epsilon < 1}$:
  \begin{align}&\totald{}{b}
\color{#c00000}{\int_{\epsilon}^{1}\ln\pars{x}\ln\pars{b - x}\,\dd x}
=\int_{\epsilon}^{1}\ln\pars{x}\bracks{-\,\partiald{\ln\pars{b - x}}{x}}\,\dd x
\\[3mm]&=\ln\pars{\epsilon}\ln\pars{b - \epsilon}
+\int_{\epsilon}^{1}\ln\pars{b - x}\,{1 \over x}\,\dd x
\\[3mm]&=\ln\pars{\epsilon}\ln\pars{b - \epsilon}
+\int_{\epsilon/b}^{1/b}{\ln\pars{b} + \ln\pars{1 - x} \over x}\,\dd x
\\[3mm]&=\ln\pars{\epsilon}\ln\pars{b - \epsilon}
+\ln\pars{b}\bracks{\ln\pars{1 \over b} - \ln\pars{\epsilon \over b}}
-\int_{\epsilon/b}^{1/b}{\rm Li}_{1}\pars{x}\,\dd x
\\[3mm]&=\ln\pars{\epsilon}\bracks{\ln\pars{b - \epsilon} - \ln\pars{b}}
-\int_{\epsilon/b}^{1/b}\totald{{\rm Li}_{2}\pars{x}}{x}\,\dd x
\\[3mm]&=\
\overbrace{\ln\pars{\epsilon}\bracks{\ln\pars{b - \epsilon} - \ln\pars{b}}}
^{\ds{\to\ 0\quad\mbox{when}\quad\epsilon\ \to\ 0^{+}}}\ -\
{\rm Li}_{2}\pars{1 \over b} + {\rm Li}_{2}\pars{\epsilon \over b} 
\end{align}

$$
\totald{}{b}
\color{#c00000}{\int_{0}^{1}\ln\pars{x}\ln\pars{b - x}\,\dd x}
=
-{\rm Li}_{2}\pars{1 \over b}
$$

\begin{align}
\color{#c00000}{\int_{0}^{1}\ln\pars{x}\ln\pars{b - x}\,\dd x}
=\overbrace{\quad-\int_{0}^{1}\ln\pars{x}\ln\pars{1 - x}\,\dd x\quad}
^{\ds{-2 + {\pi^{2} \over 6}}}\
-\ \int_{1}^{b}{\rm Li}_{2}\pars{1 \over t}\,\dd t
\end{align}
  In the RHS, the first integral is easily evaluated by means of a Beta function or/and $\ds{\ln\pars{1 - x}}$ expansion. The second one is evaluated, in a rather cumbersome way, by using the serie definition of $\ds{{\rm Li}_{2}\pars{z}}$. I see other answers already did that.

