Solution (source code)

= Solution

Set $t=2^x>0$. The <exponential function> identity $4^x=(2^x)^2$ reduces the problem to the <quadratic equation>
$$
t^2-t-2=(t-2)(t+1)=0.
$$
Positivity excludes $t=-1$, so $2^x=2$. Since the <exponential function> $2^x$ is strictly increasing, the unique answer is $\boxed{x=1}$.