How to solve for third solution with Lambert W function.

90 Views Asked by At

The equation $2^x = x^2$ has 3 solutions $2, 4$ and $-0.767$. The lambert W function can be used to explicitly solve for 2 and 4 $$ x\ln(2) = 2\ln (x)$$ $$ \ln(\sqrt2)= \frac{1}{x}\ln (x)$$ $$ \ln(\frac{1}{\sqrt2})= \frac{1}{x}\ln (\frac{1}{x})$$ $$ \ln(\frac{1}{\sqrt2})= e^{ln (\frac{1}{x})}\ln (\frac{1}{x})$$ $$ W(\ln(\frac{1}{\sqrt2}))= \ln(\frac{1}{x})$$ $$ x = \frac{1}{e^{W(\ln(\frac{1}{\sqrt2}))}}$$ The solutions from the two real branches of the Lambert W function return 2 and 4 as the answers how can you algebraically arrive at the third?

1

There are 1 best solutions below

2
On BEST ANSWER

There are 2 "choices" we need to keep in mind:

  1. Which branch of $W$ we chose if $z<0$ (as you already indentified)
  2. $x^2 = f(x) \implies x = \pm\sqrt{f(x)}$, we need to keep in mind both signs are possible.

So:

$$ x^2 = 2^x \implies x = \pm e^{\frac{1}{2}x\log 2} \implies (-\tfrac{1}{2}x\log 2) e^{-\frac{1}{2}x\log 2} = \mp\tfrac{1}{2}\log 2 $$

Thus, after applying lambert-W:

$$ -\tfrac{1}{2}x\log 2 = W(\mp\frac{1}{2}\log 2) \implies x = \frac{W(\mp\tfrac{1}{2}\log 2)}{-\tfrac{1}{2}\log 2} = \begin{cases} \frac{W_0(-\tfrac{1}{2}\log 2)}{-\tfrac{1}{2}\log 2} &= 2\\ \frac{W_{-1}(-\tfrac{1}{2}\log 2)}{-\tfrac{1}{2}\log 2} &=4 \\ \frac{W_0(+\tfrac{1}{2}\log 2)}{-\tfrac{1}{2}\log 2} &= -0.766\ldots\\ \end{cases} $$