Complex integration using a suitable contour 
$$\int_{-\infty}^{\infty} \frac{x\sin x}{x^2 +4} \ dx$$

Can someone show me how to evaluate this integral by integrating around a suitable contour. I've seen similar questions however  I think you have to use Jordan's lemma. Can someone show me how to do this example?
 A: The trick is to note that $\sin(x)=\text{Im}(e^{ix})$.  Then, analyze the integral 
$$\oint_C \frac{ze^{iz}}{z^2+4}\,dz$$
where $C$ is comprised of the real line segment from $-R$ to $R$ and the upper-half place semicircle centered at $0$ with radius $R$.
Then, we have 
$$\oint_C \frac{ze^{iz}}{z^2+4}\,dz=\int_{-R}^R\frac{xe^{ix}}{x^2+4}\,dx+\int_0^\pi \frac{Re^{i\phi}e^{iRe^{i\phi}}}{(Re^{i\phi})^2+4}\,iRe^{i\phi}\,d\phi$$
For $R>2$, the contour $C$ encloses the pole at $z=i2$ and hence from the residue theorem 
$$\oint_C \frac{ze^{iz}}{z^2+4}\,dz=2\pi i \frac{(i2)e^{-2}}{i4}=i\pi e^{-2}$$
As $R\to \infty$, the integral over the semicircle vanishes.  Hence, we find 
$$\int_{-\infty}^\infty\frac{xe^{ix}}{x^2+4}\,dx=i\pi e^{-2}$$
Finally, taking the imaginary part yields
$$\int_{-\infty}^\infty\frac{x\sin(x)}{x^2+4}\,dx=\pi e^{-2}$$
A: A canonical answer has already been provided by Mark, so I will go for the unusual way. 
The integral is converging by Dirichlet's test, since $\sin(x)$ has a bounded primitive and $\frac{x}{x^2+4}$ is decreasing to zero from some point on. By parity and the Laplace transform, the given integral equals
$$ 2\int_{0}^{+\infty}\mathcal{L}(\sin x)(s)\,\mathcal{L}^{-1}\left(\frac{x}{x^2+4}\right)(s)\,ds =2\int_{0}^{+\infty}\frac{\cos(2s)}{1+s^2}\,ds$$
then by parity and Fourier cosine transforms we get
$$ I = \left.\pi e^{-|s|}\right|_{s=2} = \color{red}{\pi e^{-2}}.$$
