# How to go about solving $x=2^{\frac1x}$

How would you go about solving an equation like this, and what values of x did you end up with.

$$x=2^{\frac 1x}$$

Also, how would you generalise for

$$x=n^{\frac1x}$$

These come from

$$\sqrt[{\sqrt[{\sqrt[\cdots]n}]n}]n$$ $$x=\sqrt[{\sqrt[{\sqrt[\cdots]n}]n}]n$$ $$x=\sqrt[x]n$$ $$x=n^{\frac1x}$$

• We know that $1^1 < 2$ and $2^2 > 2$ so $1<x<2$. Now, $1^1=1$ and $1<1.5^{1.5} < 2$ so $1.5<x<2$. Now, $1.75^{1.75}>2$ so $1.5<x<1.75$. See what I am doing here? Continuing in the same fashion, I get that $1.5<x<1.625$ and so on. This is certainly not the best way of solving for $x$, however, but it is an approach. This related post might serve useful. – Feeds May 20 '18 at 8:35
• Possible duplicate of How to solve equations of this form: $x^x = n$? – user99914 May 20 '18 at 13:27

The solution of $$x=n^{\frac1x}$$ is given by $$x=\frac{\log (n)}{W(\log (n))}$$ where appears Lambert function.

If you do not want to use it, you could consider that you look for the zero of $$f(x)=x-n^{\frac1x}$$ or, much better $$g(x)=\log(x)-\frac 1x \log(n)$$ or even better $$h(x)=x\log(x)- \log(n)$$

Consider the last one and compute derivatives $$h'(x)=\log (x)+1 \qquad \text{and }\qquad h''(x)=\frac1x$$ So, the derivative cancels at $x_*=\frac 1e$; for this value $h(x_*)=-\frac{e \log (n)+1}{e}$ and $h''(x_*) >0$. So, $x_*$ is a minimum. To get an estimate, develop as a Taylor series around $x_*$ $$h(x)=-\left(\log (n)+\frac{1}{e}\right)+\frac{1}{2} e \left(x-\frac{1}{e}\right)^2+O\left(\left(x-\frac{1}{e}\right)^3\right)$$ Ignoring the higher order terms, solve for the positive root and get,as an estimate, $$x_0=\frac{\sqrt{2} \sqrt{e \log (n)+1}+1}{e}$$ Now, start using Newton method.

• How do you get from f(x) to g(x) and h(x)? I feel like i am missing something simple here. – Mitchell Browne May 20 '18 at 10:53
• From $f$ to $g$ : write $x=n^{1/x}$ and take logarithms and subtract. From $g$ to $h$, just multiply by $x$ – Claude Leibovici May 20 '18 at 16:15

Note that

$$x=2^{\frac1x}\iff x^x=2$$

abd since $f(x)=x^x$ is strictly increasing (for $x>1/e$), with $f(x)\le1$ for $0<x\le 1$, $f(1)=1$ and $f(2)=4$ by IVT an unique solution exists which can be found by numerical methods.