Integral $\int_0^\infty \frac{1-e^{-x}\cos bx}{x} dx$

Another standard technique is the Laplace transform. $\mathcal{L}$ is a self-adjoint operator, i.e. $$ \int_{0}^{+\infty} f(x)(\mathcal{L}g)(x)\,dx =\int_{0}^{+\infty} (\mathcal{L}f)(x)g(x)\,dx $$ and since $\mathcal{L}^{-1}\left(\frac{1}{x}\right)=1$, $\mathcal{L}\left(1-e^{-x}\cos(bx)\right)=\frac{1}{s}-\frac{s+1}{b^2+(s+1)^2}$, the original integral equals $$ \left[\log(s)-\frac{1}{2}\log(b^2+(s+1)^2)\right]_{0}^{+\infty} $$ which is divergent.


The integral clearly diverges as $x\to\infty$. Notice that

$$\left|\int_1^\infty\frac{e^{-x}\cos(bx)}x~\mathrm dx\right|\le\int_1^\infty e^{-x}~\mathrm dx=e^{-1}$$

converges, while

$$\int_1^\infty\frac1x~\mathrm dx=\ln(x)\bigg|_1^\infty=\infty$$

diverges.