# How to show $\int_0^1 x^{-x} \mathrm dx = \sum\limits_{n = 1}^\infty n^{-n}$. [duplicate]

I need to show that $$\int_0^1 x^{-x} \mathrm dx = \sum\limits_{n = 1}^\infty n^{-n}$$

I tried using that $$x^{-x} = e^{-x\ln(x)}$$, but I don't know what to do about when $$x = 0$$ since the equality does not hold. I also tried using the power series expansion of $$e^x$$, but I don't really know where to go from there. Any help would be appreciated.