<s>[INST] Determine the number of solutions of the equation $n^m = m^n$ 
Possible Duplicate:
$x^y = y^x$ for integers $x$ and $y$ 

Determine the number of solutions of the equation 
$n^m = m^n$ 
where both m and n are integers.
 [/INST] Hint:
Since $m^n=n^m$, take logs and separate the variables:
$$
\frac{\log(m)}{m}=\frac{\log(n)}{n}
$$
This suggests considering the function $f(x)=\frac{\log(x)}{x}$.
$\hspace{2cm}$
Another Approach:
Start by comparing $n^{n+1}$ vs $(n+1)^n$. Divide both by $n^n$, to get $n$ vs $\left(1+\frac1n\right)^n$. We can use the binomial theorem to get
$$
\begin{align}
\left(1+\frac1n\right)^n
&=\sum_{k=0}^\infty\binom{n}{k}\frac1{n^k}\\
&=\sum_{k=0}^\infty\frac1{k!}\frac{n}{n}\frac{n-1}{n}\cdots\frac{n-k+1}{n}\\
&<\sum_{k=0}^\infty\frac1{k!}\\
&<1+\sum_{k=1}^\infty\frac1{2^{k-1}}\\
&=3
\end{align}
$$
Thus, for $n\ge3$, we have
$$
n\ge3>\left(1+\frac1n\right)^n
$$
Multiplying both sides by $n^n$ yields that for $n\ge3$
$$
n^{n+1}>(n+1)^n
$$
Taking the $n(n+1)$ root of both sides gives
$$
n^{1/n}>(n+1)^{1/(n+1)}
$$
So we have determined that $n^{1/n}$ is monotonically decreasing for $n\ge3$. What does that say about $m^n$ and $n^m$ when $n>m\ge3$?
Simpler Proof by Induction
I just noted that $n^{n+1}>(n+1)^n$ for $n\ge3$ can be also proven pretty simply by induction.
Note that $3^4=81>64=4^3$.
Suppose that $n^{n+1}>(n+1)^n$. Divide through by $n^n$ to get
$$
n>\left(1+\frac1n\right)^n
$$
Multiply through by $1+\frac1n$ to get
$$
n+1>\left(1+\frac1n\right)^{n+1}
$$
Since $1+\frac1n>1+\frac1{n+1}$ we get
$$
n+1>\left(1+\frac1{n+1}\right)^{n+1}
$$
Multiply through by $(n+1)^{n+1}$ to get
$$
(n+1)^{n+2}>(n+2)^{n+1}
$$
This finishes the induction.
</s>