TITLE: Prove that $\int_{0}^{\infty}{1\over x^4+x^2+1}dx=\int_{0}^{\infty}{1\over x^8+x^4+1}dx$
QUESTION [16 upvotes]: Let

$$I=\int_{0}^{\infty}{1\over x^4+x^2+1}dx\tag1$$
  $$J=\int_{0}^{\infty}{1\over x^8+x^4+1}dx\tag2$$

Prove that $I=J={\pi \over 2\sqrt3}$

Sub: $x=\tan{u}\rightarrow dx=\sec^2{u}du$
$x=\infty \rightarrow u={\pi\over 2}$, $x=0\rightarrow u=0$
Rewrite $(1)$ as
$$I=\int_{0}^{\infty}{1\over (1+x^2)^2-x^2}dx$$
then
$$\int_{0}^{\pi/2}{\sec^2{u}\over \sec^4{u}-\tan^2{u}}du\tag3$$
Simplified to
$$I=\int_{0}^{\pi/2}{1\over \sec^2{u}-\sin^2{u}}du\tag4$$
Then to
$$I=2\int_{0}^{\pi/2}{1+\cos{2u}\over (2+\sin{2u})(2-\sin{2u})}du\tag5$$
Any hints on what to do next?

Re-edit (Hint from Marco)
$${1\over x^8+x^4+1}={1\over 2}\left({x^2+1\over x^4+x^2+1}-{x^2-1\over x^4-x^2+1}\right)$$
$$M=\int_{0}^{\infty}{x^2+1\over x^4+x^2+1}dx=\int_{0}^{\infty}{x^2\over x^4+x^2+1}dx+\int_{0}^{\infty}{1\over x^4+x^2+1}dx={\pi\over \sqrt3}$$
$$N=\int_{0}^{\infty}{x^2-1\over x^4-x^2+1}dx=0$$
$$J=\int_{0}^{\infty}{1\over x^8+x^4+1}dx={1\over 2}\left({\pi\over \sqrt3}-0\right)={\pi\over 2\sqrt3}.$$

REPLY [2 votes]: Here is an alternative approch using complex analysis. Since both integrands are even one can start with integrating around the singularities in the positive half-plane using the residue theorem which yields
$$
\begin{align*}
 \frac{1}{2}\int_{-\infty}^\infty \frac{1}{x^4+x^2+1}\,\mathrm dx
 &= \pi\mathrm i\left(\operatorname{Res}_{z=\sqrt[3]{-1}}\left(\frac{1}{z^4+z^2+1}\right) + \operatorname{Res}_{z=(-1)^{2/3}}\left(\frac{1}{z^4+z^2+1}\right)\right)\\
 &= \pi\mathrm i\left(\frac{1}{4\sqrt[3]{-1}^3+2\sqrt[3]{-1}} + \frac{1}{4((-1)^{2/3})^3+2(-1)^{2/3}}\right)\\
 &= \pi\mathrm i\left(-\frac{\mathrm i}{2\sqrt{3}}\right)\\
 &= \frac{\pi}{2\sqrt{3}}
\end{align*}
$$
and similiarly the second integral
$$
\begin{align*}
 \frac{1}{2}\int_{-\infty}^\infty \frac{1}{x^8+x^4+1}\,\mathrm dx
 &= \pi\mathrm i\left(\operatorname{Res}_{z=\sqrt[6]{-1}}\left(\frac{1}{z^8+z^4+1}\right) + \operatorname{Res}_{z=\sqrt[3]{-1}}\left(\frac{1}{z^8+z^4+1}\right)\right.\\
 &\qquad \left.+ \operatorname{Res}_{z=(-1)^{2/3}}\left(\frac{1}{z^8+z^4+1}\right) + \operatorname{Res}_{z=(-1)^{5/6}}\left(\frac{1}{z^8+z^4+1}\right)\right)\\
 &= \pi\mathrm i\left(\frac{1}{8(\sqrt[6]{-1})^7+4(\sqrt[6]{-1})^3} + \frac{1}{8(\sqrt[3]{-1})^7+4(\sqrt[3]{-1})^3}\right.\\
 &\qquad \left. + \frac{1}{8((-1)^{2/3})^7+4((-1)^{2/3})^3} +\frac{1}{8((-1)^{5/6})^7+4((-1)^{5/6})^3} \right)\\
 &= \pi\mathrm i\left(-\frac{\mathrm i}{2\sqrt{3}}\right)\\
 &= \frac{\pi}{2\sqrt{3}}
\end{align*}
$$
thus both are equal indeed.