Find all Pairs of Integers $(x,y)$ , $x \gt y \ge 2$ such that $x^y=y^{x-y}$
My Try:
if $y=2$ then $$x^2=2^{x-2}$$ and Taking log on both sides we get
$$2 \log x=(x-2) \log 2$$ i.e.,
$$2 \log_2 x=x-2$$ if $x=2^k$ then we get
$$2k=2^k-2$$ or
$$k+1=2^{k-1}$$
By Trying different values we get $k=3$ is the only solution.
so one pair is $(x,y)=(8,2)$
Similarly if $y=3$ we get
$$k+1=3^{k-1}$$ which is satisfied by $k=2$ so another pair is
$(x,y)=(9,3)$
Is this approach correct?
For $x^y=y^{x-y} $ I find that $x=8, y=2$ and $x=9, y=3$ are the only solutions.
Must have $x > y$.
$x^y =y^{x-y} $ so $(xy)^y = y^x $.
Let $x = ry$ where $r > 1$.
$(ry^2)^y = y^{ry}$ so $ry^2 = y^r$ or $r = y^{r-2}$ or $y = r^{1/(r-2)}$.
If $x = 2y$ then $(2y)^y = y^y$ which has no solution.
If $1 < r < 2$, then $r-2 < 0$ so $y = r^{1/(r-2)} < 1$, so no solution.
Therefore $r > 2$.
$r^{1/(r-2)} = 2$ for $r = 4$.
Since $r^{1/(r-2)} $ is decreasing for $r \ge 4$, must have $2 < r \le 4$.
If $r=4$ then $y=2$ and $x = ry = 8$.
$(xy)^y = (16)^2 = 256$ and $y^x = 2^8 = 256$ so this is a solution!
If $r^{1/(r-2)} = 3$, then $r=3$. Then $y = 3$ and $x = ry = 9$.
$(xy)^y = 27^3 = 3^9$ and $y^x = 3^9$, so this is a solution!
Let $d = (x, y)$ so $x = ad, y = bd$ with $4b >a > 2b, (a, b) = 1$.
From $(xy)^y = y^x $, $(abd^2)^{bd} = (bd)^{ad} $ or $(abd^2)^{b} = (bd)^{a} $ or $a^bb^bd^{2b} = b^ad^a$ or $a^b = b^{a-b}d^{a-2b}$.
Must have $b=1$ since $(a, b) = 1$.
This becomes $a = d^{a-2}$ or $d = a^{1/(a-2)}$.
As before, the only integer solutions to $d = a^{1/(a-2)}$ are $a=4, d=2$ and $a=3, d=3$ which we have found already.
Therefore $x=8, y=2$ and $x=9, y=3$ are the only solutions.
Note on the derivative of $r^{1/(r-2)}$.
$\begin{array}\\ (r^{1/(r-2)})' &= r^{1/(r-2)} (\frac1{r(r-2)}-\frac{\log(r)}{(r-2)^2}\\ &= r^{1/(r-2)} \frac{(r-2)-r\log(r)}{r(r-2)^2}\\ & < 0 \qquad\text{for } r > 2\\ \end{array} $
so $r^{1/(r-2)} < 2$ for $r > 4$.