Evaluating $\int_{\mathbb{R}}\frac{\sin x}{x(x^2 + 1)}\ dx$ How would I do this via Complex Analysis methods?
This is my attempt and I seem to have the wrong answer.  
Let $C$ be the upper semicircular contour of radius $R$ and centre $0$ and the line segment be $C_R$.  
The contour is $C\cup C_R$.  
Let $f(z) = \frac{\sin z}{z(z^2+1)}$
So
$$\left|\frac{\sin z}{z(z^2+1)}\right| \leq \frac{1}{R(R^2 - 1)}
$$
when $z\in\mathrm{Range}(C_R)$.
This approaches zero as $R\to\infty$.  
Hence, we have
$$\lim_{R\to\infty} \left(\int_{C\cup C_R} f(z)\ dz\right) \rightarrow \int_{-\infty}^\infty \frac{\sin x}{x(x^2+1)}\ dx. 
$$
Now, from the residue theorem,
$$\int_{C\cup C_R} f(z)\ dz = 2\pi i \mathrm{Res}(f,i) = 2\pi i \times \sinh(1)/(2i) = \pi \sinh (1)
$$
So I conclude that 
$$\int_{-\infty}^\infty \frac{\sin x}{x(x^2+1)} = \pi \sinh (1)
$$
which isn't the correct answer given.
Where did I go wrong in this argument?
 A: $\sin x $ is bounded on the real line, not on the imaginary axis. The trick to make the ML lemma work is the following one:
$$ I = \text{Im}\lim_{R\to +\infty}\oint_{\gamma_R}\frac{e^{ix}}{x(x^2+1)}\,dx $$
where $\gamma_R$ is a semicircle contour in the upper half-plane with radius $R$, counter-clockwise oriented.
This leads to
$$\begin{eqnarray*} I &=& \text{Im}\left[2\pi i\cdot \text{Res}\left(\frac{e^{ix}}{x(x^2+1)},x=i\right)+\pi i\cdot\text{Res}\left(\frac{e^{ix}}{x(x^2+1)},x=0\right)\right]\\&=&\text{Re}\left[2\pi\lim_{x\to i}\frac{e^{ix}}{x(x+i)}+\pi\lim_{x\to 0}\frac{e^{ix}}{x^2+1}\right]=\text{Re}\left[-2\pi\cdot\frac{1}{2e}+\pi\right]\\&=&\color{red}{\pi\left(1-\tfrac{1}{e}\right)}.\end{eqnarray*}$$

Alternative approach:
$$ \int_{\mathbb{R}}\frac{\sin x}{x(x^2+1)}\,dx\stackrel{\text{parity}}{=}2\int_{0}^{+\infty}\frac{\sin x}{x(x^2+1)}\,dx\stackrel{\mathcal{L},\mathcal{L}^{-1}}{=}\int_{\mathbb{R}}\frac{1-\cos x}{1+x^2}\,dx=\pi-\int_{\mathbb{R}}\frac{\cos x}{1+x^2}\,dx$$
and for any $a>0$ we have, by integration by parts, that $F(a)=\int_{\mathbb{R}}\frac{\cos(ax)}{1+x^2}\,dx $ fulfills $F(0^+)=\pi$ and $F'(a)=-F(a)$, hence $F(a)=\pi e^{-a}$ and we reach the same conclusion through the evaluation at $a=1$.
