🌀 Polynomial Roots Lab — Every Root, Real or Complex

Beyond quadratics, closed-form roots die at degree five — so solve numerically instead. Type any polynomial up to degree 8 and Durand–Kerner marches all of its complex roots into existence simultaneously, with a scrubber to watch the swarm converge, Vieta checks on sum and product, and the root-by-root factorisation rebuilt from the answers.

Polynomial (leading first)

Ready.
—

Durand–Kerner (the “Weierstrass method”) updates all roots at once: zᵢ ← zᵢ − p(zᵢ)/∏ᵢ≠ⱼ(zᵢ−zⱼ). Started from a complex spiral it almost never lands in a degenerate symmetric trap; ten Newton polish steps tidy the tail. Multiple roots converge slowly — watch how long the double-root preset takes.

rootrealimag|p(z)| residual