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?
 A: Alternatively, integrate by parts
\begin{align}
&\int_{0}^{\infty} \frac{1-3\cos 2x+2\cos 3x}{x^2} dx\\
= &\int_{0}^{\infty} \frac{6\sin 2x-6\sin 3x}{x} dx\\
=& \>6 \int_{0}^{\infty} \frac{\sin 2x}{2x} d(2x) 
 - 6 \int_{0}^{\infty} \frac{\sin 3x}{3x} d(3x) \\
 =&\>0
\end{align}
A: Here is an approach that uses the following identity for Laplace transforms
$$\int_0^\infty f(x) g(x) \, dx = \int_0^\infty \mathcal{L} \{f(x)\} (s)\mathcal{L}^{-1} \{g(x)\} (s) \, ds.$$
Recently this identity has been referred as the Maz identity for Laplace transforms.
Setting $f(x) = 1 - 3\cos 2x + 3 \cos 3x$ and $g(x) = \frac{1}{x^2}$, it is easy to see that
\begin{align*}
\mathcal{L}\{f(x)\} &= \mathcal{L}\{1 - 3\cos 2x + 2 \cos 3x\} = \mathcal{L}\{1\} - 3 \mathcal{L}\{\cos 2x \} + 2 \mathcal{L}\{\cos 3x \}\\
&= \frac{1}{s} - \frac{3s}{s^2 + 4} + \frac{2s}{s^2 + 9},
\end{align*}
and
$$\mathcal{L}^{-1} \{g(x)\} = \mathcal{L}^{-1} \left \{\frac{1}{x^2} \right \} = s.$$
So from the Maz identity one has
\begin{align*}
\int_0^\infty \frac{1 - 3\cos 2x + 2 \cos 3x}{x^2} \, dx &= \int_0^\infty \left [\frac{1}{s} - \frac{3s}{s^2 + 4} + \frac{2s}{s^2 + 9} \right ] s \, ds\\
&= \int_0^\infty \left [1 - 3 \frac{s^2}{s^2 + 4} + 2 \frac{s^2}{s^2 + 9} \right ] \, ds\\
&= \int_0^\infty \left [1 - 3 \frac{(s^2 + 4) - 4}{s^2 + 4} + 2 \frac{(s^2 + 9) - 9}{s^2 + 9} \right ] \, ds\\
&= \int_0^\infty \left [1 - 3 + \frac{12}{s^2 + 4} + 2 - \frac{18}{s^2 + 9} \right ] \, ds\\
&= 12 \int_0^\infty \frac{ds}{s^2 + 4} - 18 \int_0^\infty \frac{ds}{s^2 + 9}\\
&= 6 \arctan \left (\frac{s}{2} \right ) \Big{|}_0^\infty - 6 \arctan \left (\frac{s}{3} \right ) \Big{|}_0^\infty\\
&= 6 \cdot \frac{\pi}{2} - 6 \cdot \frac{\pi}{2} = 0,
\end{align*}
as required to show.
A: 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.
