n^m = m^n

Only one pair of distinct positive integers satisfy the equation $m^n = n^m$ - HN

If n^m = m^n then raising both sides to the power of 1/(nm) gives us n^(1/n) = m^(1/m). So we are looking for two distinct positive integers at which the function x ↦ x^(1/x) takes the same value. The rest of the proof then goes as before.

Differentiating the above function yields (1/x^2)(1-log(x))x^(1/x), which is positive when log(x) < 1 and negative when log(x) > 1. So the function has a maximum at e and decreases on either side of it. Therefore one of our integers must be less than e, and the other greater than it. For the smaller integer there are only two possibilities, 1 and 2. Using 1 doesn’t give a solution since the equation x^(1/x) = 1 only has the solution 1. So the only remaining possibility for the smaller number is 2, which does yield the solution 2^4 = 4^2. Since x^(1/x) is strictly decreasing when x > e, there can’t be any other solutions with the same value.

Written on April 20, 2023, Last update on April 21, 2023
math puzzle