I'm trying to understand why Solve overcounts a solution at zero, or undercounts it altogether in different cases:

For example, the input

Solve[x^2 == 0, x]
Solve[x^2 (1 - x) == 0, x]
Solve[x^2 (1 - x) (1 - r x) == 0, x]
Solve[x^2 (1 - x) (1 - r/x) == 0, x]
Solve[x^2 (1 - x) (1 - r/x)^2 == 0, x]







The solution of x->0 behaves in a way I don't understand. Thanks.

  • $\begingroup$ consider what happens when solving eg $(x-2)^2=0$; how many solutions do you get? (perhaps check Multiplicity too) $\endgroup$
    – user42582
    Commented Mar 18, 2018 at 18:55
  • $\begingroup$ As noted by others in slightly different terms, x is not an actual factor of the left hand side. 'In[115]:= Factor[x^2 (1 - x) (1 - r/x)^2] Out[115]= -(r - x)^2 (-1 + x)' $\endgroup$ Commented Mar 18, 2018 at 19:30
  • $\begingroup$ I'm voting to close this question as off-topic because the issue it raises is not really a Mathematica issue but a matter of the OP not having grasped the mathematics involved. $\endgroup$
    – m_goldberg
    Commented Mar 18, 2018 at 20:54
  • $\begingroup$ Thanks very much, my bad $\endgroup$ Commented Mar 18, 2018 at 21:51

1 Answer 1


{x->0} is not a solution for the last equaiton since it contains $1/x^{2}$ which is later multiplied by $x^2$. Previous has {x->0} because it has $1/x$ which is multiplied by $x^2$. The output you get is perfectly fine, try Expand[] function on each of your input.

  • $\begingroup$ Simplify will also eliminate the removable singularities $\endgroup$
    – Bob Hanlon
    Commented Mar 18, 2018 at 18:56

Not the answer you're looking for? Browse other questions tagged or ask your own question.