<s>[INST] Showing$ \int_{0}^{\infty} \frac{1-3\cos 2x+2\cos 3x}{x^2} dx=0$ Showing $$\int_{0}^{\infty} \frac{1-3\cos 2x+2\cos 3x}{x^2} dx=0$$
We can show this by re-writing $I$ as
$$
\implies I=6\int_{0}^{\infty}\frac{\frac{1-\cos(2x)}{2x}-\frac{1-\cos(3x)}{3x}}{x}\,\mathrm dx,
$$
which is Frullani Integral.
$$J=\int_{0}^{\infty} \frac{f(ax)-f(bx)}{x} dx=[f(\infty)-f(0)]\ln(a/b).$$ Here, $f(x)=\frac{1-\cos(x)}{x},$ hence $I=0.$
So the question is how to show (1), otherwise?
 [/INST] The result can be found almost immediately from the work in the question statement.
Note that
\begin{align*}
\int_{0}^{\infty} \frac{1-3\cos 2x+2\cos 3x}{x^2} dx
&= 6 \underbrace{\int_0^\infty\frac{1-\cos 2x}{2x^2}dx}_{\textrm{let }x=t/2} - 
6 \underbrace{\int_0^\infty\frac{1-\cos 3x}{3x^2} dx}_{\textrm{let }x=t/3} \\ 
&= 6\int_0^\infty\frac{1-\cos t}{t^2} - 6\int_0^\infty\frac{1-\cos t}{t^2} \\
&= 0.
\end{align*}
It remains to show that
$(1-\cos 2x)/(2x^2)$ and
$(1-\cos 3x)/(3x^2)$ are integrable on $[0,\infty)$, which is a straightforward exercise.
</s>