I am to evaluate $\displaystyle\int_0^{\infty} \dfrac{\sin x}{x(x^2+1)}dx$ via contour integration.
Now I used an indented semicircular contour, and the parts lying on the real line and the big arc were no problem, but the small arc is being resistant, and I'm not sure what to do. Usually, on the small arc from $-\varepsilon$ to $\varepsilon$ I can take a laurent expansion of the integrand, and consider integrating its principle part over the arc, letting the rest go to zero in the limit $\varepsilon \to 0$ as the "holomorphic part". My issue is this particular integrand doesn't have a principle part...
The end result is $\dfrac{(e-1)\pi}{2e}$, and so far I have the integral over the whole contour as $\dfrac{-\pi i}{e}$ (I'm not sure why this came out imaginary..) so this part is going to have to contribute something. What should I do to get something out?
Then the integral over the large semicircle won't work out. Remember that
$$\lvert \sin (x+iy)\rvert^2 = \lvert \sin x \cos (iy) + \sin(iy)\cos x\rvert^2 = \sin^2 x+ \sinh^2 y,$$
so if you keep the sine in the integrand, you have no growth control to conclude that the integral over the large semicircle tends to $0$.
Use the symmetry to get
$$\begin{align} \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\\ &= \frac{1}{2i}\operatorname{v.p.} \int_{-\infty}^\infty \frac{e^{ix}}{x(x^2+1)}\,dx, \end{align}$$
then you have an integrand with a simple pole on the contour, and the small semicircle gives you $\pi i$ times the residue in $0$, the latter being $1$.
Using both semicircles in the upper half-plane, the integral over the closed contour is
$$2\pi i \operatorname{Res}\left(\frac{e^{iz}}{z(z^2+1)}; i\right) = 2\pi i \frac{e^{-1}}{i\cdot 2i} = - \frac{\pi i}{e}.$$
Hence
$$\operatorname{v.p.}\int_{-\infty}^\infty \frac{e^{ix}}{x(x^2+1)}\,dx = \lim_{\varepsilon \downarrow 0} \int_{\lvert x\rvert > \varepsilon} \frac{e^{ix}}{x(x^2+1)}\,dx = \pi i \frac{e-1}{e}$$
and
$$\int_0^\infty \frac{\sin x}{x(x^2+1)}\,dx = \frac{\pi(e-1)}{2e}.$$