25

Given that

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

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

Josh
  • 351

3 Answers3

29

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

Listing
  • 13,937
  • Wow - thanks - I really didn't think it was possible. – Josh Jul 28 '11 at 22:23
  • @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. –  Jul 09 '18 at 14:04
2

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

gsbabil
  • 196
  • 4
    If you're just going to post a link to wolframalpha, you could at least make sure that it works... – t.b. Dec 31 '11 at 16:20
  • 2
    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. – duckstar Dec 31 '11 at 17:22
  • 3
    I guess part of GSBabil's point is that Josh should have tried that first, before posting here. – GEdgar Dec 31 '11 at 18:33
0

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

Cris
  • 1