27
$\begingroup$

Given that

  1. $x^x = y$; and
  2. given some value for $y$

is there a way to expressly solve that equation for $x$?

$\endgroup$
4
  • 5
    $\begingroup$ Take logs, set $x = e^t$ and apply this: math.stackexchange.com/questions/10261/inverse-of-y-xex $\endgroup$
    – Aryabhata
    Commented Jul 28, 2011 at 7:03
  • $\begingroup$ For $e^{-1/e} \lt y \le 1$ there will be two non-negative solutions for $x$ and for $y \lt e^{-1/e}$ there will be none $\endgroup$
    – Henry
    Commented Sep 5, 2016 at 10:18
  • $\begingroup$ It is also known as the super-square root of $y$. $\endgroup$ Commented Dec 31, 2016 at 1:00
  • 1
    $\begingroup$ Assume $y$ is positive we have $x^x=y$ so $x\ln x=\ln y$ so $\ln x e^{\ln x}=\ln y$ so $\ln x=W(\ln y)$ so $x=e^{W(\ln y)}=\frac{\ln y}{W(\ln y)}$. $\endgroup$ Commented Jan 9, 2017 at 5:56

4 Answers 4

30
$\begingroup$

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)$$

$\endgroup$
2
  • $\begingroup$ Wow - thanks - I really didn't think it was possible. $\endgroup$
    – Josh
    Commented Jul 28, 2011 at 22:23
  • 2
    $\begingroup$ @Josh: in fact this might as well be solved by defining a new ad-hoc function $Z(x)$ such that $Z(x)^{Z(x)}=x$, so that the solution of the equation is $x=Z(y)$; Lambert is defined by $W(x)e^{W(x)}=x$, there is little magic. The main advantage of reducing to the special Lambert function is that it has already been studied. $\endgroup$
    – user65203
    Commented Jul 9, 2018 at 14:04
2
$\begingroup$

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).

$\endgroup$
3
  • 4
    $\begingroup$ If you're just going to post a link to wolframalpha, you could at least make sure that it works... $\endgroup$
    – t.b.
    Commented Dec 31, 2011 at 16:20
  • 2
    $\begingroup$ If a natural number y is entered in "solve x^x=y" WA will give the numeric answer. Strangely it doesn't work for all real y. However, I downvoted since the link is no help in understanding how the solution was reached. $\endgroup$
    – duckstar
    Commented Dec 31, 2011 at 17:22
  • 3
    $\begingroup$ I guess part of GSBabil's point is that Josh should have tried that first, before posting here. $\endgroup$
    – GEdgar
    Commented Dec 31, 2011 at 18:33
1
$\begingroup$

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:

  1. For $\log y\ge 0$, the only real solution is $e^{W_{0}(\log y)}$.

  2. For $e^{-1} < \log y< 0$, we have two distinct real solutions $e^{W_{0}(\log y)}$ and $e^{W_{-1}(\log y)}$.

  3. For $\log y=-e^{-1}$, $e^{-1}$ is the only solution as $W_{0}(-1)=W_{-1}(-1)=-1$.

  4. 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.

$\endgroup$
0
$\begingroup$

Given y, you can solve y = x**x with a simple iteration:

  1. Set x_0 = 2 (or anything else really)
  2. x_(i+1) = ln y / ln x_i
  3. Repeat 2 until abs(x_(i+1) - x_i) < threshold

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

$\endgroup$
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .