Fun logarithm question

We all agree on the fact that the solution of this equation is close to $e^{1/e}$. What I did was to write the solution as $x=e^{1/(e+y)}$ and I expanded the equation as a Taylor series around $y=0$. Limited to the first order, this leads to an expression of $y$ (I am physically unable to write it down) which only includes $2$, e and $\log 2$. Its numerical value is $2.53791*10^{-6}$. For this value of $x=1.444667364812765575108917$ (quite close to Umberto's), the function value is $5.48006*10^{-12}$.

Edit (6 years later)

Taking logarithms, consider that we look for the zero of function $$f(x)=\log \left(x^{2^x}\right)-\log \left(2^x\right)=2^x\log(x)-x \log(2)$$ and perform one Newton iteration to get $$x_0=e^{\frac{1}{e}}\implies x_1=x_0+ \frac{{x_0} \left({x_0} \log (2)-2^{x_0} \log ({x_0})\right)}{2^{x_0}+2^{x_0} {x_0} \log (2) \log ({x_0})-{x_0} \log (2)}$$ which makes $x_1=1.44466736481181$ while the "exact" solution is $x=1.44466736481170$.

Using one iteration of Halley method gives $21$ exact figures. Using one iteration of Householder method gives $27$ exact figures. The formulae are explicit but really too lengthy to be reported here.


Edited: what follows is not very useful. See below


Letting $y = 2^x$ we must have $x^y = y $.

This later is solved by

$$ y = \frac{W_{-1}( -\log(x)) }{-\log x} $$

where $W_{-1}$ is the second branch of the Lambert function - with domain in $(-1/e,0)$ and image in $(-\infty,-1)$.

But $y \log x =\log y$, then

$$ -W_{-1}( -\log(x)) = \log y = x \log 2$$

Or, letting $t= -\log x$

$$ -W_{-1}(t) = e^{-t} \log 2$$

enter image description here

Still, this is no explicit solution, but -to begin with- it shows (graphically) that the $t$ should be slighly larger than $-1/e$, and hence $x$ is slighly below $e^{1/e}$.

This is due to the fact that $\log 2 = 0.693147...$ is quite near to $ e^{-1/e} = 0.6922006...$


Update: forget about the Lambert function, it really doesn't add anything.

The equation can be manipulated to the form

$$ a x e^{-a x}=\log x, \hskip{1cm} {\rm with } \; a= \log2$$

enter image description here

This equation cannot be solved explicity, but we can verify nevertheless that the function

$$ F(x,a)=a x e^{-a x}- \log x$$

has a zero at $a_0=e^{-1/e}$ and $x_0=1/a_0=e^{1/e}$. Now, because our $a = \log 2 = 0.693147...$ is quite near $ a_0 = e^{-1/e} = 0.6922006...$, we can expect our solution $x$ to be near $x_0=e^{1/e}=1.444667861...$. This argument (I guess) could be empowered by doing a Taylor expansion of $F(x,a)$

Update: assuming that $F(x,a)=0$ defines implicitly $x=g(a)$, we compute the first two derivatives and evaluate them at $(x_0,a_0)$. We get

$$\left.\frac{dx}{da}\right|_{x_0,a_0}=0$$

$$\left.\frac{d^2x}{da^2}\right|_{x_0,a_0}=-{e}^{3/e-1}$$

So we can refine the approximation:

$$ x \approx x_0 - \frac{{e}^{3/e-1}}{2} (\log 2 - a_0)^2 =1.4446673641...$$

A simpler procedure is to iterate:

$$x_{n+1} = \exp(a_0 x_n e^{-a_0 x_n})$$

It converges very quickly, in two iterations we get ten decimal digits: $x=1.4446673648...$


I do not think that there is any analytical solution to this equation. The only way to find the solution would be a root finder and I suggest Newton starting from a reasonable guess.

Let me be lazzy and start at $x_{old}=2$. Newton scheme will update the value according to the classical scheme

$$x_{new} = x_{old} - f(x_{old}) / f'(x_{old}) $$

We then have the following iterates :2.00000, 1.79992, 1.61902, 1.49567, 1.44977, 1.44472, 1.44467. For this last value of $x$, the value of the function is 0.000013522.

You can continue iterating until you reach the required accuracy.