๐Ÿงฎ Brain Teaser

The Integral That Telescopes in Disguise

Evaluate the improper integral

I=โˆซ0โˆžeโˆ’xโˆ’eโˆ’2xxโ€‰dx.I = \int_0^\infty \frac{e^{-x} - e^{-2x}}{x}\, dx.

Frullani integraldifferentiation under the integral signimproper integralFeynman trick

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โˆžf(ax)โˆ’f(bx)xโ€‰dx=(f(0)โˆ’f(โˆž))lnโก(b/a)\int_0^\infty \frac{f(ax)-f(bx)}{x}\,dx = (f(0)-f(\infty))\ln(b/a) whenever ff is continuous and the limits at 00 and โˆž\infty exist. Here f(x)=eโˆ’xf(x)=e^{-x}, so f(0)=1f(0)=1, f(โˆž)=0f(\infty)=0, and the ratio of the two "speeds" is 2/12/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 lnโก2\ln 2.


Formal Proof / Solution

Method 1: Frullani's Integral

Frullani's theorem. If f:[0,โˆž)โ†’Rf:[0,\infty)\to\mathbb{R} is continuous and f(0)f(0), f(โˆž):=limโกxโ†’โˆžf(x)f(\infty):=\lim_{x\to\infty}f(x) both exist, then for 0<a<b0 < a < b,

โˆซ0โˆžf(ax)โˆ’f(bx)xโ€‰dx=(f(0)โˆ’f(โˆž))lnโกโ€‰โฃba.\int_0^\infty \frac{f(ax)-f(bx)}{x}\,dx = \bigl(f(0)-f(\infty)\bigr)\ln\!\frac{b}{a}.

Write our integral as

I=โˆซ0โˆžeโˆ’xโˆ’eโˆ’2xxโ€‰dx=โˆซ0โˆžf(1โ‹…x)โˆ’f(2โ‹…x)xโ€‰dx,f(t)=eโˆ’t.I = \int_0^\infty \frac{e^{-x} - e^{-2x}}{x}\,dx = \int_0^\infty \frac{f(1\cdot x)-f(2\cdot x)}{x}\,dx,\quad f(t)=e^{-t}.

Then f(0)=1f(0)=1, f(โˆž)=0f(\infty)=0, a=1a=1, b=2b=2, so Frullani gives

I=(1โˆ’0)lnโกโ€‰โฃ21=lnโก2.\boxed{I = (1-0)\ln\!\frac{2}{1} = \ln 2.}


Method 2: Differentiation Under the Integral Sign (Feynman)

Define

I(t)=โˆซ0โˆžeโˆ’xโˆ’eโˆ’txxโ€‰dx,t>0.I(t) = \int_0^\infty \frac{e^{-x} - e^{-tx}}{x}\,dx, \quad t > 0.

Differentiate with respect to tt (justified by dominated convergence, since โˆฃโˆ’xeโˆ’tx/xโˆฃ=eโˆ’tx|{-xe^{-tx}}/{x}| = e^{-tx} is integrable):

Iโ€ฒ(t)=โˆซ0โˆžโˆ‚โˆ‚tโ€‰โฃ(eโˆ’xโˆ’eโˆ’txx)dx=โˆซ0โˆžeโˆ’txโ€‰dx=1t.I'(t) = \int_0^\infty \frac{\partial}{\partial t}\!\left(\frac{e^{-x}-e^{-tx}}{x}\right)dx = \int_0^\infty e^{-tx}\,dx = \frac{1}{t}.

Integrate back: I(t)=lnโกt+CI(t) = \ln t + C.

Boundary condition: I(1)=โˆซ0โˆžeโˆ’xโˆ’eโˆ’xxโ€‰dx=0I(1) = \int_0^\infty \frac{e^{-x}-e^{-x}}{x}\,dx = 0, so 0=lnโก1+C=C0 = \ln 1 + C = C.

Therefore I(t)=lnโกtI(t) = \ln t, and

I=I(2)=lnโก2.I = I(2) = \ln 2.


Quick sanity check

For large xx the integrand decays like eโˆ’xe^{-x} (absolutely integrable). Near x=0x=0, eโˆ’xโˆ’eโˆ’2xโ‰ˆxโˆ’(2xโˆ’โ‹ฏโ€‰)=x(1โˆ’2)โ‹…(โˆ’1)+โ‹ฏโˆผxe^{-x}-e^{-2x} \approx x - (2x - \cdots) = x(1-2)\cdot (-1)+\cdots \sim x, so (eโˆ’xโˆ’eโˆ’2x)/xโ†’1(e^{-x}-e^{-2x})/x\to 1: no singularity. The integral is well-defined. โœ“