<s>[INST] Intersection points of $2^x$ and $x^2$ I am trying to find the intersection points of $2^x$ and $x^2$.
To do this, I set the two functions equal to each other: $2^x = x^2$. It seems intuitive to take the log base two of both sides of the equations, and I got: $x = \log_2{x^2}$.
I'm not entirely sure how to proceed from here. Can someone please help me?
 [/INST] All three solutions can be found using an analytic approach based on the Lambert W function.
Starting with the equation $2^x = x^2$, taking the square root of both sides gives
$$x = \pm 2^{x/2}.$$
Rewriting this equation in the form for the defining equation for the Lambert W function, namely
$$\text{W} (x) e^{\text{W}(x)} = x,$$
where $\text{W}(x)$ denotes the Lambert W function, we have
\begin{align*}
x &= \pm 2^{x/2}\\
x &= \pm e^{\frac{x}{2} \ln 2}\\
\Rightarrow x e^{-\frac{x}{2} \ln 2} &= \pm 1\\
-\frac{x}{2} \ln 2 e^{-\frac{x}{2} \ln 2} & = \mp \frac{\ln 2}{2},
\end{align*}
which is now exactly in the form for the defining equation for the Lambert W function and yields
$$-\frac{x}{2} \ln 2 = \text{W}_\nu \left (\mp \frac{\ln 2}{2} \right ),$$
or
$$x = - \frac{2}{\ln 2} \text{W}_\nu \left (\mp \frac{\ln 2}{2} \right ). \tag1$$
Here $\nu$ denote the branches for the Lambert W function. For branches that are real we have $\nu = 0$ and corresponds to the principal branch for the Lambert W function while $\nu = -1$ corresponds to the secondary real branch.
We now make use of the following simplification rule for the Lambert W function
$$-\ln x = \begin{cases}
\text{W}_0 \left (-\dfrac{\ln x}{x} \right ), \quad 0 < x \leqslant e,\\[2ex]
\text{W}_{-1} \left (-\dfrac{\ln x}{x} \right ), \quad x \geqslant e,
\end{cases}$$
and consider the negative and positive cases found in the argument of the Lambert W function in (1) separately.

Negative case
Here
$$x = -\frac{2}{\ln 2} \text{W}_\nu \left (-\frac{\ln 2}{2} \right ) = \begin{cases}
-\dfrac{2}{\ln 2} \text{W}_0 \left (-\dfrac{\ln 2}{2} \right )\\
-\dfrac{2}{\ln 2} \text{W}_{-1} \left (-\dfrac{\ln 2}{2} \right )
\end{cases}$$
Now on application of the above simplification rule we have
$$\text{W}_0 \left (-\frac{\ln 2}{2} \right ) = -\ln 2 = 2,$$
since $x = 2$ lies between $0 < x \leqslant e$.
Also
$$\text{W}_{-1} \left (-\frac{\ln 2}{2} \right ) = \text{W}_{-1} \left (-\frac{2 \ln 2}{2^2} \right ) = \text{W}_{-1} \left (- \frac{\ln 4}{4} \right ) = -\ln 4 = -2 \ln 2,$$
since $x = 4$ is greater than $e$. Thus
\begin{align*}
x &= \begin{cases}
-\dfrac{2}{\ln 2} \cdot - \ln 2\\[2ex]
-\dfrac{2}{\ln 2} \cdot - 2\ln 2
\end{cases}\\
\end{align*}
or
$$x = 2, 4.$$

Positive case
Here
$$x = -\frac{2}{\ln 2} \text{W}_\nu \left (\frac{\ln 2}{2} \right ) = -\frac{2}{\ln 2} \text{W}_0 \left (\frac{\ln 2}{2} \right ).$$
Note that as the argument to the Lambert W function is positive, for a real solution, only the principal branch is selected. 

So to summarise, the three real solutions to the equation $2^x = x^2$ are:
$$x = 2, 4, -\frac{2}{\ln 2} \text{W}_0 \left (\frac{\ln 2}{2} \right )$$
</s>