Connect via MCP →

Enter Calculation

a0 multiplies x^n (leading, nonzero); the constant term is a(n). Unused coefficients can stay 0.

Formula

Advertisement

Results

Number of roots found
5
roots (real & complex) via Durand-Kerner
Root Value (re ± i·im)
x_1 2.6817925684442003E-15
x_2 1.3368995720865E-15
x_3 -1.5843433783877E-15
x_4 -2.1505841279553E-15
x_5 1.1330769043639002E-16

What this solver does

The Nth-Degree Polynomial Equation Solver finds all roots — real and complex — of a polynomial equation \(a_0 x^{n} + a_1 x^{n-1} + \cdots + a_{n-1} x + a_n = 0\) with real coefficients. It uses the Durand-Kerner method (also called the Weierstrass method, the basis of the DKA / Durand-Kerner-Aberth family), a simultaneous iterative scheme that refines every root estimate at once. It is a universal mathematical tool with no country scope or units.

Complex plane with polynomial roots plotted as points, including conjugate pairs
Roots of a polynomial appear as points in the complex plane, with complex roots forming mirror-image conjugate pairs.

Coefficient convention

This tool indexes coefficients leading-first: a0 multiplies xn (the leading coefficient, which must be nonzero) and an is the constant term. This is the reverse of the textbook "a_k multiplies x^k" convention, so enter your coefficients accordingly. Coefficients with index larger than n are ignored.

How to use it

Pick the degree n (1 to 16), type coefficients a0 through an (leave unused ones at 0), choose how many significant digits to display, and submit. Real roots are shown with a zero imaginary part; complex roots of a real polynomial appear in conjugate pairs (re + i·im and re − i·im).

Advertisement

The formula

After dividing every coefficient by a0 to get a monic polynomial \(p(x) = x^{n} + b_1 x^{n-1} + \cdots + b_n\), each estimate is updated by $$z_i \leftarrow z_i - \frac{p(z_i)}{\displaystyle\prod_{j \ne i}\left(z_i - z_j\right)}$$ Starting from distinct points spread around a circle, the estimates converge simultaneously to the n roots.

Diagram of Durand-Kerner iteration with initial guesses on a circle converging toward actual roots
The DKA method starts all root estimates on a circle and updates them simultaneously until they converge.

Worked example

For \(x^3 - 6x^2 + 11x - 6 = 0\) enter n=3, a0=1, a1=−6, a2=11, a3=−6. The polynomial factors as $$(x-1)(x-2)(x-3)$$ and the iteration converges to the roots 1, 2 and 3 (all real).

Advertisement

FAQ

Why must a0 be nonzero? If the leading coefficient is zero the equation is not truly degree n; the tool treats \(a_0 = 0\) as invalid.

Why do complex roots come in pairs? A polynomial with real coefficients always has complex roots in conjugate pairs, so you will see matching +i·im and −i·im values.

Are repeated roots handled? Yes, but multiple (repeated) roots converge more slowly, so the solver allows many iterations and a looser tolerance; tiny imaginary residues are snapped to zero.

Last updated: