Use residues to compute \[ \int_0^\infty \frac{x\sin(2x)}{x^2+3}\,dx. \]
Solution
Set \[ F(z)\coloneqq\frac{ze^{2iz}}{z^2+3}. \] For \(R>\sqrt3\), let \(C_R\) be the upper semicircle \[ z=Re^{i\theta}, \qquad 0\leq\theta\leq\pi, \] oriented from \(R\) to \(-R\).
1. The semicircular contribution tends to zero:\[ \lim_{R\to\infty}\int_{C_R}F(z)\,dz=0. \]
On \(C_R\), \[ \abs{z^2+3} \geq R^2-3 \] and \[ \abs{e^{2iz}} = e^{-2R\sin\theta}. \] Since \[ \abs{dz}=R\,d\theta, \] one obtains \[ \abs{\int_{C_R}F(z)\,dz} \leq \frac{R^2}{R^2-3} \int_0^\pi e^{-2R\sin\theta}\,d\theta. \] For \(0\leq\theta\leq\pi/2\), \[ \sin\theta\geq\frac{2\theta}{\pi}. \] By symmetry, \[ \begin{aligned} \int_0^\pi e^{-2R\sin\theta}\,d\theta &\leq 2\int_0^{\pi/2}e^{-4R\theta/\pi}\,d\theta\\ &\leq \frac{\pi}{2R}. \end{aligned} \] Therefore \[ \abs{\int_{C_R}F(z)\,dz} \leq \frac{\pi R}{2(R^2-3)} \longrightarrow0. \]
2. The only pole of \(F\) in the upper half-plane is\[ z=i\sqrt3, \]and its residue is\[ \operatorname{Res}_{z=i\sqrt3}F(z) = \frac12e^{-2\sqrt3}. \]
The poles are at \[ z=\pm i\sqrt3, \] so only \(i\sqrt3\) lies in the upper half-plane. Since the pole is simple, \[ \begin{aligned} \operatorname{Res}_{z=i\sqrt3}F(z) &= \frac{i\sqrt3\,e^{2i(i\sqrt3)}}{2i\sqrt3}\\ &= \frac12e^{-2\sqrt3}. \end{aligned} \]
3. One has\[ \lim_{R\to\infty} \int_{-R}^{R}\frac{xe^{2ix}}{x^2+3}\,dx = \pi i e^{-2\sqrt3}. \]
For \(R>\sqrt3\), the residue theorem on the contour consisting of \([-R,R]\) and \(C_R\) gives \[ \int_{-R}^{R}\frac{xe^{2ix}}{x^2+3}\,dx + \int_{C_R}F(z)\,dz = 2\pi i \operatorname{Res}_{z=i\sqrt3}F(z). \] Apply steps 1 and 2 and let \(R\to\infty\).
4. The requested integral is\[ \boxed{ \int_0^\infty\frac{x\sin(2x)}{x^2+3}\,dx = \frac{\pi}{2}e^{-2\sqrt3} }. \]
Taking imaginary parts in step 3 gives \[ \lim_{R\to\infty} \int_{-R}^{R}\frac{x\sin(2x)}{x^2+3}\,dx = \pi e^{-2\sqrt3}. \] The integrand \[ x\longmapsto\frac{x\sin(2x)}{x^2+3} \] is even. Hence, for every \(R>0\), \[ \int_{-R}^{R}\frac{x\sin(2x)}{x^2+3}\,dx = 2\int_0^R\frac{x\sin(2x)}{x^2+3}\,dx. \] Dividing the limiting identity by \(2\) proves the displayed value and, at the same time, the existence of the improper integral.
5. Q.E.D.
Step 4 gives the required residue evaluation.