๐Ÿงฎ Brain Teaser

The Integral That Splits at a Threshold

Evaluate the definite integral

I=โˆซ01xxโ€‰dx+โˆซ01xโˆ’xโ€‰dx.I = \int_0^1 x^x \, dx + \int_0^1 x^{-x} \, dx.

Wait โ€” that's not quite it. Instead, evaluate:

I=โˆซ01(xx+xโˆ’x)dxโˆ’2โˆซ01dxI = \int_0^1 \left(x^x + x^{-x}\right) dx - 2\int_0^1 dx

...

Actually, let's state the real gem cleanly. Compute:

I=โˆซ01xxโ€‰dxI = \int_0^1 x^x \, dx

and show it equals

I=โˆ‘n=1โˆž(โˆ’1)n+1nn=1โˆ’122+133โˆ’144+โ‹ฏI = \sum_{n=1}^{\infty} \frac{(-1)^{n+1}}{n^n} = 1 - \frac{1}{2^2} + \frac{1}{3^3} - \frac{1}{4^4} + \cdots

power seriesintegration by substitutionBernoulliclosed formsophomore's dream

Answer: Sophomore's Dream: Integral of x^x

Key Idea / Intuition

The function xx=exlnโกxx^x = e^{x \ln x} looks complicated, but expanding it as a power series in xlnโกxx \ln x reduces it to integrals of the form โˆซ01xk(lnโกx)kโ€‰dx\int_0^1 x^k (\ln x)^k \, dx. Each such integral evaluates to a clean closed form via the substitution x=eโˆ’tx = e^{-t}, and the resulting sum is exactly the alternating series โˆ‘(โˆ’1)n+1/nn\sum (-1)^{n+1}/n^n. This is Johann Bernoulli's sophomore's dream โ€” a striking closed form for an integral with no elementary antiderivative.


Formal Proof / Solution

Step 1: Series expansion.

Write

xx=exlnโกx=โˆ‘n=0โˆž(xlnโกx)nn!.x^x = e^{x \ln x} = \sum_{n=0}^{\infty} \frac{(x \ln x)^n}{n!}.

So

I=โˆซ01xxโ€‰dx=โˆ‘n=0โˆž1n!โˆซ01xn(lnโกx)nโ€‰dx.I = \int_0^1 x^x \, dx = \sum_{n=0}^{\infty} \frac{1}{n!} \int_0^1 x^n (\ln x)^n \, dx.

(Interchange of sum and integral is justified by uniform/dominated convergence on [0,1][0,1], since โˆฃxlnโกxโˆฃโ‰ค1/e|x \ln x| \le 1/e there.)

Step 2: Evaluate โˆซ01xn(lnโกx)nโ€‰dx\int_0^1 x^n (\ln x)^n \, dx.

Substitute x=eโˆ’tx = e^{-t}, so dx=โˆ’eโˆ’tdtdx = -e^{-t} dt, lnโกx=โˆ’t\ln x = -t, and the limits go from t=โˆžt = \infty to t=0t = 0:

โˆซ01xn(lnโกx)nโ€‰dx=โˆซ0โˆžeโˆ’nt(โˆ’t)neโˆ’tโ€‰dt=(โˆ’1)nโˆซ0โˆžtneโˆ’(n+1)tโ€‰dt.\int_0^1 x^n (\ln x)^n \, dx = \int_0^{\infty} e^{-nt} (-t)^n e^{-t} \, dt = (-1)^n \int_0^{\infty} t^n e^{-(n+1)t} \, dt.

Now use the standard formula โˆซ0โˆžtneโˆ’ฮฑtdt=n!/ฮฑn+1\int_0^\infty t^n e^{-\alpha t} dt = n!/\alpha^{n+1} with ฮฑ=n+1\alpha = n+1:

โˆซ01xn(lnโกx)nโ€‰dx=(โˆ’1)nโ‹…n!(n+1)n+1.\int_0^1 x^n (\ln x)^n \, dx = (-1)^n \cdot \frac{n!}{(n+1)^{n+1}}.

Step 3: Sum the series.

I=โˆ‘n=0โˆž1n!โ‹…(โˆ’1)nโ‹…n!(n+1)n+1=โˆ‘n=0โˆž(โˆ’1)n(n+1)n+1.I = \sum_{n=0}^{\infty} \frac{1}{n!} \cdot (-1)^n \cdot \frac{n!}{(n+1)^{n+1}} = \sum_{n=0}^{\infty} \frac{(-1)^n}{(n+1)^{n+1}}.

Re-index with m=n+1m = n+1:

I=โˆ‘m=1โˆž(โˆ’1)mโˆ’1mm=1โˆ’14+127โˆ’1256+โ‹ฏ\boxed{I = \sum_{m=1}^{\infty} \frac{(-1)^{m-1}}{m^m} = 1 - \frac{1}{4} + \frac{1}{27} - \frac{1}{256} + \cdots}

Numerically: Iโ‰ˆ0.7834305107...I \approx 0.7834305107...

This result is surprising because the integrand xxx^x has no elementary antiderivative, yet the integral has this delightful explicit series representation.

Source: Johann Bernoulli (1697); mathematical folklore

Type: IntegrationSource: Johann Bernoulli (1697); mathematical folkloreEdit on GitHub โ†—