$2^n=n$ and similar equations Is it possible to solve equations in the form $k^n=n$ for n and if so, How? I am new to logarithms and so would be glad if someone could explain even if there is an obvious answer.
Also What about $k^{a+b}=a$ for a? Or $k^{ab}=a$?
 A: All these equations can be standardized to the form
$$xe^x=y$$ for which the general solution has been studied in depth and is denoted as the function $x=W(y)$ known as Lambert's.


*

*$k^n=n$


Write $k^n=e^{-x}$, i.e. $x=-n\log(k)$, and $e^{-x}=-\dfrac x{\log(k)}$ or $xe^x=-\log(k)$.


*

*$k^{a+b}=a=k^ak^b$


Like before, $xe^x=-\log(k)k^b$, with $x=-a\log(k)$.


*

*$k^{ab}=a$.


Can be rewritten $bk^{ab}=ab$, and $xe^x=-\log(k)b$, with $x=-ab\log(k)$.

In general, there is no simpler approach, but you can create equations with a known solution by working in reverse.
For instance, taking $x=-\log(2)$ so that $\log(k)=\dfrac{\log(2)}2$ yields the equation
$$(\sqrt2)^n=n$$ with the solution $n=2$.

For those not willing to take Lambert's $W$ for granted we can discuss the real roots of $xe^x=y$.
The derivative is $(x+1)e^x$ so that the function is decreasing from an horizontal asymptote $(-\infty,0)$ to the minimum at $(-1,-1/e)$, then increasing exponentially to $(\infty,\infty)$ after crossing the origin $(0,0)$.
So there are no solutions in $y$ for $x<\frac1e$, two negative solutions on both sides of $x=-1$ for $1/e<y<0$ and a single solution for $y>0$.
A: I think that using Lambert's $W$ is like cheating. ;-) To get a more general approach, let's study the equation $k^x=x$, with $k>0$.
Consider the function $f(x)=k^x-x$. We have
$$
\lim_{x\to-\infty}f(x)=\infty
$$
and
$$
\lim_{x\to\infty}f(x)=
\begin{cases}
-\infty & \text{if $0<k\le 1$}\\[4px]
\infty & \text{if $k>1$}
\end{cases}
$$
Moreover
$$
f'(x)=k^x\log k-1
$$
If $0<k\le1$ we have $f'(x)<0$ for all $x$, so the function crosses the $x$-axis exactly once and the equation has a single solution. Since $f(0)=1$ and $f(1)=k-1<0$, we know the solution is in the interval $(0,1)$.
The more interesting case is $k>1$. The derivative vanishes for
$$
k^x=\frac{1}{\log k}
$$
so for $x\log k=-\log\log k$ or
$$
x=-\frac{\log\log k}{\log k}
$$
where the function has an absolute minimum.
Now
$$
f\left(-\frac{\log\log k}{\log k}\right)=
\frac{1}{\log k}+\frac{\log\log k}{\log k}=
\frac{1+\log\log k}{\log k}
$$
The equation has


*

*two solutions if $1+\log\log k<0$, that is, $\log k<e^{-1}$ or $1<k<e^{1/e}$;

*one solution if $k=e^{1/e}$;

*no solution if $k>e^{1/e}$.
The equations of the form $k^{x+b}=x$ can be studied similarly; more generally, you can study $qk^x=x$, taking into account that $k^{x+b}=k^b\cdot k^x$.
Equations like $k^{xb}=x$ are just the same as before, because they can be rewritten as $(k^b)^x=x$.
