Q:

Residue Theorem to Compute Integrals of Rational Functions

Any help would be very much appreciated. Thanks. 
$$\int_{-\infty}^{\infty}\frac{x^2}{x^4-4x^2+5}dx$$
Integral for the above using Residue Theorem. 

A:

Check the singularities of the function, in this case check the roots of the denominator. Consider only the ones that has imaginary part strictly greater then 0. If there are some real roots, you have to apply Jordan's Lemma, on the "deviation" you have to do with your path to avoid them. This is due to the fact that you are defining a particular closed path to trying apply residue theorem (there is a lot of details to fix here, just read any books on complex analysys)
Then verify that $f(z) := \frac{z^2}{z^4-4z^2+5} $ satisfy $|f(z)| \leq \frac{K}{|z|^{1+a}}$ for some,$a >0$. If all the hypothesis are satisfied apply Jordan Lemma (if needed) and,the residue theorem to compute the integral. 
the hypothesis on the module assure you that once defined a let's say square of side $m$ when $m \rightarrow \infty $ only the integral on the real axys (which is what are you trying to compute) is giving contribute to the result.
NB to calculate zeroes of the denominator just make a substitution $t=x^2$ and solve as always. Then you have to figure out the order of the poles you find, maybe using the criteria of the limit
Please note that this is only a hint of,how to do a integral of this kind using complex analysis technique.

