๐Ÿงฎ Brain Teaser

The Integral That Wants to Be a Probability

Evaluate: I=โˆซ0โˆž1โˆ’eโˆ’xxeโˆ’xโ€‰dxI = \int_0^\infty \frac{1 - e^{-x}}{x} e^{-x} \, dx

Feynman trickTonelliexponential integralparameter integration

Answer: The Integral That Wants to Be a Probability

Key Idea / Intuition

The fraction (1โˆ’eโˆ’x)/x(1 - e^{-x})/x looks awkward by itself, but it secretly wants to be written as an integral: 1โˆ’eโˆ’xx=โˆซ01eโˆ’txโ€‰dt\frac{1-e^{-x}}{x} = \int_0^1 e^{-tx}\,dt. Once you swap the order of integration, you're left with a product of two exponentials, which integrates instantly. The answer falls out as a logarithm.


Formal Proof / Solution

Step 1: Write the numerator as an integral.

Observe the key identity: 1โˆ’eโˆ’xx=โˆซ01eโˆ’txโ€‰dt\frac{1 - e^{-x}}{x} = \int_0^1 e^{-tx} \, dt (this follows from โˆซ01eโˆ’txโ€‰dt=[โˆ’eโˆ’txx]01=1โˆ’eโˆ’xx\int_0^1 e^{-tx}\,dt = \left[-\frac{e^{-tx}}{x}\right]_0^1 = \frac{1-e^{-x}}{x}).

Step 2: Substitute and swap the order.

I=โˆซ0โˆž(โˆซ01eโˆ’txโ€‰dt)eโˆ’xโ€‰dx=โˆซ01โˆซ0โˆžeโˆ’(t+1)xโ€‰dxโ€‰dtI = \int_0^\infty \left(\int_0^1 e^{-tx}\,dt\right) e^{-x} \, dx = \int_0^1 \int_0^\infty e^{-(t+1)x}\,dx\,dt

Swapping is justified by Tonelli's theorem (the integrand is non-negative).

Step 3: Evaluate the inner integral.

โˆซ0โˆžeโˆ’(t+1)xโ€‰dx=1t+1\int_0^\infty e^{-(t+1)x}\,dx = \frac{1}{t+1}

Step 4: Evaluate the outer integral.

I=โˆซ011t+1โ€‰dt=lnโก(t+1)โˆฃ01=lnโก2โˆ’lnโก1=lnโก2I = \int_0^1 \frac{1}{t+1}\,dt = \ln(t+1)\Big|_0^1 = \ln 2 - \ln 1 = \boxed{\ln 2}


Remark: This is a baby version of the Frullani integral philosophy: expressing a ratio (f(0)โˆ’f(x))/x(f(0)-f(x))/x as โˆซ01fโ€ฒ(tx)โ€‰dt\int_0^1 f'(tx)\,dt and swapping order. Here f(x)=eโˆ’xf(x) = e^{-x} makes everything explicit and clean.

Type: IntegrationEdit on GitHub โ†—