Why does basic algebra provide one value for $x$ when there should be two?
Solution 1:
When you "divided both sides by $x$", you tacitly assumed that $x \neq 0$. It does not make sense to divide by zero.
In general, when confronted with problems like this, you can try to substitute in your solution from the beginning and go through the steps to see what goes awry. Here, starting with $x = 0$, the equation $x^2 = x$ is $0 = 0$. The next step is to divide both sides by $x$... whoops!
Solution 2:
$x^2=x\Rightarrow x^2-x=0\Rightarrow x(x-1)=0\Rightarrow $either $x=0$ or $x=1$
Solution 3:
The given quadratic equation $x^2=x$ will have two real roots given as follows $$x^2-x=0$$ $$x(x-1)=0$$ $$x=0\ \ \ \ \textrm{or}\ \ \ x-1=0$$ $$x=0\ \ \ \ \textrm{or}\ \ \ x=1$$ Hence, we get $x=0$ or $x=1$