Evaluating $\int_{-\infty}^{\infty}\frac{1}{(x^2+b^2)^2}dx$ 
Find $$\int_{-\infty}^{\infty}\frac{1}{(x^2+b^2)^2}dx$$

We see that the only poles are at $x=\pm bi$.  Integrating over the semicircular contour implies that it is equal to $2\pi i*Res_{(+bi)}$ because the integral over the circular arc is $0$.  So now I just need to calculate the residue at $+bi$. Can anyone give hints on how to do this?  I was thinking about multiplying by $(x-bi)^2$ and then evaluating at $bi$ but I'm not sure why this even makes sense. 
 A: A possible contour is the semi circle in the upper half plane with a semi circle around the origin. Let $\int_{\Gamma}$ be large semi circle and $\int_{\gamma}$ be the small semi circle. Let $R$ be the radius of the $\Gamma$ and $\epsilon$ the radius of $\gamma$. Now as $R\to\infty$, $\int_{\Gamma}\to 0$ and similarly as $\epsilon\to 0$, $\int_{\gamma}\to 0$ by the estimation lemma. Take the orientation of the contour to be counter clockwise.
Therefore, we can write you integral as
\begin{align}
\int_{-\infty}^{\infty}f(x)dx &= \int_{-\infty}^{\infty}f(z)dz\\
&= \int_{\Gamma}+\int_{\gamma} + \int_{-\infty}^{\infty}f(z)dz\\
&= 2\pi i\sum_{\text{UHP}}\text{Res}\\
\int_{-\infty}^{\infty}f(z)dz &=2\pi i\sum_{\text{UHP}}\text{Res}
\end{align}
As you have been told in the comments, the residue for a pole which isn't simple is 
$$
2\pi i\lim_{z\to z_0}\frac{1}{(k - 1)!}\frac{d^{k-1}}{dz^{k-1}}(z - z_0)^kf(z)
$$
In your case, the pole of order two in the upper half plane is $z_0 = ib$. That is,
\begin{align}
2\pi i\lim_{z\to z_0}\frac{1}{(k - 1)!}\frac{d^{k-1}}{dz^{k-1}}(z - z_0)^kf(z) &= 2\pi i\lim_{z\to ib}\frac{1}{1!}\frac{d}{dz}\frac{1}{(z + ib)^2}\\
&= 2\pi i\lim_{z\to ib}\frac{-2}{(z+ib)^3}
\end{align}
