Evaluate the improper integral. Evaluate the integral below. 
$ \int^{+\infty}_{-\infty} \frac{x^2}{{(x^2-8x+20)}^2} \, dx $
I feel that I know how to do this problem, but I'm getting caught up in all the calculations. I've been approaching the problem the way we were taught in class. This is what I've done so far: 
1) I rewrote it as $\lim_{\to\infty}  \int^{A}_{-A} \frac{x^2}{{(x^2-8x+20)}^2} \, dx$ 
2) In order to use the Residue Theorem we must be integrating over a closed contour. I picked a semi-circle centered at the origin in the upper half plane.  From here I started to find the singularities so that I could compute the residues. 
From what I understand, the singularities are the zeros of the denominator in a rational function.  I came up with -2 and 10. 10 is in the domain that I chose. 
So from here prior to computing the residues, we've been told to break the integral into two pieces... honestly this is where I get confused. Can someone help me continue? 

I'm still feeling a little confused and I'm hoping to see the solution to this problem done out so that I can see where I'm going wrong. As many of you noticed I calculated the singularities incorrectly the first time. I now have 2i+4 as the singularity that is in the semi circle centered at the origin in the upper half plane if A >4. 
Can someone please offer a solution to the conclusion of this problem? 

If you want to use the residue theorem, then be careful.  The two poles (at $z=4\pm i2$) are of second order (since the quadratic term is squared).  
You can still close the contour in the upper-half plane.  Thus, 
$$\int_{-\infty}^{\infty}\frac{x^2}{(x^2-8x+20)^2}dx=2\pi i \,\text{Res}_{z=4+2i}\left(\frac{z^2}{(z^2-8z+20)^2}\right)$$
For a pole of order $n$ the residue of $f$ at $z_0$ is given by
$$\frac{1}{(n-1)!}\lim_{z\to z_0}\frac{d^{n-1}}{dz^{n-1}}\left((z-z_0)^nf(z)\right)$$
Here, we have $n=2$, $z_0=4+2i$, and $f(z)=\frac{z^2}{(z-(4+2i))^2(z-(4-2i))^2}$.  Thus
$$\text{Res}_{z=4+2i}\left(\frac{z^2}{(z^2-8z+20)^2}\right)=\frac{2(4+2i)}{(4i)^2}-\frac{2(4+2i)^2}{(4i)^3}=-\frac58 i$$
Thus, after multiplying by $2\pi i$, we find 
$$\int_{-\infty}^{\infty}\frac{x^2}{(x^2-8x+20)^2}dx=5\pi/4$$
