Why is this integration proof incorrect? I recently came across the fact that $\displaystyle\int_{\frac{m}{a}}^{\frac{n}{a}}\frac{f(ax)}{x}\,dx$ is independent of the value of $a$. This lead me to this integral here: $\displaystyle \int_0^\infty \frac{\sin(ax) \cos(bx)}{x}\,dx$.
From the above result of independence, it is clear that:
$
\begin{align}
\int_0^\infty \frac{\sin(bx+ax)}{x}\,dx &= \int_0^\infty \frac{\sin(bx-ax)}{x}\,dx\\
\int_0^\infty \frac{\sin(bx+ax)}{x}\,dx - \int_0^\infty \frac{\sin(bx-ax)}{x}\,dx &= 0\\
\int_0^\infty \frac{\sin(bx+ax) - \sin(bx-ax)}{x}\,dx&= 0\\
2\int_0^\infty \frac{\sin(ax) \cos(bx)}{x}\,dx&= 0\\
\int_0^\infty \frac{\sin(ax) \cos(bx)}{x}\,dx&= 0.
\end{align}
$
However, it's obvious that this is incorrect by counterexample, say $a = 2$ and $b = 1$. Where is the mistake in this proof? Is there a restriction on $a$ and $b$ that I need to take into consideration? Any help or guidance would be greatly appreciated!
 A: For finite $m$ and $n$, it is true that the value of
$$ \int_{m/a}^{n/a} \frac{\sin(ax)}{x}\, \mathrm dx $$
is independent of $x.$ But when you integrate to $\infty,$ you need to watch the sign.
In particular, if $p$ and $q$ have opposite signs, then
$$ \lim_{n \to \infty} \frac np = - \lim_{n \to \infty} \frac nq,$$
and therefore
$$ \int_0^\infty \frac{\sin(px)}{x}\, \mathrm dx
 = \int_0^{-\infty} \frac{\sin(qx)}{x}\, \mathrm dx
 = - \int_0^\infty \frac{\sin(qx)}{x}\, \mathrm dx. $$
Set $px = bx + ax$ and $qx = bx - ax$ in your calculations;
then for $a = 2$ and $b = 1,$ you have $p = 3$ and $q = -1,$
therefore
\begin{align}
\int_0^\infty \frac{\sin(2x) \cos(x)}{x}\, \mathrm dx
&= \frac12\left(\int_0^\infty \frac{\sin(3x)}{x}\, \mathrm dx
- \int_0^\infty \frac{\sin(-x)}{x}\, \mathrm dx\right) \\
&= \frac12\left(\int_0^\infty \frac{\sin(3x)}{x}\, \mathrm dx
+ \int_0^\infty \frac{\sin(3x)}{x}\, \mathrm dx\right) \\
&= \int_0^\infty \frac{\sin(3x)}{x}\, \mathrm dx \\
&= \int_0^\infty \frac{\sin(x)}{x}\, \mathrm dx.
\end{align}
Neither side is zero.
