I am trying to solve
$$x\log(x) = 10^6$$
but can't find an elegant solution. Any ideas ?
$\endgroup$ 13 Answers
$\begingroup$Let $y=\log(x)$. Then the equation is $$ye^y=10^6.$$ The Lambert W-function is defined such that this means $y=W(10^6)$, and therefore $x=e^{W(10^6)}$. (This is effectively just a notational trick; it doesn't make anything more explicit).
$\endgroup$ $\begingroup$There is no simple solution (as you have found out), your only way out is using a numerical method to solve the equation, e.g. Newton's method.
$\endgroup$ $\begingroup$You won't find a "nice" answer, since this is a transcendental equation (no "algebraic" solution). There is a special function related to this called the Lambert W-function, defined by $ \ z = W(z) \cdot e^{W(z)} \ $ . The "exact" answer to your equation is $ \ x = e^{W( [\ln 10] \cdot 10^6)} \ . $ (I'm assuming you're using the base-10 logarithm here; otherwise you can drop the $ \ln 10 $ factor.)
$\endgroup$