Computing an integral using residues

192 Views Asked by At

I am trying to find an integral:

$$\int_{-\infty}^{+\infty}\frac{e^{-\sqrt{(x^2 + 1)}}}{(x^2 + 1)^2}\,\mathrm dx$$

I went about applying contour integral over a semicircle with diameter along $ x = +\infty$ to $- \infty $ enclosing the pole at $x = +i $. The residue is $(-i/2)$ as shown here.

So the integral should be $(2\pi i)\times (-i/2)=\pi$

However since it is a well behaved function if I do a quick numerical integration in Mathematica it is giving me a value of $0.475$

A plot confirms that the function converges very fast.

Mathematica code:

NIntegrate[ E^{- Sqrt[1 + y^2]}/(1 + y^2)^2, {y, -1000, 1000}]

What am I doing wrong?

Many thanks!