A few days ago I was checking out some old diophantine equations that I solved some year ago and I found the equation $$(x-y)^{xy}=x^y\cdot y^x$$ where $x$ and $y$ are positive integers such that $x>y$.
I decided to check my solution and it seems that it is wrong. This is what I did: it's easy to see that both $x$ and $y$ have to even. Now, set $d=\gcd(x,y)$ so we can write $x=da$ and $y=db$ for some coprime integers $a$ and $b$, moreover it's clear that $d$ is even. Replacing we get $$d^{xy}(a-b)^{xy}=d^{x+y}a^yb^x.$$
As $x\ge 4$ and $y\ge 2$ we have $ab>a+b$, then $d^{xy-x-y}\mid a^yb^x$ and from this we get that $d\mid a^yb^x$. Here is where I deduced that $d\mid a^y$ or $d\mid b^x$, but this is not in general true (e.g. $6\mid 2^3\cdot 3^2$ but neither $6\mid 2^3$ nor $6\mid 3^2$ even when $\gcd(2,3)=1$). The rest of my solution depends on the analysis of the cases $d\mid a^y$ and $d\mid b^x$ so the above idea is crucial. By the way, the only solution seems to be the pair $(x,y)=(4,2)$.
I think my above deduction is wrong (or maybe is correct for some extra assumptions that I can't see). I try to use other approaches but I go nowhere, so how can be solved the above diophantine equation? Any ideas/hints or solutions are welcome. Thanks in advance.
You've got to $d^{xy-x-y}(a-b)^{xy} = a^yb^x$
Let $p$ prime such that $p|(a-b)$. Then $p|a^yb^x$ therefore $p|a$ or $p|b$. If $p|b$ then $p|(a-b)+b=a$ false because $a,b$ are coprime. Similar for $p|a$. It follows that $a-b=1$ and $d^{xy-x-y}=a^yb^x \tag 1$
Now let $p$ prime such that $p|a$. From (1) $p^y|d^{xy-x-y}$ we get $ \rlap{\textbf{-------------------}} {y=c(xy -x-y)} \tag 2$ for some positive integer $c$. But $xy -x-y \gt y$ for $x \gt 4, y \ge 2$, therefore $x=4$ and $c=1$. From (2) we get $y=2$
UPDATE
It seems that (2) is not quite right. Suppose $a=p^ka_1$ where $p,a_1$ coprime. From (1) we know $p|d$ so let $d=p^cd_1$ where $p,d_1$ coprime. Because $p,b$ coprime, from (1) we have $c(xy-x-y)=ky \tag 3$ I cannot go further with (3)