**Theorem.** $\int_0^\infty \sin x \phantom. dx/x = \pi/2$.

**Poof.** For $x>0$ write $1/x = \int_0^\infty e^{-xt} \phantom. dt$,
and deduce that $\int_0^\infty \sin x \phantom. dx/x$ is
$$
\int_0^\infty \sin x \int_0^\infty e^{-xt} \phantom. dt \phantom. dx
= \int_0^\infty
\left( \int_0^\infty e^{-tx} \sin x \phantom. dx \right)
\phantom. dt
= \int_0^\infty \frac{dt}{t^2+1},
$$
which is the arctangent integral for $\pi/2$, QED.

The theorem is correct, and usually obtained as an application of
contour integration, or of Fourier inversion ($\sin x / x$ is a multiple of
the Fourier transform of the characteristic function of an interval).
The poof, which is the first one I saw
(given in a footnote in an introductory textbook on quantum physics),
is not correct, because the integral does not converge absolutely.
One can rescue it by writing $\int_0^M \sin x \phantom. dx/x$
as a double integral in the same way, obtaining
$$
\int_0^M \sin x \frac{dx}{x} =
\int_0^\infty \frac{dt}{t^2+1}
- \int_0^\infty e^{-Mt} (\cos M + t \cdot \sin M) \frac{dt}{t^2+1}
$$
and showing that the second integral approaches $0$ as $M \rightarrow \infty$;
but this detour makes for a much less appealing alternative to the usual
proof by complex or Fourier analysis.

Still the double-integral trick can be used legitimately to evaluate
$\int_0^\infty \sin^m x \phantom. dx/x^n$ for integers $m,n$ such that
the integral converges absolutely (that is, with $2 \leq n \leq m$;
NB unlike the contour or Fourier approach this technique applies
also when $m \not\equiv n \bmod 2$).
Write $(n-1)!/x^n = \int_0^\infty t^{n-1} e^{-xt} \phantom. dt$ to obtain
$$
\int_0^\infty \sin^m x \frac{dx}{x^n} = \frac1{(n-1)!}
\int_0^\infty t^{n-1}
\left( \int_0^\infty e^{-tx} \sin^m x \phantom. dx \right)
\phantom. dt,
$$
in which the inner integral is a rational function of $t$,
and then the integral with respect to $t$ is elementary.
For example, when $m=n=2$ we find
$$
\int_0^\infty \sin^2 x \frac{dx}{x^2}
= \int_0^\infty t \frac2{t^3+4t} dt
= 2 \int_0^\infty \frac{dt}{t^2+4} = \frac\pi2.
$$
As a bonus, we recover a correct proof of our starting theorem by
integration by parts:

$$
\frac\pi2 = \int_0^\infty \sin^2 x \frac{dx}{x^2}
= \int_0^\infty \sin^2 x \phantom. d(-1/x)
= \int_0^\infty \frac1x d(\sin^2 x)
= \int_0^\infty 2 \sin x \cos x \frac{dx}{x};
$$
since $2 \sin x \cos x = \sin 2x$, the desired
$\int_0^\infty \sin x \phantom. dx/x = \pi/2$
follows by a linear change of variable.

**Exercise** Use this technique to prove that
$\int_0^\infty \sin^3 x \phantom. dx/x^2 = \frac34 \log 3$,
and more generally
$$
\int_0^\infty \sin^3 x \frac{dx}{x^\nu} =
\frac{3-3^{\nu-1}}{4} \cos \frac{\nu\pi}{2} \Gamma(1-\nu)
$$
when the integral converges. [Both are in Gradshteyn and Ryzhik,
page 449, formula 3.827; the $\nu=2$ case is 3.827#3, credited to
D. Bierens de Haan, *Nouvelles tables d'intégrales définies*,
Amsterdam 1867; the general case is 3.827#1, from Gröbner and
Hofreiter's *Integraltafel* II, Springer: Vienna and Innsbruck 1958.]

6more comments