Equations via Lambert's W function I'm studying Lambert's W function and I came across the equation $2^x = 2x$.
Upon inspection it is easy to see that $x = 1$ and $x = 2$ are the real solutions to the equation.
Solving for Lambert's W function, we have:
$$
\begin{split}
&2^x = 2x \ \Rightarrow \ x2^{-x} = \frac{1}{2} \ \Rightarrow \ -x\log 2 \ e^{-x\log 2} = -\frac{\log 2}{2} \ \Rightarrow \ W(-x \log 2\ e^{-x\log 2}) = W\biggl(-\frac{\log 2}{2}\biggr) \ \Rightarrow\\
&-x\log 2 = W\biggl(-\frac{\log 2}{2}\biggr) \ \Rightarrow \ x = -\frac{1}{\log 2}W\biggl(-\frac{\log 2}{2}\biggr)
\end{split}
$$
But, $-\frac{1}{e} < -\frac{\log 2}{2} < 0$. Thus,
$$
x = 
\begin{cases}
-\frac{1}{\log 2}W_0\biggl(-\frac{\log 2}{2}\biggr) = -\frac{1}{\log 2}W_0[2^{-1}\log(2^{-1})] = -\frac{1}{\log 2}\cdot \log(2^{-1}) = 1\\
-\frac{1}{\log 2}W_-1\biggl(-\frac{\log 2}{2}\biggr) = -\frac{1}{\log 2}W_{-1}[2^{-1}\log(2^{-1})] = -\frac{1}{\log 2}\cdot 2\log(2^{-1}) = 2
\end{cases}
$$
Why $W_{-1}[2^{-1}\log(2^{-1})] = -2\log 2$? Where did factor $2$ come from?
 A: You seem to believe that
$$  W_{-1} \left( \frac{1}{2} \ln \frac{1}{2} \right)  $$
should be $- \ln 2$.  The Lambert $W$ function has some identities that might make one suspect this, but none are applicable at $(1/2) \ln (1/2)$.
$$  W_{-1}(x \ln x) = \ln x, x \leq \frac{1}{\mathrm{e}}  $$
is such an identity.  It does not apply here because $2 < \mathrm{e}$, so $\frac{1}{2} > \frac{1}{\mathrm{e}}$
Let's look at $W_{-1}(x \ln x)$.

The identity applies to the part to the left of the apex and not to the part to the right.  You are interested in $x = 1/2$, which is to the right.  (The apex is at the branch point of $W$, where $x \ln x = -1/\mathrm{e}$, i.e., where $x = 1/\mathrm{e}$.  Since we are crossing the branch point, we should expect some kind of non-smoothness there.)
Ultimately, the answer to your question is just because
$$  W_{-1} \left( \frac{1}{2} \ln \frac{1}{2} \right) = -2 \ln 2 \text{.} $$
A: $\require{begingroup} \begingroup$
$\def\e{\mathrm{e}}\def\W{\operatorname{W}}\def\Wp{\operatorname{W_0}}\def\Wm{\operatorname{W_{-1}}}$
When the argument of $\W(u)$ is in the range $(-\tfrac1\e,0)$,
the number $u$ always can be expressed in two equivalent forms:
\begin{align}
u&=\ln\left(a^{\tfrac 1{1-a}} \right)\cdot a^{\tfrac 1{1-a}}
\tag{1}\label{1}
\\
&=\ln\left(a^{\tfrac a{1-a}} \right)\cdot a^{\tfrac a{1-a}}
\tag{2}\label{2}
.
\end{align}
Indeed, multiplying \eqref{1} by $1=a\cdot\frac1a$, we have
\begin{align}
u&=
a\cdot\tfrac 1a\cdot\ln\left(a^{\tfrac 1{1-a}} \right)\cdot a^{\tfrac 1{1-a}}
\tag{3}\label{3}
\\
&=
a\cdot\ln\left(a^{\tfrac 1{1-a}} \right)\cdot a^{\tfrac 1{1-a}}\cdot \tfrac 1a
\tag{4}\label{4}
\\
&=
\ln\left(a^{\tfrac a{1-a}} \right)\cdot a^{\tfrac 1{1-a}-1}
=
\ln\left(a^{\tfrac a{1-a}} \right)\cdot a^{\tfrac 1{1-a}-\tfrac{1-a}{1-a}}
=
\ln\left(a^{\tfrac a{1-a}} \right)\cdot a^{\tfrac a{1-a}}
,
\tag{5}\label{5}
\end{align}
that is, \eqref{1}$\equiv$\eqref{2}.
Recall that the expression of the form $\W(t\exp{t})=t$,
just by the definition of $\W$, ignoring any questions about branches of $\W$.
So, applying $\W$ to both forms of $u$ in \eqref{1}, \eqref{2},
we have two distinct results,
\begin{align} 
\W\left( \ln\left(a^{\tfrac 1{1-a}} \right)\cdot a^{\tfrac 1{1-a}} \right)
&=
\ln\left(a^{\tfrac 1{1-a}} \right)
=\frac{\ln a}{1-a}
\tag{6}\label{6}
\\
\text{and }
\W\left( \ln\left(a^{\tfrac a{1-a}} \right)\cdot a^{\tfrac a{1-a}} \right)
&=
\ln\left(a^{\tfrac a{1-a}} \right)
=\frac{a\ln a}{1-a}
\tag{7}\label{7}
.
\end{align}
The last two expressions are known as
Parametric representation of the real branches of the Lambert W function.
Note that both values obtained from \eqref{6}, \eqref{7}
are negative, and one of them
is always greater than $-1$
(belongs to the branch $\Wp$),
while the other is less than $-1$
(belongs to the branch $\Wm$).
Note also, that the positive parameter $a$ can be either less, or greater than $1$.
When $a<1$, the expression \eqref{7} is recognized as $\Wp(u)$
while the expression \eqref{6} is recognized as $\Wm(u)$
and $a=\tfrac{\Wp(u)}{\Wm(u)}$.
In context of the original question, we have
for $a=\tfrac12$,
\begin{align} 
u&=\tfrac12\cdot\ln\tfrac12
\tag{8}\label{8}
\\
&=\ln\left(a^{\tfrac a{1-a}} \right)\cdot a^{\tfrac a{1-a}}
=\ln\left(a^{\tfrac 1{1-a}} \right)\cdot a^{\tfrac 1{1-a}}
\tag{9}\label{9}
\\
&=\tfrac12\cdot\ln\tfrac12
=\tfrac14\cdot\ln\tfrac14
\tag{10}\label{10}
.
\end{align}
\begin{align} 
\W(u)&=\W(\tfrac12\cdot\ln\tfrac12)=\ln\tfrac12
=-\ln2
=\Wp(u)\approx -0.69314718>-1
\tag{11}\label{11}
,\\
\W(u)&=\W(\tfrac14\cdot\ln\tfrac14)=\ln\tfrac14
=-2\ln2
=\Wm(u)\approx -1.38629436<-1
\tag{12}\label{12}
.
\end{align}
$\endgroup$
