2

How would I go about solving $x^y = y^x$?

$$\frac{y}{\ln y} = \frac{x}{\ln x} $$

Is trivial to find, but I'm not sure where I'd go from here.

Thanks in advance

Gibbs
  • 8,230

3 Answers3

0

The plot of $\frac{\ln x}{x}$ looks so:

enter image description here

By searching for the solutions of $\frac{x}{\ln x} = \frac{y}{ln y}$ where $x \ne y$, you are looking for the points of this plot with the same $y$-coordinate.

As you can see, $2^4 = 4^2$ is your only integer solution.

peterh
  • 2,683
0

Plotting (using Geogebra) $\frac{x}{\log_{10}(x)}=\frac{y}{\log_{10}(y)}$ gives

enter image description here

As we can see, the only integral solutions are $(2,4)$ and $(4,2)$ (as well as the trivial $(x,x) \in \Bbb{Z} \times \Bbb{Z}$ solutions). This is because as $y$ (respectively $x$) increases, the curve asymptotes to an $x$ coordinate of $>1$ (respectively $y$ coordinate of $>1$) but never reaches it.

mathphys
  • 2,899
0

The only integer solution is (2,4).

You are solving

$$y^x=x^y$$

and if you fix $y$, you (almost) always have two solutions for $x$. One is $x=y$, the other is not expressible in closed form with "traditional" functions, but you can use the transcendental function $W(z)$, the Lambert function, which solves

$$xe^x=z \mapsto x=W(z)$$

To do this, you transform the equation into

$$e^{x\ln y}x^{-y}=1$$ $$x e^{(-x\ln y/y)}=1$$ $$(-x\ln y/y) e^{(-x\ln y/y)}=-\ln y/y$$

The parenthesised expression can be your unknown, arriving at

$$-\frac{x\ln y}{y}=W(-\ln y/y)$$

$$x=-\frac{y}{\ln y}W(-\ln y/y)$$

Provided you have a way to compute $W$, this gives you a solution.

Special case: for $y=e$, the only (double) solution is $x=y=e$. This is the crossover point: for $y<e$, the nontrivial solution is $x>e$ and vice-versa.

orion
  • 15,781