Use an indented contour and residues to establish the Cauchy principal value of $\int_{-\infty}^{\infty}\frac{\sin x}{x}$ using complex integration. [duplicate]

Use an indented contour and residues to establish the Cauchy principal value of $\int_{-\infty}^{\infty}\frac{\sin x}{x}$ using complex integration.

I see that breaking this up into $\int_{C_R} + \int_{-R}^{-r} + \int_{-C_r} + \int _{-r}^{R}$ (where $-C_r$ is the upper hemispherical contour about $0$ and under $C_R$), and taking the limit as $r \rightarrow 0 \text{ and } R \rightarrow \infty$ would the be ideal method, but I don't see how $\int_{C_R} \rightarrow 0$.

Even if I alter $\int_{-\infty}^{\infty}\frac{\sin x}{x}$ to $\int_{-\infty}^{\infty}\frac{e^{iz}}{x}$, I'm still left with the fact that the denominator is not $\ge 2 +$the degree of the numerator.

Am I missing something here or is there a better way to solve this?

marked as duplicate by Guy Fsone, jkabrg, Sahiba Arora, John Doe, Brian BorchersFeb 4 '18 at 20:37

The integral $\int_{-\infty}^\infty \frac{\sin(x)}{x}\,dx$ converges.
\begin{align} \oint_C\frac{e^{iz}}{z}\,d&=\int_{\epsilon\le |x|\le R}\frac{e^{ix}}{x}\,dx+\int_{\pi}^0\frac{e^{i\epsilon e^{i\phi}}}{\epsilon e^{i\phi}}\,i\epsilon e^{i\phi}\,d\phi+\int_{0}^\pi \frac{e^{iR e^{i\phi}}}{R e^{i\phi}}\,iR e^{i\phi}\,d\phi\\\\ &=\int_{\epsilon\le |x|\le R}\frac{e^{ix}}{x}\,dx-i\int_{0}^\pi e^{i\epsilon e^{i\phi}}\,d\phi+i\int_{0}^\pi e^{iR e^{i\phi}}\,d\phi\tag 1 \end{align}
From Cauchy's Integral Theorem, the integral on the left-hand side of $(1)$ is identically zero. Furhermore, as $R\to \infty$ the third integral on the right-hand side of $(1)$ approaches $0$, the second one approaches $i\pi$, and the first one approaches the Principal Value integral $\text{PV}\int_{-\infty}^\infty \frac{e^{ix}}{x}\,dx$.
Taking the imaginary part of $(1)$ and putting it all together yields
$$\int_{-\infty}^\infty \frac{\sin(x)}{x}\,dx=\pi$$