A CMIMC Integration Bee integral: $\int_0^\infty \left( \sin(1/x) - \frac{\sin(\pi/x)}{\pi} \right) \,dx$

If you consider that $$\int \sin \left(\frac{1}{x}\right)\,dx =x \sin \left(\frac{1}{x}\right)-\text{Ci}\left(\frac{1}{x}\right)$$ then $$\int\left(\sin \left(\frac{1}{x}\right)-\frac{1}{\pi }\sin \left(\frac{\pi }{x}\right)\right) \,dx=\text{Ci}\left(\frac{\pi }{x}\right)-\text{Ci}\left(\frac{1}{x}\right)+x \sin \left(\frac{1}{x}\right)-\frac{x }{\pi }\sin \left(\frac{\pi }{x}\right)$$ Now, using asymptotics for large values of $x$ $$\frac{x }{a}\sin \left(\frac{a}{x}\right)-\text{Ci}\left(\frac{a}{x}\right)=-\left(\log (a)+\gamma -1\right)+\log \left({x}\right)+\frac{a^2}{12 x^2}-\frac{a^4}{480 x^4}+O\left(\frac{1}{x^6}\right)$$ $$\int_0^t \left(\sin \left(\frac{1}{x}\right)-\frac{1}{\pi }\sin \left(\frac{\pi }{x}\right)\right) \,dx=\log (\pi )-\frac{\pi ^2-1}{12 t^2}+\frac{\pi ^4-1}{480 t^4}+O\left(\frac{1}{t^6}\right)$$


Random Variable's comment outlines what is almost certainly the intended (and most elegant!) method. The finished solution is as follows:

Let $u=\frac{1}{x}$. Now, $$\begin{align} \int_0^\infty \left( \sin(1/x) - \frac{\sin(\pi/x)}{\pi} \right) \, dx &= \int_0^\infty \frac{\frac{\sin u}{u} - \frac{\sin \pi u}{\pi u}}{u} \, du \\ &= (\ln \pi) \left( \lim_{x \to 0^+} \frac{\sin x}{x} - \lim_{x \to \infty} \frac{\sin x}{x} \right) \\ &= \ln \pi. \end{align} $$