Calculating integrals using method of Cauchy residues Calculate by the method of residues 
$$\int_{0}^{\infty} \frac {x^2 dx}{x^4+6x^2+13}.$$ 
I am stuck in finding the residues and the contour, any hint?
 A: Let $I$ be given by
$$I=\int_0^\infty \frac{x^2}{x^4+6x^2+13}\,dx$$
Enforce the substitution $x\to 1/x$ to reveal
$$I=\int_0^\infty \frac{1}{13x^4+6x^2+1}\,dx$$
Then, noting that the integrand is an even function, we can write
$$I=\frac12 \int_{-\infty}^\infty \frac{1}{13x^4+6x^2+1}\,dx \tag 1$$
Now, we move to the complex plane and analyze the integral
$$\begin{align}
J&=\frac12 \oint_{C}\frac{1}{13z^4+6z^2+1}\,dz\\\\
&=\frac12 \int_{-R}^R \frac{1}{13x^4+6x^2+1}\,dx+\int_0^\pi \frac{1}{13R^4e^{i4\phi}+6R^2e^{i2\phi}+1}\,iRe^{i\phi}\,d\phi \tag 2\\\\
&=\pi i \left(\text{Res}\left(\frac{1}{13z^4+6z^2+1}, z=z_1\right)+\text{Res}\left(\frac{1}{13z^4+6z^2+1}, z=z_2\right)\right) \tag 3\\\\
&=\pi i \left(\frac{1}{52z_1^3+12z_1}+\frac{1}{52z_2^3+12z_2}\right) \tag 4
\end{align}$$
where $z_1=\sqrt{\frac{-3+i2}{13}}$ and $z_2=-\sqrt{\frac{-3-i2}{13}}$ are the roots of $13z^4+6z^2+1$ in the upper-half plane.

NOTES:
In going from $(2)$ to $(3)$, we used the Residue Theorem.
In going from $(3)$ to $(4)$, we applied L'Hospital's Rule to find the residues as 
$$\lim_{z\to z_{1,2}}\frac{(z-z_{1,2})}{13z^4+6z^2+1}=\frac{1}{52z_{1,2}^3+12z_{1,2}}$$

As $R\to \infty$, the first integral on the right-hand side of $(2)$ approaches $I$ while the second approaches zero.  Therefore, we find that $I$ as given in $(1)$ is given by
$$\begin{align}
I&=\frac{\pi i}{4} \left(\frac{1}{z_1(13z_1^2+3)}+\frac{1}{z_2(13z_2^2+3)}\right)\\\\
&=\frac{\pi}{8}\left(\frac{1}{z_1}+\frac{1}{z_2}\right)\\\\
&=\frac{\pi}{4}\text{Re}\left(\sqrt{-3+i2}\right)\\\\
&=\frac{\pi}{4}\sqrt{\frac{\sqrt{13}-3}{2}}
\end{align}$$
