Find $I:=\lim\limits_{R\to \infty}\int\limits_{-R}^R \frac{x \sin(3x)}{x ^2+4}dx$ using residues Find $I:=\lim\limits_{R\to \infty}\int\limits_{-R}^R \frac{x \sin(3x)}{x ^2+4}dx$ using residues. Let $f(z)= \frac{z \sin(3z)}{z ^2+4}$. First define two contours:
$$\Gamma_1: z=t \text{ where } -R\leq t \leq R$$
$$\Gamma_2: z=Re^{i\theta} \text{ where } 0\leq \theta \leq \pi$$
And $\Gamma_3=\Gamma_1+\Gamma_2$. Basically $\Gamma_3$ is the closed half circle in the upper half of the complex plane and $\Gamma_1$ runs along the real axis from $-R$ to $R$. Now we have:
$$I=\lim\limits_{R\to \infty}\int\limits_{\Gamma_1}f(z)dz=\lim\limits_{R\to \infty}\oint_{\Gamma_3}f(z)dz-\lim\limits_{R\to \infty}\int_{\Gamma_2}f(z)dz$$
We can compute $\lim\limits_{R\to \infty}\oint_{\Gamma_3}f(z)dz=\lim\limits_{R\to \infty}\oint_{\Gamma_3}\frac{z\sin(3z)}{(z+2i)(z-2i)}dz$ fairly easily after recognizing that it has simple poles at $z_0=\pm 2i$ and only $z_0=2i$ is enclosed in $\Gamma_3$. By the residue theorem:
$$\lim\limits_{R\to \infty}\oint_{\Gamma_3}f(z)dz=2\pi i \left(\mathop{Res} _{z=2i}(f)\right)=2\pi i \lim\limits_{z\to 2i}(z-2i)f(z)=2\pi i \frac{2  i\sin(6 i)}{2 i +2i}=\pi i \sin(6i)$$
Now the only obstacle to finding the value of our original integral is finding $\lim\limits_{R\to \infty}\int_{\Gamma_2}f(z)dz$. If $f(z)$ were such that the degree of the polynomial in the denominator was at least 2 higher then the polynomial in the numerator (ignoring the $\sin$) we could easily show that the integral vanishes. I still think this last integral should vanish but find it hard to show why. Any help would be appreciated. Also any suggestions on different methods of solving for $I$ are welcome. Thanks!
 A: You can't ignore sin, but you can deal with it virtuously. It blows up exponentially both in the upper and in the lower half-plane, but you can split it into its $\mathrm e^{\mathrm ix}$ and $\mathrm e^{-\mathrm ix}$ components and complete the contour in the upper half-plane for the former and the lower half-plane for the latter. This gives you exponential damping, so you no longer need another power of $x$ in the denominator. If you did, you could get it by integrating by parts.
A: Hint:
$\sin(z)$ does not vanish along $\Gamma_2$. In fact, it blows up exponentially in $\mathrm{Im}(z)$. The way to get around this is to note that your integral is the imaginary part of
$$
\int_{-\infty}^\infty\frac{x\,e^{i3x}}{x^2+4}\,\mathrm{d}x
$$
Now $e^{i3x}$ does decay exponentially in $\mathrm{Im}(z)$.
A: A not unrelated method of attack is to write the integral as 
$$\frac{1}{2 i} \int_{-R}^R dx \frac{x}{x^2+4} \left (e^{i 3 x} - e^{-i 3 x} \right ) $$
Now work each piece separately.   For the $e^{i 3 x}$ piece, you use a contour in the upper half plane; for the $e^{-I 3 x}$ piece, use a contour in the lower half plane.
