TITLE: Series as an integral (sophomore's dream)
QUESTION [24 upvotes]: I need help with this exercise.
I need to prove
$$\int_{0}^{1}x^{-x}\ dx=\sum_{n=1}^{\infty}n^{-n}$$
I think I should use some convergence theorem, but I'm stuck.
Thanks a lot!

REPLY [5 votes]: Let $\displaystyle I(\lambda) = \int_{0}^{1}x^{\lambda}\;{dx} = \frac{1}{1+\lambda}.$ Differentiating this w.r.t. $\lambda$ we get:
$\displaystyle I^{(n)}(\lambda) = \int_{0}^{1}x^{\lambda}\ln^{n}{x}\;{dx} = \frac{(-1)^nn!}{(1+\lambda)^{n+1}}$ -- and therefore we have:
$\displaystyle \int_{0}^{1} x^{-x} \;{dx} =  \sum_{n \ge 0}\frac{(-1)^n}{n!} \int_{0}^{1}x^n\ln^n{x}\;{dx} = \sum_{n \ge 0}\frac{1}{(1+n)^{n+1}}$
and $\displaystyle \int_{0}^{1} x^{x} \;{dx} =  \sum_{n \ge 0}\frac{1}{n!} \int_{0}^{1}x^n\ln^n{x}\;{dx} = \sum_{n \ge 0}\frac{(-1)^n}{(1+n)^{n+1}}$.