How can I evaluate this? $$\int_0^\infty \frac{1-e^{-x}\cos bx}{x} dx$$
One standard technique is the residue theorem, and one immediately notices that the integrand is entire.($x=0$ is a removable singularity.) However, it is not plausible to deform the contour properly to make this integral easier.
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.