TITLE: How many real roots are there to $2^x=x^2$?
QUESTION [7 upvotes]: How many real roots are there to
$2^x=x^2$?

REPLY [4 votes]: To flesh out Robert's solution:
$$x^2=\exp(x\ln 2)$$
can be rearranged as:
$$x^2 \exp(-x\ln 2)=1$$
Take the appropriate square root of both sides:
$$x \exp\left(-x\frac{\ln 2}{2}\right)=-1$$
multiply both sides with the appropriate factor:
$$-x \frac{\ln 2}{2}\exp\left(-x\frac{\ln 2}{2}\right)=\frac{\ln 2}{2}$$
invoke the Lambert function:
$$-x \frac{\ln 2}{2}=W\left(\frac{\ln 2}{2}\right)$$
and Bob's your uncle:
$$x=-\frac{2}{\ln 2}W\left(\frac{\ln 2}{2}\right)$$
Also,
$$-\frac{2}{\ln 2}W\left(-\frac{\ln 2}{2}\right)=2$$
and
$$-\frac{2}{\ln 2}W_{-1}\left(-\frac{\ln 2}{2}\right)=4$$
where $W_{-1}(x)$ is the other branch of the Lambert function that is real in the interval $[-1/e,0)$