Answer: Frullani Integral: (e^{-x}-e^{-2x})/x
Key Idea / Intuition
The integrand looks like a single ugly fraction, but hidden inside it is a Frullani integral: the formula that says โซ0โโxf(ax)โf(bx)โdx=(f(0)โf(โ))ln(b/a) whenever f is continuous and the limits at 0 and โ exist. Here f(x)=eโx, so f(0)=1, f(โ)=0, and the ratio of the two "speeds" is 2/1. The answer pops out in one line.
Alternatively, one can differentiate under the integral sign: introduce a parameter, swap differentiation and integration, then integrate back. Both routes lead to the same beautiful answer ln2.
Formal Proof / Solution
Method 1: Frullani's Integral
Frullani's theorem. If f:[0,โ)โR is continuous and f(0), f(โ):=limxโโโf(x) both exist, then for 0<a<b,
โซ0โโxf(ax)โf(bx)โdx=(f(0)โf(โ))lnabโ.
Write our integral as
I=โซ0โโxeโxโeโ2xโdx=โซ0โโxf(1โ
x)โf(2โ
x)โdx,f(t)=eโt.
Then f(0)=1, f(โ)=0, a=1, b=2, so Frullani gives
I=(1โ0)ln12โ=ln2.โ
Method 2: Differentiation Under the Integral Sign (Feynman)
Define
I(t)=โซ0โโxeโxโeโtxโdx,t>0.
Differentiate with respect to t (justified by dominated convergence, since โฃโxeโtx/xโฃ=eโtx is integrable):
Iโฒ(t)=โซ0โโโtโโ(xeโxโeโtxโ)dx=โซ0โโeโtxdx=t1โ.
Integrate back: I(t)=lnt+C.
Boundary condition: I(1)=โซ0โโxeโxโeโxโdx=0, so 0=ln1+C=C.
Therefore I(t)=lnt, and
I=I(2)=ln2.
Quick sanity check
For large x the integrand decays like eโx (absolutely integrable). Near x=0, eโxโeโ2xโxโ(2xโโฏ)=x(1โ2)โ
(โ1)+โฏโผx, so (eโxโeโ2x)/xโ1: no singularity. The integral is well-defined. โ