I'm trying to evaluate the following integral, and I'm getting stuck on one part. Here's the integral:
$$\int_{-\infty}^\infty \frac{\sin(x)}{x(x^2+1)} dx$$
Basically, I'm converting this to the complex plane and performing a contour integration over the top half of the plane (semi-circle). Further, I'm looping around the singularity at z=0. Now, I'm fine with all of the integrals except for the integral involving the loop around the singularity. For this guy, I end up with the following. I have no idea how to evaluate this in the limit as r goes to 0. Any idea how to proceed?
$$\int_{\pi}^0 \frac{e^{ire^{i\theta}}}{r^2e^{i2\theta}+1} d\theta$$
Write $$f(z)=\frac{e^{iz}}{z(z^2+1)}$$ and let $C$ be the clockwise semi-circular contour of radius $r$ about $0$. Now $f$ has a simple pole at $z=0$ with residue $1$, so $$f(z)-\frac{1}{z}$$ has a removable singularity at $z=0$. Therefore, for a suitable constant $c$, the function $$g(z)=\cases{f(z)-1/z&if $z\ne0$\cr c&if $z=0$\cr}$$ is continuous. Now $$\left|\int_C g(z)\,dz\right|\le (\pi r)\max_{|z|\le r}|g(z)|\to (\pi)(0)|c|=0$$ as $r\to0$, and $$\int_C\frac{1}{z}\,dz=\int_\pi^0 \frac{ie^{i\theta}}{e^{i\theta}}\,d\theta=-\pi i\ .$$ Therefore $$\int_C f(z)\,dz=\int_C \Bigl(g(z)+\frac{1}{z}\Bigr) dz\to -\pi i$$ as $r\to0$.