Compute $\int_{\mathbb R}\frac{dx}{1+2x^2+x^4}$

Here's a real-variable way if you're interested: $$I=\int_{-\infty}^{\infty}\frac{dx}{x^4+2x^2+1}=2\int_0^{\infty}\frac{dx}{(x^2+1)^2}$$

Now let $x=\frac{1}{y}\implies dx=\frac{-dy}{y^2}$

So we have $$I=-2\int^0_{\infty}\frac{1}{y^2}\frac{dy}{\left(\frac{1}{y^2}+1\right)^2}=2\int_0^{\infty}\frac{1}{y^2}\frac{dy}{\left(\frac{y^2+1}{y^2}\right)^2}=2\int_0^{\infty}\frac{y^2}{(y^2+1)^2}dy$$ Then write $$I=2\int_0^{\infty}\frac{\left(y^2+1\right)-1}{(y^2+1)^2}dy=2\int_0^\infty\left(\frac{1}{y^2+1}-\frac{1}{(y^2+1)^2}\right)dy$$ $$=2\int_0^{\infty}\frac{dy}{y^2+1}-2\int_0^\infty\frac{dy}{(y^2+1)^2}=2\arctan(y)\big|^{\infty}_0-I$$

Thus we have $$I=2\arctan(\infty)-2\arctan(0)-I\implies2I=2\left(\frac{\pi}{2}\right)-0\implies \boxed{I=\frac{\pi}{2}}$$


$|z^{4}+2z^{2}+1|=|z^{2}+1|^{2} \geq (R^{2}-1)^{2}$.


While we're apparently solving this without the residue theorem:

For large enough $s$, let $$I(s) = \int_{-\infty}^{\infty} (x^2 + 1)^{-s} \, \mathrm{d}x.$$ Then $$\Gamma(s) I(s) = \int_0^{\infty} \int_{-\infty}^{\infty} y^{s-1} (x^2 + 1)^{-s} e^{-y} \, \mathrm{d}x \, \mathrm{d}y.$$ Making the change of variables $y \mapsto y(x^2+1)$ turns this into \begin{align*} \Gamma(s) I(s) &= \int_0^{\infty} y^{s-1} e^{-y} \int_{-\infty}^{\infty} e^{-yx^2} \, \mathrm{d}x \, \mathrm{d}y \\ &= \sqrt{\pi} \int_0^{\infty} y^{s-3/2} e^{-y} \, \mathrm{d}y \\ &= \Gamma(s-1/2)\sqrt{\pi} , \end{align*}

so $\int_{-\infty}^{\infty} (x^2 + 1)^{-s} \, \mathrm{d}x = \frac{\Gamma(s-1/2)\sqrt{\pi}}{\Gamma(s)}.$ At $s=2$ you obtain $\Gamma(3/2)\sqrt{\pi} = \pi/2.$