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

\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}