I am trying to evaluate $$\int_{0}^{\infty} \frac{\cos(x)-e^{-x}}{x} dx$$
I did manage to get the correct value of this integral through the use of Frullani's Integral Theorem, which states that $$\int_{0}^{\infty} \frac{f(ax)-f(bx)}{x} dx = (f(\infty)-f(0))\Big(\ln\Big(\frac{a}{b}\Big)\Big)$$
So from here, I substitute $e^{ix}-i\sin(x)$ for $\cos(x)$ to get this into something of the Frullani Integral form. It seems from the response here: Frullani 's theorem in a complex context., that we can extend the Frullani Theorem to a complex setting with a lot of work and on a case-by-case basis. However, I would like to approach this integral in a way that does not involve complex numbers. This integral was originally meant to be evaluated with just "advanced calc"/elementary real analysis methods, so I am looking for such an approach.