The Solution
Calculation: Roots Relationship Calculator
Roots Relationship Calculator
Enter your polynomial coefficients above and click "Analyze Root Relationships" to see results.Cubic Equation Solver
Find real and complex roots, discriminant, and cubic graphs in seconds with our precision solver.
Provide coefficients to analyze distances, spread, and algebraic relationships between all three roots.
Calculation: Roots Relationship Calculator
Roots Relationship Calculator
Enter your polynomial coefficients above and click "Analyze Root Relationships" to see results.The Treatise
The Formula
The Method
The Illustration
The Deep Dive
The gaps and the discriminant are the same information in two costumes. The identity Δ = a⁴(r₁ − r₂)²(r₁ − r₃)²(r₂ − r₃)² says the discriminant is the leading coefficient's fourth power times the squared product of the three gaps. In the worked example above, gaps 1, 2, 3 give Δ = (1 × 2 × 3)² = 36, exactly what the five-term formula produces. This is why a tiny gap is dangerous: it drives one squared factor toward zero, collapsing the discriminant and signaling that the roots are nearly colliding.
The centroid needs no root-finding, and Vieta's formulas explain why. Since r₁ + r₂ + r₃ = −b/a, dividing by three gives −b/3a immediately. But −b/3a is also the x-coordinate of the inflection point and the midpoint between the turning points. Three different concepts, one number. Geometrically it says the root cluster is always centered on the curve's center of symmetry, no matter how lopsided the individual gaps look. The Vieta's formulas calculator walks through the coefficient identities behind this coincidence.
Near-multiple roots are numerically treacherous, and gap analysis is the early warning system. When two roots sit within, say, 10⁻⁶ of each other, a microscopic change in a coefficient can merge them into a double root or split them into a complex pair, flipping the discriminant sign. Iterative solvers slow down near such clusters because the function is nearly flat there, and rounding errors get amplified. If this tool reports a gap smaller than about the square root of your working precision, treat the computed roots as approximate and consider reformulating the problem, perhaps via the depressed cubic form which is often better conditioned.
Complex roots have relationships too, measured in the complex plane. For a cubic with one real root and a conjugate pair u ± iv, the pair sits 2|v| apart vertically, while each sits √((r − u)² + v²) from the real root. Take x³ − 1 = 0: roots 1 and −1/2 ± i√3/2. The complex pair is √3 ≈ 1.732 apart, and each is √((3/2)² + (√3/2)²) = √3 from the real root 1, an elegant equilateral triangle in the complex plane. The complex roots calculator finds these geometries exactly.
Spread and standard deviation are two dialects for the same idea: how scattered the roots are. The spread r₃ − r₁ is the simplest, the full width of the cluster. The standard deviation weights the middle root too, giving a smoother measure that statisticians prefer. For the roots 1, 2, 4, the spread is 3 while the standard deviation is about 1.25. Both grow when the cluster loosens and shrink toward zero as roots collide. In uncertainty quantification, the spread of possible roots under coefficient perturbations tells you how much to trust each computed value, which is the practical payoff of the whole analysis.
The Applications
When a design parameter satisfies a cubic, the root gaps tell the engineer how much slack exists before two operating points merge. Wide gaps mean the design tolerates manufacturing variation; narrow gaps mean a tiny drift flips the system into a different regime. Tolerance budgets are set from these numbers.
Software that solves cubics internally, from CAD kernels to physics engines, monitors root gaps to choose algorithms. Well-separated roots get fast iterative methods; clustered roots trigger careful high-precision paths. The gap report is the triage step that keeps the solver both fast and correct.
A cubic potential energy curve has equilibria at its roots, and the gaps between them set the energy barriers a particle must cross. Widely spaced equilibria mean deep, stable wells; closely spaced ones mean the system can hop between states with a nudge. Phase stability analysis starts with these distances.
The poles of a third-order control system are the roots of its characteristic cubic, and their spacing shapes the response. Well-separated real poles give a clean, predictable settling; clustered or complex poles bring oscillation and overshoot. Pole placement design is, at heart, root-gap design.
Cubic models of returns can yield three break-even scenarios: pessimistic, central, and optimistic. The gaps between them measure how distinct the scenarios really are. If two scenarios sit nearly on top of each other, the model is effectively saying the same thing twice, and the plan should be simplified.
The Cautions
Ignoring complex root distances: A cubic with one real root still has three pairwise distances; two of them live in the complex plane. Forgetting them discards most of the relationship data.
Assuming equal spacing: Roots are rarely evenly spaced. The centroid is the average, not the middle root, and the gaps 1, 2, 3 in the example show how lopsided real cases are.
Forgetting the centroid: The average of the roots is free from Vieta: −b/(3a). Skipping it misses the anchor that ties the cluster to the inflection point.
Confusing spread with function range: Spread measures how far apart the roots sit on the x-axis, not how tall the curve gets. A wide root spread can coexist with a flat-looking graph.
Using rounded roots for gaps: Subtracting rounded root values amplifies the rounding error in the gap. Compute gaps from full-precision roots, then round the answer, not the inputs.
The Reference
The Questions
A repeated root: two roots coincide exactly. The discriminant will be zero in that case.
Yes. Distances are measured in the complex plane, so a conjugate pair 2|v| apart is perfectly meaningful. See the complex roots calculator.
Yes. Changing d slides the graph vertically, which moves the roots and reshapes every gap. Only the centroid's formula stays fixed in form.
Tiny gaps mean the roots are numerically fragile: small coefficient changes swing them wildly. Wide gaps mean stable, trustworthy roots.
The discriminant is essentially the squared product of the three gaps times a⁴. Wide gaps give a large positive discriminant; shrinking gaps drive it toward zero.
Not generally. The centroid is the average of all three, which equals −b/(3a). For roots 1, 2, 4 the centroid is 7/3 ≈ 2.333, while the middle root is 2.
No. Gaps are absolute distances, always non-negative. The ordering r₁ ≤ r₂ ≤ r₃ keeps every reported gap positive or zero.
Three pairs: (r₁,r₂), (r₂,r₃), and (r₁,r₃). The last one is the total spread, always the largest of the three.