# Test the convergence of an improper integral [duplicate]

Test the convergence of $\int_0^∞\frac {\sin x}{x}\,dx$. My attempt = by comparison test the integrand diverges but how it is conditionally convergent I don't understand. I think it diverges in both cases.

## marked as duplicate by Mark Viola integration StackExchange.ready(function() { if (StackExchange.options.isMobile) return; $('.dupe-hammer-message-hover:not(.hover-bound)').each(function() { var$hover = $(this).addClass('hover-bound'),$msg = $hover.siblings('.dupe-hammer-message');$hover.hover( function() { $hover.showInfoMessage('', { messageElement:$msg.clone().show(), transient: false, position: { my: 'bottom left', at: 'top center', offsetTop: -7 }, dismissable: false, relativeToBody: true }); }, function() { StackExchange.helpers.removeMessages(); } ); }); }); May 15 '18 at 16:17

• It converges conditionally as an improper Riemann Integral. It diverges as a Lebesgue integral. – Mark Viola May 15 '18 at 16:16

The integral converges, it is the Dirichlet's Integral. You need to integrate by parts in order to prove it exists. $$\int_{\pi}^{N}\frac{\sin\left(x\right)}{x}\text{d}x=\left[-\frac{\cos\left(x\right)}{x}\right]^{N}_{\pi}-\int_{\pi}^{N}\frac{\cos\left(x\right)}{x^2}\text{d}x=-\frac{\cos\left(N\right)}{N}-\frac{1}{\pi}-\int_{\pi}^{N}\frac{\cos\left(x\right)}{x^2}\text{d}x$$ First $$\left|\frac{\cos\left(N\right)}{N}\right|\leq \frac{1}{N} \underset{N \rightarrow +\infty}{\rightarrow}0 \text{ and }\left|\frac{\cos\left(x\right)}{x^2}\right| \leq \frac{1}{x^2} \text{ with } x \mapsto \frac{1}{x^2} \in\ell^{1}\left(\left[\pi,+\infty\right[\right)$$ Hence letting $N \rightarrow +\infty$, the right member admits a limit so the integral converges and $$\int_{\pi}^{+\infty}\frac{\sin\left(x\right)}{x}\text{d}x=-\frac{1}{\pi}-\int_{\pi}^{+\infty}\frac{\cos\left(x\right)}{x^2}\text{d}x$$ With the continuity of $\displaystyle x \mapsto \frac{\sin\left(x\right)}{x}$ on $\left[0, \pi\right]$ by extended it with the value $1$ in $x=0$. The integral

$$\displaystyle \int_{0}^{+\infty}\frac{\sin\left(x\right)}{x}\text{d}x \text{ converges.}$$

• It converges conditionally as an improper Riemann Integral. It diverges as a Lebesgue integral. – Mark Viola May 15 '18 at 16:15

Consider writing $$\int_0^\infty \frac{\sin(x)}{x} \, \mathrm{d}x = \sum_{n=0}^\infty \int_{n\pi}^{(n+1)\pi} \frac{\sin(x)}{x} \, \mathrm{d}x.$$