Find $x$ in the equation $x^x = n$ for a given $n$ Simply: How do I solve this equation for a given $n \in \mathbb Z$?
$x^x = n$
I mean, of course $2^2=4$ and $3^3=27$ and so on. But I don't understand how to calculate the reverse of this, to get from a given $n$ to $x$. 

Simpler:
If
$x^x = n$,
then $x\ln(x) = \ln(n)
=y$.
Let
$f(x) = x\ln(x)-y
$.
$f'(x)
=\ln(x)+1
$.
Applying Newton's iteration,
starting with $x = \frac{y}{\ln y}$,
$x_{new}
=x-\frac{f(x)}{f'(x)}
=x-\frac{x\ln(x)-y}{\ln(x)+1}
=\frac{x\ln(x)+x-x\ln(x)+y}{\ln(x)+1}
=\frac{x+y}{\ln(x)+1}
$.
Iterate until cooked.
