# Compute $\int_{-\infty}^{\infty} \frac{e^{-2ix}}{x^2 + 4}dx$ using contour integration

I'm studying for an applied mathematics qualifying exam, and have the following practice problem:

Compute the integral $\int_{-\infty}^{\infty} \frac{e^{-2ix}}{x^2 + 4}dx$ using contour integration.

I'm considering a contour that is a half-circle of radius $R$ that includes a segment of the real line ($[-R, R]$) and within the path includes the pole at $2i$. Using the Cauchy integral formula I can evaluate this integral and determine that it equals $\frac{e^4\pi}{2}$.

The next step is to show that the complex part of the path of integration is negligible, and I have tried to bound $\left|\int_{Re^{i[0,\pi]}} \frac{e^{-2iz}}{z^2 + 4}dz\right|$ but it doesn't seem to work.

Help?

Hint. Note that along the LOWER semicircle of radius $R>0$, $z=R(\cos(t)+i\sin(t))$ with $t\in [\pi,2\pi]$ and $$|\exp(-2iz)|=|\exp(-2iR(\cos(t)+i\sin(t))|=\exp(2R\sin(t))\leq 1.$$ Now are you able to show that the integral along the semicircle part of the path of integration is negligible?
P.S. By considering the LOWER semicircle, you will also get the correct result of the integral $$\int\limits_{-\infty}^{+\infty}\frac{e^{-2xi}}{x^2+4}dx=-2\pi i\mbox{Res}\left(\frac{e^{-2iz}}{z^2+4},-2i\right)= -2\pi i\cdot \frac{e^{-2i(-2i)}}{2(-2i)}=\frac{\pi e^{-4}}{2}.$$
Suppose that your half-circle is in the lower half-plane. Then, if $|z|>1$, you have$$\left|\frac{e^{-2iz}}{z^2+1}\right|=\frac{e^{\operatorname{Re}(-2iz)}}{|1+z^2|}=\frac{e^{2\operatorname{Im}(z)}}{|z^2+1|}\leqslant\frac1{|z|^2-1}\to0\text,$$as $z$ goes to $+\infty$.
$$\int\limits_{-\infty}^{+\infty}\frac{e^{-2xi}}{x^2+4}dx=\int\limits_{-\infty}^{+\infty}\frac{\cos2x-i\sin2x}{x^2+4}dx=\int\limits_{-\infty}^{+\infty}\frac{\cos2x}{x^2+4}dx=$$ $$=2\int\limits_{0}^{+\infty}\frac{\cos2x}{x^2+4}dx=\frac{\pi}{2e^4},$$ where the last integral it's just the Laplace's integral. For $a>0$ and $b>0$ we have: $$\int\limits_0^{+\infty}\frac{\cos{bx}}{x^2+a^2}dx=\frac{\pi e^{-ab}}{2a}.$$