$\int_{0}^{\infty}\frac{\cos2\pi x}{x^4+x^2+1}dx=-\frac{\pi}{2\sqrt{3}}\mathrm{e}^{-\pi\sqrt{3}}$ Can somebody help me out with the following integral?
Prove that:
$\int_{0}^{\infty}\frac{cos2\pi x}{x^4+x^2+1}dx=\frac{-\pi}{2\sqrt{3}}e^{-\pi\sqrt{3}}$
I have already determined the singularities: $z=e^{\frac{\pi i}{3}}$  and $z=e^{\frac{2\pi i}{3}}$. These are poles of order one. But determining the integral with the residue theorem doesn't work. Can anybody help me?
For the first residue I find: $Res(f,z)=\frac{e^{iz}}{4z^3+2z}$  (with z the first value above) and for the second in the same way. 
 A: Hint: $\cos$ is even, and $\sin$ odd, so
$$\int_0^\infty \frac{\cos (2\pi x)}{x^4+x^2+1}\,dx = \frac{1}{2} \int_{-\infty}^\infty \frac{\cos (2\pi x)}{x^4+x^2+1}\,dx = \frac{1}{2} \int_{-\infty}^\infty  \frac{e^{2\pi ix}}{x^4+x^2+1}\,dx.$$

For the first residue I find: $Res(f,z)=\frac{e^{iz}}{4z^3+2z}$  (with z the first value above) and for the second in the same way.

You forgot the factor $2\pi$ in the exponent, the residue is
$$\frac{e^{2\pi iz}}{4z^3 + 2z}.$$
A: $$x^4+x^2+1=0\iff x_{1,2}^2=\frac{-1\pm\sqrt3\,i}2\implies\begin{cases}x_{1,2}=\pm\left(\frac12+\frac{\sqrt3}2i\right)=\pm e^{\pi i/3}\\{}\\x_{3,4}=\pm\left(-\frac12+\frac{\sqrt3}2i\right)=\pm e^{2\pi i/3}\end{cases}$$
Taking
$$f(z)=\frac{e^{2\pi iz}}{z^4+z^2+1}\;,\;\;C_R=[-R,R]\cup\gamma_R:=\{z\in\Bbb C\;;\;z=Re^{it}\;,\;R\in\Bbb R^+\;,\;0<t<\pi\}$$
We get that only the (simple) poles $\;x_1,x_3\;$ are within out contour's region, so
$$\begin{align*}\text{Res}_{z=x_1}(f)&=\lim_{z\to x_1}(z-x_1)f(z)\stackrel{\text{l'Hospital}}=\frac{e^{\pi i(1+\sqrt3i)}}{-4+1+\sqrt3i}=-\frac{e^{\pi(-\sqrt 3+i)}}{3-\sqrt3i}\\{}\\
\text{Res}_{z=x_3}(f)&=\lim_{z\to x_3}(z-x_3)f(z)\stackrel{\text{l'Hospital}}=\frac{e^{\pi i(-1+\sqrt3i)}}{4-1+\sqrt3i}=\frac{e^{\pi(-\sqrt 3-i)}}{3+\sqrt3i}\end{align*}$$
Try to take it from here.
