Best way to integrate $ \int_0^\infty \frac{e^{-at} - e^{-bt}}{t} \text{d}t $

Solution 1:

I may as well give an answer:

Note $$ \frac{ e^{-at} - e^{-bt} }{t} = \int^b_a e^{-xt} dx $$ so our integral is

$$ \int^{\infty}_0 \int^b_a e^{-xt} dx dt = \int^b_a \int^{\infty}_0 e^{-xt} dt dx $$ $$ = \int^b_a \frac{1}{x} dx = \log(b/a) $$

This is a general method, and often this whole process is compressed into a well known integral called Frullani's Integral.

Solution 2:

By differentiating under the integral sign. Fix $a$, and let

$$ g(b) = \int_{0}^\infty \frac{e^{-at} - e^{-bt}}{t} dt. $$

Differentiating w.r.t. $b$, we get $$ g'(b) = \frac{d}{db}\int_{0}^\infty \frac{e^{-at} - e^{-bt}}{t} dt = \int_{0}^{\infty} \frac{\partial}{\partial b} \frac{e^{-at} - e^{-bt}}{t} dt. $$ Doing the differentiation, $$ g'(b) = \int_{0}^{\infty} e^{-bt} dt = - \left.\frac{e^{-bt}}{b} \right|_{0}^{\infty} = \frac{1}{b}. $$ Thus we must have $g(b) = \ln b + C$ for some constant $C$. To determine $C$, plug in $a$, and use the fact that $g(a) = 0$.

Note. I am yet to convince myself that all the steps of the proof are rigorous. I will edit my answer later if additional argument is necessary.