How to evaluate the integral $\int_{0}^{1} \frac{(\log {x})^2}{\sqrt{x^2(1-x)^2+x^2+(1-x)^2}}dx$ $$I=\int_{0}^{1} \frac{(\log {x})^2}{\sqrt{x^2(1-x)^2+x^2+(1-x)^2}}dx$$
My attempt:
$$I=\int_{0}^{1} \frac{(\log {x})^2}{\sqrt{x^2(1-x)^2-2x(1-x)+(x+1-x)^2}}dx$$
$$=\int_{0}^{1} \frac{(\log {x})^2}{\sqrt{(1-x(1-x))^2}}dx=\int_{0}^{1} \frac{(\log {x})^2}{(x^2-x+1)}dx$$
How do I proceed further next step?
 A: Notice that
$$ I = \frac{1}{2} \int_{0}^{\infty} \frac{\log^2 x}{x^2-x+1} \, dx.$$
To evaluate this integral, we consider the following contour integral
$$ J = \oint_{C}\frac{\operatorname{Log}^3z}{z^2-z+1} \, dz,$$
where $\operatorname{Log}z$ is the complex logarithm with the branch cut $[0,\infty)$ and $C$ is a keyhole contour enclosing this branch cut. A standard argument shows that $J$ reduces to
$$ J
= \int_{0}^{\infty} \frac{\log^3 x - (2\pi i + \log x)^3}{x^2 - x + 1} \, dx.
\tag{1} $$
On the other hand, in the region enclosed by $C$, there are two simple poles of the integrand at $z_1 = e^{\pi i/3}$ and $z_2 = e^{5\pi i/3}$. So by the residue theorem,
$$ J = 2\pi i \sum_{a \in \{z_1, z_2\}} \underset{z=a}{\mathrm{Res}} \, \frac{\operatorname{Log}^3 z}{z^2-z+1} = \frac{248 \pi^4 i}{27\sqrt{3}}. \tag{2} $$
Comparing imaginary parts of $\text{(1)}$ and $\text{(2)}$, we obtain
$$ \frac{248 \pi^4}{27\sqrt{3}} = \operatorname{Im}(J) = \int_{0}^{\infty} \frac{8\pi^3  - 6\pi \log^2 x}{x^2 - x + 1} \, dx $$
and solving this equation with respect to $I$ together with $\int_{0}^{\infty} \frac{dx}{x^2 - x + 1} = \frac{4\pi}{3\sqrt{3}}$ gives
$$ I = \frac{10\pi^3}{81\sqrt{3}}. $$
A: Here is another method:
\begin{eqnarray}
I&=&\int_{0}^{1} \frac{(\log {x})^2}{x^2-x+1}dx=\int_{0}^{1} \frac{(1+x)(\log {x})^2}{1+x^3}dx\\
&=&\int_{0}^{1}(1+x)\log^2x\sum_{k=0}^\infty(-1)^kx^{3k}dx\\
&=&\sum_{k=0}^\infty(-1)^k\int_0^1(x^{3k}+x^{3k+1})\log^2xdx\\
&=&2\sum_{k=0}^\infty(-1)^k\left[\frac{1}{(3k+1)^3}+\frac{1}{(3k+2)^3}\right]\\
&=&2\sum_{k=-\infty}^\infty(-1)^k\frac{1}{(3k+1)^3}\\
&=&-2\pi\text{Res}\left(\frac{1}{(3z+1)^3\sin(\pi z)},z=-\frac13\right)\\
&=&\frac{10\pi^3}{81\sqrt3}.
\end{eqnarray}
