TITLE: $x^x=y$. How to solve for $x$?
QUESTION [8 upvotes]: I tried looking for ways to solve this equation and came across something like Lambert's W function, which, by the way, I did not understand a bit, because I've never learned it nor do I have a decent mathematical background. I also came across one more method called the Newton's method, but never used it either. Can the procedure to solve this equation be made a little bit clearer? I just plugged in the value on my calculator and it solved it for me, I guess it must have used some trial and error. Please advise.

REPLY [6 votes]: Please excuse me if I go back too far in not assuming things which you already understand very well.
You first have to clarify what $x^x$ really means. In general, $a^x$ is defined as
$e^{x \log a}$ for positive $a$. So for positive $x$, we define $x^x$ as $e^{x\log x}$. If you want to use Newton's method, it's a bit easier to take (natural) logarithms at this point. Solving $x^x = c$ for some number $c$ is then equivalent to solving 
$x \log x = d$ where $d = \log c$, so let's concentrate on solving $x \log x = d$.
We are then trying to solve $f(x) = 0$ where $f(x) = x \log x -d$. Notice that 
the derivative $f^{\prime}(x) = 1 +\log x$. 
Newton's method tries to solve $f(x) = 0$ by picking a starting approximation to a solution $x_0$, and then by generating new approximations via the formula
$x_{n+1} = x_n - \frac{f(x_n)}{f^{\prime}(x_n)}.$ This is justified by the heuristic that $f(x + h)$ is close to $f(x) + hf^{\prime}(x)$ when $h$ is small, so if we take
$h = \frac{-f(x)}{f^{\prime}(x)}$, we should get something close to zero. Newton's method doesn't always converge to a solution, and analysing under which conditions it does is
quite complicated.
Anyway, for this choice of $f$, Newton's method tells us to set 
$x_{n+1} = x_{n} - \frac{x_n \log (x_n) - d}{1+\log (x_n)}$, 
which we can rewrite as $ x_{n+1} = \frac{x_n + d}{1 + \log( x_n)}$.
This, or something like it, may be how your calculator found a solution.