Is there only one pair of unequal rational numbers with $n^m = m^n$? [duplicate]

Solution 1:

Consider taking the $mn$-th root $$n^m=m^n\\n^{1/n}=m^{1/m}$$ Now the function $f(x)=x^{1/x}$ attains it's maximum at $x=e$ and is increasing from $(0,e)$ and decreasing from $(e,\infty)$ WLOG assume $m>n$ then $m\in (e,\infty)$ while $n\in (0,e)$.

If we limit $m,n$ to be integers we can see that either $m=1$ or $m=2$ which both give the trivial solutions $m=n=1$ and $m=2,n=4$.

In general if we are looking for rational solutions we get the parametric equation by setting $n=km$ $$m^{km}=(km)^m\\m^{(k-1)m}=k^m\\m=k^{1/(k-1)}$$ From this putting $t=\frac{1}{k-1}$ we get $m=(1+\frac1t)^t$ and $n=(1+\frac{1}{t})^{t+1}$,this parametrization gives infinitely many rational solutions (for any integer $t\neq -1,0$) for example for $t=2$ we get $2.25^{3.375}=3.375^{2.25}$

Solution 2:

We can state the requirement $m^n=n^m$ as $$ \frac{\ln n}{n}=\frac{\ln m}{m} $$ We can define $f(x)=\frac{\ln x}{x}$ for $x>0$. This function is increasing for $x<e$ and decreasing for $x>e$. It attains negative values for $x<1$ and positive values for $x>1$. Therefore, the only possible way of finding two values $x_1$ and $x_2$ such that $x_1<x_2$ and $f(x_1)=f(x_2)$ is to choose $x_1\in (1,e)$ and $x_2\in(e,\infty)$. Therefore $x_1 = 2$ and $x_2=4$ is the only solution with integers.

Solution 3:

Take log's of both sides and un-cross multiply and your equation becomes

$$\frac{\ln m}{m} = \frac{\ln n}{n}.$$

The graph of the function $f(x) = \ln(x)/x$ tells the story. $f$ has a local max at $x=e$. Any horizontal line $y = k$ with $0<k<1/e$ intersects the graph at two points. The $x$-coordinates of those two points are a solution to your equation.

Take $k=1/5$. Maple gives the two solutions in terms of Lambert Omega functions, and gives decimal approximations: $1.295855509, 12.71320679.$ So there are lots of real solutions, but none as pretty as $2, 4$.

Pick a rational number $a/b$ between $1$ and $e$. Set $\ln(x)/x = \ln(a/b)/(a/b)$. One solution is rational $x=a/b$. The other solution is given by $$ \Omega\left(-1,\frac{b}{a}\ln \frac{b}{a}\right)\frac{\frac{a}{b}}{\ln\frac{b}{a}}.$$

This seems unlikely to be rational. Maybe look at the series expansion of $\Omega(\ln(x))$(?)