Abstract
We report on an accurate and efficient algorithm for obtaining all roots of general real cubic and quartic polynomials. Both the cubic and quartic solvers give highly accurate roots and place no restrictions on the magnitude of the polynomial coefficients. The key to the algorithm is a proper rescaling of both polynomials. This puts upper bounds on the magnitude of the roots and is very useful in stabilizing the root finding process. The cubic solver is based on dividing the cubic polynomial into six classes. By analyzing the root surface for each class, a fast convergent Newton-Raphson starting point for a real root is obtained at a cost no higher than three additions and four multiplications. The quartic solver uses the cubic solver in getting information about stationary points and, when the quartic has real roots, stable Newton-Raphson iterations give one of the extreme real roots. The remaining roots follow by composite deflation to a cubic. If the quartic has only complex roots, the present article shows that a stable Newton-Raphson iteration on a derived symmetric sixth degree polynomial can be formulated for the real parts of the complex roots. The imaginary parts follow by solving suitable quadratics.
Supplemental Material
Available for Download
Software for An Accurate and Efficient Cubic and Quartic Equation Solver for Physical Applications
- D. W. Arthur. 1972. Extension of Bairstow’s method for multiple quadratic factors. J. Inst. Math. Appl. 9 (1972), 194--197.Google ScholarCross Ref
- L. Bairstow. 1914. Investigations Relating to the Stability of the Aeroplane. Reports and Memoranda 154. National Advisory Committee for Aeronautics.Google Scholar
- B. Christianson. 1991. Solving quartics using palindromes. Math. Gaz. 75 (1991), 327--328.Google ScholarCross Ref
- J. Dexter and E. Agol. 2009. A fast new public code for computing photon orbits in a Kerr spacetime. Astrophys. J. 696 (2009), 1616--1629.Google ScholarCross Ref
- M. Fujiwara. 1916. Über die obere Schranke des absoluten Betrages der Wurzeln einer algebraischen Gleichung. Tohoku Math. J. 10 (1916), 167--171.Google Scholar
- G. H. Golub and C. F. Van Loan. 1990. Matrix Computations (2nd ed.). Johns Hopkins University Press, Baltimore, MD.Google Scholar
- S. Graillat, P. Langlois, and N. Louvet. 2009. Algorithms for accurate, validated and fast polynomial evaluation. Japan J. Indust. Appl. Math. 26 (2009), 2--3, 191--214.Google ScholarCross Ref
- D. Herbison-Evans. 1995. Solving quartics and cubics for graphics. In Graphics Gems V, A. Paeth (Ed.). Academic Press, Chesnut Hill, 3--15.Google Scholar
- M. A. Jenkins. 1975. Algorithm 493: Zeros of a real polynomial. ACM Trans. Math. Software 1, 2 (1975), 178--189. Google ScholarDigital Library
- M. A. Jenkins and J. F. Traub. 1970. A three-stage algorithm for real polynomials using quadratic iteration. SIAM J. Numer. Anal. 7 (1970), 545--566.Google ScholarDigital Library
- T. B. Kaiser. 2000. Laser ray tracing and power deposition on an unstructured three-dimensional grid. Phys. Rev. E 61 (2000), 895--905.Google ScholarCross Ref
- A. Lucia. 2010. A multiscale Gibbs-Helmholtz constrained cubic equation of state. J. Thermodyn. 2010, 1--10.Google Scholar
- J. M. McNamee. 1993. A bibliography on roots of polynomials. J. Comput. Appl. Math. 47 (1993), 391--394. Google ScholarDigital Library
- J. M. McNamee. 1999. An updated supplementary bibliography on roots of polynomials. J. Comput. Appl. Math. 110 (1999), 305--306. Google ScholarDigital Library
- D. A. McQuarrie and J. D. Simon. 1999. Molecular Thermodynamics. University Science Books, Sausalito, CA.Google Scholar
- S. Neumark. 1965. Solution of Cubic and Quartic Equations (1st ed.). Pergamon Press, Oxford.Google Scholar
- G. Peters and J. H. Wilkinson. 1971. Practical problems arising in the solution of polynomial equations. J. Inst. Math. Appl. 8 (1971), 16--35.Google ScholarCross Ref
- W. H. Press, S. A. Teukolsky, W. T. Vetterling, and B. P. Flannery. 2007. Numerical Recipes: The Art of Scientific Computing (3rd ed.). Cambridge University Press, New York, NY. Google ScholarDigital Library
- E. L. Rees. 1922. Graphical discussion of the roots of a quartic equation. Amer. Math. Monthly 29, 2 (1922), 51--55.Google ScholarCross Ref
- V. M. Shah, P. R. Bienkowski, and H. D. Cochran. 1994. Generalized quartic equation of state for pure nonpolar fluids. AIChE J. 40 (1994), 152--159.Google ScholarCross Ref
- S. L. Shmakov. 2011. A universal method of solving quartic equations. Int. J. Pure Appl. Math. 71 (2011), 251--259.Google Scholar
- P. Strohbach. 2010. The fast quartic solver. J. Comput. Appl. Math. 234 (2010), 3007--3024. Google ScholarDigital Library
- P. Strohbach. 2011. Solving cubics by polynomial fitting. J. Comput. Appl. Math. 235 (2011), 3033--3052. Google ScholarDigital Library
- F. Viéte. 1579. Opera Mathematica.Google Scholar
- Wolfram Research. 2011. Mathematica 8. Software.Google Scholar
- M. D. Yacoub and G. Fraidenraich. 2012. A solution of the general quartic equation. Math. Gaz. 96 (2012), 271--275.Google ScholarCross Ref
- Y.-K. Zhu and W. B. Hayes. 2010. Algorithm 908: Online exact summation of floating-point streams. ACM Trans. Math. Softw. 37, 3, Article 37 (Sept. 2010). Google ScholarDigital Library
Index Terms
- Algorithm 954: An Accurate and Efficient Cubic and Quartic Equation Solver for Physical Applications
Recommendations
Robust plotting of generalized lemniscates
A root neighborhood (or pseudozero set) of a degree-n polynomial p(z) is the set of roots of all polynomials P˜(z) whose coefficients differ from those of p(z), under a specified norm in Cn+1, by no more than a given amount ε. In the case of a weighted ...
Revisiting the problem of zeros of univariate scalar Béziers
This paper proposes a fast algorithm for computing the real roots of univariate polynomials given in the Bernstein basis. Traditionally, the polynomial is subdivided until a root can be isolated. In contrast, herein we aim to find a root only to ...
Existence of Pythagorean-hodograph quintic interpolants to spatial G 1 Hermite data with prescribed arc lengths
AbstractA unique feature of polynomial Pythagorean–hodograph (PH) curves is the ability to interpolate G 1 Hermite data (end points and tangents) with a specified total arc length. Since their construction involves the solution of a set of non–...
Comments