Compute $\int_{0}^{\infty}\frac{x\sin 2x}{9+x^{2}} \, dx$

Before addressing the question regarding the limit of the integral over $\gamma_R$, it is important to first understand that

$$\int_0^\infty \frac{x\sin(2x)}{9+x^2}\,dx=\frac12\text{Im}\left(\int_{-\infty}^\infty \frac{xe^{i2x}}{9+x^2}\,dx\right)$$

Next, using the residue theorem we find that

$$\oint_\gamma \frac{ze^{i2z}}{9+z^2}\,dz=2\pi i \frac{3i(e^{-6})}{6i}=\pi ie^{-6}$$


Now, to address the question regarding the limit of the integral over $\gamma_R$, we first note that

$$\begin{align} \left|\int_0^\pi \frac{Re^{i\phi }e^{i2Re^{i\phi}}}{9+R^2e^{i2\phi}}\,iRe^{i\phi}\,d\phi\right|&\le \int_0^\pi \frac{R^2e^{-2R\sin(\phi)}}{|9+R^2e^{i2\phi}|}\\\\ &\le \frac{2R^2}{|R^2-9|}\int_0^{\pi/2} e^{-2R\sin(\phi)}\,d\phi\tag 1 \end{align}$$

Next, we use the fact that $\sin(\phi)\ge 2\phi/\pi$ for $\phi \in[0,\pi/2]$. Hence, we can write

$$\int_0^{\pi/2} e^{-2R\sin(\phi)}\,d\phi\le \int_0^{\pi/2} e^{-4R\phi/\pi}\,d\phi=\frac{1-e^{-2R}}{4R/\pi}\tag 2$$

Using $(2)$ in $(1)$ we find that

$$\begin{align} \left|\int_0^\pi \frac{Re^{i\phi }e^{i2Re^{i\phi}}}{9+R^2e^{i2\phi}}\,iRe^{i\phi}\,d\phi\right|\le \frac{2R^2}{|R^2-9|}\frac{1-e^{-2R}}{4R/\pi}\to 0\,\,\text{as}\,\,R\to \infty \end{align}$$