Find the two solutions of $\log x=\frac{1}{2}(x-1)$ Question: solve $\log x=\frac{1}{2}(x-1)$
With the following I only get one solution (apparently with $W_0$), but I can't find the solution with $W_{-1}$ this way. What is my mistake?
$$\log x=\frac{1}{2}(x-1)$$
$$\log x-\frac{1}{2}x=-\frac{1}{2}$$
$$e^{\log(x)-\frac{1}{2}x}=e^{-\frac{1}{2}}$$
$$xe^{-\frac{1}{2}x}=e^{-\frac{1}{2}}$$
$$-\frac{1}{2}xe^{-\frac{1}{2}x}=-\frac{1}{2}e^{-\frac{1}{2}}$$
$$-\frac{1}{2}x=W(-\frac{1}{2}e^{-\frac{1}{2}})$$
$$x=-2W(-\frac{1}{2}e^{-\frac{1}{2}})$$
 A: When solving $ye^y=x$ for real $y$ (given real $x$) there are two cases:

*

*If $x\ge0$ then there is only one solution $W_0(x)$.

*If $-1/e\le x<0$ then thre are two solutions $W_0(x)$ and $W_{-1}(x)$.

In this problem $-\frac{1}{2}e^{-1/2}$ is in the second case, so we find the solutions to be
$$ -2W_0(-\frac{1}{2}e^{-\frac{1}{2}})=1, \qquad -2W_{-1}(-\frac{1}{2}e^{-\frac{1}{2}})\approx 3.51286. $$
For these I typed the following two things into Mathematica:

*

*N[-2 ProductLog[0, -0.5 Exp[-0.5]]]

*N[-2 ProductLog[-1, -0.5 Exp[-0.5]]]
A: 
Question: solve
\begin{align}\ln x&=\tfrac12(x-1)\tag{1}\label{1}\end{align}

$\require{begingroup} \begingroup$
$\def\e{\mathrm{e}}\def\W{\operatorname{W}}\def\Wp{\operatorname{W_0}}\def\Wm{\operatorname{W_{-1}}}\def\Catalan{\mathsf{Catalan}}$
Equation \eqref{1} has one obvious root $x=1$.
For the other roots we can divide \eqref{1} by $(1-x)$ to get
\begin{align}
\frac{\ln x}{(1-x)}&=-\tfrac12
\tag{2}\label{2}
,
\end{align}
a recognizable form of
parametric representation of the real branches $\Wp,\Wm$ of the Lambert $\W$ function,
which has only one solution $x>1$:
\begin{align}
x&=\frac{\Wm\left(-\tfrac12\exp(-\tfrac12)\right)}
{\Wp\left(-\tfrac12\exp(-\tfrac12)\right)}
=\frac{\Wm\left(-\tfrac12\exp(-\tfrac12)\right)}
{-\tfrac12}
=-2{\Wm\left(-\tfrac12\exp(-\tfrac12)\right)}
\approx 3.5128624
\tag{3}\label{3}
.
\end{align}
$\endgroup$
