Find an analytical real solution to $1-x=k\ln(x)$, in which $k$ is real and $x\ne 1$.
I notice that (please correct if I am wrong):
when $k>=0$, we have only one real solution of $x=1 \Rightarrow k<0 \Rightarrow x>1$
when $x>1$, both $1-x$ and $k\ln(x)$ are motonically decreasing. As $1-x$ is a straight line and $k\ln(x)$ is convex in shape, $x$ has only one real solution.
I know it is possible to solve it with numerical approximation; is anyone aware of any analytical solution?
P.S. I tried to apply Lambert w function on both sides but it returns $x=1$.
$\require{begingroup} \begingroup$ $\def\e{\mathrm{e}}\def\W{\operatorname{W}}\def\Wp{\operatorname{W_0}}\def\Wm{\operatorname{W_{-1}}}$
For $x\ne1$ we can rewrite \eqref{1} as
\begin{align} \frac{\ln(x)}{1-x} &= \frac1k \tag{2}\label{2} . \end{align}
Note that LHS of \eqref{1} is negative for all real $x>0,\ x\ne 1$, and the known unique real solution for $k<0$ is:
\begin{align} x&= \begin{cases} k\Wp\Big(\tfrac1k\,\exp(\tfrac1k)\Big) ,\quad k\in(-1,0) ,\\ k\Wm\Big(\tfrac1k\,\exp(\tfrac1k)\Big) ,\quad k\in(-\infty,-1) \tag{3}\label{3} , \end{cases} \end{align}
where $\Wp$ is the principal branch and $\Wm$ is the other real branch of the Lambert $\W$ function.
$\endgroup$