Fast computation of complete elliptic integrals and Jacobian elliptic functions

  • Toshio Fukushima
Original Article


As a preparation step to compute Jacobian elliptic functions efficiently, we created a fast method to calculate the complete elliptic integral of the first and second kinds, K(m) and E(m), for the standard domain of the elliptic parameter, 0 < m < 1. For the case 0 < m < 0.9, the method utilizes 10 pairs of approximate polynomials of the order of 9–19 obtained by truncating Taylor series expansions of the integrals. Otherwise, the associate integrals, K(1 − m) and E(1 − m), are first computed by a pair of the approximate polynomials and then transformed to K(m) and E(m) by means of Jacobi’s nome, q, and Legendre’s identity relation. In average, the new method runs more-than-twice faster than the existing methods including Cody’s Chebyshev polynomial approximation of Hastings type and Innes’ formulation based on q-series expansions. Next, we invented a fast procedure to compute simultaneously three Jacobian elliptic functions, sn(u|m), cn(u|m), and dn(u|m), by repeated usage of the double argument formulae starting from the Maclaurin series expansions with respect to the elliptic argument, u, after its domain is reduced to the standard range, 0 ≤ u < K(m)/4, with the help of the new method to compute K(m). The new procedure is 25–70% faster than the methods based on the Gauss transformation such as Bulirsch’s algorithm, sncndn, quoted in the Numerical Recipes even if the acceleration of computation of K(m) is not taken into account.


Numerical methods Complete elliptic integrals Jacobian elliptic functions Nome expansion Innes’ method Encke’s method 


  1. Abad A., Belizon F.: Application of the Gauss’ method to the stellar three body problem. Celest. Mech. Dyn. Astron 68, 43–51 (1997)zbMATHCrossRefADSGoogle Scholar
  2. Abramowitz, M., Stegun, I.A. (eds.): Handbook on Mathematical Functions with Formulas, Graphs, and Mathematical Tables, Chapter 17. Dover, New York, tenth GPO printing (1964)Google Scholar
  3. Alberti A., Vidal C.: Dynamics of a particle in a gravitational field of a homogeneous annulus disk. Celest. Mech. Dyn. Astron 98, 75–93 (2007)zbMATHCrossRefMathSciNetADSGoogle Scholar
  4. Barkin Yu.V.: Unperturbed chandler motion and perturbation theory of the rotation motion of deformable celestial bodies. Astron. Astrophys. Trans. 17, 179–219 (1999)ADSGoogle Scholar
  5. Brasser R.: Some properties of a two-body system under the influence of the galactic tidal field. Mon. Not. R. Astron. Soc. 324, 1109–1116 (2001)CrossRefADSGoogle Scholar
  6. Breiter S., Buciora M.: Explicit symplectic integrator for rotating satellites. Celest. Mech. Dyn. Astron. 77, 127–137 (2000)zbMATHCrossRefMathSciNetADSGoogle Scholar
  7. Brumberg V.A., Brumberg E.: Elliptic anomaly in constructing long-term and short-term dynamical theories. Celest. Mech. Dyn. Astron. 80, 159–166 (2001)zbMATHCrossRefADSGoogle Scholar
  8. Brumberg E., Fukushima T.: Expansions of elliptic motion based on elliptic function theory. Celest. Mech. Dyn. Astron. 60, 69–89 (1994)zbMATHCrossRefMathSciNetADSGoogle Scholar
  9. Bulirsch R.: Numerical computation of elliptic integrals and elliptic functions. Numer. Math. 7, 78–90 (1965a)zbMATHCrossRefMathSciNetGoogle Scholar
  10. Bulirsch R.: Numerical computation of elliptic integrals and elliptic functions II. Numer. Math. 7, 353–354 (1965b)zbMATHCrossRefMathSciNetGoogle Scholar
  11. Bulirsch R.: An extension of the Bartky-transformation to incomplete elliptic integrals of the third kind. Numer. Math. 13, 266–284 (1969a)zbMATHCrossRefMathSciNetGoogle Scholar
  12. Bulirsch R.: Numerical computation of elliptic integrals and elliptic functions III. Numer. Math. 13, 305–315 (1969b)zbMATHCrossRefMathSciNetGoogle Scholar
  13. Byrd P.F., Friedman M.D.: Handbook on Elliptic Integrals for Engineers and Physicistsm, 2nd edn. Springer, Berlin (1971)Google Scholar
  14. Carlson B.C.: Elliptic integrals of the first kind. SIAM J. Math. Anal. 8, 231–242 (1977)zbMATHCrossRefMathSciNetGoogle Scholar
  15. Carlson B.C.: Short proofs of three theorems on elliptic integrals. SIAM J. Math. Anal. 9, 524–528 (1978)zbMATHCrossRefMathSciNetGoogle Scholar
  16. Carlson B.C.: Computing elliptic integrals by duplication. Numer. Math. 33, 1–16 (1979)zbMATHCrossRefMathSciNetGoogle Scholar
  17. Carlson B.C., Notis E.M.: Algorithm 577. Algorithms for incomplete elliptic integrals. ACM Trans. Math. Softw. 7, 398–403 (1981)zbMATHCrossRefGoogle Scholar
  18. Cavas J.A., Vigueras A.: An integrable case of a rotational motion analogous to that of Lagrange and Poisson for a gyrostat in a newtonian force field. Celest. Mech. Dyn. Astron. 60, 317–330 (1994)zbMATHCrossRefMathSciNetADSGoogle Scholar
  19. Chapront J., Simon J.-L.: Planetary theories with the aid of the expansions of elliptic functions. Celest. Mech. Dyn. Astron. 63, 171–188 (1996)zbMATHADSGoogle Scholar
  20. Cody W.J.: Chebyshev approximations for the complete elliptic integrals K and E. Math. Comp. 19, 105–112 (1965a)zbMATHCrossRefMathSciNetGoogle Scholar
  21. Cody W.J.: Chebyshev polynomial expansions of complete elliptic integrals K and E. Math. Comp. 19, 249–259 (1965b)zbMATHCrossRefMathSciNetGoogle Scholar
  22. Cody W.J.: Corrigenda: Chebyshev approximations for the complete elliptic integrals K and E. Math. Comp. 20, 207 (1966)CrossRefGoogle Scholar
  23. Conway J.T.: Analytical solutions for the Newtonian gravitational field induced by matter within axisymmetric boundaries. Mon. Not. R. Astron. Soc. 316, 540–554 (2000)CrossRefADSGoogle Scholar
  24. El-Sabaa F.M.F.: Periodic solutions in the Kovalevskaya case of a rigid body in rotation about a fixed point. Astrophys. Space Sci. 193, 309–315 (1992)zbMATHCrossRefMathSciNetADSGoogle Scholar
  25. Elipe A., Lanchares V.: Exact solution of a triaxial gyrostat with one rotor. Celest. Mech. Dyn. Astron. 101, 49–68 (2008)zbMATHCrossRefMathSciNetADSGoogle Scholar
  26. Erdi B., Kovacs J.: A fourth-order solution of the ideal resonance. Celest. Mech. Dyn. Astron. 56, 221–230 (1993)zbMATHCrossRefADSGoogle Scholar
  27. Fukushima T.: Generalization of Encke’s method and its application to the orbital and rotational motions of celestial bodies. Astron. J. 112, 1263–1277 (1996)CrossRefADSGoogle Scholar
  28. Fukushima T.: Simple, regular, and efficient numerical integration of rotational motion. Astron. J. 135, 2298–2322 (2008a)CrossRefADSGoogle Scholar
  29. Fukushima T.: Gaussian element formulation of short-axis-mode rotation of a rigid body. Astron. J. 136, 649–653 (2008b)CrossRefADSGoogle Scholar
  30. Fukushima T.: Canonical and universal elements of rotational motion of triaxial rigid body. Astron. J. 136, 1728–1735 (2008c)CrossRefADSGoogle Scholar
  31. Fukushima T.: Fast computation of Jacobian elliptic functions and incomplete elliptic integrals for constant values of elliptic parameter and elliptic characteristic. Celest. Mech. Dyn. Astron. 105, 245–260 (2009a)CrossRefGoogle Scholar
  32. Fukushima T.: Efficient solution of initial-value problem of torque-free rotation. Astron. J. 137, 210–218 (2009b)CrossRefADSGoogle Scholar
  33. Gair J.R.: Spherical universes with anisotropic pressure. Class. Quantum Grav. 18, 4897–4919 (2001)zbMATHCrossRefMathSciNetADSGoogle Scholar
  34. Halburd R.: Solvable models of relativistic charged spherically symmetric fluids. Class. Quantum Grav. 18, 11–25 (2001)zbMATHCrossRefMathSciNetADSGoogle Scholar
  35. Hastings C. Jr: Approximations for Digital Computers. Princeton University Press, Princeton (1955)zbMATHGoogle Scholar
  36. Hellstrom C., Mikkola S.: Satellite attitude dynamics and estimation with the implicit midpoint method. New Astron. 14, 467–477 (2009)CrossRefADSGoogle Scholar
  37. Hure J.-M.: Solutions of the axi-symmetric Poisson equation for elliptic integrals I. Numerical splitting methods. Astron. Astrophys. 434, 1–15 (2005)CrossRefADSGoogle Scholar
  38. Hure J.-M., Hersant F., Carreau C., Busset J.-P.: A new equation for the mid-plane potential of power-law discs II. Exact solutions and approximate formulae. Astron. Astrophys. 490, 477–486 (2008)zbMATHCrossRefADSGoogle Scholar
  39. Hure J.-M., Pierens A., Hersant F.: Self-gravity at the scale of the polar cell. Astron. Astrophys. 500, 617–620 (2009)zbMATHCrossRefADSGoogle Scholar
  40. Innes R.T.A.: Jacobi’s Nome (q) in astronomical formulae with numerical tables. Mon. Not. R. Astron. Soc. 62, 494–503 (1902)ADSGoogle Scholar
  41. Kinoshita H.: Analytical expansions of torque-free motions for short and long axis modes. Celest. Mech. Dyn. Astron. 53, 365–375 (1992)zbMATHCrossRefADSGoogle Scholar
  42. Krogh F.T., Ng E.W., Snyder W.V.: The gravitational field of a disk. Celest. Mech. 26, 395–405 (1982)zbMATHCrossRefMathSciNetADSGoogle Scholar
  43. Maharaj S.D., Leach P.G.L., Maartens R.: Expanding spherically symmetric models without shear. Gen. Relativ. Grav. 28, 35–50 (1996)zbMATHCrossRefMathSciNetADSGoogle Scholar
  44. Moshier, S.L.: Cephes math library: release 2.8. (2000)
  45. Musen P.: A discussion of Hill’s method of secular perturbation and its application to the determination of the zero-rank effects in non-singular vectorial elements of a planetary motion. Celest. Mech. 2, 41–59 (1970)zbMATHCrossRefMathSciNetADSGoogle Scholar
  46. Nieves-Chinchilla T., Vinas A.-F., Hidalgo M.A.: Magnetic field profiles within magnetic clouds: a model-approach. Earth Moon Planets 104, 109–113 (2009)zbMATHCrossRefADSGoogle Scholar
  47. Nolan B.C.: A point mass in an isotropic universe: existence, uniqueness, and basic properties. Phys. Rev. D 58(064006), 1–10 (1998)MathSciNetGoogle Scholar
  48. Osborne M.R., Smyth K.: A modified Prony algorithm for fitting functions defined by difference equations. SIAM J. Sci. Stat. Comput. 12, 362–382 (1991)zbMATHCrossRefMathSciNetGoogle Scholar
  49. Pierens A., Hure J.-M.: Rotation curves of galactic disks for arbitrary surface density profiles: a simple and efficient recipes. Astrophys. J. 605, 179–182 (2004)CrossRefADSGoogle Scholar
  50. Pierens A., Hure J.-M.: Solutions of the axi-symmetric Poisson equation for elliptic integrals II. Semi-Anal. Approach. Astron. Astrophys. 434, 17–23 (2005)CrossRefADSGoogle Scholar
  51. Poleshchikov S.M.: One integrable case of the perturbed two-body problem. Cosmic. Res. 42, 398–407 (2004)CrossRefADSGoogle Scholar
  52. Press W.H., Flannery B.P., Teukolsky S.A., Vetterling W.T.: Numerical Recipes: The Art of Scientific Computing. Cambridge University Press, Cambridge (1986)Google Scholar
  53. Press W.H., Teukolsky S.A., Vetterling W.T., Flannery B.P.: Numerical Recipes: The Art of Scientific Computing, 3rd edn. Cambridge University Press, Cambridge (2007)zbMATHGoogle Scholar
  54. Scheeres D.J., Hu W.: Secular motion in a 2nd degree and order-gravity field with rotation. Celest. Mech. Dyn. Astron. 79, 183–200 (2001)zbMATHCrossRefADSGoogle Scholar
  55. Sussman R.A., Triginer J.: Exact solutions of Einstein’s equations with ideal gas sources. Class. Quantum Grav. 16, 167–187 (1999)zbMATHCrossRefMathSciNetADSGoogle Scholar
  56. Varvoglis H., Vozikis C., Wodnar K.: The two fixed centers: an exceptional integrable system. Celest. Mech. Dyn. Astron. 89, 343–356 (2004)zbMATHCrossRefMathSciNetADSGoogle Scholar
  57. van de Ven G., Hunter C., Verolme E.K., de Zeeuw P.T.: General solution of the Jeans equations for triaxial galaxies with separable potentials. Mon. Not. R. Astron. Soc. 342, 1056–1082 (2003)CrossRefADSGoogle Scholar
  58. Viergutz S.U.: Image generation in Kerr Geometry I. analytical investigations on the stationary emitter-observer problem. Astron. Astrophys. 272, 355–375 (1993)MathSciNetADSGoogle Scholar
  59. Vokrouhlicky D., Karas V.: A star orbiting around a supermassive rotating black hole: free motion and corrections due to star-disc collisions. Mon. Not. R. Astron. Soc. 265, 365–378 (1993)ADSGoogle Scholar
  60. Wolfram S.: The Mathematica Book, 5th edn. Wolfram Research Inc./Cambridge University Press, Cambridge (2003)Google Scholar

Copyright information

© Springer Science+Business Media B.V. 2009

Authors and Affiliations

  1. 1.National Astronomical Observatory of JapanMitaka, TokyoJapan

Personalised recommendations