Contour integration – evaluating $\int_{-\infty}^{\infty}\frac{\sin(x)}{x(x^2+1)} \ dx$ around a semi-circle

complex-analysiscontour-integrationproof-verification

I am trying to show that $$\int_{-\infty}^{\infty}\frac{\sin(x)}{x(x^2+1)} \ dx=\pi(1-e^{-1}).$$

I considered a semi-circle in the upper-half plane, indented at the origin, orientated counter-clockwise with radius $R$ and $r$ of the outer and inner circular regions respectively ($r<1<R$).

enter image description here

How do we determine the two straight line segments on the contour (from $-R$ to $-r$ and $r$ to $R$)?

For the segment from $-R$ to $-r$, I let $y(x)=-x,\ \ x\in [R,r]$, such that $$\int_{R}^{r} \frac{e^{-ix}}{x(x^2+1)} \ dx\implies\Im\left(\int_{R}^{r} \frac{e^{-ix}}{x(x^2+1)} \ dx\right)=\int_{r}^{R} \frac{\sin(x)}{x(x^2+1)} \ dx.$$

Similarly for the segment from $r$ to $R$, I let $y(x)=x,\ \ x\in [r,R]$, such that $$\int_{r}^{R} \frac{e^{ix}}{x(x^2+1)} \ dx\implies\Im\left(\int_{r}^{R} \frac{e^{ix}}{x(x^2+1)} \ dx\right)=\int_{r}^{R} \frac{\sin(x)}{x(x^2+1)} \ dx.$$

Hence the sum of the two contours is $$2\int_{r}^{R} \frac{\sin(x)}{x(x^2+1)} \ dx.$$ But computing the remaining contours, this $2$ should be a $1$ for the result to follow.

But where is the error in my logic?

Best Answer

Well, when you take $r\to 0$ and $R\to \infty$ $$ 2 \int_r^R \frac{\sin(x)}{x(x^2+1)}dx$$ becomes $$ 2\int_0^\infty \frac{\sin(x)}{x(x^2+1)}dx=\int_{-\infty}^\infty \frac{\sin(x)}{x(x^2+1)}dx$$ so you've just made a small mistake.