How to calculate: $$\int_0^\infty \frac{x \sin(x)}{x^2+1} dx$$ I thought I should find the integral on the path $[-R,R] \cup \{Re^{i \phi} : 0 \leq \phi \leq \pi\}$.
I can easily take the residue in $i$ $$ Res_{z=i} \frac{x \sin(x)}{x^2+1} \quad = \quad \frac{i (e^{ii}-e^{-ii})}{2i} \quad = \quad \frac{i(\frac1e-e)}{2i} \quad = \quad \frac1{2e}-\frac e2 $$ I know that the integral on $[-R,R]$ will get nearby the real value of $ \frac12\int_0^\infty \frac{x \sin(x)}{x^2+1} dx$. That means that I'm done if I show that the integral on the other part of the path will be small, here is an attempt to do so:
$$ \left|\frac{x \sin(x)}{x^2+1} \right| \quad \leq \quad R \cdot \frac{|\sin x|}{R^2-1} $$ I could rewrite $\sin x$ but it becomes nasty. Can you help me with this?