<s>[INST] 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}$.
 [/INST] This one I found in The American Mathematical Monthly from 1951 in the article 'A simple evaluation of an improper integral' written by Waclaw Kozakiewicz.
Theorem (Riemann). If $f(x)$ is Riemann integrable in the interval $a \leq x \leq b$, then:
$$\lim_{k \to +\infty} \int_a^b f(x) \sin kx \; dx = 0 \;.$$
Next, notice that:
$$\int_0^\pi \frac{\sin \left(n+\frac{1}{2}\right)x}{2 \sin \frac{x}{2}}\; dx = \frac{\pi}{2} \; ,n = 0,1,2,\ldots \quad (1)$$
and let:
$$\phi(x) = \begin{cases} 0 & , \;x = 0 \\ \frac{1}{x} - \frac{1}{2 \sin \frac{x}{2}} =\frac{2 \sin \frac{x}{2} - x}{2x \sin \frac{x}{2}} & ,\; 0 < x \leq \pi \; . \end{cases}$$
Then $\phi(x)$ is continuous and satisfies Riemann theorem, so choosing $k = n + \frac{1}{2}$ we write:
$$\lim_{n \to +\infty}\int_0^{\pi} \left(\frac{1}{x} - \frac{1}{2 \sin \frac{x}{2}} \right) \sin \left(n+\frac{1}{2}\right)x \; dx = 0 \;.$$
But taking $(1)$ into account we have:
$$\lim_{n \to +\infty} \int_0^\pi \frac{\sin \left(n+\frac{1}{2}\right)x}{x} \; dx = \frac{\pi}{2}\;.$$
Using substitution $u = \left(n+\frac{1}{2}\right)x$ and knowing that $\int_0^{+\infty} \frac{\sin x}{x} \; dx$ converges we finally have:
$$\int_0^{+\infty} \frac{\sin x}{x} \; dx = \lim_{n \to +\infty} \int_0^{\left(n+\frac{1}{2}\right)\pi}\frac{\sin u}{u} \; du = \frac{\pi}{2}\;.$$
</s>