<s>[INST] Prove that $\int_{-\infty}^{+\infty} \frac{1}{x^4+x^2+1}dx = \frac{\pi}{\sqrt{3}}$ Good evening everyone,
how can I prove that
$$\int_{-\infty}^{+\infty} \frac{1}{x^4+x^2+1}dx = \frac{\pi}{\sqrt{3}}\;?$$
Well, I know that $\displaystyle\frac{1}{x^4+x^2+1} $ is an even function and the interval $(-\infty,+\infty)$ is symmetric about zero, so
$$\int_{-\infty}^{+\infty} \frac{1}{x^4+x^2+1}dx = 2\int_0^\infty \frac{1}{x^4+x^2+1}dx.$$
Then I use the partial fraction:
$$2\int_0^\infty \frac{1}{x^4+x^2+1}dx= 2\int_0^\infty \left( \frac{1-x}{2(x^2-x+1)} + \frac{x+1}{2(x^2+x+1)} \right)dx.$$
So that's all. What's next step?
 [/INST] $$x^4 + x^2 + 1 = 0 \implies x = \frac{1 \pm i\sqrt{3}}{2}, \frac{-1 \pm i\sqrt{3}}{2}$$
Only consider the two positive roots,
$$a, b = \frac{1 + i\sqrt{3}}{2}, \frac{-1 + i\sqrt{3}}{2}$$
Consider a semi circle contour $C$, with radius $R$ and upper semi-circle $\Gamma$
In other words, $C = \text{line} + \Gamma$
The integral around the whole contour $C$ is given by:
$$\oint_{C} f(z) dz = (2\pi i)(\sum Res)$$
The sum of the residues is as follows: (ask if you dont understand)
$$\sum \text{Res}f(z) = \frac{-i}{2\sqrt{3}} $$
Then,
$$\oint_{C} f(z) dz = (2\pi i)(\sum Res) = (2\pi i)\cdot \frac{-i}{2\sqrt{3}} = \frac{\pi}{\sqrt{3}} $$
But realize that:
$$\oint_{C} f(z) dz = \int_{-R}^{R} f(x) dx + \int_{\Gamma} f(z) dz = \frac{\pi}{\sqrt{3}}$$ 
Using the M-L estimation lemma
You see that:
$$\left| \int_{\Gamma} \frac{1}{z^4 + z^2 + 1} dz   \right| \le \int_{\Gamma} \left|  \frac{1}{z^4 + z^2 + 1} \right|$$
You see that:
The point in polar representation is $z = Re^{i\theta}$
$$\left|  \frac{1}{z^4 + z^2 + 1} \right| = \left|  \frac{1}{R^4e^{4i\theta} + (R^2e^{2i\theta}) + 1} \right| $$
Since $\theta > 0$ we have:
$$\left|  \frac{1}{R^4e^{4i\theta} + (R^2e^{2i\theta}) + 1} \right| = \left|  \frac{1}{R^4(1) + R^2(1)) + 1} \right| = M$$
The perimeter along the semi-circle is $L(\Gamma) = \frac{1}{2} (2\pi R) =  \pi R$
The Ml inequality states:
$$\left| \int_{\Gamma} \frac{1}{z^4 + z^2 + 1} dz   \right| \le \int_{\Gamma} \left|  \frac{1}{z^4 + z^2 + 1} \right| \le ML(\Gamma) = \frac{\pi R}{R^4(1) + R^2(1)) + 1}$$
$$\lim_{R \to \infty} \frac{\pi R}{R^4(1) + R^2(1)) + 1} = 0$$
Back to:
$$\oint_{C} f(z) dz = \int_{-R}^{R} f(x) dx + \int_{\Gamma} f(z) dz = \frac{\pi}{\sqrt{3}}$$
Take the limit as $R \to \infty$
$$\frac{\pi}{\sqrt{3}} = \int_{-\infty}^{\infty} f(x) dx + \lim_{R \to \infty} \int_{\Gamma} f(z) dz = \int_{-\infty}^{\infty} f(x) dx + 0$$
Thus,
$$\int_{-\infty}^{\infty} f(x) dx = \int_{-\infty}^{\infty} \frac{1}{x^4 + x^2 + 1} dx = \frac{\pi}{\sqrt{3}}$$
</s>