<s>[INST] Using Residue theorem to evaluate the integral Using Residue theorem to evaluate the integral: 
$$\int_0^{\infty} \frac{x^2}{x^4 + 5x^2 +6}dx$$
I am using partial fraction to get: 
$$\int_0^{\infty} \left( \frac{3}{x^2 +3} - \frac{2}{x^2+2} \right)dx$$
Then, next step, can someone show me how to use Residue theorem to evaluate the integral. 
 [/INST] You just use partial fraction expansion again, for each of the quadratic terms.  We have
$$\frac{1}{x^2+3}=\frac{1}{i2\sqrt{3}}\left(\frac{1}{x-i\sqrt{3}}-\frac{1}{x+i\sqrt{3}}\right)$$
and
$$\frac{1}{x^2+2}=\frac{1}{i2\sqrt{2}}\left(\frac{1}{x-i\sqrt{2}}-\frac{1}{x+i\sqrt{2}}\right)$$
Can you finish from here?
SPOLIER ALERT:  SCROLL OVER THE SHADED AREA TO SEE THE REST OF THE ANSWER

First we note that the integrand is even and therefore we can write the integral of interest $I$ as $$I=\int_0^{\infty}\frac{x^2}{x^4+5x^2+6}dx=\frac12\int_{-\infty}^{\infty}\frac{x^2}{x^4+5x^2+6}dx$$  Next, we move to the complex plane and analyze the integral $$\oint_{C}\frac{z^2}{z^4+5z^2+6}dz$$where $C$ is the contour in the upper-half plane comprised of the real-line segment from $x=-R$ to $x=R$ and the semi-circle with radius $R$ and centered at the origin.  Using the Residue Theorem, we have $$\oint_{C}\frac{z^2}{z^4+5z^2+6}dz=2\pi i \left(\frac{-2}{2i\sqrt{2}}+\frac{3}{2i\sqrt{3}}\right)=\pi(-\sqrt{2}+\sqrt{3}) $$ Notice that as as $R$ goes to infinity, the contribution from the integral over $C_R$ vanishes while the integral over the real line segment is equal to twice the integral of interest as $R\to \infty$.  Therefore, we have $$I=\frac{\pi}{2}(\sqrt{3}-\sqrt{2})$$

</s>