2

I just learned about Lambert W Function and I am trying to solve the above equation (and I have seen this article but I want to solve it myself). However, I seem not to be able to reach the correct answer. Can someone please point out the error ?

$$x^2 = 2^x$$

Taking $\log_e$ (denoted by $\ln$) on both sides

$$\ln(x^2) = \ln(2^x)$$ $$\implies 2\;\ln(x) = x(\ln 2)$$ $$\implies \ln(x) = x \;(\ln 2)/2$$ $$\implies 1/(x\ln(x)) = (\ln 2)/2$$ Let $y = 1/x$, then we get $$y\;\ln (1/y) = (\ln 2)/2$$ $$\implies y\;\ln y^{-1} = (\ln 2)/2$$ $$\implies -y\;\ln y = (\ln 2)/2$$ $$\implies y\;\ln y = -(\ln 2)/2$$ Replacing $y$ by $e^{\ln y}$, we get $$\implies e ^ {\ln y}\;\ln y = -(\ln 2) / 2$$ $$\implies \ln\;y = W(-(\ln 2)/2)$$ Replacing back $y = 1/x = x^{-1}$, we get $$\implies \ln x^{-1} = W(-(\ln 2) / 2)$$ $$\implies \ln x = - W(-(\ln 2) / 2)$$ $$\implies x = e^{- W(-(\ln 2) / 2)}$$ And this isn't the right answer :(

Gary
  • 31,845

1 Answers1

3

The function $$ f(x)=\frac{\ln x}{x}, $$ is strictly increasing is $(0,e]$ and strictly decreasing in $[e,\infty)$. since $f'(x)=\frac{1-\ln x}{x^2}$. Hence, for every $y\in (0,1)$ is the image of exactly two $x$'s. In particular, for every $y\in (0,1)$, there exist a unique $x_1\in (1,e)$ and a unique $x_2\in (e,\infty),$ such that $$ y=\frac{\ln x_1}{x_1}=\frac{\ln x_2}{x_2}. $$ Observe that $$ \frac{\ln 2}{2}=\frac{\ln 4}{4}, $$ and $2<e<4$. Hence the only solutions of $$ 2^x=x^2 \quad\Longleftrightarrow\quad \frac{\ln x}{x}=\frac{\ln 2}{2}, $$ are 2 and 4.