Computing $\int_0^\infty \frac{dx}{(x^2 + 1)^2} $ with the residue theorem I am solving this integral and am stuck on proving an inequality, I believe I have the rest worked out.
My work:
First observe that the integrand is even, hence $$\int_0^\infty \frac{dx}{(x^2+1)^2} = \frac{1}{2}\int_{-\infty}^\infty \frac{dx}{(x^2+1)^2}$$
We now consider the integral on the r.h.s. above and integrate over the upper half circle with radius $R$ and the segment $[-R, R]$ on the real axis. We let $R$ tend towards infinity. Denoting this region by $D$, and the upper half circle by $C$, by Cauchy's Residue Theorem we have,
$$\int_{D} \frac{dz}{(z^2+1)^2} = 2\pi i \sum \text{Res} = \int_{-\infty}^\infty \frac{dx}{(x^2+1)^2} + \int_C \frac{dz}{(z^2+1)^2}$$
I first calculate the residues of the integrand in $D$. Notice there is a pole of order 2 at $z = i$. Hence,
$$\text{Res}_{z = i} = \lim_{z \rightarrow i} \Bigl( \frac{(z-i)^2}{(z^2+1)^2} \Bigr)' = \frac{1}{4i}$$
Thus,
$$\frac{\pi}{2} = \int_{-\infty}^\infty \frac{dx}{(x^2+1)^2} + \int_C \frac{dz}{(z^2+1)^2}$$
Now I would like to show that the complex integral on the r.h.s. tends to 0 as $R$ tends to infinity:
$$\int_C \frac{dz}{(z^2+1)^2} \leq \Biggl \vert \int_C \frac{dz}{(z^2+1)^2} \Biggr \vert \leq \sup f(X) \cdot L = \sup f(X) \cdot \pi R$$
This is as far as I have gotten. I know I have to play with the triangle inequality somehow to bound the integrand from above and determine $\sup f(x)$, but I cannot figure out how to do this.
One thought I had was to use the reverse triangle inequality since:
$$|(z^2+1)^2| = |z^4 +2z^2 + 1| \geq \bigl| |z^4| - |2z|^2 - 1\ \bigr|$$
so that,
$$\frac{1}{(z^2+1)^2} \leq \frac{1}{\bigl| |z^4| - |2z|^2 - 1\ \bigr|} = \frac{1}{\bigl| R^4 - 2R^2 - 1\ \bigr|}$$
This will wrap things up as
$$\sup f(x) \cdot R = \frac{\pi R}{\bigl| R^4 - 2R^2 - 1\ \bigr|}$$
which will tend to 0 as $R$ tends to infinity.
Putting it all together and diving by two,
$$\int_0^\infty \frac{dx}{(x^2 + 1)^2} = \frac{\pi}{4}$$
This is the correct numerical answer, but I am not sure if my use of the reverse triangle inequality is correct, can anyone confirm? Thanks!
 A: The idea of your proof is correct, but there are some inaccuracies. First, it should be
$$
\frac{\pi}{2} = \int_R^R \frac{dx}{(x^2+1)^2} + \int_C \frac{dz}{(z^2+1)^2}
$$
for $R > 1$. You cannot replace the $R$ by $\infty$ in the first integral because the second integral depends on $R$. I would denote the half-circle with $C_R$ to emphasize the dependency on the radius.
Second,
$$
|(z^2+1)^2| = |z^4 +2z^2 + 1| \geq \bigl| |z^4| - |2z|^2 - 1 \bigr|
$$
is wrong as can be seen by substituting $z=i$. But
$$
|z^2+1| \ge |z^2| - 1 = R^2 - 1 > 0  \\
\implies |(z^2+1)^2| = |z^2+1|^2 \geq (R^2-1)^2
$$
for $R > 1$, so that
$$
 \sup_{z \in C_R} |f(z)| \cdot L(C_R) \le \frac{\pi R}{R^4-2R^2+1}
$$
converges to zero for $R \to \infty$. (You wrote $\sup f(x) \cdot R = \ldots$, which is not correct because we have only an upper bound for the supremum, not the exact value.)
Then
$$
\int_{-\infty}^\infty \frac{dx}{(x^2+1)^2} = \lim_{R \to \infty}\int_R^R \frac{dx}{(x^2+1)^2}
= \frac \pi 2 - \lim_{R \to \infty} \int_{C_R} \frac{dz}{(z^2+1)^2}
= \frac \pi 2 \, .
$$
