$\int_0^\infty \frac{1}{x^2}\left( \left(\sum_{n=1}^\infty\sin\left(\frac{x}{2^n}\right)\right)-\sin(x)\right)\ dx$ While I was working on my stuff, another question suddenly came to mind, the one you see below
$$\int_0^\infty \frac{ \left(\sum_{n=1}^\infty\sin\left(\frac{x}{2^n}\right)\right)-\sin(x)}{x^2} \ dx$$
Which way should I look at this integral?
 A: You can write you integral as $$\int_0^\infty t^{-2} \sum\limits_{\nu \geqslant 1} g_\nu (t)dt=\int_0^\infty t^{-2}g(t)dt$$ where $g_\nu(t)=\sin(t/2^\nu)-\sin(t)/2^{\nu-1}$ and $g(t)=\sum\limits_{\nu\geqslant 1}g_\nu(t)$. Using an equation relating $g(2t)$ and $g(t)$ and a change of variables $t=2u$ in the integral I get that $$\int_0^\infty \frac{g(t)}{t^2}dt=\int_0^{\infty}\frac{2\sin t-\sin 2t}{t^2}dt$$
This is a Frullani type integral which you can evaluate to $2\log 2$. 
A: Note that
$$
\begin{align}
\int_0^\infty\frac{\lambda\sin(x)-\sin(\lambda x)}{x^2}\mathrm{d}x
&=\lim_{a\to0}\left(\int_a^\infty\frac{\lambda\sin(x)}{x^2}\mathrm{d}x-\int_{a\lambda}^\infty\frac{\lambda\sin(x)}{x^2}\mathrm{d}x\right)\\
&=\lambda\lim_{a\to0}\int_a^{a\lambda}\frac{\sin(x)}x\frac{\mathrm{d}x}x\\[6pt]
&=\lambda\log(\lambda)\tag{1}
\end{align}
$$
Applying $(1)$ to the question gives
$$
\begin{align}
\int_0^\infty\frac1{x^2}\left(\left(\sum_{n=1}^\infty\sin\left(\frac{x}{2^n}\right)\right)-\sin(x)\right)\mathrm{d}x
&=\sum_{n=1}^\infty\int_0^\infty\frac{\sin(2^{-n}x)-2^{-n}\sin(x)}{x^2}\mathrm{d}x\\
&=-\sum_{n=1}^\infty2^{-n}\log\left(2^{-n}\right)\\
&=\log(2)\sum_{n=1}^\infty n2^{-n}\\[6pt]
&=2\log(2)\tag{2}
\end{align}
$$
