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?

$$
\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}
$$
