how do I justify this $\int_{0}^{\infty}\frac {e^{-2x}-e^{-x}}{x}dx=\lim_ {s\to1^{-}} \int_{0}^{\infty}\frac{e^{-2x}-e^{-x}}{x^s}dx$ I was trying to compute
$\displaystyle\int_{0}^{\infty}
\frac{{\rm e}^{-2x} - {\rm e}^{-x}}{x}\,{\rm d}x$ when I had an idea, the gamma function is $\Gamma(1+z)=\int_{0}^{\infty}x^ze^{-x}dx$ and for $s<1$ the integral $\int_{0}^{\infty}\frac{e^{-2x}-e^{-x}}{x^s}dx$
converges, so call
$$I(s)=\int_{0}^{\infty}\frac{e^{-2x}-e^{-x}}{x^s}dx$$
and hope that it is continuous from the left at $s=1$.
Assuming that it is, for $s<1$ we have
$$I(s)=(2^{s-1}-1)\Gamma(1-s)$$
and so:
$$I(1)=\int_{0}^{\infty}\frac {e^{-2x}-e^{-x}}{x}dx = \lim_{s\to1^-}I(s)= \lim_{s\to1^-}(2^{s-1}-1)\Gamma(1-s)$$
Now, write $$2^{s-1}-1=1+\ln(2)(s-1)+o((s-1)^2)-1=\ln(2)(s-1)+o((s-1)^2)$$
and so:
$$\lim_{s\to1^-}(2^{s-1}-1)\Gamma(1-s) = -\ln(2)\lim_{s\to 1^-}(1-s)\Gamma(1-s)+\lim_{s\to 1^-}o((1-s)^2)\Gamma(1-s)$$
Here comes the cool part, use the reflection formula ($\Gamma(z)\Gamma(1-z)=\frac{\pi}{\sin(\pi z)}$) and obtain:
$$(1-s)\Gamma(1-s) = \frac {\pi (1-s)}{\sin(\pi s)\Gamma(s)}$$
and:
$$o((1-s)^2)\Gamma(1-s) = o(1-s)\frac {\pi (1-s)}{\sin(\pi s)\Gamma(s)}$$
Now, $\Gamma$ is continuous at 1 and $\Gamma(1)=1$ so:
$$\lim_{s\to 1^-}\frac {\pi (1-s)}{\sin(\pi s)\Gamma(s)} = \lim_{s\to 1^-}\frac {\pi (1-s)}{\sin(\pi s)}$$
this limit is finite and is equal to 1 (with l'hopital) and so
$$\lim_{s\to 1^-}o((1-s)^2)\Gamma(1-s) = 0$$
And we can finally finish up and say $I(1)=-\ln(2)$.
Now, I don't know how to justify the fact that $I(s)$ is continuous at $s=1$ from the left and so I don't know if my solution is correct.
BUT! the answer is correct which gives me hope that this solution is correct with some additional justifications about the continuity of $I$ at $s=1^-$ which is why I am looking for help.
 A: $\int_0^{\infty} \frac {e^{-x}-e^{-2x}} {x^{s}}dx=\int_0^{1} \frac {e^{-x}-e^{-2x}} {x^{s}}dx+\int_1^{\infty} \frac {e^{-x}-e^{-2x}} {x^{s}}dx$. In the second term use the DCT to justify interchange of limit and integral. (Note that $x^{s} >1$ for $x >1$ and $s>0$). In the first term use Monotone Convergence Theorem.
A: Not directly related to the way you solved the integral but I thought you might be interested in the Frullani integral which states:
$$\int_0^\infty\frac{f(ax)-f(bx)}{x}dx=\left(f(\infty)-f(0)\right)\ln\frac{a}{b}$$
and in your case:
$$f(x)=e^{-x},a=2,b=1$$
and so:
$$I=\left(0-1\right)\ln\frac{2}{1}=-\ln(2)$$
Hope this helps!
A: I thought it might be of interest to present a way to show directly, using elementary inequalities only, that the integral of interest, $I(s)=\int_0^\infty \frac{e^{-2x}-e^{-x}}{x^s}\,dx$, is right continuous at $s=1$.  To that end we proceed.

Note that for $0<s\le1$, we have the estiamtes
$$\begin{align}
|I(s)-I(1)|&=\left|\int_0^\infty \frac{e^{-2x}-e^{-x}}{x^s}\,dx-\int_0^\infty \frac{e^{-2x}-e^{-x}}{x}\,dx\right|\\\\
&=\int_0^\infty (e^{-x}-e^{-2x})\left|\frac1{x^s}-\frac1x\right|\,dx\\\\
&= \int_0^\infty \left(\frac{e^{-x}-e^{-2x}}{x}\right)|x^{1-s}-1|\,dx\\\\
&=\int_0^\infty \left(\frac{e^{-x}-e^{-2x}}{x}\right)\left|e^{(1-s)\log(x)}-1\right|\,dx\\\\
&= \int_0^1  \left(\frac{e^{-x}-e^{-2x}}{x}\right)\left(1-e^{(1-s)\log(x)}\right)\,dx\\\\
&+\int_1^\infty \left(\frac{e^{-x}-e^{-2x}}{x}\right)\left(e^{(1-s)\log(x)}-1\right)\,dx\tag1\\\\
&\le (1-s)\int_0^1  \left(\frac{e^{-x}-e^{-2x}}{x}\right)\left|\log(x)\right|\,dx\\\\
&+\int_1^\infty \left(\frac{e^{-x}-e^{-2x}}{x}\right)\left(e^{(1-s)x}-1\right)\,dx\tag2\\\\
&=(1-s)\int_0^1  \left(\frac{e^{-x}-e^{-2x}}{x}\right)\left|\log(x)\right|\,dx\\\\
&+\int_1^\infty \left(\frac{e^{-sx}-e^{-(1+s)x}}{x}\right)\left(1-e^{-(1-s)x}\right)\,dx\tag3\\\\
&\le (1-s)\int_0^1  \left(\frac{e^{-x}-e^{-2x}}{x}\right)\left|\log(x)\right|\,dx\\\\
&+(1-s)\int_1^\infty \left(e^{-sx}-e^{-(1+s)x}\right)\,dx\tag4\\\\
\end{align}$$
Inasmuch as the first integral on the right-hand side of $(4)$ exists (in fact, it is easy to show that it is less than $\int_0^1 |\log(x)|\,dx=1$) and the second integral exists and is a bounded function of $s\in (\delta,1]$ for $1>\delta>0$ (in fact, the integral is less that $1/(s(1+s))$), we conclude that the integral of interest, $I(s)$ is right continuous at $s=1$.
And we are done!


NOTES:
In going from $(1)$ to $(2)$ we used the inequality $e^x\ge 1+x$ and the inequality $\log(x)\le x$.
In going from $(3)$ to $(4)$, we used the inequality $1-e^{-x}\le x$.
A: Not an answer, but another way to calculate this integral:
\begin{align} \int_0^\infty \frac{e^{-2x}-e^{-x}}{x}dx &= \lim_{M\to\infty}  \int_0^M \frac{e^{-2x}-e^{-x}}{x}dx = \\
&= \lim_{M\to\infty} \Big( \int_0^M \frac{e^{-2x}-1}{x}dx - \int_0^M \frac{e^{-x}-1}{x} dx \Big) = \\
&= \lim_{M\to\infty} \Big( \int_0^{2M} \frac{e^{-y}-1}{y}dy - \int_0^M \frac{e^{-x}-1}{x} dx \Big) = \\
&= \lim_{M\to\infty} \int_M^{2M} \frac{e^{-x}-1}{x}dx = \\
&= \lim_{M\to\infty} \Big(\int_M^{2M} \frac{e^{-x}}{x}dx -\int_M^{2M}\frac{1}{x}dx \Big) = \\
&= \lim_{M\to\infty} \Big(\int_M^{\infty} \frac{e^{-x}}{x}dx - \int_{2M}^{\infty} \frac{e^{-x}}{x}dx - \ln 2 \Big) = \\
&= -\ln 2\end{align}
where we used the fact that $\int_M^{\infty} \frac{e^{-x}}{x}dx$ is convergent, so $ \lim_{M\to\infty} \int_M^{\infty} \frac{e^{-x}}{x}dx = 0$.
A: We can prove that $f(s)=\int_0^{\infty} (e^{-x}-e^{-2x})x^{-s} dx$ is analytic on $\Re s \in [\epsilon,2)$ for any $0<\epsilon<1$. Let $g(x)=-e^{-2x}/2+e^{-x}-1/2$ and $g'(x)=e^{-2x}-e^{-x}$. Since $|g(x)|\leq c\min(1,x^2)$ for an absolute constant $c>0$, the integration by parts gives
$$\begin{align}
f(s)&=g(x) x^{-s} \bigg\vert_0^{\infty} + s\int_0^{\infty} g(x) x^{-s-1} dx\\
&=s\int_0^{\infty}g(x) x^{-s-1} dx.\end{align}
$$
That is, $f(s)$ is analytic on $\Re s \in (0,2)$. Then, by your method, we have
$$
f(s)=(2^{s-1}-1)\Gamma(1-s)  \mathrm{ \ if \ }  s \in (0,1). 
$$
As $(2^{s-1}-1)\Gamma(1-s)$ is meromorphic with only a removable singularity at $s=1$, we must have $f(s)=(2^{s-1}-1)\Gamma(1-s)$ if $\Re s\in (0,2)$ by analytic continuation. In particular, we have
$$
f(1)=\lim_{s\rightarrow 1} (2^{s-1}-1)\Gamma(1-s)=-\log 2.
$$
Here, $\log=\ln$.
Moreover, $f(s)=\int_0^{\infty} (e^{-x}-e^{-2x})x^{-s} dx$ is analytic on $\Re s \in (-\infty, 1)$. This is because $|e^{-x}-e^{-2x}|\leq c \min(x, e^{-x})$ for some absolute constant $c>0$.
Combining these, we can conclude that $f(s)=\int_0^{\infty} (e^{-x}-e^{-2x})x^{-s} dx$ is analytic on $\Re s \in (-\infty, 2)$, and
$$
f(s)=\int_0^{\infty} (e^{-x}-e^{-2x})x^{-s} dx= (2^{s-1}-1)\Gamma(1-s) 
$$
for  $\Re s \in (-\infty, 2)$.
