Solve $x^y \, = \, y^x$ 
Possible Duplicate:
$x^y = y^x$ for integers $x$ and $y$ 

I obtained a question asking for how to solve $\large x^y = y^x$. The given restraints was that $x$ and $y$ were both positive integers.
By a bit of error an trial we quickly see that $x=2$ and $y=4$ is one solution.


*

*My question is: How do one show that $(2\,,\,4)$ is the only non trivial, positive solution to the equation?


Now my initial approach was as follows:
We have 
$$\large x^y = y^x$$
The trivial solution is obviously when $y=x$, so let us focus on when $y \neq x$. 
Let us make a more general statement. Firstly I take the log of both sides
$$\large y \log x = x \log y $$
Let us divide by x and \log x (We now assume $x\neq 0$ and $x\neq 1$ since 0 is not a positive number, and 1 gives us a trivial solution)
$$\large \frac{y}{x} = \frac{\log y }{\log x}$$
For these sides to be equal, we must remove the logarithms on the right hand side, this is achived if $y$ is on the form $x^a$. Now This gives
$$\large \frac{x^a}{x} = \frac{\log \left(x^a\right) }{\log(x)}$$
$$\large x^{a-1} = a$$
So finaly we obtain that $ \displaystyle \large x=\sqrt[ a-1]{a}$ and $\displaystyle \large y = \sqrt[a-1]{a^a}$
Now setting $a=2$ gives us $x = 2$ and $y=4$ as desired.
My question is, how do we prove that $x=2$ and $y=4$ is the only integer solutions? My thought was to show that $ \displaystyle \large \sqrt[ a-1]{a}$ and $\displaystyle \large \sqrt[a-1]{a^a}$ are both irrational when a>2, but I have not been able to show this. 
Any help is greatly appreciated, cheers =)
 A: Another approach for these kind of problems:
$$x^y=y^x$$
By dividing both sides of equations by $x^x$, we'll have:
$$x^{y-x}=(\frac{y}{x})^x$$
Now, what you can say about $\frac{y}{x}$ ?
Try to continue. 
A: The function $u:x\mapsto(\log x)/x$ is increasing on $[1,\mathrm e]$ from $u(1)=0$ to $u(\mathrm e)=1/\mathrm e$, and decreasing on $[\mathrm e,+\infty)$ from $u(\mathrm e)=1/\mathrm e$ to $0$. Hence, if $u(x)=u(y)$ with $y\gt x\geqslant 1$, then $y\gt \mathrm e\gt x\gt1$. Since $\mathrm  e\lt3$, this implies that $1\lt x\lt3$. If furthermore $x$ is an integer, then $x=2$. The unique root of the equation $u(y)=(\log2)/2$ such that $y\gt\mathrm e$ is $y=4$. Hence $(x,y)=(2,4)$ is the unique solution.
A: I thought this sounded familiar. The equation $a^b = b^a$ can be written as
$$  \frac{\log a}{a} =  \frac{\log b}{b}   $$
If you carefully draw the curve $y= \log x$ in the $x-y$ plane, the quantity $ \frac{\log a}{a}$ is the slope of the line that passes through the origin and the point $(a, \log a).$ So the equation $  \frac{\log a}{a} =  \frac{\log b}{b}   $ says that the lines from the origin to $(a, \log a)$ and to  $(b, \log b)$ have the same slope, therefore they are the same line. That is, the three points are collinear.
So, a graphical solution is to draw lines through the origin, with positive slope, that intersect the curve $y= \log x.$ It will be seen fairly quickly that one intersection point, call it $a,$ has $1 < a < e.$ As you want $a$ an integer, the only choice is $a=2.$
The calculus part is this: the line through the origin with slope $\frac{1}{e}$ is tangent to the curve $y= \log x$ at the point $(e, \log e \; = \; 1).$ To intersect the curve twice, we need slope a little bit less than that, and the first intersection point will be a little bit to the left of $e.$
