Show that $\int_{0}^{+\infty} \frac{\sin(x)}{x(x^2+1)} dx = \frac{\pi}{2}\left(1-\frac{1}{e}\right) $ I'm trying to show that 
$$\int_{0}^{+\infty}  \frac{\sin(x)}{x(x^2+1)} dx = \frac{\pi}{2}\left(1-\frac{1}{e}\right) $$
using Jordan's lemma and contour integration. 
MY ATTEMPT: The function in the integrand is even, so I have:
$$\int_{0}^{+\infty}  \frac{\sin(x)}{x(x^2+1)} dx =\frac{1}{2}\int_{-\infty}^{+\infty}  \frac{\sin(x)}{x(x^2+1)} dx$$ 
There is a simple pole at $z=0$ and poles at $z=+i, z=-i$. 
A method in the chapter I am working on (Ablowitz & Fokas sections 4.2 & 4.3) usually considers the integral
$$\int_{-\infty}^{+\infty}  \frac{e^{ix}}{x(x^2+1)} dx=2\pi iRes\left(\frac{e^{ix}}{x(x^2+1)},z=i,-i,0\right)$$ Which when I compute results in $\dfrac{-(-1+e)^2\pi}{2e}$, which is close but not quite the answer. (Notice that factored in another way the answer is also equal to $\dfrac{(-1+e)\pi}{2e}$.
But I am not sure if this will work, instead another example builds a contour $C_r+C_e+(-R,-e)+(R,e)$ which avoids the poles and thus integrating over that yields zero and helps me get my answer. Unfortunately, this attempt does not give me the right value either. 
Do any of you integration whizzes out there have anything for me? Many thanks.

I know that this question has already received an accepted answer and that it is tagged as a contour integration problem, but I thought it would be worth pointing out a solution based on differentiation under the integral sign (known also as Feynman's Trick or Leibniz Rule).
With that, let me begin my solution. The start of the solution is similar to @Iuʇǝƃɹɐʇoɹ's, by defining:
$$I(b) = \int_0^\infty \frac{\sin bx}{x(x^2+1)}dx$$
Now, since the integral converges uniformly for all b, we may differentiate under the integral sign:
$$I'(b) = \frac{d}{db} \int_0^\infty \frac{\sin bx}{x(x^2+1)}dx$$
$$ = \int_0^\infty \frac{\partial}{\partial b} \frac{\sin bx}{x(x^2+1)}dx$$
$$ = \int_0^\infty \frac{\cos bx}{x^2+1}dx$$
Differentiating again with respect to b, we have:
$$I''(b) = \frac{d}{db}\int_0^\infty \frac{\cos bx}{x^2+1}dx$$
$$ = \int_0^\infty \frac{\partial}{\partial b} \frac{\cos bx}{x^2+1}dx$$
$$ = -\int_0^\infty \frac{x\sin bx}{x^2+1}dx$$
Now, some manipulation yields:
$$I''(b) = -\int_0^\infty \frac{x^2 \sin bx}{x(x^2+1)}dx$$
$$= -\int_0^\infty \frac{(x^2+1-1) \sin bx}{x(x^2+1)}dx$$
$$= -\int_0^\infty \frac{(x^2+1) \sin bx}{x(x^2+1)}dx + \int_0^\infty \frac{\sin bx}{x(x^2+1)}dx$$
$$= -\int_0^\infty \frac{\sin bx}{x}dx + \int_0^\infty \frac{\sin bx}{x(x^2+1)}dx$$
$$= -\frac{\pi}{2} + I(b)$$
$I(b)$ is therefore the solution to the differential equation $I''(b)=I(b)-\frac{\pi}{2}$
This differential equation has the general solution
$$I(b)=Ae^b+Be^{-b}+\frac{\pi}{2}$$
with
$$I'(b) = Ae^b - Be^{-b}$$
Now since $I(0) = \int_0^\infty \frac{0}{x(x^2+1)}dx = 0$ and $I'(0) = \int_0^\infty \frac{1}{x^2+1}dx = arctan(x)|_0^\infty=\frac{\pi}{2}$
$$A+B+\frac{\pi}{2}=0$$
$$A-B=\frac{\pi}{2}$$
And so
$$A=0, B=-\frac{\pi}{2}$$
and 
$$I(b) = \frac{\pi}{2} (1-e^{-b})$$
$$I(1)=\int_0^\infty \frac{\sin x}{x(x^2+1)}dx=\frac{\pi}{2} (1-\frac{1}{e})$$
This solution is very similar to @Mark Viola's solution here.
