# Solutions of Diophantine equations ${x^y} = {y^x}$ [duplicate]

Possible Duplicate:
$x^y = y^x$ for integers $x$ and $y$

How to prove that $(2,4)$ and $(4,2)$ are the only solutions of Diophantine equations ${x^y} = {y^x}$ for $x \ne y$?

-

## marked as duplicate by Cameron Buie, Thomas, Noah Snyder, Chris Eagle, J. M.Oct 5 '12 at 13:00

@DavidWallace For $x \ne y$. – glebovg Oct 1 '12 at 5:02
Hah! Sorry, I can't read. – user22805 Oct 1 '12 at 5:04

Taking logarithms:

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

For this to be true, the function has to take the same value at two different locations. Take the function

$$f(x)=\frac{\ln x}x$$ $$f'(x)=\frac{1-\ln x}{x^2}$$

It has a maximum at $x=e$, is decreasing for $x>e$ and increasing for $x<e$. So if two values are equal, one has to be greater than $e$ and the other must be less. So for the lower value we only have $x=1,2$ as options. Our problem amounts to proving that there is no other number that gives the same value as $x=1$. Since $f(1)=0$, and $\ln(x)$ only has a single root at $1$, we know this can't happen, so we're done.

-
Keep in mind that logarithms assume the numbers are positive. $x=-4, y=-2$ works as well. Cases of negative integers either reduce to the positive case in disguise (when both are negative) or are trivial (when only one is). – Robert Mastragostino Oct 1 '12 at 5:29
I used a very similar argument, but I was not convinced. Thanks. – glebovg Oct 1 '12 at 5:30