TITLE: Show $ \int_0^\infty\left(1-x\sin\frac 1 x\right)dx = \frac\pi 4 $
QUESTION [20 upvotes]: How to show that
$$
\int_0^\infty\left(1-x\sin\frac{1}{x}\right)dx=\frac{\pi}{4}
$$
?

REPLY [4 votes]: Another way is to use Laplace transform to evaluate this improper integral. In fact, let $f(x)=x-\sin x$ and then $F(s)=\frac{1}{s^2}-\frac{1}{s^2+1}$. Thus 
\begin{eqnarray*}
\mathcal{L}\big\{\frac{f(x)}{x}\big\}&=&\int_s^\infty F(s)ds=-\frac{\pi}{2}+\frac{1}{s}+\arctan s, \\
\mathcal{L}\big\{\frac{f(x)}{x^2}\big\}&=&\int_s^\infty(-\frac{\pi}{2}+\frac{1}{u}+\arctan u)du\\
&=&-1+s(\frac{\pi}{2}-\arctan s)+\ln\frac{\sqrt{s^2+1}}{s}, \\
\mathcal{L}\big\{\frac{f(x)}{x^3}\big\}&=&\int_s^\infty\left(-1+u(\frac{\pi}{2}-\arctan u)-\ln\frac{\sqrt{u^2+1}}{u}\right)du\\
&=&\frac{s}{2}-\frac{\pi s^2}{4}-\frac{1}{2}\arctan s+\frac{1}{2}s^2\arctan s+s\ln s-\frac{1}{2}s\ln(s^2+1).
\end{eqnarray*}
From this, one can obtain
\begin{eqnarray*}
&&\int_0^\infty (1-x\sin\frac{1}{x})dx=\int_0^\infty\frac{x-\sin x}{x^3}dx=\lim_{s\to 0^+}\mathcal{L}\big\{\frac{f(x)}{x^3}\big\}\\
&=&\lim_{s\to 0^+}(\frac{\pi}{4}+\frac{s}{2}-\frac{\pi s^2}{4}-\frac{1}{2}\arctan s+\frac{1}{2}s^2\arctan s+s\ln s-\frac{1}{2}s\ln(s^2+1))\\
&=&\frac{\pi}{4}.
\end{eqnarray*}