Sophomore's dream (source code)

= Sophomore's dream
{title2=$\int_0^1x^{\pm x}\,dx=\sum_{n\geq1}(\mp1)^{n-1}n^{-n}$}
{wiki}

The two identities are
$$
\int_0^1x^{-x}\,dx=\sum_{n=1}^\infty n^{-n},\qquad
\int_0^1x^x\,dx=\sum_{n=1}^\infty(-1)^{n-1}n^{-n}.
$$
To prove them, expand $e^{\pm x\log x}$ in its <exponential series>. Since $|x\log x|\leq1/e$ on $(0,1)$, the <Weierstrass M-test> justifies termwise integration. Substituting $x=e^{-t}$ gives $\int_0^1x^k(\log x)^k\,dx=(-1)^kk!/(k+1)^{k+1}$ through the <gamma function>. Inserting these moments into the series and shifting $n=k+1$ proves both formulas. Each resulting numerical <series> has <absolute convergence>.