Evaluating the integral $\int_0^\infty \frac{\sin x} x \,\mathrm dx = \frac \pi 2$? A famous exercise which one encounters while doing Complex Analysis (Residue theory) is to prove that the given integral:
$$\int\limits_0^\infty \frac{\sin x} x \,\mathrm  dx = \frac \pi 2$$
Well, can anyone prove this without using Residue theory?  I actually thought of using the series representation of $\sin x$:
$$\int\limits_0^\infty \frac{\sin x} x \, dx = \lim\limits_{n \to \infty} \int\limits_0^n \frac{1}{t} \left( t - \frac{t^3}{3!} + \frac{t^5}{5!} + \cdots \right) \,\mathrm  dt$$
but I don't see how $\pi$ comes here, since we need the answer to be equal to $\dfrac{\pi}{2}$.
I believe this can also be solved using double integrals.

It is possible (if I remember correctly) to justify switching the order of integration to give the equality:

$$\int_{0}^{\infty} \Bigg(\int_{0}^{\infty} e^{-xy} \sin x \,dy \Bigg)\, dx = \int_{0}^{\infty} \Bigg(\int_{0}^{\infty} e^{-xy} \sin x \,dx \Bigg)\,dy$$
Notice that
$$\int_{0}^{\infty} e^{-xy} \sin x\,dy = \frac{\sin x}{x}$$

This leads us to

$$\int_{0}^{\infty} \Big(\frac{\sin x}{x} \Big) \,dx = \int_{0}^{\infty} \Bigg(\int_{0}^{\infty} e^{-xy} \sin x \,dx \Bigg)\,dy$$
Now the right hand side can be found easily, using integration by parts.

$$\begin{align*}
I &amp;= \int e^{-xy} \sin x \,dx = -e^{-xy}{\cos x} - y \int e^{-xy} \cos x \, dx\\
&amp;= -e^{-xy}{\cos x} - y \Big(e^{-xy}\sin x + y \int e^{-xy} \sin x \,dx \Big)\\
&amp;= \frac{-ye^{-xy}\sin x - e^{-xy}\cos x}{1+y^2}.
\end{align*}$$
Thus $$\int_{0}^{\infty} e^{-xy} \sin x \,dx = \frac{1}{1+y^2}$$
Thus $$\int_{0}^{\infty} \Big(\frac{\sin x}{x} \Big) \,dx = \int_{0}^{\infty}\frac{1}{1+y^2}\,dy = \frac{\pi}{2}.$$
$\newcommand{\bbx}[1]{\,\bbox[15px,border:1px groove navy]{\displaystyle{#1}}\,}
 \newcommand{\braces}[1]{\left\lbrace\,{#1}\,\right\rbrace}
 \newcommand{\bracks}[1]{\left\lbrack\,{#1}\,\right\rbrack}
 \newcommand{\dd}{\mathrm{d}}
 \newcommand{\ds}[1]{\displaystyle{#1}}
 \newcommand{\expo}[1]{\,\mathrm{e}^{#1}\,}
 \newcommand{\ic}{\mathrm{i}}
 \newcommand{\mc}[1]{\mathcal{#1}}
 \newcommand{\mrm}[1]{\mathrm{#1}}
 \newcommand{\pars}[1]{\left(\,{#1}\,\right)}
 \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}}
 \newcommand{\root}[2][]{\,\sqrt[#1]{\,{#2}\,}\,}
 \newcommand{\totald}[3][]{\frac{\mathrm{d}^{#1} #2}{\mathrm{d} #3^{#1}}}
 \newcommand{\verts}[1]{\left\vert\,{#1}\,\right\vert}$


  By "closing" a contour in the first quadrant (&nbsp;a quarter circle of radius $\ds{R}$&nbsp;): 


\begin{align}
\int_{0}^{R\ &gt;\ 0}{\sin\pars{x} \over x}\,\dd x &amp; =
\Im\int_{0}^{R}{\expo{\ic x} - 1\over x}\,\dd x
\\[5mm] &amp; =
-\,\Im\
\overbrace{\int_{0}^{\pi/2}{\exp\pars{\ic R\expo{\ic\theta}} - 1 \over R\expo{\ic\theta}}\,R\expo{\ic\theta}\ic\,\dd\theta}
^{\ds{\mbox{along the arc}}}\ -\
\Im\
\overbrace{\int_{R}^{0}{\expo{-y} - 1 \over \ic y}\,\ic\,\dd y}
^{\ds{\mbox{along the}\ y\ \mbox{axis}}}
\\[5mm] &amp; =
-\,\Re\int_{0}^{\pi/2}\bracks{\exp\pars{\ic R\cos\pars{\theta}}
\exp\pars{ -R\sin\pars{\theta}} - 1}\,\dd\theta
\\[5mm] &amp; =
{\pi \over 2} -
\Re\int_{0}^{\pi/2}\exp\pars{\ic R\cos\pars{\theta}}
\exp\pars{ -R\sin\pars{\theta}}\,\dd\theta = \bbx{\pi \over 2}
\end{align}


  Note that


\begin{align}
0 &amp; &lt; \verts{\int_{0}^{\pi/2}\exp\pars{\ic R\cos\pars{\theta}}
\exp\pars{ -R\sin\pars{\theta}}\,\dd\theta} &lt;
\int_{0}^{\pi/2}\exp\pars{-R\sin\pars{\theta}}\,\dd\theta
\\[5mm] &amp; &lt;
\int_{0}^{\pi/2}\exp\pars{-\,{2R \over \pi}\,\theta}\,\dd\theta =
{\expo{-R} - 1 \over -2R/\pi}\,\,\,\stackrel{\mrm{as}\ R\ \to\ \infty}{\Large\to}\,\,\,{\large 0}
\end{align}