Sophomore's Dream

Theorem
$$ $$

These were discovered in 1697 by Johann Bernoulli.

Proof
The following is a proof of the second identity; the first follows the same lines.

By definition, we can express $$x^x$$ as:

$$ $$

Thus the exercise devolves into the following sum of integrals:


 * $$\int_0^1 x^x dx = \sum_{n=0}^\infty \int_0^1 \frac{x^n(\ln x)^n}{n!} \, dx$$

We can evaluate this by Integration by Parts.

Integrate:
 * $$\int x^m (\ln x)^n\; dx$$

by taking $$u = (\ln x)^n$$ and $$dv = x^m dx$$, which gives us:


 * $$\int x^m (\ln x)^n\; dx = \frac{x^{m+1}(\ln x)^n}{m+1} - \frac{n}{m+1}\int x^{m+1} \frac{(\ln x)^{n-1}}{x} dx \qquad\mbox{(for }m \ne -1\mbox{)}$$

for $$m \ne -1$$.

Thus, by induction:



\int x^m (\ln x)^n\; dx = \frac{x^{m+1}}{m+1} \cdot \sum_{i=0}^n (-1)^i \frac{(n)_i}{(m+1)^i} (\ln x)^{n-i}$$

where $$(n)_i$$ denotes the falling factorial.

In this case $$m = n$$, and they are integers, so:


 * $$\int x^n (\ln x)^n\; dx = \frac{x^{n+1}}{n+1} \cdot \sum_{i=0}^n (-1)^i \frac{(n)_i}{(n+1)^i} (\ln x)^{n-i}$$

We integrate from $$0$$ to $$1$$.

By L'Hôpital's Rule, we have that:
 * $$\lim_{x \to 0^+} x^m (\ln x)^n \, = \, 0$$

Because of this, and the fact that $$\ln 1 = 0$$, all the terms vanish except the last term at $$1$$.

This yields:


 * $$\int_0^1 \frac{x^n (\ln x)^n}{n!}\; dx = \frac{1}{n!}\frac{1^{n+1}}{n+1} (-1)^n \frac{(n)_n}{(n+1)^n} = (-1)^n (n+1)^{-(n+1)}$$

Summing these (and changing indexing so it starts at $$n=1$$ instead of $$n=0$$ yields the formula.