I am practicing calculus section of GRE Math Subject test, and I can't figure out a way to do the following integral: $$\int_0^\infty \frac{\cos (ax) - \cos (bx)}{x}dx.$$
I absolutely have no clue how to do this. Can someone show me the solution explicitly? Thank you.
Let $Y\geqslant X\geqslant 0$, you have $$ \int_{X}^{Y}{\frac{\cos(ax)-\cos(bx)}{x}dx}=\int_{aX}^{aY}{\frac{\cos(u)}{u}du}-\int_{bX}^{bY}{\frac{\cos(u)}{u}du} $$ Since $\cos$ is even we can suppose $a,b>0$. Hence letting $Y\rightarrow+\infty$ gives $$ \int_{X}^{+\infty}{\frac{\cos(ax)-\cos(bx)}{x}dx}=\int_{aX}^{+\infty}{\frac{\cos(u)}{u}du}-\int_{bX}^{+\infty}{\frac{\cos(u)}{u}du}=\int_{aX}^{bX}{\frac{\cos(u)}{u}du}$$ Letting $X\rightarrow 0$ gives $$ \int_{0}^{+\infty}{\frac{\cos(ax)-\cos(bx)}{x}dx}=\ln\left(\frac{b}{a}\right)$$