Commutative equations Recently, I was wondering about some commutative equations. For sum and multiplication it's not interesting, because $x + y = y + x$ and $xy = yx$ is true for any numbers $x$ and $y$. Doing that for subtraction is quite easy: $$x - y = y - x \iff 2x = 2y \iff x = y$$
And for division it's not much harder: $$\frac{x}{y} = \frac{y}{x} \iff x^2 = y^2 \iff x = \pm y$$
But if you try to do that to powers, it's a lot harder. So, please, can you get $x^y = y^x$ to state $x = f(y)$ or $y = f(x)$, or, at least, so an investigation on that. And, if you are interested, you can, as well, do an investigation on $\log_y(x) = \log_x(y)$ and $\sqrt[y]{x} = \sqrt[x]{y}$.
P.s. I'm not sure about the tag, so please correct me on that if I made a mistake.
P.p.s. Sorry for my bad English.
 A: Assuming $x$ and $y$ are both positive, we can take $\ln$ of both sides. This gives
$$
x^y = y^x\\
y\ln x = x\ln y\\
\frac{\ln x}{x} = \frac{\ln y}y
$$
which is to say, the function you're after is
$$
f(x) = \frac{\ln x}x
$$
This function is non-positive and monotonically increasing for $x\leq 1$, so for such $x$, $x = y$ is the only solution.
Then the function is increasing and positive for $1<x\leq e$, and decreasing towards $0$ for $e\leq x$.
So for any $x$ between $1$ and $e$, there is some $y>e$ such that $x^y = y^x$ (and for any $x>e$ there is one $1<y<e$). However, for $x\leq 1$ or $x = e$, there is only $x = y$.
The case with roots, $\sqrt[y]{x} = \sqrt[x]{y}$ is basically the same: take logarithms on both sides, and you get
$$
x\ln x = y\ln y
$$
This is, in fact, $-f(1/x)$ from above. So if $x, y$ are such that $x^y = y^x$, then $1/x$ and $1/y$ are such that $\sqrt[1/y]{1/x} = \sqrt[1/x]{1/y}$, and vice versa.
As for the logarithms, that's a bit different. We need to transform the logarithms:
$$
\log_y x = \log_x y\\
\frac{\ln x}{\ln y} = \frac{\ln y}{\ln x}
$$
which you will recognize from your previous calculations: we need $\ln x = \pm \ln y$, or in other words, $x = y^{\pm 1}$
