>>>>> "Richard" == Richard Fateman <fateman at eecs.berkeley.edu> writes:
Richard> Looked at it this way, a polynomial p(x) either has exact
Richard> multiple roots or not. The test is easy. If p(x) and
Richard> p'(x), its derivative wrt x have no common factors then
Richard> it has no multiple roots. So compute gcd(p,p').
Richard> If the gcd is 1, then you (and you can tell your
Richard> root-finder program) that there are NO multiple
Richard> roots. (Oh, if gcd is not 1, it tells you a polynomial
Richard> whose roots have multiplicity >1; you can divide out by
Richard> this ,etc.)
I guess the following would be a bug in gcd?
p:expand((x-sqrt(2))^2*(x^2+2*x+2));
gcd(p,diff(p,x)) -> 1
It works fine if you replace sqrt(2) with r. The gcd is then x-r.
Ray