I note that Mathematica could yield the identity
$$\int\_0^1\frac{\log(1+x^2(x-1)/2)}{x^2(x-1)}dx=\frac{\pi(\pi-4)-12\log^22+24\log2}{16}.\tag{1}\label{1}$$
But I don't know how Mathematica got this.


**Question.** How to prove \eqref{1} manually?


Your comments are welcome!



For a manual evaluation of a definite integral
With Mathematica, one can actually find an antiderivative $F=G+H$ of the function $f$, where
$$f(x):=\frac{\ln(1+x^2(x-1) /2)}{x^2(x-1)},$$
$$G(x):=-\text{Li}\_2\left(\frac{1-x}{2}\right)-\frac{1}{2}
 \text{Li}\_2\left(-(x-1)^2\right)+\text{Li}\_2(-x)+\text{Li}\_2\left(\left(\frac{1}{2}-\frac{i}{2}\right) x\right)+\text{Li}\_2\left(\left(\frac{1}{2}+\frac{i}{2}\right) x\right),$$
\begin{gather}
 H(x):=\frac{\left(x \ln \left(\frac{x-1}{x}\right)+1\right) \ln \left(\frac{1}{2} (x-1)
 x^2+1\right)}{x}+\ln (x+1) \\ 
 +\ln (x) \left(\ln
 \left(1-\left(\frac{1}{2}+\frac{i}{2}\right) x\right)+\ln
 \left(1-\left(\frac{1}{2}-\frac{i}{2}\right) x\right)+\ln (x+1)\right) \\ 
 -\ln (x-1)
 \left(\ln (i x+(1-i))+\ln \left(\frac{1}{2} ((1+i)-i x)
 (x+1)\right)\right) \\ 
 -\frac{1}{2} \ln ((x-2) x+2)+\tan ^{-1}(1-x). 
\end{gather}
This can be verified by differentiation, since $\text{Li}'\_2(x)=-\ln(1-x)/x$.


The desired result now follows because
$$G(0)=\frac{\ln ^2(2)}{2}-\frac{\pi ^2}{24},\quad G(1)=\frac{1}{48} \left(\pi ^2-12 \ln ^2(2)\right),$$
$$\lim\_{x\to0}H(x)=(\pi - \ln4)/4,\quad \lim\_{x\to1}H(x)=\ln2.$$




---


The indefinite integral of $f$ can be found "more manually" as follows. Integrate $f$ by parts, to get an integrand of the form $R(x)+R\_0(x)\ln x+R\_1(x)\ln(1-x)$ instead of $f(x)=\dfrac{\ln(1+x^2(x-1) /2)}{\cdots}$, where $R(x),R\_0(x),R\_1(x)$ are certain rational expressions. Use then partial fraction decomposition (involving certain complex constants) to reduce the integrand to ones of the form $\frac{\ln u}{u+a}$, and note that
$$\int \frac{\ln u}{u+a}\,du=
\text{Li}\_2\left(-\frac{u}{a}\right)+\ln(u) \ln\left(\frac{a+u}{a}\right)+C.$$


