TITLE: Is there analytic solution to $x^y=y^x\land x\neq y$ as $y(x)$?
QUESTION [6 upvotes]: Equation $x^y=y^x\land x\neq y$ has trivial solution $ y(x) = x$. Is there non trivial solution given say in terms of elementary or special functions as $y(x)$? A solution that would yield $y(2) = 4$ and $y(4) = 2$ - among of course all other real numbers $x > 0$.

REPLY [3 votes]: I already answered this question here in the 3rd comment. If $W(t)$ is Lambert W function, then solution is  
$
y(x) = \begin{cases}
 e^{-W_{-1}\left(-\log \left(x^{\frac{1}{x}}\right)\right)} & 0<x<e \\
 e^{-W\left(-\log \left(x^{\frac{1}{x}}\right)\right)} & e<x
\end{cases}
$
With the graph that looks like (so no trivial $x = y$ part present):