Solving the Cubic: A Modular Algorithm
Anyone who has tried to teach the cubic formula runs into the same obstacle: written out in full, Cardano's solution is an intimidating tangle of nested square and cube roots, and even when every root is real, getting there sometimes requires passing through complex numbers (the casus irreducibilis). The formula is easy to state and hard to teach, since a single sign error anywhere in the expression can derail the rest of the calculation with no way to catch it early. We show that reframing François Viète's classical substitution as five short, separately checkable steps turns the same mathematics into something a class can work through together: each step produces one concrete, checkable number; the sign of the discriminant tells a student in advance whether complex arithmetic is coming; and a final step recovers all three roots rather than just one. We go beyond the standard textbook treatment in ways of direct use in the classroom: we prove that the procedure is correct regardless of an arbitrary branch choice made along the way; we show precisely how much of the classical difficulty is genuinely removed rather than merely repackaged; we derive, and prove exactly equivalent to the main algorithm, a fully real trigonometric alternative for the casus irreducibilis that avoids complex arithmetic altogether; and we supply a complete, stress-tested Python implementation and a fully worked numerical example, suitable for direct use in a lesson or a programming exercise. ```[span_4](start_span)[span_4](end_span) --- ### Keywords & Subjects * **Keywords:** `Cubic equation`, `Cardano's formula`, `Viète's substitution`, `Tschirnhaus transformation`, `Casus irreducibilis`, `Branch invariance`, `Polynomial root-finding`, `Numerical stability`, `Mathematics education`, `Python algorithm`[span_5](start_span)[span_5](end_span) * **Subject / Classification (MSC 2020):** * `Primary: 12-01 (Instructional exposition of field theory and polynomials)`[span_6](start_span)[span_6](end_span) * `Secondary: 01A40 (16th century mathematics)`[span_7](start_span)[span_7](end_span) * `Secondary: 01A45 (17th century mathematics)`[span_8](start_span)[span_8](end_span) * `Secondary: 65H04 (Numerical computation of roots of polynomial equations)`[span_9](start_span)[span_9](end_span) --- ### License & Access Rights * **Access right:** `Open Access` * **License:** `Creative Commons Attribution 4.0 International (CC-BY-4.0)` *(Standard open-access default for academic preprints)* --- ## 3. Recommended Optional Additions * **Related Identifiers (Code Repository):** If you have uploaded the Python script from Section 11 to a public GitHub repository, add the repository URL under **Related works** with the relation `is supplemented by`[span_10](start_span)[span_10](end_span). * **Communities:** You can search for and submit to relevant Zenodo communities (such as *Mathematics Education* or *Open Science Preprints*) for increased visibility.
Authors
- Adhrit Mohan Sahai
Publication Details
- Journal
- Zenodo (CERN European Organization for Nuclear Research)
- Published
- 2026-08-26
- DOI
- https://doi.org/10.5281/zenodo.22105693
- Primary Topic
- History and Theory of Mathematics
- Type
- preprint