Calculator overview
Inputs and outputs
This summary comes from the calculator's published input and output contract.
Inputs
- Root 5 imaginary part (required)
-
Default 0 Range 0 to 10
About this input
The imaginary part of root 5, from 0 to 10 in steps of 0.25. Above 0 its mirror image below the real axis is a root too; the handle snaps onto the real axis at 0.
- Root 4 real part (required)
-
Default 2 Range -10 to 10
About this input
The real part of root 4, from -10 to 10 in steps of 0.25. Drag the root handle; arrow keys move it by 0.25.
- Root 5 multiplicity (required)
-
Default 1 Range 1 to 4
About this input
How many times root 5 repeats, from 1 to 4. Tap the handle (or press Space) to cycle x1 to x4.
- Root 6 imaginary part (required)
-
Default 0 Range 0 to 10
About this input
The imaginary part of root 6, from 0 to 10 in steps of 0.25. Above 0 its mirror image below the real axis is a root too; the handle snaps onto the real axis at 0.
- Root 5 real part (required)
-
Default -1 Range -10 to 10
About this input
The real part of root 5, from -10 to 10 in steps of 0.25. Drag the root handle; arrow keys move it by 0.25.
- Root 3 multiplicity (required)
-
Default 1 Range 1 to 4
About this input
How many times root 3 repeats, from 1 to 4. Tap the handle (or press Space) to cycle x1 to x4.
- Root 3 imaginary part (required)
-
Default 1 Range 0 to 10
About this input
The imaginary part of root 3, from 0 to 10 in steps of 0.25. Above 0 its mirror image below the real axis is a root too; the handle snaps onto the real axis at 0.
- Root 3 real part (required)
-
Default 0.5 Range -10 to 10
About this input
The real part of root 3, from -10 to 10 in steps of 0.25. Drag the root handle; arrow keys move it by 0.25.
- Root 4 multiplicity (required)
-
Default 1 Range 1 to 4
About this input
How many times root 4 repeats, from 1 to 4. Tap the handle (or press Space) to cycle x1 to x4.
- Root 4 imaginary part (required)
-
Default 0 Range 0 to 10
About this input
The imaginary part of root 4, from 0 to 10 in steps of 0.25. Above 0 its mirror image below the real axis is a root too; the handle snaps onto the real axis at 0.
- Root 6 multiplicity (required)
-
Default 1 Range 1 to 4
About this input
How many times root 6 repeats, from 1 to 4. Tap the handle (or press Space) to cycle x1 to x4.
- Root 8 real part (required)
-
Default 4 Range -10 to 10
About this input
The real part of root 8, from -10 to 10 in steps of 0.25. Drag the root handle; arrow keys move it by 0.25.
- Root 8 multiplicity (required)
-
Default 1 Range 1 to 4
About this input
How many times root 8 repeats, from 1 to 4. Tap the handle (or press Space) to cycle x1 to x4.
- Number of roots (required)
-
Default 3 Range 1 to 8
About this input
How many root slots are in use, 1 to 8. Add or remove a root with the + root and - root buttons; a root off the real axis also brings its mirror image, so the degree may not pass 8.
- Step tolerance (required)
-
Default 0.0001 Range 1E-14 to 0.01
About this input
The step tolerance: a solve has settled at the first step where no root moves more than this times max(1, its size). From 10^-14 to 0.01; the choices are 0.01, 0.001, 0.0001, 10^-6 and 10^-8.
- Your prediction: the most sensitive root
-
When omitted Blank
Default Not set Range 1 to 8
About this input
Challenge 1 only: tap the root you think is most sensitive before the condition numbers appear; the value is its row in the root table, 1 to 8. Blank until you choose.
- Root 7 imaginary part (required)
-
Default 0 Range 0 to 10
About this input
The imaginary part of root 7, from 0 to 10 in steps of 0.25. Above 0 its mirror image below the real axis is a root too; the handle snaps onto the real axis at 0.
- Root 6 real part (required)
-
Default 3 Range -10 to 10
About this input
The real part of root 6, from -10 to 10 in steps of 0.25. Drag the root handle; arrow keys move it by 0.25.
- Root 7 multiplicity (required)
-
Default 1 Range 1 to 4
About this input
How many times root 7 repeats, from 1 to 4. Tap the handle (or press Space) to cycle x1 to x4.
- Root 8 imaginary part (required)
-
Default 0 Range 0 to 10
About this input
The imaginary part of root 8, from 0 to 10 in steps of 0.25. Above 0 its mirror image below the real axis is a root too; the handle snaps onto the real axis at 0.
- Root 7 real part (required)
-
Default -3 Range -10 to 10
About this input
The real part of root 7, from -10 to 10 in steps of 0.25. Drag the root handle; arrow keys move it by 0.25.
- Coefficient of x^5 (required)
-
Default 0 Range -1000000 to 1000000
About this input
The coefficient of x^5 in Type coefficients mode, from -1000000 to 1000000; used up to the degree. The leading coefficient must be at least 0.001 in size.
- Coefficient of x^4 (required)
-
Default 1 Range -1000000 to 1000000
About this input
The coefficient of x^4 in Type coefficients mode, from -1000000 to 1000000; used up to the degree. The leading coefficient must be at least 0.001 in size.
- Coefficient of x^6 (required)
-
Default 0 Range -1000000 to 1000000
About this input
The coefficient of x^6 in Type coefficients mode, from -1000000 to 1000000; used up to the degree. The leading coefficient must be at least 0.001 in size.
- Coefficient of x^8 (required)
-
Default 0 Range -1000000 to 1000000
About this input
The coefficient of x^8 in Type coefficients mode, from -1000000 to 1000000; used up to the degree. The leading coefficient must be at least 0.001 in size.
- Coefficient of x^7 (required)
-
Default 0 Range -1000000 to 1000000
About this input
The coefficient of x^7 in Type coefficients mode, from -1000000 to 1000000; used up to the degree. The leading coefficient must be at least 0.001 in size.
- Coefficient of x^0 (required)
-
Default -2.5 Range -1000000 to 1000000
About this input
The coefficient of x^0 in Type coefficients mode, from -1000000 to 1000000; used up to the degree. The leading coefficient must be at least 0.001 in size.
- Challenge number (required)
-
Default 0 Range 0 to 5
About this input
The challenge number: 0 for free play, 1 to 5 to load a challenge.
- Coefficient of x^1 (required)
-
Default 3.25 Range -1000000 to 1000000
About this input
The coefficient of x^1 in Type coefficients mode, from -1000000 to 1000000; used up to the degree. The leading coefficient must be at least 0.001 in size.
- Coefficient of x^3 (required)
-
Default 0 Range -1000000 to 1000000
About this input
The coefficient of x^3 in Type coefficients mode, from -1000000 to 1000000; used up to the degree. The leading coefficient must be at least 0.001 in size.
- Coefficient of x^2 (required)
-
Default -1.75 Range -1000000 to 1000000
About this input
The coefficient of x^2 in Type coefficients mode, from -1000000 to 1000000; used up to the degree. The leading coefficient must be at least 0.001 in size.
- How to set the polynomial (required)
-
Default Drag roots Allowed Drag roots, Type coefficients
About this input
How the polynomial is set: Drag roots (move root handles on the complex plane) or Type coefficients. Chosen with the chip on the stage.
- Root 1 real part (required)
-
Default -2 Range -10 to 10
About this input
The real part of root 1, from -10 to 10 in steps of 0.25. Drag the root handle; arrow keys move it by 0.25.
- Root 1 multiplicity (required)
-
Default 1 Range 1 to 4
About this input
How many times root 1 repeats, from 1 to 4. Tap the handle (or press Space) to cycle x1 to x4.
- Root 2 imaginary part (required)
-
Default 0 Range 0 to 10
About this input
The imaginary part of root 2, from 0 to 10 in steps of 0.25. Above 0 its mirror image below the real axis is a root too; the handle snaps onto the real axis at 0.
- Root 2 real part (required)
-
Default 1 Range -10 to 10
About this input
The real part of root 2, from -10 to 10 in steps of 0.25. Drag the root handle; arrow keys move it by 0.25.
- Root 2 multiplicity (required)
-
Default 1 Range 1 to 4
About this input
How many times root 2 repeats, from 1 to 4. Tap the handle (or press Space) to cycle x1 to x4.
- Perturbation power p (required)
-
Default 6 Range 2 to 14
About this input
The perturbation power p: every coefficient is nudged by a relative amount of size 10^-p, p a whole number from 2 to 14. Set with the stepper under the plot.
- Method shown (required)
-
Default Durand-Kerner Allowed Durand-Kerner, Aberth
About this input
Which method's steps the frames show: Durand-Kerner or Aberth. Both always run.
- Degree (required)
-
Default 4 Range 1 to 8
About this input
The degree of the typed polynomial, a whole number from 1 to 8 (Type coefficients mode).
- Root 1 imaginary part (required)
-
Default 0 Range 0 to 10
About this input
The imaginary part of root 1, from 0 to 10 in steps of 0.25. Above 0 its mirror image below the real axis is a root too; the handle snaps onto the real axis at 0.
- Random seed (required)
-
Default 2026 Range 1 to 2147483646
About this input
The seed of the random perturbation draws, a whole number from 1 to 2147483646. New seed picks another one.
Outputs
- p(x) relative to its terms along the real axis of the plot
-
No unit declared
About this output
p(x) divided by the sum of the sizes of its terms along the real axis of the plot: a long flat stretch near zero is where roots are sensitive.
- Random seed used
-
No unit declared
About this output
The seed used (a challenge fixes it at 2026).
- Exact re-solves that settled
-
No unit declared
About this output
How many of the 6 exact re-solves settled within 20 steps.
- The steps of the method shown, k = 0 .. 40, one root estimate per slot
-
No unit declared
About this output
The 41 steps (0 to 40) of the method shown, one estimate per root slot; the plot draws each root's path.
- Number of roots used
-
No unit declared
About this output
The number of root slots used (Drag roots mode).
- Perturbation size (epsilon)
-
No unit declared
About this output
epsilon = 10^-p, the relative size of the coefficient nudges.
- Most sensitive root, real part
-
No unit declared
About this output
The real part of the most sensitive root (the first root-table row with the largest condition number).
- Most sensitive root, imaginary part
-
No unit declared
About this output
The size of the imaginary part of the most sensitive root.
- Roots that left the real line in trial 1
-
No unit declared
About this output
How many roots left the real axis in the first exact re-solve (beyond those already off it).
- Perturbation power used
-
No unit declared
About this output
The perturbation power used (a challenge may fix it).
- Observed sensitivity
-
No unit declared
About this output
The cloud spread divided by epsilon and by the root scale: how far roots move per unit relative change of the coefficients.
- Root-sum check (Durand-Kerner)
-
No unit declared
About this output
How far the sum of the Durand-Kerner roots is from minus the second-highest coefficient; near zero when the method has settled.
- Plot window, imaginary part high
-
No unit declared
About this output
The top edge of the square plot window (imaginary part). Read by the plot.
- Plot half-width
-
No unit declared
About this output
Half the width of the square plot window.
- Plot window, imaginary part low
-
No unit declared
About this output
The bottom edge of the square plot window (imaginary part). Read by the plot.
- Plot window, real part low
-
No unit declared
About this output
The left edge of the square plot window (real part). Read by the plot.
- Plot window, real part high
-
No unit declared
About this output
The right edge of the square plot window (real part). Read by the plot.
- Plot centre, real part
-
No unit declared
About this output
The real part of the plot centre (the plot always covers -2 to 2).
- Start circle centre
-
No unit declared
About this output
The centre of the start circle on the real axis (the mean of the roots). Read by the plot.
- The roots in display order (real part ascending, then imaginary part descending): condition number, repeated-group size, relative residual
-
No unit declared
About this output
The computed roots in display order (real part ascending, then imaginary part descending), with each condition number, repeated-group size and relative residual.
- Start circle radius
-
No unit declared
About this output
The radius of the start circle. Read by the plot.
- Plot centre, imaginary part
-
No unit declared
About this output
The imaginary part of the plot centre.
- Step tolerance used
-
No unit declared
About this output
The step tolerance used (a challenge fixes it at 0.0001).
- Exact cloud: the roots of six perturbed polynomials (slot order) and whether each re-solve settled
-
No unit declared
About this output
The exact cloud: the roots of six perturbed polynomials, each solved again in 20 Aberth steps, and whether each settled.
- Challenge result
-
No unit declared
About this output
No challenge selected, MET or NOT MET.
- First-order cloud: 30 perturbed positions of each root (root-table order)
-
No unit declared
About this output
The first-order cloud: 30 perturbed positions of each root in root-table order; blank at repeated roots.
- Groups of nearly repeated roots
-
No unit declared
About this output
How many groups of nearly repeated roots there are (roots within 1% of the root scale of each other).
- Cloud spread
-
No unit declared
About this output
The furthest any point of the exact cloud lands from its nearest unperturbed root.
- Challenge score
-
No unit declared
About this output
100 when the challenge is met, else 0.
- Aberth
-
No unit declared
About this output
Aberth: Settled, Not settled within 40 steps, or Collision.
- Aberth steps to settle
-
No unit declared
About this output
The first step at which Aberth settled; blank when it did not settle.
- Challenge feedback
-
No unit declared
About this output
A hint for the selected challenge, or why it is met.
- Challenge: the value scored
-
No unit declared
About this output
The value the challenge scores: the chosen root's condition number over the largest (1), the largest condition number (2, 5), the roots that left the real line (3) or the Durand-Kerner steps (4).
- Challenge goal
-
No unit declared
About this output
What the selected challenge asks for.
- The coefficients a_k of the polynomial, k = 0 .. 8
-
No unit declared
About this output
The coefficients a_k of the polynomial, k = 0 to the degree.
- Method shown, used
-
No unit declared
About this output
The method whose steps the frames show.
- Largest condition number
-
No unit declared
About this output
The largest condition number among the roots: how much a root moves, relative to its size, per unit relative change of every coefficient. Shown up to 10^12.
- Model Status
-
No unit declared
About this output
OK, CHECK with the reason (two estimates met, a method did not settle, re-solves did not settle, or roots too close to group), or NOT VALID with the input to fix.
- Formula module versions
-
No unit declared
About this output
The versions of the formula modules this model uses.
- Model version
-
No unit declared
About this output
The version of this calculation model.
- Largest group radius
-
No unit declared
About this output
The radius of the widest group of nearly repeated roots; blank when there is no group.
- Degree solved
-
No unit declared
About this output
The degree n of the polynomial solved (a root off the real axis counts twice).
- Degree room left
-
No unit declared
About this output
How many more degrees the polynomial may take (8 minus the degree); the plot disables + root when it is 0. Drag roots mode only.
- Durand-Kerner steps to settle
-
No unit declared
About this output
The first step at which Durand-Kerner settled; blank when it did not settle.
- How the polynomial was set
-
No unit declared
About this output
How the polynomial was set in this answer.
- Durand-Kerner
-
No unit declared
About this output
Durand-Kerner: Settled, Not settled within 40 steps, or Collision (two estimates met).
LogicCommons is in beta. If a result, label, or reference looks wrong, tell us here; we read every message.
Methodology
Purpose and model boundary
This lab finds every root of a real polynomial of degree 1 to 8 and shows how far each root moves when the coefficients change by a tiny amount. The polynomial is set either by dragging up to eight roots on the complex plane, each on a 0.25 grid and repeated up to four times, or by typing its coefficients. Two methods find all the roots at once from one shared circle of start points, 40 steps each: Durand-Kerner (also called Weierstrass) and Aberth. The model gives each root its condition number, groups nearly repeated roots and names the most sensitive root. It then nudges every coefficient by a seeded relative amount of size ε = 10⁻ᵖ: 30 nudges move the roots to first order, and 6 are solved again exactly, so a cloud of points shows which roots are sensitive. Every step of the method shown is returned, with the clouds, a curve of the polynomial along the real axis and five scored challenges.
It is a lab for learning why some polynomial roots are hard to pin down from the coefficients: why roots crowded together far from zero, like those of Wilkinson's polynomial, move a long way when the coefficients barely change, why the same spacing balanced around zero is calm, why a repeated root turns into a star of nearby roots and slows the methods down, and how a small change can turn two real roots into a complex pair. It is not a general root finder. It takes real coefficients only, up to degree 8, and a repeated root can be found only to a limited number of digits.
The model is the calculation authority. The page sends the values you set to the model and draws only what it returns: the polynomial, the computed roots, the start circle, the path of each root estimate, the two clouds, the plot window and the real-axis curve all come from the model's own results. The page computes no coefficient, root, condition number or cloud point itself.
Inputs and units
Every input is a pure number or a choice; the lab has no physical units. A root is a complex number re + im·i.
| Input | Meaning and unit |
|---|---|
| How the polynomial is set | Drag roots (default) or Type coefficients. |
| Number of roots | Drag roots only: a whole number from 1 to 8 (default 3), the root slots in use. |
| Root 1 to 8, real part | Drag roots only: from -10 to 10 in steps of 0.25 (defaults -2, 1, 0.5, 2, -1, 3, -3, 4). |
| Root 1 to 8, imaginary part | Drag roots only: from 0 to 10 in steps of 0.25 (default 0, except 1 for root 3). Above 0, the root's mirror image below the real axis is a root too. |
| Root 1 to 8, multiplicity | Drag roots only: how many times the root repeats, a whole number from 1 to 4 (default 1). |
| Degree | Type coefficients only: a whole number from 1 to 8 (default 4). |
| Coefficients of x⁰ to x⁸ | Type coefficients only, used up to the degree: each from -1,000,000 to 1,000,000 (defaults -2.5, 3.25, -1.75, 0, 1 for x⁰ to x⁴, and 0 above). The leading coefficient must be at least 0.001 in size. |
| Perturbation power | p, a whole number from 2 to 14 (default 6): every coefficient is nudged by a relative amount of size ε = 10⁻ᵖ. |
| Seed | A whole number from 1 to 2,147,483,646 (default 2026) that fixes the random nudges. |
| Step tolerance | From 10⁻¹⁴ to 0.01 (default 0.0001): a solve has settled at the first step where no root moves more than this times max(1, its size). |
| Method shown | Durand-Kerner (default) or Aberth: whose steps the paths show. Both methods always run. |
| Challenge number | 0 for free exploration, or 1 to 5 to load a challenge. |
| Your prediction: the most sensitive root | Challenge 1 only: blank until you choose, then the root you picked, 1 to 8. |
The default roots -2, 1 and 0.5 ± 1i give (x + 2)(x - 1)(x² - x + 1.25) = x⁴ - 1.75·x² + 3.25·x - 2.5, which is also the default typed polynomial, so switching how the polynomial is set shows the same one.
Where each input is set:
- On the canvas only: the root handles, dragged in the upper half of the plane in steps of 0.25 and snapping onto the real axis (arrow keys move a handle one step; Enter opens an exact entry); each root's multiplicity, cycled ×1 to ×4 by a tap or Space; the + root and - root buttons; the perturbation stepper under the plot, labelled with ε = 10⁻ᵖ; and, from the Experiment level, the chips for how the polynomial is set and for the method shown. None of these is in the input panel. The canvas refuses to drop a root on another root, and disables + root once the degree reaches 8.
- With challenge 1 only: your prediction: tap the root you think is most sensitive, then lock it in.
- In the input panel: the challenge number and, from the Experiment level, the degree and the coefficient table (Type coefficients only), the seed with a New seed button, and the step tolerance (one of 0.01, 0.001, 0.0001, 10⁻⁶ and 10⁻⁸; the model accepts any value from 10⁻¹⁴ to 0.01).
An input that does not apply (the coefficients while roots are dragged, the roots while coefficients are typed, the slots above the number of roots, or the prediction outside challenge 1) is neither checked nor used.
Governing relationships
The polynomial from its roots. A real root r with multiplicity m contributes the factor (x - r) m times; a root re + im·i above the axis brings its mirror image, and contributes the real quadratic factor x² - 2·re·x + (re² + im²) m times. The degree n is the sum of m over the real roots plus twice the sum over the others. The model multiplies the factors out one at a time. Because every root lies on the 0.25 grid, every product is exact, so the polynomial solved is exactly the one you drew, with leading coefficient 1.
Typed coefficients. With a_0 to a_n typed, the model divides by the leading coefficient, c_k = a_k/a_n, so in both modes it solves p(x) = c_0 + c_1·x + ... + x^n.
Evaluating p. The model evaluates p and its derivative p′ at a complex point by Horner's rule, from the highest coefficient down.
The shared start circle. The centre is c₀ = -c_(n-1)/n, the mean of the roots. The model rewrites p in powers of (x - c₀) (a Taylor shift with coefficients q_k) and takes the radius ρ as the largest of (|q_(n-k)|/C(n, k))^(1/k) for k = 1 to n, with C(n, k) the binomial coefficient; ρ is at least 0.25·max(1, |c₀|). The n start points are c₀ + ρ·(cos t_i + i·sin t_i), with t_i = 2π·(i - 1)/n + 0.7. The offset of 0.7 radians keeps the start points off the lines of symmetry where a method can stall.
Durand-Kerner. Every estimate moves at once, from the row above: z_i ← z_i - p(z_i) / Π_(j ≠ i) (z_i - z_j). If the product is exactly 0 the estimate holds for that step.
Aberth. With w_i = p(z_i)/p′(z_i) and s_i = Σ_(j ≠ i) 1/(z_i - z_j), every estimate moves at once: z_i ← z_i - w_i/(1 - w_i·s_i). The estimate holds for that step if p′(z_i), a difference z_i - z_j or the denominator is exactly 0. Aberth's step 40 gives the computed roots that every later result uses.
The step test. After step k, r_k is the largest over the roots of |z_i(k) - z_i(k-1)| / max(1, |z_i(k)|). A solve has settled at the first step with r_k at most the step tolerance; it still runs to its last step, which is the result. A solve's status is Collision if, at any step, two estimates are exactly equal; otherwise Settled or Not settled.
The condition number. For a computed root z, with N(t) = Σ |c_k|·t^k the size of the terms of p at |z| = t, the condition number is κ = N(|z|) / (|p′(z)|·max(1, |z|)). It measures how far the root moves, relative to its size for roots of size 1 or more and absolutely below that, per unit relative change of every coefficient. It is capped at 10¹²; a root where p′ is exactly 0 counts as above the cap. The relative residual of a root is |p(z)|/N(|z|).
Roots in order, groups and the most sensitive root. The root scale is S = max(1, the largest |z|). The roots are listed by real part (rounded to 6 decimals), then by imaginary part from the top down, so each pair sits together, upper member first. Two roots are in the same group of nearly repeated roots when they lie within 0.01·S of each other: each root takes the label of the first root within that distance. If that does not split the roots cleanly, the status says so. The most sensitive root is the first listed root whose condition number is within one part in a million of the largest.
The random nudges. The seed starts the minimal standard generator: s_t = 48,271·s_(t-1) mod (2³¹ - 1). The first two draws are discarded, and each later draw gives u = 2·s_t/(2³¹ - 1) - 1, strictly between -1 and 1. Each sample takes nine draws, one for each coefficient c_0 to c_8, whatever the degree.
The first-order cloud. For sample s (1 to 30) and each root z, the first-order shift is δz = -ε·Σ c_k·u_k·z^k / p′(z), which is how far z moves when every coefficient c_k becomes c_k·(1 + ε·u_k), to first order in ε. The point z + δz is left blank at a root in a group of nearly repeated roots, or one above the cap, where first-order theory fails.
The exact cloud. For samples 1 to 6 the model forms the nudged coefficients c_k·(1 + ε·u_k), the leading one included, and solves them again with 20 Aberth steps from the same start circle, each with its own step test and status. The cloud spread is the farthest any of these points lands from its nearest unperturbed root. The observed sensitivity is spread/(ε·S): root movement per unit relative coefficient change, in units of the root scale.
Roots leaving the real line. A root is off the real axis when its imaginary part is larger than 1×10⁻⁶·S in size. The model counts the roots off the axis in the first exact re-solve and subtracts those already off it, never going below 0.
The root-sum check. For any monic polynomial the roots add up to -c_(n-1). The model reports how far the sum of Durand-Kerner's final estimates is from it: near zero when the method has settled.
The plot window and the real-axis curve. The window is a square that covers 0, the computed roots, the start points, the exact cloud and the square from -2 to 2 in both directions, with a margin of 10% of its width (at least 0.25). The first-order cloud is not included. The real-axis curve samples p(x)/N(|x|) at 81 points across the window; it lies between -1 and 1, and a long flat stretch near zero is where roots are sensitive.
Calculation sequence
- The model checks the inputs that apply in the order of the status list under Errors and warnings, on the values entered.
- It fixes the values in use: in a challenge the challenge's own, except the inputs it leaves to you; otherwise yours.
- It builds the coefficients, exactly from the roots or from the typed values, and divides by the leading coefficient.
- It forms the start circle and runs Durand-Kerner and Aberth for 40 steps each, with their step tests.
- From Aberth's final roots it computes each condition number and residual, the display order, the groups and the most sensitive root, and the root-sum check from Durand-Kerner's.
- It draws the nudges from the seed, moves each root to first order for 30 samples, and solves 6 nudged polynomials again exactly.
- It reads the cloud spread, the observed sensitivity and the roots that left the real line, then the plot window and the real-axis curve.
- It sets the status and, in a challenge, scores it and holds back what the challenge keeps back.
Outputs and interpretation
- Degree of the polynomial solved: a root off the real axis counts twice.
- Durand-Kerner and Aberth: each one's status (Settled, Not settled or Collision) and the first step at which it settled, blank when it did not.
- Largest condition number (shown up to 10¹²), and the real part and the size of the imaginary part of the most sensitive root.
- Groups of nearly repeated roots and the radius of the widest group, blank when there is none.
- Perturbation size ε, the cloud spread, the observed sensitivity, the roots that left the real line in the first exact re-solve, and how many of the 6 exact re-solves settled.
- Root-sum check: near zero when Durand-Kerner has settled.
- Root table: each computed root in display order, with its condition number, the size of its group (blank for a single root) and its relative residual.
- Coefficient table: the coefficients a_k of the polynomial, k = 0 to the degree.
- The steps of the method shown: the 41 estimates (steps 0 to 40) of each root slot.
- The clouds: the first-order cloud, 30 points for each root, and the exact cloud, the roots of the 6 nudged polynomials, each marked Settled, Not settled or Collision.
- Real-axis curve: p(x) divided by the size of its terms at 81 points.
- Settings used: how the polynomial was set, the number of roots, the perturbation power, the seed, the step tolerance and the method shown (a challenge's own while one is selected), with the model and module versions.
Reading the canvas: the typeset polynomial sits above the plane. Your roots are dots you can drag, each with its mirror image and a ×m badge when repeated; the computed roots are rings; the start circle is dashed; and the path of each start point is drawn step by step by a player, coloured by start point. The exact cloud is drawn as filled dots and, from the Experiment level, the first-order cloud as small rings; a note says when the first-order cloud is left out at a repeated root. The Advanced level adds the real-axis curve as a chart, the root-sum check, the coefficient table and the settings used. The condition numbers, spreads and counts are results, never printed on the plane.
What to take from the lab: a root's sensitivity depends on where the roots sit relative to zero, not only on how close they are. Roots crowded together far from zero, like Wilkinson's 1 to 8, are very sensitive, because the coefficients barely notice small moves of them: a tiny relative change of the coefficients moves the middle roots far and can turn two real roots into a complex pair. The same spacing balanced around zero is far better behaved. A repeated root splits into a star of nearby roots under a nudge, and turns fast convergence into a slow crawl for both methods. Aberth usually settles in fewer steps than Durand-Kerner.
Challenges
Each challenge sets the polynomial by dragged roots with the seed 2026, the step tolerance 0.0001 and, except in challenge 3, the perturbation power 6, and fixes its own roots except the ones it leaves to you; the method shown is always yours. The model scores each one MET (100) or NOT MET (0) and gives a one-line hint while it is not met.
- Spot the most sensitive root (Explore). The eight roots 1 to 8. Before any condition numbers appear, tap the root you think moves the most when every coefficient changes by a tiny amount. Met when the condition number of the root you chose is within one part in a million of the largest. The value scored is its condition number over the largest.
- Make a root sensitive (Experiment). Six real roots, starting at -3, -1, 1, 3, 5 and 7. Drag them along the real line so that the most sensitive one has a condition number of at least one million. The value scored is the largest condition number.
- Knock roots off the line (Experiment). The roots 1 to 8 and the random draw are fixed. Find the smallest perturbation that still pushes a pair of roots off the real line in trial 1. Met when at least two roots leave the real line in the first exact re-solve and the perturbation is no larger than the smallest that does so for these roots and this draw. The value scored is the number of roots that left the line.
- Slow the solver down (Experiment). Three roots, starting at -2, 1 and 0.5 + 1i. Make Durand-Kerner need at least 20 steps to settle; you may move the three roots or tap one to repeat it. Met when Durand-Kerner settles at step 20 or later, or does not settle in 40 steps. The value scored is its settling step.
- Calm the roots (Advanced). Start from the roots 1 to 6. Slide them along the real line until every root has a condition number of at most 4. The value scored is the largest condition number.
Challenge 1 holds back the answer until you choose: while your prediction is blank, the largest condition number, the most sensitive root, the cloud spread, the observed sensitivity, the roots that left the real line, the value scored, the condition number and residual columns of the root table, both clouds and the real-axis curve are blank, and the page asks you to tap the root you think is most sensitive first. The root positions, the paths, the coefficients, the methods' statuses and steps, and the settings used stay. Any choice reveals everything, met or not. Challenges 2 to 5 hold nothing back: their results are feedback on your own roots or perturbation. Your prediction changes nothing outside challenge 1.
Validation and status logic
The status reads the first match in the list under Errors and warnings. The NOT VALID checks read the values you entered, only for the inputs that apply; inside a challenge its fixed values apply and are checked too. The checks on the roots and their degree apply when roots are dragged, those on the degree and coefficients when they are typed. The CHECK items read the run with the values in use and apply inside challenges too. A challenge number that is not a whole number from 0 to 5 is NOT VALID and counts as no challenge selected.
Assumptions and limitations
- Real coefficients only, degree 1 to 8. Dragged roots lie on the 0.25 grid with real parts from -10 to 10 and imaginary parts from 0 to 10; typed coefficients lie within ±1,000,000, with a leading coefficient of at least 0.001 in size.
- 40 Durand-Kerner and 40 Aberth steps, and 20 Aberth steps for each exact re-solve. Repeated roots converge only slowly, and rounding alone limits a root repeated m times to about the m-th root of the rounding error: a root repeated four times near 1 spreads over a radius of about 2×10⁻⁴ even with no nudge.
- The condition number is the first-order, coefficient-wise one measured against max(1, |z|), capped at 10¹². The first-order cloud holds only while the shift is small compared with the spacing of the roots, and is left out at repeated roots.
- Groups use one fixed distance, 1% of the root scale; a chain of near roots that cannot be grouped cleanly reads CHECK.
- Six exact re-solves and 30 first-order samples from one seeded draw; another seed gives another cloud.
- Condition numbers within one part in a million of the largest count as tied for the most sensitive root. A value within about 1×10⁻⁹ (relative) of a threshold, such as the step tolerance, the off-axis test, the group distance, the condition-number cap or a challenge target, may fall either side of it. Very sensitive roots, and the members of a repeated root, can differ in their later digits.
Restrictions and non-computing states
Under NOT VALID every result and every table is blank, except the model and module versions, the challenge status (No challenge selected, or NOT MET with a challenge selected), a score of 0, and the goal and hint of a selected challenge.
A solve that meets a collision holds the estimates concerned for that step and reads Collision. The first-order cloud is blank for a root in a group of nearly repeated roots or above the condition-number cap.
In challenge 1, until you choose, the results listed under Challenges are held back.
Errors and warnings
The status messages, first match wins:
- NOT VALID: choose how to set the polynomial from the list
- NOT VALID: the number of roots must be a whole number from 1 to 8 — roots dragged.
- NOT VALID: each root's real part must be from -10 to 10 in steps of 0.25 — each slot in use.
- NOT VALID: each root's imaginary part must be from 0 to 10 in steps of 0.25
- NOT VALID: each root's multiplicity must be a whole number from 1 to 4
- NOT VALID: two roots sit on the same point; tap one root to repeat it instead — two slots in use with equal real and imaginary parts.
- NOT VALID: these roots give degree D, above 8; a root off the real axis counts twice because its mirror image is a root too — D is the degree the roots give.
- NOT VALID: the degree must be a whole number from 1 to 8 — coefficients typed.
- NOT VALID: each coefficient must be a number from -1000000 to 1000000 — up to the degree.
- NOT VALID: the leading coefficient must be at least 0.001 in size
- NOT VALID: the perturbation power must be a whole number from 2 to 14
- NOT VALID: the seed must be a whole number from 1 to 2147483646
- NOT VALID: the step tolerance must be from 10⁻¹⁴ to 0.01
- NOT VALID: choose which method's steps to show from the list
- NOT VALID: the challenge number must be a whole number from 0 to 5, and in challenge 1 the guessed root a whole number from 1 to 8
- CHECK: two root estimates met at the same point, so a method stopped early; move a root slightly — a collision in Durand-Kerner or Aberth.
- CHECK: Aberth's method did not settle within 40 steps at this tolerance, so the roots shown may still be moving; repeated roots settle slowly
- CHECK: Durand-Kerner did not settle within 40 steps at this tolerance; repeated roots slow it down
- CHECK: k of the 6 exact re-solves did not settle within 20 steps, so some cloud points may not be final — k is the number that did not settle.
- CHECK: some roots sit so close together that they cannot be grouped cleanly
- OK
References
This laboratory is an educational model of how the roots of a real polynomial of degree 1 to 8 respond to small changes in its coefficients. The polynomial is either expanded exactly from roots placed on a 0.25 grid or typed as coefficients, and is scaled to leading coefficient 1. Starting from one shared circle of points, the Durand-Kerner (Weierstrass) and Aberth-Ehrlich iterations find every root in 40 fixed steps each, evaluating the polynomial and its derivative by Horner's rule. Each root found gets its coefficient-wise condition number, nearly repeated roots are grouped, and every coefficient is nudged by a seeded relative amount of size 10^-p drawn from the minimal standard random number generator: 30 nudges move each root to first order and six are re-solved exactly, so a cloud shows which roots are sensitive.
Sources and further reading
- Rounding errors in computations with polynomials: J. H. Wilkinson, Rounding Errors in Algebraic Processes, SIAM, 2023 (first published 1963), chapter 2, Computations Involving Polynomials. doi:10.1137/1.9781611977523
- Evaluating a polynomial by Horner's rule, and the accuracy of polynomial computations: N. J. Higham, Accuracy and Stability of Numerical Algorithms, 2nd edition, SIAM, 2002, chapter 5, Polynomials. doi:10.1137/1.9780898718027
- The simultaneous iteration that improves all the roots in each step: I. O. Kerner, "Ein Gesamtschrittverfahren zur Berechnung der Nullstellen von Polynomen", Numerische Mathematik 8(3), 1966, pages 290-294. doi:10.1007/BF02162564
- A derivation of the Durand-Kerner iteration, a faster method for all the zeros at once (the Aberth method), and a way to choose the starting points: O. Aberth, "Iteration methods for finding all zeros of a polynomial simultaneously", Mathematics of Computation 27(122), 1973, pages 339-344. doi:10.1090/S0025-5718-1973-0329236-7
- Computing polynomial zeros with Aberth's method in practice: D. A. Bini, "Numerical computation of polynomial zeros by means of Aberth's method", Numerical Algorithms 13(2), 1996, pages 179-200. doi:10.1007/BF02207694
- The minimal standard random number generator with modulus 2^31 - 1: S. K. Park and K. W. Miller, "Random number generators: good ones are hard to find", Communications of the ACM 31(10), 1988, pages 1192-1201. doi:10.1145/63039.63042
No table or text from any of these publications is reproduced, and none of their authors or publishers has reviewed or endorses this laboratory.
This laboratory is for learning. Its results hold only within its stated ranges; it is not a validated root-finding library, and repeated roots can be pinned down only to a limited number of digits.
Found a problem, or have an idea?
Tell us if a result looks wrong, a label is unclear, or something is missing. We read every message.