Can $x^n=n^x$ be solved for $n$?

200 Views Asked by At

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.

2

There are 2 best solutions below

0
On BEST ANSWER

$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$.

1
On

Use the Lambert-W function, $W(z)$ is the inverse of $ze^z$,

$$ n = -\frac{xW(\frac{-\log x}{x})}{\log x} $$

Edit: First notice that $x^n = n^x \implies \frac{\log n}{n} = \frac{\log x}{x}$. Then use the definition of the Lambert function, $z = W(t) \implies t = ze^z$ and rewrite the original expression as,

$$ \frac{n\log x}{-x} e^{\frac{n log x}{-x}} = -\frac{\log x}{x} $$ and from here you should be able to show that $\frac{\log n}{n} = \frac{\log x}{x}$.