Take the polynomial . Multiplied out it is just a string of coefficients — — with no obvious sign that two of its roots are repeated. Finding the actual roots and can be genuinely hard work. But there is a much easier question hiding in plain sight: which roots repeat, and how many times, without solving for a single root?
The trick uses calculus, of all things. A repeated root of is also a root of its derivative — that is exactly what "repeated" means graphically: the curve touches zero and doubles back instead of crossing it. So a repeated factor of leaves behind a inside .
That means the greatest common divisor of and captures every repeated factor at once — computed with nothing more exotic than polynomial long division run in a loop, exactly like Euclid's algorithm for ordinary integers.
Comments
Loading comments...