Complex Root Calculator
Find all real and complex roots of any polynomial up to degree 10 using Durand-Kerner iteration. Displays roots in a + bi form with adjustable precision.
About
Polynomial root-finding is a deceptively fragile numerical problem. For degree n ā„ 5, the Abel-Ruffini theorem guarantees no closed-form radical solution exists. Every practical solver therefore relies on iterative approximation, and the choice of algorithm determines whether you get garbage or correct digits. This calculator implements the Durand-Kerner simultaneous iteration method, which converges to all n roots in parallel by treating them as repelling particles in the complex plane. It handles real coefficients, detects conjugate pairs, classifies multiplicity via polynomial GCD, and reports residuals so you can verify accuracy. Results assume coefficients are exact; floating-point representation of irrational coefficients introduces error of order 10ā15 per operation.
Formulas
Given a monic polynomial of degree n:
The Durand-Kerner iteration updates each root estimate zk simultaneously:
Polynomial evaluation uses Horner's method for numerical stability:
Convergence is detected when the maximum residual |P(zk)| falls below the tolerance ε = 10ād, where d is the selected decimal precision. Multiplicity is detected by computing gcd(P, Pā²) via the Euclidean algorithm on polynomial coefficients.
where zk = the k-th root estimate (complex number a + bi), P(z) = polynomial evaluated at z, aj = coefficient of zj, n = polynomial degree, ε = convergence tolerance.
Reference Data
| Polynomial Name | Degree | Equation | Root Type | Notable Property |
|---|---|---|---|---|
| Linear | 1 | x + a = 0 | 1 real | Always solvable |
| Quadratic | 2 | ax2 + bx + c | Real or conjugate pair | Discriminant b2 ā 4ac determines type |
| Depressed cubic | 3 | x3 + px + q | 1 or 3 real | Cardano's formula; casus irreducibilis |
| Quartic | 4 | x4 + ⦠| Mixed | Ferrari's method; last radical-solvable degree |
| Quintic | 5 | x5 + ⦠| Mixed | No radical formula (Abel-Ruffini) |
| Wilkinson's polynomial | 20 | ā(x ā k) | 20 real | Extreme coefficient sensitivity |
| Cyclotomic Φ5 | 4 | x4 + x3 + x2 + x + 1 | 4 complex | Roots are primitive 5th roots of unity |
| Chebyshev T5 | 5 | 16x5 ā 20x3 + 5x | 5 real in [ā1, 1] | Optimal interpolation nodes |
| Laguerre L3 | 3 | āx3 + 9x2 ā 18x + 6 | 3 real positive | Gaussian quadrature weights |
| Bernoulli-type | 6 | x6 + 1 | 6 complex | Roots on unit circle at 30° offsets |
| Characteristic poly (2Ć2) | 2 | Ī»2 ā tr(A)Ī» + det(A) | Eigenvalues | Trace-determinant relation |
| Minimal poly (repeated root) | 3 | (x ā 1)2(x + 2) | 2 distinct (1 repeated) | Multiplicity detection via GCD |
| Reciprocal polynomial | 4 | x4 + 3x3 + 5x2 + 3x + 1 | Paired | If r is a root, so is 1/r |