Can the equation $x^n=n^x$ be solved for $n$ where $x \in \mathbb R, n \in \mathbb N$.
I have tried to simplify it using logarithms and properties of logs, but I can't isolate $n$. I transformed the equation to the form $n^{1/n}=x^{1/x}$ but this creates an issue if there is a negative value for $x$, which happens every time $n$ is even.
$n=1 \implies x=1$. Otherwise fix $n\ge 2$ integer. The function $f(x)=\log x/x$ (for $x>0$) is such that $f^\prime(x)=(1-\log x)/x^2$. Hence $f$ is increasing in $(0,e]$ and decreasing otherwise. Note also that $$ f(0^+)=-\infty, f(1)=0, f(e)=1/e, \text{ and }\lim_{x\to \infty}f(x)=0^+. $$ That means that for each $n\ge 2$ integer there exists a unique $x>0$ such that $x\neq n$ and $x^n=n^x$.