Evaluating $\int_{-\infty}^\infty \frac{1}{(4+x^2)^2}\mathrm dx $ I wish to evaluate the integral $\int_{-\infty}^\infty  \frac{1}{(4+x^2)^2}\mathrm dx $. This is a complex analysis exercise so expecting that some sort of complex analysis technique is required, my first instinct was to split the integrand into partial fractions, making use of the fact that $(4+x^2)^2=(x+2i)^2(x-2i)^2$ but the Cauchy Integral Formula does not seem to work here so I got stuck. Then I went back to using substitution, say $x = \tan u$ but that didn't really work out as well, though I am not sure if I missed any technical details. 
 A: One way to simplify the approach is to use differentiation under the integral.  Then, note that 
$$-\frac1{2a}\frac{d}{da}\int_{-\infty}^\infty\frac{1}{a^2+x^2}\,dx=\int_{-\infty}^\infty\frac{1}{(a^2+x^2)^2}\,dx\tag 1$$
The integral on the left-hand side of $(1)$ can be evaluate a number of ways.  Inasmuch as the OP seeks to use contour integration, we proceed as follows.  
Let $C$ be the contour comprised of the real line segment from $-R$ to $R$ and the upper-half-plane semi-circle centered at $0$ with radius $R$.  Then, we have from the residue theorem for $R>a>0$
$$\begin{align}
\oint_C \frac{1}{z^2+a^2}\,dz&=\int_{-R}^R \frac{1}{x^2+a^2}\,dx+\int_0^\pi \frac{1}{(Re^{i\phi})^2+a^2}\,iRe^{Re^{i\phi}}\,d\phi \tag 2\\\\
&=2\pi i \text{Res}\left(\frac{1}{z^2+a^2},z=ia\right)\\\\
&=\frac{\pi }{a}
\end{align}$$
The second integral on the right-hand side of $(2)$ vanishes as $R\to \infty$.  Hence, we find that 
$$\int_{-\infty}^\infty \frac{1}{x^2+a^2}\,dx=\frac\pi a \tag 3$$
Taking the derivative of $(3)$ with respect to $a$, multiplying by $-1/(2a)$ and setting $a=2$ yields the coveted result

$$\int_{-\infty}^\infty\frac{1}{(4+x^2)^2}\,dx=\frac\pi{16}$$

A: An alternative solution through real-analytic tools. For any $\alpha>0$ we have
$$ I(\alpha) = \int_{-\infty}^{+\infty}\frac{1}{\alpha^2+x^2}\,dx =\frac{\pi}{\alpha} \tag{1} $$
and by differentiating both sides with respect to $\alpha$ we get:
$$ I'(\alpha) = -\int_{-\infty}^{+\infty}\frac{2\alpha}{(\alpha^2+x^2)^2}\,dx = -\frac{\pi}{\alpha^2}\tag{2} $$
hence by evaluating at $\alpha=2$ we get:
$$ \int_{-\infty}^{+\infty}\frac{dx}{(4+x^2)^2} = \left.\frac{\pi}{2\alpha^3}\right|_{\alpha=2}=\color{red}{\frac{\pi}{16}}.\tag{3}$$
A: This is the standard approach to a problem like yours: Integrate over a semicircle with diameter along the real axis and center at $0$, using the residue theorem (or Cauchy's integral formula of you can). Let the radius go towards $\infty$, and argue that the contribution to the integral from the circle arc goes to $0$.
No partial fractions needed, although the factorisation is handy when locating and classifying poles.
A: Another alternative is to use Glaisher's theorem. If $f(x)$ is an even function with series expansion of the form:
$$f(x)= \sum_{k=0}^{\infty}(-1)^kc_k x^{2k}$$
and the integral over the real line converges, then we have:
$$\int_{-\infty}^{\infty}f(x) dx = \pi c_{-\frac{1}{2}}$$
where $c_{-\frac{1}{2}}$ is defined from an appropriate analytic expression of the series expansion coefficients, where factorials are supposed to be replaced by gamma functions. This can be made more rigorous, it's a special case of Ramanujan's master theorem. The advantage of this method is that you essentially have the same benefit as when doing complex analysis where the integral is derived from an appropriate series expansion coefficient, but you now don't have to bother about setting up appropriate contours. In fact, the theorem remains valid if contour integration won't work.
So, all we have to do is find an analytic expression for $c_k$. This is a simple matter of differentiating the geometric series. If we put $x^2 = y$, then we have:
$$\frac{1}{4+y} = \sum_{k=0}^{\infty}(-1)^k \frac{y^k}{4^{k+1}}$$
Taking minus the derivative w.r.t.$y$ yields:
$$\frac{1}{(4+y)^2} = -\sum_{k=1}^{\infty}(-1)^k k \frac{y^{k-1}}{4^{k+1}} =\sum_{k=0}^{\infty}(-1)^k (k+1) \frac{y^k}{4^{k+2}}  $$
So, we see that $c_k = \frac{k+1}{4^{k+2}}$ and we're now supposed to analytically continue this to real $k$ in the standard way allowing us to insert $k = -\frac{1}{2}$ in here, but in this case that's trivial. This yields $c_{-\frac{1}{2}}=\frac{1}{16}$, the integral is thus $\frac{\pi}{16}$.
