Given that
- $x^x = y$; and
- given some value for $y$
is there a way to expressly solve that equation for $x$?
Given that
is there a way to expressly solve that equation for $x$?
As Aryabhata mentions this is another application for the Lambert W function. The solution to your problem is presented in the wikipedia article. Using elementary substitutions you have
$$x=\frac{\ln(y)}{W(\ln y)}$$
If you are interested in the asymptotic growth of $x$ relative to $y$, note that for every $z$: $W(z) = \ln{z} - \ln\ln{z} + o(1)$. Hence:
$$x=\frac{\ln(y)}{\ln{\ln y} - \ln\ln{\ln y} + o(1)} = \Theta\left( \frac{\ln y}{\ln \ln y}\right)$$
You should try WolframAlpha for similar problems. WolframAlpha would solve y=x^x for y=5 as shown here (using Lamber W Function as suggested before).
The existing answers to this question and similar duplicate questions, only present a generic solution $e^{W(\log y)}$ of the equation ($y$ is a given real): $$x^x=y,$$ without clarifying that the equation can have no, one, or two real solutions. Indeed, there are four cases as follows:
For $\log y\ge 0$, the only real solution is $e^{W_{0}(\log y)}$.
For $e^{-1} < \log y< 0$, we have two distinct real solutions $e^{W_{0}(\log y)}$ and $e^{W_{-1}(\log y)}$.
For $\log y=-e^{-1}$, $e^{-1}$ is the only solution as $W_{0}(-1)=W_{-1}(-1)=-1$.
For $\log y<-e^{-1}$, the equation $x^x=y$ has no real solution.
Here, $W_{0}$ and $W_{-1}$ are two branches of the Lambert $W$ function, for which we have $e^{W_{0}(\log y)}=\frac{\log y}{W_{0}(\log y)}$ and $e^{W_{-1}(\log y)}=\frac{\log y}{W_{-1}(\log y)}$.
I hope this answer is helpful for who are less familiar with the Lambert $W$ function.
Given y, you can solve y = x**x with a simple iteration:
It's akin to Newton's method of finding square roots.
The convergence of this process is the "natural base of y to itself", or the "exponential root" of y.
If you think about this iteration, you're iteratively performing the base-change logarithm formula. So at first you get y's logarithm (or "bit length") in base 2. Then in base of what y was in base 2, and so on. Successive values oscillate around the "natural base of y to itself" until it converges.
It's pretty interesting. I wonder if there's anything special about the value of x for each y.
As other people have said, you can take log of each side, to get:
ln y = ln x**x, which is ln y = x ln x, and the iteration