Integral $I:=\int_0^1 \frac{\log^2 x}{x^2-x+1}\mathrm dx=\frac{10\pi^3}{81 \sqrt 3}$ Hi how can we prove this integral below?
$$
I:=\int_0^1 \frac{\log^2 x}{x^2-x+1}\mathrm dx=\frac{10\pi^3}{81 \sqrt 3}
$$
I tried to use
$$
I=\int_0^1 \frac{\log^2x}{1-x(1-x)}\mathrm dx
$$
and now tried changing variables to $y=x(1-x)$ in order to write
$$
I\propto \int_0^1 \sum_{n=0}^\infty y^n 
$$
however I do not know how to manipulate the $\log^2 x$ term when doing this procedure when doing this substitution.  If we can do this the integral would be trivial from here.
Complex methods are okay also, if you want to use this method we have complex roots at $x=(-1)^{1/3}$.  But what contour can we use suitable for the $\log^2x $ term?
Thanks
 A: Real Part
Substituting $x\mapsto1/x$ says
$$
\int_0^1\frac{\log(x)^2}{x^2-x+1}\mathrm{d}x
=\int_1^\infty\frac{\log(x)^2}{x^2-x+1}\mathrm{d}x\tag{1}
$$
Therefore,
$$
\int_0^1\frac{\log(x)^2}{x^2-x+1}\mathrm{d}x
=\frac12\int_0^\infty\frac{\log(x)^2}{x^2-x+1}\mathrm{d}x\tag{2}
$$

Contour Integration Part
Putting the branch cut for $\log(z)$ along the positive real axis, and using the contour
$$
\gamma=[0,R]e^{i\epsilon}\cup Re^{i[\epsilon,2\pi-\epsilon]}\cup[R,0]e^{-i\epsilon}\tag{3}
$$
as $R\to\infty$ and $\epsilon\to0$, $\log(z)=\log(x)$ on the outbound segment and $\log(z)=\log(x)+2\pi i$ on the inbound segment and he integral around huge circular arc vanishes.  Therefore,
$$
\begin{align}
\int_\gamma\frac{\log(z)^3}{z^2-z+1}\mathrm{d}z
&=\int_0^\infty\frac{-6\pi i\log(x)^2+12\pi^2\log(x)+8\pi^3i}{x^2-x+1}\mathrm{d}x\\
&=\frac{124\pi^3}{27\sqrt3}\cdot2\pi i\tag{4}
\end{align}
$$
where $\dfrac{124\pi^3}{27\sqrt3}$ is the sum of the residues of $\dfrac{\log(z)^3}{z^2-z+1}$ at $e^{i\pi/3}$ and $e^{i5\pi/3}$.

Combining Real and Complex Analysis
Therefore, using $(2)$ and the imaginary part of $(4)$, we get
$$
\begin{align}
\int_0^1\frac{\log(x)^2}{x^2-x+1}\mathrm{d}x
&=\frac12\int_0^\infty\frac{\log(x)^2}{x^2-x+1}\mathrm{d}x\\
&=\frac12\left[-\frac{124\pi^3}{81\sqrt3}
+\frac{4\pi^2}{3}\int_0^\infty\frac1{x^2-x+1}\mathrm{d}x\right]\\
&=\frac12\left[-\frac{124\pi^3}{81\sqrt3}
+\frac{4\pi^2}{3}\frac{4\pi}{3\sqrt3}\right]\\
&=\frac{10\pi^3}{81\sqrt3}\tag{5}
\end{align}
$$
A: Setting $x\mapsto\frac1x$, we obtain
$$
\int_0^1\frac{\ln^2x}{x^2-x+1}\ dx
=\frac12\int_0^\infty\frac{\ln^2x}{x^2-x+1}\ dx.\tag1
$$
Note that $1+x^3=(1+x)(x^2-x+1)$, hence
$$
\frac12\int_0^\infty\frac{\ln^2x}{x^2-x+1}\ dx=\frac12\int_0^\infty\left[\frac{\ln^2x}{1+x^3}+\frac{x\ln^2x}{1+x^3}\right]\ dx.\tag2
$$
Now consider beta function
$$
\int_0^\infty\dfrac{x^{\large \alpha-1}}{1+x^{\beta}}\ dx=\frac{\pi}{\beta\sin\left(\frac{\alpha\pi}{\beta}\right)}\quad;\quad\text{for}\ 0<\alpha<\beta.\tag3
$$
Differentiating $(3)$ with respect to $\alpha$ twice yields
$$
\int_0^\infty\dfrac{x^{\alpha-1}\ln^2x}{1+x^{\beta}}\ dx=\frac{\pi^3\left[\cos\left(\frac{2\alpha\pi}{\beta}\right)+3\right]}{2\beta^3\sin^3\left(\frac{\alpha\pi}{\beta}\right)}.\tag4
$$
Evaluating $(2)$ using $(4)$, we obtain
\begin{align}
\frac12\int_0^\infty\left[\frac{\ln^2x}{1+x^3}+\frac{x\ln^2x}{1+x^3}\right]\ dx&=\frac{\pi^3}{4\cdot3^3}\left[\frac{\cos\left(\frac{2\pi}{3}\right)+3}{\sin^3\left(\frac{\pi}{3}\right)}+\frac{\cos\left(\frac{4\pi}{3}\right)+3}{\sin^3\left(\frac{2\pi}{3}\right)}\right]\\
\int_0^1\frac{\ln^2x}{x^2-x+1}\ dx&=\large\color{blue}{\frac{10\pi^3}{81\sqrt3}}.
\end{align}
A: Hint:
Consider the change of variable $x=1/t$ hence you have 
$$2I = \int^\infty_0 \frac{\log^2(t)}{t^2-t+1}\,dt$$
Now integrate the function 
$$f(z)  =\frac{\log^3(z)}{z^2-z+1}$$
Along a key hole contour indented at 0
A: $\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{I\equiv\int_{0}^{1}{\ln^{2}\pars{x} \over x^{2} - x + 1}\,\dd x
     ={10\pi^{3} \over 81\root3}:\ {\large ?}}$

Zeros of $\ds{x^{2} - x + 1=0}$ are given by
  $\ds{z}$ and $\ds{z^{*} = {1 \over z}}$ where
  $\ds{z \equiv {1 + \root{3}\ic \over 2} = \expo{\ic\pi/3}}$ such that

\begin{align}
I&\equiv\int_{0}^{1}{\ln^{2}\pars{x} \over \pars{x - z}\pars{x - z^{*}}}\,\dd x
=\int_{0}^{1}\ln^{2}\pars{x}
\pars{{1 \over x - z^{*}} - {1 \over x - z}}\,{1 \over z^{*} - z}
\\[3mm]&=-\,{1 \over 2\ic\,\Im\pars{z}}\,
2\ic\,\Im\int_{0}^{1}{\ln^{2}\pars{x} \over x - z^{*}}\,\dd x
={2\root{3} \over 3}\,\Im\int_{0}^{1}{\ln^{2}\pars{x} \over z^{*} - x}\,\dd x
\end{align}

$$
I\equiv\int_{0}^{1}{\ln^{2}\pars{x} \over x^{2} - x + 1}\,\dd x
={2\root{3} \over 3}\,\Im
\color{#c00000}{\int_{0}^{z}{\ln^{2}\pars{z^{*}x} \over 1 - x}\,\dd x}
\tag{1}
$$

\begin{align}&\color{#c00000}{%
\int_{0}^{z}{\ln^{2}\pars{z^{*}x} \over 1 - x}\,\dd x}
=\int_{0}^{z}\log\pars{1 - x}\bracks{2\ln\pars{z^{*}x}\,{1 \over x}}\,\dd x
=-2\int_{0}^{z}{{\rm Li}_{1}\pars{x} \over x}\,\ln\pars{z^{*}x}\,\dd x
\end{align}
where ${{\rm Li}_{s}\pars{z}}$ is a PolyLogarithm Function. Then,
\begin{align}&\color{#c00000}{%
\int_{0}^{z}{\ln^{2}\pars{z^{*}x} \over 1 - x}\,\dd x}
=-2\int_{0}^{z}\partiald{{\rm Li}_{2}\pars{x}}{x}\,\ln\pars{z^{*}x}\,\dd x
=2\int_{0}^{z}{{\rm Li}_{2}\pars{x} \over x}\,\dd x
=2\int_{0}^{z}\partiald{{\rm Li}_{3}\pars{x}}{x}\,\dd x
\end{align}
where we used the
PolyLogarithm Recursive Property.
With this result and expression $\pars{1}$ we find:
$$
I\equiv\int_{0}^{1}{\ln^{2}\pars{x} \over x^{2} - x + 1}\,\dd x
={4\root{3} \over 3}\,\Im\,{\rm Li}_{3}\pars{z}
={4\root{3} \over 3}\,\Im\,{\rm Li}_{3}\pars{\expo{\ic\pi/3}}
$$
With Jonquière Inversion Formula:
$\ds{\Im\,{\rm Li}_{3}\pars{\expo{\ic\pi/3}} = {5\pi^{3} \over 162}}$.

$$
I\equiv\color{#66f}{\large\int_{0}^{1}{\ln^{2}\pars{x} \over x^{2} - x + 1}\,\dd x
={10\root{3} \over 243}\,\pi^{3}} \approx 2.2101
$$

A: Note
$$ \frac{1}{x^2-x+1}=\frac{1+x}{1+x^3}. $$
So
\begin{eqnarray*}
I&=&\int_0^1 \frac{\ln^2x}{x^2-x+1}dx=\int_0^1 \frac{(1+x)\ln^2x}{1+x^3}dx\\
&=&\sum_{n=0}^{\infty}(-1)^n \int_0^1(1+x)x^{3n}\ln^2xdx\\
&=&\sum_{n=0}^{\infty}(-1)^n \int_0^1(x^{3n}+x^{3n+1})\ln^2xdx\\
&=&2\sum_{n=0}^{\infty}(-1)^n\left(\frac{1}{(3n+1)^3}+\frac{1}{(3n+2)^3}\right)\\
&=&2\sum_{n=-\infty}^{\infty}(-1)^n\frac{1}{(3n+1)^3}\\
&=&\frac{10\pi^3}{81\sqrt3}.
\end{eqnarray*}
Here we use the following theorem
$$ \sum_{n=-\infty}^\infty (-1)^nf(n)=-\pi \sum_{k=1}^m\text{Re}(\frac{f(z)}{\sin\pi z},a_k) $$
where $a_1,a_2,\cdots,a_m$ are poles of $f(z)$. For $f(z)=\frac{1}{(3z+1)^3}$, $z=-\frac{1}{3}$ is the only pole and
$$ \text{Re}(\frac{f(z)}{\sin\pi z},-\frac{1}{3})=-\frac{5\pi^2}{81\sqrt3}. $$
Thus we have the result.
A: Consider the integral
\begin{align}
I = \int_{0}^{1} \frac{\ln^{2}(x)}{1 - x + x^{2}} \ dx 
\end{align}
Now consider the factorization of $x^{2} - x + 1$ which is $(x - a)(x-b)$ where $a$ and 
$b$ are $e^{\pi i/3}$ and $e^{-\pi i/3}$, respectively. With this in mind it is seen that
\begin{align}
\frac{1}{x^{2} - x + 1} = \frac{1}{a-b} \left( \frac{1}{x - a} - \frac{1}{x-b} \right).
\end{align}
This can also be expanded into series form and is
\begin{align}
\frac{1}{x^{2} - x + 1} = \frac{1}{a-b} \ \sum_{n=0}^{\infty} \left( - \frac{1}{a^{n+1}} 
 + \frac{1}{b^{n+1}} \right) x^{n}.
\end{align}
Now consider the integral
\begin{align}
I_{n} &= \int_{0}^{1} x^{n} \ln^{2}(x) \ dx = \partial_{n}^{2} \int_{0}^{1} x^{n} \ dx \\
&= \partial_{n}^{2} \left( \frac{1}{n+1} \right) \\
&= \frac{2}{(n+1)^{3}}.
\end{align}
Since the components are built the desired integral is seen as the following.
\begin{align}
I &= \int_{0}^{1} \frac{\ln^{2}(x)}{1 - x + x^{2}} \ dx  \\
&= \frac{1}{a-b} \ \sum_{n=0}^{\infty} \left( - \frac{1}{a^{n+1}} 
 + \frac{1}{b^{n+1}} \right) \ \int_{0}^{1} x^{n} \ln^{2}(x) \ dx \\
&= \frac{1}{a-b} \ \sum_{n=0}^{\infty} \left( - \frac{1}{a^{n+1}} 
 + \frac{1}{b^{n+1}} \right) \frac{2}{(n+1)^{3}} \\
&= \frac{2}{a-b} \ \sum_{n=1}^{\infty} \left( - \frac{1}{a^{n}} 
 + \frac{1}{b^{n}} \right) \frac{1}{n^{3}} \\
&= \frac{2}{a-b} \ \sum_{n=1}^{\infty} \left( \frac{a^{n}-b^{n}}{(ab)^{n}} 
 \right) \frac{1}{n^{3}} \\
&= \frac{2}{a-b} \ \sum_{n=1}^{\infty} \left( \frac{a^{n}}{n^{3}}
- \frac{b^{n}}{n^{3}} \right) \\
&= \frac{2}{a-b} \left[ Li_{3} (a) - Li_{3}(b) \right], 
\end{align}
where $Li_{3}(x)$ is the trilogarithm. Utilizing the results
\begin{align}
Li_{3}(a) &= Li_{3}(e^{\pi i/3}) = \frac{1}{3} \zeta(3) + \frac{5 \pi^{3} i }{162} \\
Li_{3}(b) &= Li_{3}(e^{-\pi i/3}) = \frac{1}{3} \zeta(3) - \frac{5 \pi^{3} i }{162} \\
a-b &= e^{\pi i /3} - e^{- \pi i/3} = \sqrt{3} i 
\end{align}
then 
\begin{align}
I &= \frac{2}{\sqrt{3} i} \cdot \frac{5 \pi^{3} i}{81} = \frac{10 \pi^{3}}{81 \sqrt{3}}.
\end{align}
Hence 
\begin{align}
\int_{0}^{1} \frac{\ln^{2}(x)}{1 - x + x^{2}} \ dx = \frac{10 \pi^{3}}{81 \sqrt{3}} .
\end{align}
A: Substituting $u = 1/x$ and averaging with the original integral gives that
$$
\int_0^{1} \frac{\ln^2 x}{x^2+2x\cos\varphi+1} dx = 
\frac{1}{2}\int_0^{\infty} \frac{\ln^2 x}{x^2+2x\cos\varphi+1} dx
$$
For real $\varphi$ and suitable complex $a$, we can prove using contours that $$ I(a) := \int_0^{\infty} \frac{x^{a}}{x^2+2x\cos\varphi+1} dx = \frac{\pi}{\sin(\pi a)} \frac{\sin(a\varphi)}{\sin(\varphi)}$$
Differentiating twice gives (and this is the most tedious part of the calculation)
$$ I''(a) := \int_0^{\infty} \frac{x^{a}\ln^2x}{x^2+2x\cos\varphi+1} dx = 
\frac{2\pi}{\sin \varphi}
\left[
-\phi ^2 \csc (\pi  a) \sin (a \phi )+\pi ^2 \csc ^3(\pi  a) \sin (a \phi )-2 \pi  \phi  \cot (\pi  a) \csc (\pi  a) \cos (a \phi )+\pi ^2 \cot ^2(\pi  a) \csc (\pi  a) \sin (a \phi )
\right]
$$
Letting $a$ tend to $0$ gives $I''(0) = \dfrac{2\varphi  \left(\pi ^2-\varphi ^2\right)}{3 \sin \varphi}$. For the integral under discussion, we have $\cos \varphi = -1/2$ so we may choose $\varphi = 2\pi/3$. This gives
$I''(0) =\dfrac{20 \pi ^3}{81\sqrt 3}$. Remembering the factor $1/2$ gives the desired answer.
A: Here is another way to do it.  Let $$I=\int_{0}^{1} \frac{(\ln(x))^2}{x^2-x+1} \ dx =\int_{0}^{1} \frac{(\ln(x))^2 (1+x)}{1+x^3} \ dx.$$ By a change of variables $x=\frac{1}{u}, \ dx =-\frac{1}{u^2} \ du,$ we have 
$$I=\int_{1}^{\infty} \frac{(\ln(u))^2 (1+u)}{1+u^3} \ du,$$ which implies
$$I=\frac{1}{2} \int_{0}^{\infty} \frac{(\ln(x))^2 (1+x)}{1+x^3} \ dx.$$ Now split the integrand into two terms 
$$I=\frac{1}{2} \int_{0}^{\infty} \frac{(\ln(x))^2}{x^3+1} \ dx + \frac{1}{2} \int_{0}^{\infty} \frac{x(\ln(x))^2}{x^3+1} \ dx.$$ The two terms are equal to one another, which can be shown by the same change of variables $x= \frac{1}{u}$ on the first term.Thus, 
$$I= \int_{0}^{\infty} \frac{(\ln(x))^2}{x^3+1} \ dx.$$ 
Now consider the triple integral 
$$J=\int_{0}^{\infty}\int_{0}^{\infty}\int_{0}^{\infty} \frac{xy}{(1+x^2)(1+y^2)(1+x^2y^2z^3)} \ dz \ dy \ dx.$$
Make the change of variables $z=\frac{u}{(xy)^{\frac{2}{3}}}, \ dz = \frac{1}{xy^{\frac{2}{3}}} \ du,$ to see 
$$J=\int_{0}^{\infty}\int_{0}^{\infty}\int_{0}^{\infty} \frac{(xy)^{\frac{1}{3}}}{(1+x^2)(1+y^2)(1+u^3)} \ du \ dy \ dx.$$ Apply the well known formula 
$$\int_{0}^{\infty} \frac{t^m}{1+t^n} \ dt= \frac{\pi}{n} \csc \left( \frac{\pi(m+1)}{n} \right)$$ thrice to find $$J=\frac{2 \pi^3}{9\sqrt{3}}.$$ 
Now reverse the order of integration as such. $$J=\int_{0}^{\infty}\int_{0}^{\infty}\int_{0}^{\infty} \frac{xy}{(1+x^2)(1+y^2)(1+x^2y^2z^3)} \ dx \ dz \ dy.$$ Applying partial fractions or Mathematica gives us that 
$$J=\int_{0}^{\infty}\int_{0}^{\infty}\frac{y\ln(y)}{(1+y^2)(-1+y^2z^3)} \ dz \ dy+ \frac{3}{2} \int_{0}^{\infty}\int_{0}^{\infty}\frac{y\ln(z)}{(1+y^2)(-1+y^2z^3)} \ dz \ dy=J_1+J_2$$ Reverse the order of integration on $J_2$ and use partial fractions to see 
$$J_2=\frac{9}{4}I.$$
Now we focus on the first term $J_1$ Apply partial fractions or use Mathematica to see that 
$$J_1=-\frac{\pi}{3 \sqrt{3}} \int_{0}^{\infty} \frac{y^{\frac{1}{3}} \ln(y)}{y^2+1} \ dy.$$
We expand $$J_1 =\frac{\pi}{3 \sqrt{3}} \int_{0}^{\infty} \int_{0}^{\infty} \frac{ty^{\frac{1}{3}}}{(1-t^2y^2)(1+t^2)} \ dt \ dy.$$ This equality is true by using partial fractions to evaluate the inner integral. Reversing the order of integration, and using partial fractions again, we get that 
$$J_1=\frac{-\pi^2}{18} \int_{0}^{\infty} \frac{t^{\frac{-1}{3}}}{1+t^2} \ dt= \frac{-\pi^3}{18\sqrt{3}}$$ by our aforementioned well-known integral formula. 
Since $$J=J_1+ \frac{9}{4}I,$$ and $J=\frac{2 \pi ^3}{9\sqrt{3}}$ and $J_1= \frac{-\pi^3}{18\sqrt{3}},$ we have that $$I=\frac{4}{9}\left(\frac{2 \pi ^3}{9\sqrt{3}}+\frac{\pi^3}{18\sqrt{3}}\right)=\frac{10 \pi ^3}{81\sqrt{3}}.$$
