# How does one solve $y^y-x^x=x$ for $x$ as a function of $y$?

In order to find the answer to this question I started thinking that as a first step to obtain the first and second column, one would have to solve the equation:

$$y^y-x^x=x$$

for $$x$$ as a function of $$y$$.

Can it be done?

• Are you looking for a closed form? Commented Jan 25, 2015 at 14:09
• Not necessarily. A list of numerical values that satisfy the equation would also do. Commented Jan 25, 2015 at 14:13
• Would it help to use the Lambert W function to solve for $y$ as a function of $x$? This gives $y=\frac{\ln(x^x+x)}{\mathrm{W}(\ln(x^x+x))}$. Commented Jan 25, 2015 at 18:23
• It helps a little bit yes. Later on I am also interested in the equation $y^{y^y}-x^{x^x}=x$. The direction of the recursion in the linked question is towards $x$ though. Commented Jan 25, 2015 at 18:39
• The solution$($s$)$ to $y^{y^y}=a$ cannot be expressed even ij terms of Lambert's W function. Commented Jan 25, 2015 at 20:53

Considering that you look for the zero of function $$f(x)=x^x-x -y^y$$ Assuming that $$y$$ is large, the very first estimate is $$x_0=y$$. For all $$y$$, $$f(y)<0$$ and $$f''(y)>0$$. So, $$x_0$$ is an under estimate of the solution.

Let $$x=(y+\epsilon)$$, $$Y=(y^y+y)$$ and consider the function $$g(\epsilon)=(y+\epsilon ) \log (y+\epsilon )-\log\left(Y+\epsilon \right)$$ Expanded as a Taylor series built around $$\epsilon=0$$, $$g(\epsilon)=\big(y \log (y)-\log (Y)\big)+\frac{Y (\log (y)+1)-1}{Y}\,\epsilon+ \sum_{n=2}^\infty \,\frac { (-1)^n } n\Big(\frac 1 {(n-1)\, y^{n-1}}+\frac 1 {Y^n} \Big)\,\epsilon^n$$ which can easily be inversed as $$\epsilon=\sum_{n=0}^\infty a_n\, t^n \qquad \text{with} \qquad t=\frac{Y (\log (Y)-y \log (y))}{Y (\log (y)+1)-1}$$ and we know all coefficients $$a_n$$.

The very beginning would be $$\epsilon=t+\frac{y^{2 y}+2 y^{y+1}+y^2+y }{2y Y(Y (\log (y)+1)-1) } t^2$$

Trying for $$y=5$$, this would give as an estimate $$x=\color{red}{5.00061272949}66$$

Using the next term in the inverse series gives $$x=\color{red}{5.000612729497824738}40$$

If you want explicit formulae, use $$x_0=y$$ and express $$x_1^{(n)}$$ as the first iterate of a Newton-like method of order $$n$$. Messy formulae, for sure, but fully explicit.

Edit

As @Rory Daulton wrote in comments, you look for the inverse of $$y=\frac{\log\left(x^x+x\right)}{W\left(\log\left(x^x+x\right)\right)}$$ If $$y$$ is small, expand the rhs as a Taylor series around $$x=1$$ and use power series reversion again. This would give $$x=1+(1+w)\,t+\frac {w } {2\log(2)}\,t^2-\frac{1}{12} \left((1+w)^3+2 e^{-2w}\right)\,t^3+O(t^4)$$ where $$w=W(\log (2)) \qquad \text{and} \qquad t=y-\frac{\log (2)}{w}$$