Check the existence of $\int_{0}^{+\infty}\frac{\sin(x)}{x}\,dx$ I know that $\int_{0}^{+\infty}\frac{\sin(x)}{x}\,dx=\dfrac \pi 2$, by constructing the 2 variable integration $$\int_{0}^{+\infty}\sin(x)\int_{0}^{+\infty}\dfrac{1}{e^{xy}}\,dy\,dx$$ But this seems to be an ad hoc solution to me.
If I only need to prove it converges to a finite number, is there any general method?
Thanks a lot.
 A: To show that the improper Riemann integral $\int_0^\infty \frac{\sin(x)}{x}\,dx$ exists, we can use the Abel-Dirichlet test.  There, we only need to establish that there exists a number $M$ such that for any $L>0$
$$\left|\int_0^L \sin(x)\,dx\right|\le M$$
Inasmuch as $\frac{1}{x}$ decreases to $0$ monotonically, then the test guarantees that the integral $\int_0^\infty \frac{\sin(x)}{x}\,dx$ exists.
A: Here are two proofs.
For the first, we write
$$  \int_0^\infty \frac{\sin x}{x} \ dx  = \sum_{n=0}^\infty \int_{n \pi}^{  (n + 1) \pi} \frac{\sin x}{x} \ dx \ .$$
Now define
$$ x_n = \int_{n \pi}^{ (n + 1) \pi} \frac{\sin x}{x} \ dx \ ,$$
and note that the terms $x_n$ alternate in sign since $\sin x$ alternates in sign. We have
$$ - \frac{1}{ n} \leq x_n \leq \frac{1}{n} \ ,$$
so $\lim_{n \to \infty} x_n = 0$. Finally, note that
$$|x_n| = \int_{n \pi}^{(n + 1) \pi } \frac{|\sin x|}{x} \ dx = \int_{(n + 1) \pi}^{(n + 2) \pi } \frac{|\sin x|}{x - \pi} \ dx \geq \int_{(n + 1) \pi}^{(n + 2) \pi } \frac{|\sin x|}{x} \ dx = |x_{n+1}| \ ,
$$
so $|x_n|$ is monotonically decreasing. We can thus conclude that the series
$$ \sum_{n=0}^\infty x_n$$
satisfies the conditions of Leibniz's test for alternating series, and thus converges.
For the second, using continuity, one can show that
$$ \int_0^1 \frac{\sin x}{x} \ dx < \infty \ .$$
Now for the remaining integral, we have
$$ \int_1^\infty \frac{\sin x}{x} \ dx  = - \frac{\cos x}{x} |_{1}^\infty - \int_1^\infty \frac{\cos x}{x^2} \ dx = \cos 1 - \int_1^\infty \frac{\cos x}{x^2} \ dx \ .$$
Now note that
$$ \left| \int_1^\infty \frac{\cos x}{x^2} \ dx \right| \leq \int_1^\infty \frac{1}{x^2} \ dx < \infty \ .$$
So, the integral
$$ \int_1^\infty \frac{\sin x}{x} \ dx < \infty \ .$$
