Actually this is my first time to self-study about lambert w function, and i have interest on it, so forgive me if this question sounds stupid.
I can derive it manually with algebra if the solution of
$$\text{$x^x=2$ is $x=e^{W(\ln(2))}$ }$$
But, that was before i knew about principal branch such as $W_0(x)$ and $W_{-1}(x)$, and obviously from the definition (i got from Wikipedia), $ye^y=x$ holds if only if
$$\text{$w=W_k(x)$ for some integer $k$}$$
But, how do we know and determine the $k$? On my first case, it turns out $x=e^{W_0(\ln(2))}, \quad k=0$. Without computer we never know that wheter $k\ne 0$ is hold or not. Even if we know the graph of the equation and determine $k$ with considering intersection points from its graph, it's fine. But again, for knowing the graph we need computer to draw the graph.
Another example is $9x=e^{3x}$. This equation has 2 real solutions that is
$$\text{$-\frac{W_0\left(\frac 1 3\right)}{3}$ and $-\frac{W_{-1}\left(\frac 1 3\right)}{3}$}$$
And what about $x^x=2$ that has 3 real solutions? Seems like only 2 of them can be interpreted by LW function (not sure).
So, what's the idea to determine the $k$? Thanks in advance!
There are only two branches of Lambert W that give you real values on real numbers. The principal branch is real on $[-1/e, \infty)$ with values $\ge -1$. The $-1$ branch is real on $[-1/e, 0)$ with values $ \le -1$. Here is a graph, with the principal branch in red and the $-1$ branch in green.