Switching Limit and Integral in Improper Integral I am trying to evaluate the improper integral: $$\int_{0}^{\infty}\frac{\cos(\alpha x)-\cos(\beta x)}{x}\,dx,$$ with $\alpha,\beta>0$.
After observing that the integrand is equal to $\int_{\alpha}^\beta \sin(tx)\,dt$, I am nearly there. In particular, I need to evaluate the integral: $$\int_{\alpha}^{\beta}\left[\lim_{R\to \infty} \frac{\cos(tR)}{t} \right]\,dt. $$
I would like to make a change of variables and write $\zeta=tR$, but I am struggling to be rigorous when it comes to handling the limit operation inside the integral. In particular, I think that I have: $$\int_{\alpha}^{\beta}\left[\lim_{R\to \infty} \frac{\cos(tR)}{t} \right]\,dt=\int_{\alpha R}^{\beta R}\left[\lim_{R \to \infty}\frac{\cos(\zeta)}{\zeta} \right]\,d\zeta, $$
and I would love to write: $$\int_{\alpha R}^{\beta R}\left[\lim_{R \to \infty}\frac{\cos(\zeta)}{\zeta} \right]\,d\zeta=\lim_{R\to \infty}\int_{\alpha R}^{\beta R}\frac{\cos \zeta}{\zeta}\,d\zeta.$$ But I am worried that bringing the limit outside the integral wasn't legal, especially since $\mathbf{R\to \infty}\implies \mathbf{\zeta \to \infty} $. If it is legal, then I plan on showing (using Dirichlet's test for improper integrals) that the improper integral $\int_{a}^\infty \frac{\cos\zeta}{\zeta} \,d\zeta$ converges for any $a\geq0$. Then the integral I want to evaluate (in the indented equation immediately above) must go to zero, since it is the tail end of a convergent improper integral using a Cauchy Criterion related argument. 
Is it immediately clear whether or not my interchange of limit and integral was allowed? If not, is there a way I could justify it?
Thank you for your help!
 A: Instead let's try to make use of the following manipulation:
$$\int_0^\infty \frac{\cos(\alpha x) - \cos(\beta x)}{x}\:dx = \int_0^\infty \int_0^\infty e^{-yx}\left[\cos(\alpha x) - \cos(\beta x)\right]\:dy\:dx$$
then switch the order of integration (which is more easily justifiable then the limit interchange) to get
$$= \int_0^\infty \frac{y}{\alpha^2+y^2}-\frac{y}{\beta^2+y^2}\:dy = \log\left(\frac{\beta}{\alpha}\right)$$
A: This can be handled similarly to the Frullani integral even though $\cos x$ does not have a limit as $x \to \infty$.
It is straightforward to show (see here) that
$$\int_0^1 \frac{\cos(\alpha x)-\cos(\beta x)}{x}\,dx = \log \frac{\beta}{\alpha}- \int_\alpha^\beta \frac{\cos x}{x} \, dx,$$
and with the substitution $x = Ru$,
$$\int_0^R \frac{\cos(\alpha x)-\cos(\beta x)}{x}\,dx = \log \frac{\beta}{\alpha}- \int_{\alpha R}^{\beta R} \frac{\cos u}{u} \, du$$
By the second mean value theorem for integrals there exists $\xi \in (\alpha R, \beta R)$ such that
$$\left|\int_{\alpha R}^{\beta R} \frac{\cos u}{u} \, du\right| = \left|\frac{1}{\alpha R} \int_{\alpha R}^{\xi} \cos u\, du\right| = \frac{|\sin \xi - \sin( \alpha R)|}{\alpha R} \leqslant \frac{2}{\alpha R}$$
Therefore,
$$\int_0^\infty \frac{\cos(\alpha x)-\cos(\beta x)}{x}\,dx = \log \frac{\beta}{\alpha}-\underbrace{\lim_{R \to \infty}\int_{\alpha R}^{\beta R} \frac{\cos u}{u} \, du}_{= 0} = \log \frac{\beta}{\alpha}$$
