# Is there any “superlogarithm” or something to solve $x^x$? [duplicate]

Is there any "superlogarithm" or something to solve an equation like this:

$$x^x = 10?$$

-

## marked as duplicate by Amzoti, Daniel Rust, Micah, Henry T. Horton, QuixoticJun 12 '13 at 1:32

Newton's method works for (almost) every equations and is pretty fast (and works better for convex functions like yours). –  user10676 Jun 11 '13 at 17:21
It's usually called the Lambert W, but superlogarithm is a far better name. –  Lucas Jun 11 '13 at 21:23
In Mathematica - and no where else, as far as I know - the Lambert W is referred to as the Product Log. –  horchler Jun 12 '13 at 0:02
–  Mhenni Benghorbal Jun 12 '13 at 0:10

Yes - it's called the Lambert W Function. Scroll down and take a look at Example 2.

-

What you're looking for is the Lambert $W$ function. This is the function such that: $$W(xe^x) = x$$

It does not have a "simple" or explicit form.

To solve your equation, we follow this process: $$x^x = 10$$ $$x\ln x = \ln10$$ $$e^{\ln x}\ln x = \ln10$$ $$W(e^{\ln x}\ln x) = W(\ln10)$$ $$\ln x = W(\ln10)$$ $$x = e^{W(\ln10)}$$

-
I accept this answer too, this was a good explanation. –  Mike Jun 11 '13 at 17:30

The Lambert $W$ function is technically a multi-valued function. Equations such as yours can also be solved with a simpler single valued function, the Wright $\omega$ function (see also Corless & Jeffrey 2002), which is defined with respect to the Lambert $W$. The Lambert $W$ by it's definition is the natural choice for exponential functions like yours, while the Wright $\omega$ is better suited to logarithmic ones (e.g., $z = \omega+\text{ln}(\omega)$), but one can often transform between the two. In your case, the two are equivalent via:

$$x^x = a \rightarrow x = \frac{\ln a}{W_0(\ln a)} = \frac{\ln a}{\omega(\ln(\ln a))}$$

for $a \in \mathbb{Z}$ and where $W_0$ is the upper (principal) branch of the Lambert $W$ function.

If you happen to need numeric values, the Wright $\omega$ function may be easier and more efficient to calculate. For $z = \ln(\ln 10)) \approx 0.834032...$ (and real $z \in [-1, 2]$), the following is an approximation for $\omega(z)$:

$$\omega(z) \approx 1 + \frac{1}{2}(z−1) + \frac{1}{16}(z−1)^2 − \frac{1}{192}(z−1)^3 − \frac{1}{3072}(z−1)^4 + \frac{13}{61440}(z−1)^5...$$

Matlab's Symbolic Toolbox has builtin support via wrightOmega, as does Maple with Wrightomega. Additionally, I've implemented the Wright $\omega$ function for complex double-precision evaluation in Matlab based on a 2012 paper by Lawrence, Corless, and Jeffrey – it's 3 to 4 orders of magnitude faster than performing variable precision/symbolic calculations.

-