Proving of Integral $\int_{0}^{\infty}\frac{e^{-bx}-e^{-ax}}{x}dx = \ln\left(\frac{a}{b}\right)$

A problem-specific solution is as follows:

\begin{align*} \int_{0}^{\infty} \frac{e^{-bx} - e^{-ax}}{x} \, dx &= - \int_{0}^{\infty} \int_{a}^{b} e^{-xt} dt \, dx \\ &= - \int_{a}^{b} \int_{0}^{\infty} e^{-xt} dx \, dt \\ &= - \int_{a}^{b} \frac{dt}{t} = - \left[ \log x \right]_{a}^{b} = \log\left(\frac{a}{b}\right). \end{align*}

Interchanging the order of integration is justified either by Fubini's theorem or Tonelli's theorem.


Note that the following is a general technique that can handle much harder problems. Recalling the Laplace transform

$$ F(s) = \int_{0}^{\infty} f(x) e^{-sx} dx. $$

Consider the more general integral

$$ F(s) = \int_{0}^{\infty} \frac{e^{-bx}-e^{-ax}}{x} e^{-sx} dx \implies F'(s) = -\int_{0}^{\infty} ({e^{-bx}-e^{-ax}}) e^{-sx} dx .$$

Now, it is just a matter of evaluating the last integral and integrating the answer with respect to $s$ and then taking the limit as $s\to 0$ to find the desired value.

Note: When you integrate with respect to $s$ do not forget the constant of integration. To find it use the fact that

$$ \lim_{s\to \infty} F(s) = 0. $$


$$ \begin{split} \int_{0}^{\infty}\frac{\exp(-ax) - \exp(-bx)}{x}dx &= \lim_{\epsilon\to 0}\int_{\epsilon}^{\infty}\frac{\exp(-ax) - \exp(-bx)}{x}dx\\ &=\lim_{\epsilon\to 0}\left[\int_{\epsilon}^{\infty}\frac{\exp(-ax)}{x}dx - \int_{\epsilon}^{\infty}\frac{\exp(-bx)}{x}dx\right]\\ &=\lim_{\epsilon\to 0}\left[\int_{a\epsilon}^{\infty}\frac{\exp(-t)}{t}dt - \int_{b\epsilon}^{\infty}\frac{\exp(-t)}{t}dt\right]\\ &=\lim_{\epsilon\to 0}\int_{a\epsilon}^{b\epsilon}\frac{\exp(-t)}{t}dt=\lim_{\epsilon\to 0}\int_{a}^{b}\frac{\exp(-\epsilon u)}{u}du \end{split} $$

The integrand converges uniformly to $\frac{1}{u}$ within the finite integration limits, therefore we're allowed to move the limit inside the integral.