# Calculate integral $\int_{0}^{+\infty} \frac{x - \sin{\left(x \right)}}{x^{3}}\, dx$ using the Dirichlet integral

I try to calculate the integral:

$$\int_{0}^{+\infty} \frac{x - \sin{\left(x \right)}}{x^{3}}\, dx,$$

using the Dirichlet integral

$$\int\limits_0^{+\infty} \frac{\sin \alpha x}{x}\,dx = \frac{\pi}{2}\mathrm{sgn}\,\alpha.$$

I integrate this integral in parts, but I can't substitute the limits of integration because the limit is infinity.

Integrating twice by parts gives $$\int_0^T {\frac{{x - \sin x}}{{x^3 }}\mathrm{d}x} = \frac{1}{2}\frac{{\cos T}}{T} + \frac{1}{2}\frac{{\sin T}}{{T^2 }} - \frac{1}{T} + \frac{1}{2}\int_0^T {\frac{{\sin x}}{x}\mathrm{d}x} .$$ Thus $$\int_0^{ + \infty } {\frac{{x - \sin x}}{{x^3 }}\mathrm{d}x} = \frac{1}{2}\int_0^{ + \infty } {\frac{{\sin x}}{x}\mathrm{d}x} = \frac{\pi }{4}.$$

The following lacks justification (I don't know much about swapping integrals). But it sounds like the gist of what you're asking for.

$$\int_{0}^{\beta} \frac{\sin\alpha x}{x}\, d\alpha = \frac{1-\cos \beta x }{x^2}$$ $$\int_{0}^{\gamma} \frac{1-\cos \beta x}{x^2}\, d\beta = \frac{\gamma x - \sin \gamma x}{x^3}$$

So compute

$$\int_{0}^{1}\int_{0}^{\beta}\frac{\pi}{2}\text{sgn}(\alpha)\, d\alpha\, d\beta = \int_{0}^{1}\frac{\pi}{2}\beta\, d\beta = \frac{\pi}{4}$$

• Explicitly,\begin{align}\int_0^\infty\frac{x-\sin x}{x^3}dx&=\int_0^\infty\int_0^1\frac{1-\cos\beta x}{x^2}d\beta dx\\&=\int_0^\infty\int_0^1\int_0^\beta\frac{\sin\alpha x}{x}d\alpha d\beta dx\\&\stackrel{\star}{=}\int_0^1\int_0^\beta\int_0^\infty\frac{\sin\alpha x}{x}dxd\alpha d\beta\\&=\int_0^1\int_0^\beta\frac{\pi}{2}\operatorname{sgn}\alpha d\alpha d\beta\\&=\int_0^1\frac{\pi}{2}\beta d\beta\\&=\frac{\pi}{4},\end{align}with $\star$ needing justification.
– J.G.
Jan 4, 2021 at 17:14

$$\int\frac{x-\sin (x)}{x^3}\,dx=\int\frac{1}{x^2}\,dx-\int\frac{\sin (x)}{x^3}\,dx=$$ $$=-\frac{1}{x}-\int\frac{\sin (x)}{x^3}\,dx$$ by parts $$\int\frac{\sin (x)}{x^3}\,dx=-\frac{\sin (x)}{2 x^2}-\int -\frac{\cos (x)}{2 x^2} \, dx=$$ again by parts $$=-\frac{\sin (x)}{2 x^2}-\left(\frac{\cos (x)}{2 x}-\int -\frac{\sin (x)}{2 x} \, dx\right)=$$ $$=-\frac{\sin (x)}{2 x^2}-\frac{\cos (x)}{2 x}-\int \frac{\sin (x)}{2 x} \, dx$$ And finally $$\int\frac{x-\sin (x)}{x^3}\,dx=-\frac{1}{x}+\frac{\sin (x)}{2 x^2}+\frac{\cos (x)}{2 x}+\int \frac{\sin (x)}{2 x} \, dx$$ the improper integral becomes $$\int_0^{\infty } \frac{x-\sin (x)}{x^3} \, dx=\left[-\frac{1}{x}+\frac{\sin (x)}{2 x^2}+\frac{\cos (x)}{2 x}\right]_0^{\infty}+\int_0^{\infty } \frac{\sin (x)}{2 x} \, dx=$$ $$=\underset{M\to \infty }{\text{lim}}\left(\frac{\sin (M)}{2 M^2}+\int_0^M \frac{\sin (x)}{2 x} \, dx-\frac{1}{M}+\frac{\cos (M)}{2 M}\right)-\underset{M\to 0}{\text{lim}}\left(\frac{\sin (M)}{2 M^2}+\int_0^M \frac{\sin (x)}{2 x} \, dx-\frac{1}{M}+\frac{\cos (M)}{2 M}\right)$$ first limit gives $$\frac{\pi }{4}$$.

Second limit is zero because obviously $$\int_0^0 \frac{\sin (x)}{2 x} \, dx=0$$, furthermore $$\underset{M\to 0}{\text{lim}}\frac{-2 M+\sin (M)+M \cos (M)}{2 M^2}=\underset{M\to 0}{\text{lim}}\frac{\frac{\sin (M)}{M}^*+\cos (M)-2}{2 M}=$$ $$=\underset{M\to 0}{\text{lim}}\frac{\cos (M)-1}{2 M}=^{**}\underset{M\to 0}{\text{lim}}-\frac{\sin (M)}{2}=0$$

$$^*$$ fundamental limit $$\frac{\sin (M)}{M}\to 1$$ as $$M\to 0$$

$$^{**}$$ L'Hopital rule

Expanding $$\sin(x)$$ by its Maclaurin series, writing out the first term, and re-indexing gives, \begin{align*} \frac{x-\sin(x)}{x^3}&=\frac{1}{x^3}\left(x-\sum_{n=0}^\infty\frac{(-1)^n}{(2n+1)!}x^{2n+1}\right)=\frac{1}{x^3}\left(x-x-\sum_{n=1}^\infty\frac{(-1)^n}{(2n+1)!}x^{2n+1}\right) \\ &=\frac{1}{x^3}\sum_{n=1}^\infty\frac{(-1)^{n+1}}{(2n+1)!}x^{2n+1}=\frac{1}{x^3}\sum_{n=0}^\infty\frac{(-1)^n}{(2n+3)!}x^{2n+3}=\sum_{n=0}^\infty\phi_n\frac{\Gamma(n+1)}{\Gamma(2n+4)}x^{2n} \end{align*} where $$\phi_n$$ is the indicator of $$n$$ defined as,

$$\phi_n=\frac{(-1)^n}{\Gamma(n+1)},\quad n\in\mathbb{Z}.$$

Now integrating and re-expressing as a Bracket series, \begin{align*} \int_0^{+\infty}\frac{x-\sin(x)}{x^3}\ dx&=\int_0^{+\infty}\sum_{n=0}^\infty\phi_n\frac{\Gamma(n+1)}{\Gamma(2n+4)}x^{2n}\ dx=\sum_{n=0}^\infty\phi_n\frac{\Gamma(n+1)}{\Gamma(2n+4)}\langle2n+1\rangle \end{align*} where $$\langle a\rangle$$ is the bracket assigned as,

$$\langle a\rangle=\int_0^{+\infty} x^{a-1}\ dx,\quad a\in\mathbb{R}.$$

The series gives the value, $$\sum_{n=0}^\infty\phi_n\frac{\Gamma(n+1)}{\Gamma(2n+4)}\langle2n+1\rangle=\frac{\Gamma(1/2)\Gamma(1/2)}{2\Gamma(3)}=\frac{\pi}{4}$$ hence, $$\int_0^{+\infty}\frac{x-\sin(x)}{x^3}\ dx=\frac{\pi}{4}.$$ The general outline for the method of bracket integration is easily found, for example here. I've also answered another question with more details on how the bracket series assigns a value here.