How many real roots are there to $2^x=x^2$? How many real roots are there to
$2^x=x^2$? 

An obvious solution is $x=2$.
If $2^x = x^2$, then $x\neq 1$ and $x\neq 0$. I'll treat the positive and negative cases separately.
If $x\gt 0$, then we get $x\ln(2) = 2\ln (a)$, or $\frac{x}{\ln x} = \frac{2}{\ln 2}$.
The derivative of $g(x) = \frac{x}{\ln x}$ is $\frac{\ln x - 1}{(\ln x)^2}$.
On $(1,\infty)$, the derivative is positive on $(e,\infty)$ and negative on $(1,e)$, so there is an absolute minimum at $x=e$, where the value is $e$; $\lim\limits_{x\to 1^+} g(x) = \lim\limits_{x\to\infty}g(x) = \infty$; since $\frac{2}{\ln 2}\gt e$, there are two values of $x$ where $g(x) = \frac{2}{\ln 2}$; one is $x=2$, which we had already found, the other is a value greater than $e$ (which as it happens is $4$). 
On $(0,1)$, $g(x)$ is always negative, so there are no values where $g(x)=\frac{2}{\ln 2}$.
So for $x\gt 0$, there are two solutions.
For $x\lt 0$, the equation $2^x = x^2$ is equivalent to the equation $\left(\frac{1}{2}\right)^a = a^2$, where $a=-x\gt 0$. This time, the equation is equivalent to $\frac{a}{\ln a} = -\frac{2}{\ln 2}$. There are no solutions for $a\gt 1$, since $g(x)$ is positive there. On $(0,1)$, $g'(x)\lt 0$, so the function is strictly decreasing; we have $\lim\limits_{a\to 0^+}\frac{a}{\ln a} = 0$ and $\lim\limits_{a\to 1^-}\frac{a}{\ln a} = -\infty$, so there is one and only one value of $a$ for which $\frac{a}{\ln a} = -\frac{2}{\ln 2}$. Thus, there is one value of $x\lt 0$ which solves the equation.
In summary, there are three real solutions: one lies in $(-1,0)$, the second is $2$, and the third is $4$. 
