Evaluate the integral $\int_0^\infty \frac{x (\ln(x))^2}{x^4 + x^2 + 1}\text{ d}x$ What is the value of $\displaystyle\int_0^\infty \frac{x (\ln(x))^2}{x^4 + x^2 + 1}\text{ d}x$?
This is a question I came up with myself. It is not homework.
I constructed this example to make the following technique work:

 Integrate $\frac{z (\log(z))^3}{z^4 + z^2 + 1}$ along a "key-hole" contour. The argument can be made rigorous by splitting the contour into two parts, and using two different branch cuts for each part. Warning: This method is time-consuming and not for the faint-hearted

 A: Let's actually do the integral using the keyhole contour.  It may be time-consuming but it is not as bad as it looks.
We can begin by simplifying the integral using the substitution $u=x^2$:
$$I = \frac18 \int_0^{\infty} du \frac{\log^2{u}}{u^2+u+1} $$
Consider
$$\oint_C dz \frac{\log^3{z}}{z^2+z+1}$$
where $C$ is the keyhole contour, as pictured below.  

The integral over the circular arcs vanish, and the contour integral is equal to
$$i \left ( -6 \pi \int_0^{\infty} dx \frac{\log^2{x}}{x^2+x+1} + 8 \pi^3  \int_0^{\infty} dx \frac{1}{x^2+x+1}\right ) + 12 \pi^2  \int_0^{\infty} dx \frac{\log{x}}{x^2+x+1}$$
We can easily show that 
$$\int_0^{\infty} dx \frac{\log{x}}{x^2+x+1} = 0$$
by splitting up the integration interval into $[0,1]$ and $[1,\infty)$ and subbing $x=1/u$ in the latter subinterval.
Now, we can evaluate the other integral any way we want, but let's stay consistent within our chosen methodology, and evaluate the integral using the residue theorem, all the same.  Let the poles of the denominator be $z_{\pm}$; here
$$z_+ = e^{i 2 \pi/3} \quad z_-=e^{i 4 \pi/3} $$
Then
$$\int_0^{\infty} dx \frac{1}{x^2+x+1} = - \left (\frac{\log{z_+}}{2 z_++1} +\frac{\log{z_-}}{2 z_-+1}\right ) = -\frac{i 2 \pi/3}{i \sqrt{3}} +  \frac{i 4 \pi/3}{i \sqrt{3}} = \frac{2 \pi}{3 \sqrt{3}}$$
The contour integral is of course equal to $i 2 \pi$ times the sum of the residues at $z=z_{\pm}$. Thus we have
$$-3 \int_0^{\infty} dx \frac{\log^2{x}}{x^2+x+1} + 4 \pi^2 \frac{2 \pi}{3 \sqrt{3}} = \left (\frac{\log^3{z_+}}{2 z_++1} +\frac{\log^3{z_-}}{2 z_-+1}\right ) = \frac{56 \pi^3}{27 \sqrt{3}}$$
Thus, from above, we have
$$\int_0^{\infty} dx \frac{x \log^2{x}}{x^4+x^2+1} = \frac{2 \pi^3}{81 \sqrt{3}} $$
A: \begin{align}
\int^\infty_0\frac{x\ln^2{x}}{x^4+x^2+1}dx
&=\frac{1}{8}\int^\infty_0\frac{\ln^2{x}}{x^2+x+1}dx\\
&=\frac{1}{4}\int^1_0\frac{(1-x)\ln^2{x}}{1-x^3}dx\\
&=\frac{1}{4}\sum^\infty_{n=0}\int^1_0\left(x^{3n}-x^{3n+1}\right)\ln^2{x}dx\\
&=\frac{1}{2}\sum^\infty_{n=0}\left(\frac{1}{(3n+1)^3}-\frac{1}{(3n+2)^3}\right)\\
&=-\frac{1}{2}\operatorname*{Res}_{z=-1/3}\frac{\pi\cot(\pi z)}{(3z+1)^3}\\
&=-\frac{1}{108}\left(2\pi^3\cot(\pi z)\csc^2(\pi z)\right)\Bigg{|}_{z=-1/3}\\
&=\frac{2\pi^3}{81\sqrt{3}}
\end{align}
A: May be, this will be totally off-topic; if this is the case, please, forgive me.
What I found interesting is that $$I=\int \frac{x \big(\ln(x)\big)^2}{x^4 + x^2 + 1}\text{ d}x$$ has  (found by a CAS) a closed form mainly in terms of polylogarithms. 
The next point is that, using the so-found antiderivative, $$\int_0^\infty \frac{x \big(\ln(x)\big)^2}{x^4 + x^2 + 1}\text{ d}x=\frac{2 \pi ^3}{81 \sqrt{3}}$$
