Computing $\int_{-\infty}^\infty \frac{\sin x}{x} \mathrm{d}x$ with residue calculus

This refers back to the integral of $\frac{\sin(x)}x = \frac\pi2$ already posted.
How do I arrive at $\frac\pi2$ using the residue theorem?

I'm at the following point: $$\int \frac{e^{iz}}{z} - \int \frac{e^{iz}}{z},$$

and I would appreciate any help.

• It's simpler to use $$\int_{-\infty}^\infty \frac{\sin x}{x}\,dx = \operatorname{Im} p.v. \int_{-\infty}^\infty \frac{e^{ix}}{x}\,dx.$$ – Daniel Fischer Dec 5 '13 at 21:26
• Any hints/details on how to arrive at pi/2 using the residue theorem? – javier Dec 5 '13 at 21:48
• You leave out a small interval $(-\varepsilon,\varepsilon)$ of the real line for the principal value. To apply the residue theorem, you close the hole with a semicircle of radius $\varepsilon$ (your choice whether you take the semicircle in the upper or lower half plane). And you close the entire contour by cutting off at $\pm R$ and adding a large semicircle in the upper half plane, or make it a rectangular contour, doesn't matter. The integral over the large semicircle or the three sides of the rectangle in the upper half plane tend to $0$ for $R\to\infty$ (and, for the rectangle, the height – Daniel Fischer Dec 5 '13 at 21:54
• @DanielFischer: that sizable comment could be easily made into an answer. – robjohn Dec 5 '13 at 23:19
• @robjohn "Easily" turned out to be inaccurate. – Daniel Fischer Dec 10 '13 at 21:47

Since $e^{iz}$ is small in the upper half plane but large in the lower, and $e^{-iz}$ is small in the lower half plane but large in the upper, you cannot handle both terms with the same contour, thus you must separate the two parts, and that means you get a pole in $z = 0$ for the integral. Thus you must treat the pole somehow. One way is to shift the contour of integration away from the real axis like robjohn did. Another way is to treat the integral as a principal value integral.

Since the integrand is real, we have

\begin{align} \int_{-\infty}^\infty \frac{\sin x}{x}\,dx &= \operatorname{Im} \operatorname{p.v.} \int_{-\infty}^\infty \frac{e^{ix}}{x}\,dx\\ &= \operatorname{Im} \lim_{\varepsilon\searrow 0} \int_{\lvert x\rvert \geqslant \varepsilon} \frac{e^{ix}}{x}\,dx\\ &= \operatorname{Im} \lim_{\substack{\varepsilon\searrow 0\\ R\nearrow\infty}} \int_{\varepsilon \leqslant \lvert x\rvert \leqslant R} \frac{e^{ix}}{x}\,dx, \end{align}

which allows us to consider only one exponential for the sine.

To compute the latter integral, we close the contour by adding a semicircle $C_\varepsilon$ of radius $\varepsilon$ around $0$ in the upper half plane, and either a semicircle of radius $R$ around $0$ in the upper half plane, or three straight line segments connecting $R,R+iR$, $R+iR,-R+iR$ and $-R+iR,-R$ respectively; call the latter contour $C_R$, whichever of the two you choose. Let $C$ be the closed contour obtained from joining the two intervals on the real axis, $C_\varepsilon$ and $C_R$. Since the integrand is holomorphic in a neighbourhood of the region bounded by $C$, Cauchy's integral theorem asserts

$$\int_C \frac{e^{iz}}{z}\,dz = 0,$$

and hence

$$\int_{-\infty}^\infty \frac{\sin x}{x}\,dx = -\operatorname{Im} \lim_{\substack{\varepsilon\searrow 0\\ R\nearrow\infty}} \left(\int_{C_R} \frac{e^{iz}}{z}\,dz + \int_{C_\varepsilon} \frac{e^{iz}}{z}\,dz\right).$$

By Jordan's lemma, or an elementary estimate if we chose the rectangular $C_R$, we have

$$\lim_{R\to\infty} \int_{C_R} \frac{e^{iz}}{z}\,dz = 0.$$

Parametrising $C_\varepsilon$ by $\varepsilon\cdot e^{i(\pi-t)}$, we see

$$\lim_{\varepsilon \searrow 0} \int_{C_\varepsilon} \frac{e^{iz}}{z}\,dz = -\pi ie^{i\cdot 0} = -\pi i,$$

and hence overall

$$\int_{-\infty}^\infty \frac{\sin x}{x}\,dx = \pi.$$

• It's a good proof whether it was easy to convert it. (+1) – robjohn Dec 10 '13 at 22:10
• Hi @DanielFischer, how does the integration of $e^{\large i(\epsilon e^{i\theta})}$ work? I am stuck with computing the integration on the small semi-circular indent around the origin. Are you (or, can we?) use the Dominated Convergence Theorem, and take the limit inside? Then the integral evaluates to $-i\pi$. Also, how do get $\pi$ as your final answer? Shouldn't we keep the minus sign? The original parametrization, going counterclockwise, gives integration from $\pi \to 0$, so I negated the integral to switch the upper and lower limits. Thanks so much, – User001 Dec 20 '15 at 4:21
• @User001 Yes, we can use the dominated convergence theorem, but that's a bigger thing than needed, the convergence $f_{\varepsilon}(\theta) = \exp(\varepsilon e^{i\theta}) \to 1$ as $\varepsilon \to 0$ is uniform, so it's also unproblematic for the Riemann integral. – Daniel Fischer Dec 20 '15 at 9:21
• @User001 We have $\lvert e^w - 1\rvert \leqslant e^{\lvert w\rvert} - 1$, so since $\lvert i\varepsilon e^{i\theta}\rvert = \varepsilon$, we can choose $\varepsilon_0 = \log (1+\delta)$. – Daniel Fischer Dec 20 '15 at 19:22
• @Marc Expand $e^w-1$ into a power series, and apply the triangle inequality: $$\lvert e^w-1\rvert = \Biggl\lvert \sum_{k = 1}^{\infty} \frac{w^k}{k!}\Biggr\rvert \leqslant \sum_{k = 1}^{\infty} \frac{\lvert w\rvert^k}{k!} = e^{\lvert w\rvert} - 1.$$ – Daniel Fischer Jan 27 '16 at 0:26

Before we use $\sin(x)=\frac{e^{ix}-e^{-ix}}{2i}$, we should move the contour so that it does not cross the origin. One way to do this is to use the contour $$[-R,R]\cup\color{#C0C0C0}{[R,R-i]}\cup[R-i,-R-i]\cup\color{#C0C0C0}{[-R-i,-R]}$$ and notice that since $\frac{\sin(x)}{x}$ has no poles, the integral along the contour is $0$. Furthermore, the integral along the grayed out pieces tend to $0$ as the integrand is $\sim\frac1R$ along a length of $1$. This tells us that $$\int_{-\infty}^\infty\frac{\sin(x)}{x}\,\mathrm{d}x =\int_{-\infty-i}^{\infty-i}\frac{\sin(x)}{x}\,\mathrm{d}x$$ Now, we can use $\sin(x)=\frac{e^{ix}-e^{-ix}}{2i}$. We will use the contours $$U=[-R-i,R-i]\cup Re^{[0,i\pi]}-i$$ and $$L=[-R-i,R-i]\cup Re^{[0,-i\pi]}-i$$ Since the integrands vanish quickly on the circular parts, we get \begin{align} \int_{-\infty}^\infty\frac{\sin(x)}{x}\,\mathrm{d}x &=\frac1{2i}\int_U\frac{e^{iz}}{z}\,\mathrm{d}z-\frac1{2i}\int_L\frac{e^{-iz}}{z}\,\mathrm{d}z\\ &=\frac1{2i}2\pi i-\frac1{2i}0\\[9pt] &=\pi \end{align} Since $U$ circles the pole at $0$ with residue $1$ once counterclockwise, and $L$ contains no poles.

Since $\frac{\sin(x)}{x}$ is an even function, we get \begin{align} \int_0^\infty\frac{\sin(x)}{x}\,\mathrm{d}x &=\frac12\int_{-\infty}^\infty\frac{\sin(x)}{x}\,\mathrm{d}x\\ &=\frac\pi2 \end{align}

• An interesting case of a function which is not in $L^1(\mathbb R)$, but the improper Riemann integral is defined! – Yiorgos S. Smyrlis Dec 10 '13 at 21:49
• Can you explain why we have $\int_{-\infty}^\infty\frac{\sin(x)}{x}\,\mathrm{d}x =\frac1{2i}\int_U\frac{e^{iz}}{z}\,\mathrm{d}z-\frac1{2i}\int_L\frac{e^{-iz}}{z}\,\mathrm{d}z$? – principal-ideal-domain Sep 2 '15 at 12:18
• Euler's Formula implies \begin{align}\int_{-\infty-i}^{\infty-i}\frac{\sin(z)}z\,\mathrm{d}z &=\frac1{2i}\int_{-\infty-i}^{\infty-i}\frac{e^{iz}-e^{-iz}}z\,\mathrm{d}z\\ &=\frac1{2i}\int_{-\infty-i}^{\infty-i}\frac{e^{iz}}z\,\mathrm{d}z -\frac1{2i}\int_{-\infty-i}^{\infty-i}\frac{e^{-iz}}z\,\mathrm{d}z\end{align} Then we include the large semicircular contours to close each contour; one in the upper half-plane for the first, since $e^{iz}$ decays quickly there, and the lower half-plane for the second, since $e^{-iz}$ decays quickly there. – robjohn Sep 2 '15 at 17:30
• You say we should move the contour so that it does not cross the origin. But the contour you chose does cross the origin in the segment $[-R,R]$, doesn't it? – Breaking Mad Feb 24 '16 at 12:54
• @M_a_t: no, the bottom of $U$ and the top of $L$ are the line $[-R-i,R-i]$. – robjohn Feb 24 '16 at 13:27