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}})$$
When solving $ye^y=x$ for real $y$ (given real $x$) there are two cases:
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]]]