Integral $\int_0^{\infty}\frac{e^{-x}-e^{-2x}}{x}dx$ I am working on the improper integral:
$$\int_0^{\infty}\frac{e^{-x}-e^{-2x}}{x}dx$$
This function does not have an elementary anti-derivative, so here is what I did: define:
$$f(t):=\int_0^{\infty}\frac{e^{-xt}-e^{-2xt}}{x}dx,\quad t>0$$
Then differentiation gives:
$$f'(t)=\int_0^{\infty}\frac{-xe^{-xt}+2xe^{-2xt}}{x}dx=\int_0^{\infty}-e^{-xt}+2e^{-2xt}dx=0$$
this means $f$ is constant. I feel something is wrong here because $f$ should depend on $t$. Where am I wrong and what is the right way to do this?
 A: $$
\begin{align}
\int_a^b\frac{e^{-x}-e^{-2x}}{x}\,\mathrm{d}x
&=\int_a^b\frac{e^{-x}}{x}\,\mathrm{d}x-\int_a^b\frac{e^{-2x}}{x}\,\mathrm{d}x\\
&=\int_a^b\frac{e^{-x}}{x}\,\mathrm{d}x-\int_{2a}^{2b}\frac{e^{-x}}{x}\,\mathrm{d}x\\
&=\int_a^{2a}\frac{e^{-x}}{x}\,\mathrm{d}x-\int_b^{2b}\frac{e^{-x}}{x}\,\mathrm{d}x\\[9pt]
&\to\log(2)-0
\end{align}
$$
as $a\to0$ and $b\to\infty$ since, for any $c\gt0$,
$$
e^{-2c}\log(2)
\le\int_c^{2c}\frac{e^{-x}}{x}\,\mathrm{d}x
\le e^{-c}\log(2)
$$

There is nothing special about $e^{-x}$ here. As long as $\lim\limits_{x\to0}f(x)=v_0$ and $\lim\limits_{x\to\infty}f(x)=v_\infty$, then
$$
\begin{align}
\int_a^b\frac{f(x)-f(\lambda x)}{x}\,\mathrm{d}x
&=\int_a^b\frac{f(x)}{x}\,\mathrm{d}x-\int_a^b\frac{f(\lambda x)}{x}\,\mathrm{d}x\\
&=\int_a^b\frac{f(x)}{x}\,\mathrm{d}x-\int_{\lambda a}^{\lambda b}\frac{f(x)}{x}\,\mathrm{d}x\\
&=\int_a^{\lambda a}\frac{f(x)}{x}\,\mathrm{d}x-\int_b^{\lambda b}\frac{f(x)}{x}\,\mathrm{d}x\\[9pt]
&\to v_0\log(\lambda)-v_\infty\log(\lambda)\\[6pt]
\int_0^\infty\frac{f(x)-f(\lambda x)}{x}\,\mathrm{d}x
&=(v_0-v_\infty)\log(\lambda)
\end{align}
$$
A: Note that
$$e^{-x} - e^{-2x} = x\int_{1}^{2}e^{-xt}dt$$
Hence,
$$\int_0^{\infty} \dfrac{e^{-x}-e^{-2x}}xdx = \int_0^{\infty} \int_{1}^{2}e^{-xt}dtdx = \int_1^2 \int_0^{\infty}e^{-xt}dxdt = \int_1^2\dfrac{dt}t = \ln(2)$$
In general, by similar idea, we have
$$\int_0^{\infty} \dfrac{e^{-ax}-e^{-bx}}xdx = \ln(b/a)$$
A: We are going to use Feynman’s Integration Technique with the integral $$
I(a)=\int_0^{\infty} \frac{e^{-x}-e^{-a x}}{x} d x
$$
Differentiating w.r.t. $a$ yields
$$
\begin{aligned}
I^{\prime}(a) & =\int_0^{\infty} e^{-a x} d x \\
& =\left[\frac{e^{-a x}}{-a}\right]_0^{\infty} \\
& =\frac{1}{a}
\end{aligned}
$$
Integrating back $1$ to $2$ yields
$$
\begin{aligned}
I & =I(2)-I(1) \\
& =\int_1^2 I^{\prime}(a) d a \\
& =\int_1^2 \frac{1}{a} d a \\
& =\ln 2
\end{aligned}
$$
In general, replacing $1,2$ by $b,a$ gives
$$\int_0^{\infty} \frac{e^{-bx}-e^{-a x}}{x} d x=\ln \left|\frac{a}{b}\right| $$
