If I want to solve $x^2=x$ then obviously $x(x-1)=0$ so $x=0$ or $x=1$.
But, what if I try to solve it differently:
$$x^2=x$$ $$\frac{x^2}{x}=1$$ $$x=1$$
Then for some reason the solution $x=0$ vanishes. Apparently I am missing something. Question is: what am I missing and how to also get $x=0$ as a solution in the second method?