I've been trying to derive the following formula
$$\int_\mathbb{R} \! \frac{y \, dt}{|1 + (x + iy)t|^2} = \pi$$ for all $x \in \mathbb{R}, y > 0$. I was thinking that the residue formula is the way to go (and would prefer a solution by this method), but I keep getting stuck either proceeding with the function as is and choosing the correct contour or finding a substitution which makes things easier. I would greatly appreciate some help on how best to proceed. Thanks in advance.
Let $z = x + iy$ $$ f(w) = \frac{y}{(1+zw)(1+\overline{z}w)} $$ Let $\gamma$ be the contour consisting of the real axis from $-R$ to $R$ followed by the semi-circle in the upper half plane from $R$ to $-R$.
$f$ has a one simple pole in the upper half plane at $w = -\frac{\overline{z}}{|z|^2} = -\frac{1}{z}$.
The residue of $f$ at this pole is $\frac{1}{2i}$. Apply the Residue Theorem and let $R \to \infty$. In the limit, the integral on the portion of $\gamma$ in the upper half plane goes to zero using the simple estimate given by the max of the modulus of $f$ on the curve multiplied by the length of the curve.