Skip to main content
Journal of Research of the National Institute of Standards and Technology logoLink to Journal of Research of the National Institute of Standards and Technology
. 2002 Oct 1;107(5):413–418. doi: 10.6028/jres.107.034

Three Improvements in Reduction and Computation of Elliptic Integrals

B C Carlson 1
PMCID: PMC4861378  PMID: 27446741

Abstract

Three improvements in reduction and computation of elliptic integrals are made. 1. Reduction formulas, used to express many elliptic integrals in terms of a few standard integrals, are simplified by modifying the definition of intermediate “basic integrals.” 2. A faster than quadratically convergent series is given for numerical computation of the complete symmetric elliptic integral of the third kind. 3. A series expansion of an elliptic or hyperelliptic integral in elementary symmetric functions is given, illustrated with numerical coefficients for terms through degree seven for the symmetric elliptic integral of the first kind. Its usefulness for elliptic integrals, in particular, is important.

Keywords: computational algorithm, elementary symmetric function, elliptic integral, hyperelliptic integral, hypergeometric R-function, recurrence relations, series expansion

Foreword

Elliptic integrals have many applications, for example in mathematics and physics:

  • arclengths of plane curves (ellipse, hyperbola, Bernoulli’s lemniscate)

  • surface area of an ellipsoid in 3-dimensional space

  • electric and magnetic fields associated with ellipsoids

  • periodicity of anharmonic oscillators

  • mutual inductance of coaxial circles

  • age of the universe in a Friedmann model

These applications are mentioned in the chapter on elliptic integrals, written by B. C. Carlson, that will appear in the NIST Digital Library of Mathematical Functions.

The DLMF is scheduled to begin service in 2003 from a NIST Web site. A hardcover book will be published also. These resources will provide a complete guide to the higher mathematical functions for use by experienced scientific professionals. The book will provide mathematical formulas, references to proofs, references to extensions and generalizations, graphs, brief descriptions of computational methods, a survey of useful published tables, and sample applications. The Web site will include, in addition, interactive visualizations of 3-dimensional surfaces, a mathematics-aware search engine, a downloading capability for equations, live links to Web sites that provide mathematical software, and a limited facility for generating tables on demand.

The DLMF is modeled after the Handbook of Mathematical Functions, published in 1964 by the National Bureau of Standards with M. Abramowitz and I. A. Stegun as editors. This handbook has been enormously successful: it has sold more than 500,000 copies, its sales remain high, and it is very frequently cited in journal articles in physics and many other fields. But new properties of the higher functions have been developed, and new functions have risen in importance in applications, since the publication of the Abramowitz and Stegun handbook. More than half of the old handbook was devoted to tables, now made obsolete by the revolutionary improvements since 1964 in computers and software. The need for a modern reference is being filled by more than 30 expert authors who are working under contract to NIST and supervised by four NIST editors. The writing is being edited carefully to assure consistent style and level of content.

Elliptic integrals have long been associated with the name of Legendre. Legendre’s incomplete elliptic integrals are

F(ϕ,k)=0ϕdθ1k2sin2θ,E(ϕ,k)=0ϕ1k2sin2θdθ,

and

(ϕ,α2,k)=0ϕdθ1k2sin2θ(1α2sin2θ).

The complete forms of these integrals are obtained by setting ϕ = π/2.

Over a period of more than 35 years, Carlson has published a series of papers that provide valuable new mathematical and computational foundations for the subject in terms of the symmetric elliptic integrals

RF(x,y,z)=120dts(t),RD(x,y,z)=320dts(t)(t+z),RJ(x,y,z,p)=320dts(t)(t+p),

where

s(t)=t+xt+yt+z.

The complete forms are obtained by setting x = 0. In comparison with Legendre’s integrals, Carlson’s integrals simplify the reduction of general elliptic integrals to standard forms and open the way to efficient computations by application of a duplication theorem.

One of the purposes of the DLMF project is to stimulate research into the theory, computation and application of the higher mathematical functions. The paper which follows is an example. It is a further development of material that appears in Carlson’s DLMF chapter on elliptic integrals.

Daniel W. Lozier

NIST Mathematical and Computational Sciences Division

1. Simplified Formulas for Reducing Elliptic Integrals

A large class of elliptic integrals can be written in the form

I(m)=yxi=1h(ai+bit)1/2j=1n(aj+bjt)mjdt, (1.1)

where m = (m1, …, mn) is an n-tuple of integers (positive, negative or zero), x > y, h = 3 or 4, nh, and the different linear factors are not proportional. The a’s and b’s may be complex (with the b’s not equal to zero), but the integral is assumed to be well defined, possibly as a Cauchy principal value. In particular the line segment with endpoints ai + bix and ai + biy is assumed to lie in the cut plane \(,0)for 1 ≤ ih.

We write m=j=1nmjej, where ej is an n-tuple with 1 in the j th position and 0’s elsewhere, and we define 0 = (0, …, 0). Reference [1] gives a general method of reducing I (m) to a linear combination of “basic integrals,” defined as I (0), I (−ej), 1 ≤ jn, and (if h = 4) I (ek), 1 ≤ k ≤ 4. A simple example of such a reduction is

biI(ejei)=djiI(ei)+bjI(0),i,j{1,,n}, (1.2)

where dji = ajbiaibj. This equation reduces all 36+72 integrals in Ref. [2], Eqs. (3.142) and (3.168) and also the 18 integrals in Ref. [2], Eq. (3.159) after taking x2 as a new variable of integration. The basic integrals are expressed in terms of symmetric standard integrals RF, RD, and RJ in Ref. [1], Sec. 4.

The general method first reduces I (m) by Ref. [1], Eq. (2.19) to integrals in which m has at most one nonzero component and then uses two recurrence relations Ref. [1] Eqs. (3.5) and (3.11) for further reduction to basic integrals. For example, the simplest recurrence relation is Ref. [1], Eq. (3.11):

biqI(qej)=r=0q(qr)bjrdjtqrI(rei),q. (1.3)

The b’s appear also in the other two formulas and therefore in all reduction formulas, sometimes in great profusion if m is considerably more complicated than in Eq. (1.2).

It has been found that the b’s disappear from all three formulas, and therefore from all reduction formulas, if we define

I^(m)=I(m/B),A^(m)=A(m)/B,B=j=1nbjmj,rij=dijbibj=aibiajbj. (1.4)

Here A (m) is the algebraic function

A(m)=fm(x)fm(y), (1.5)

where fm(t) is the integrand of Eq. (1.1). Note that Î(0) = I(0).

For example, Eq. (1.2) becomes

I^(ejei)=rjiI^(ei)+I(0), (1.6)

and Eq. (1.3) becomes

I^(qej)=r=0q(qr)rjiqrI^(rei),q. (1.7)

The other recurrence relation, Ref. [1], Eq. (3.5), becomes

r=0h(2q+r)Ehr(r1j,,rhj)I^((q1+r)ej)=2A^(qej+i=1hei),q,1jn (1.8)

where Ehr is the elementary symmetric function defined by

i=1h(1+trij)=k=0htkEk(r1j,rhj), (1.9)

whence Eh = 0 if 1 ≤ jh because rjj = 0.

The remaining formula, Ref. [1], Eq. (2.19), becomes

I^(m)=q=0MC^Mq(k)I^(qek)+i=1nΔiq=1miC^mi+q(i)I^(qei), (1.10)

where M=j=1nmj and each sum is empty if its upper limit is less than its lower limit. The first term on the right is independent of k, which is usually best chosen so that 1 ≤ kh. The coefficients are defined by

Δi=j=1jinrjimj,C^0(i)=1,C^±s(i)=η±1α1(i)η±sαs(i)α1!αs!,η±p(i)=1pj=1jinmjrij±p,p1, (1.11)

where upper (lower) signs go together and the first sum extends over all nonnegative integers α1, …, αs such that α1 + 2 α2 + … + s = s. A recurrence relation for the coefficients is

sC^±s(i)=p=1spη±p(i)C^±(sp)(i),s1. (1.12)

2. Algorithms for Complete Elliptic Integrals of the Third Kind

Complications formerly encountered in numerical computation of Legendre’s complete elliptic integral of the third kind were avoided by defining and tabulating Heuman’s Lambda function (for circular cases) and a modification of Jacobi’s Zeta function (for hyperbolic cases). For example, the method of Ref. [3] was later superseded by Bartky’s transformation and its application by Bulirsch [4] to his complete integral cel (kc, p, a, b). Bartky’s transformation for the complete case of the symmetric integral of the third kind, obtained from Ref. [5], Eq. (4.14) with the help of

(3π/4)RL(y,z,p)=3RF(0,y,z)pRJ(0,y,z,p),(π/2)RK(y,z)=RF(0,y,z), (2.1)

can be written as

RJ(0,gn2,an2,pn2)=snRJ(0,gn+12,an+12,pn+12)+(3/2pn2)RF(0,gn+12,an+12), (2.2)

where an, gn, pn are positive, Sn=(pn4an2gn2)/8pn4 and

an+1=an+gn2,gn+1=angn,pn+1=pn2+angn2pn,n. (2.3)

As n → ∞, an and gn converge quadratically to Gauss’s arithmetic-geometric mean, M (a0, g0), and

RF(0,gn2,an2)=π/2M(a0,g0),n, (2.4)

by Ref. [6], Eqs. (6.10–8) and Eq. (2.1). It follows from (2.3) that

pn+1gn+1=(pngn+1)2/2pn. (2.5)

Since gn+1 converges quadratically to M(a0, g0), so does pn, and sn converges quadratically to 0. Iteration of Eq. (2.2) gives

RJ(0,g02,a02,p02)=Qnpn2p02RJ(0,gn2,an2,pn2)+3π4p02M(a0,g0)m=0n1Qm, (2.6)

where

Q0=1,Qmp02=s0s1sm1pm2,m1, (2.7)

and therefore

Qn+1Qn=snpn2pn+12=12pn2angnpn2+angn. (2.8)

Letting n → ∞ in Eq. (2.6), we find, for positive a0, g0, p0,

RJ(0,g02,a02,p02)=3π4p02M(a0,g0)n=0Qn,Q0=1,Qn+1=12Qnϵnϵn=pn2angnpn2+angn, (2.9)

where ϵn converges to 0 quadratically and Qn converges to 0 faster than quadratically.

If p0 = a0, Eq. (2.9) becomes

RD(0,g02,a02)=3π4a02M(a0,g0)n=0Qn,Q0=1,Qn+1=12Qnϵn,ϵn=angnan+gn, (2.10)

where RD is a complete integral of the second kind, symmetric in only its first two arguments. If 0 < a0g0 then −1 < ϵ0 ≤ 0, but ϵn ≥ 0 and Qn 0 for n ≥ 1.

If the last variable of RJ is negative, the Cauchy principal value is given by

(q02+a02)RJ(0,g02,a02,q02)=(p02a02)RJ(0,g02,a02,p02)3π2M(a0,g0),p02=a02(q02+g02)/(q02+a02), (2.11)

where we have used Eq. (2.4) and chosen xi=a02 in Ref. [7], Eq. (4.6). Substitution of Eq. (2.9) gives

RJ(0,g02,a02,q02)=3π4M(a0,g0)(q02+a02)(2+a02g02q02+g02n=0Qn). (2.12)

Equation (2.3) and the second line of Eq. (2.9) still apply, with p0 given by Eq. (2.11).

For the complete case of Legendre’s third integral,

Π(α2,k)=(α2/3)RJ(0,k2,1,1α2)+RF(0,k2,1), (2.13)

where k2 = 1 − k2, Eq. (2.9) implies

Π(α2,k)=π4M(1,k)(2+α21α2n=0Qn),<k2<1,<α2<1, (2.14)

where Eq. (2.3) applies with a0 = 1, g0 = k′, and p02=1α2.

If α2 > 1, Eq. (2.12) gives the Cauchy principal value,

Π(α2,k)=πk24M(1,k)(α2k2)n=0Qn,<k2<1,1<α2<, (2.15)

where Eq. (2.3) and the second line of Eq. (2.9) apply with a0 = 1, g0 = k′, and p02=1k2/α2.

3. Expansion in Elementary Symmetric Functions

The duplication method of computing the symmetric elliptic integrals RF and RJ (including their degenerate cases RC and RD) consists in iterating their duplication theorems until their variables are nearly equal and then expanding in a series of elementary symmetric functions of the small differences between the variables. In the absence of a duplication theorem the method is useful for a hyperelliptic integral only if the variables are nearly equal. The series is truncated to a polynomial of fixed degree; the higher the degree, the fewer duplications are needed for a desired accuracy of the result but the larger the number of terms to be calculated. No tests have been made to determine an optimal compromise, which would depend in large part on the speed of extracting square roots in the duplication theorem and therefore on the equipment used. In Ref. [8] polynomials of degree five were chosen for simplicity, but later it seemed worthwhile to increase the degree for the comparatively slow computation of RJ, and Ref. [9], Eq. (A.11) gives the terms of degree six and seven for RJ. The change in speed would be significant only if a very large number of computations were performed, since the result of a single computation is returned with no delay apparent to the eye. We shall give here the corresponding terms for RF and the general form of the infinite series of which the polynomials are truncations.

Any R-function Ra(b1, …, bk; z1, …, zk) (see Ref. [6]) in which all the b-parameters are positive integral multiples of a single number β can be rewritten with repeated variables and all b’s equal to β. An example is

RJ(x,y,z,p)=R3/2(12,12,12,1;x,y,z,p)=R3/2(12,12,12,12,12;x,y,z,p,p), (3.1)

and RD (x, y, z) is the case with p = z. Therefore we consider

Ra(β,,β;z1,,zn)=1B(a,nβa)0tnβa1i=1n(t+zi)βdt=AaRa(β,,β;z1/A,,zn/A), (3.2)

where B is the beta function and we have used the homogeneity of R to divide the variables by their arithmetic average,

A=1ni=1nzi. (3.3)

The relative difference between A and zi is

Zi=AziA=1ziA, (3.4)

whence

Ra(β,,β;z1,,zn)=AaRa(β,,β;1Z1,,1Zn). (3.5)

Because the function is symmetric in the Z’s, it can be expanded in elementary symmetric functions Em = Em(Z1, …, Zn) defined by

i=1n(1+tZi)=r=0ntrEr. (3.6)

Applying Ref. [10], Eqs. (A.5) and (A.12) to the right side of Eq. (3.5), we find

Ra(β,,β;z1,zn)=AaN=0(a)N(nβ)NTN(β,,β;Z1,,Zn), (3.7)
=AaN=0(a)N(nβ)N(1)N+M(β)ME1m1Enmnm1!mn!, (3.8)

where (a)N is Pochhammer’s shifted factorial, M=inmi, and the inner sum (representing TN) extends over all nonnegative integers m1, …, mn such that m1 + 2m2 + … + nmn = N. Reference [10], Eq. (A.6) provides the recurrence relation

NTN+r=2n(1)r(rβ+Nr)ErTNr=0, (3.9)

where T0 = 1 and TNr = 0 if r > N, whence T1 = 0. The term with r = 1 is missing because Eqs. (3.3) and (3.4) imply E1 = 0, which greatly simplifies TN.

Let |Z| = maxi |Zi| and λ = max{|a|, 1}. The series [Eq. (3.7)] converges absolutely if β > 0 and |Z| < 1, and the truncation error rK resulting from neglect of terms of degree NK can be shown to satisfy

|rK|(|a|)K|Z|KK!(1|Z|)λ. (3.10)

Each application of a duplication theorem decreases by a factor of four the differences between the variables, therefore the difference Azi, and ultimately |Z| as A approaches a limit. It is easy to determine whether another duplication is needed before using the truncated series to achieve the desired accuracy.

If a = β = 1/2 and n = 3, the series [Eq. (3.8)] with E1 = 0 can be rearranged as

RF(z1,z2,z3)=A1/2r=0s=0(1)r(12)r+s4r+6s+1E2rE3sr!s!. (3.11)

This double series is convenient for obtaining numerical coefficients but requires |E2| + |E3| < 1 for absolute convergence. Keeping together all terms of the same degree in the Z’s, as in Eq. (3.8), we find

RF(z1,z2,z3)=A1/2(1110E2+114E3+124E22344E2E35208E23+3104E22E3+r8), (3.12)

where

|r8|<0.2|Z|81|Z|,|Z|=maxi|AziA|<1,A=(z1+z2+z3)/3. (3.13)

One more duplication would (ultimately) have decreased |r8| by a factor of 48 = 65 536.

For convenient reference we restate the corresponding result for RJ and RD [see Eq. (3.1) and the discussions preceding it]:

R3/2(12,,12;z1,,z5)=A3/2(1314E2+16E3+988E22322E4952E2E3+326E5116E23+340E32+320E2E4+45272E22E3968E3E4968E2E5+r8), (3.14)

where

|r8|<3.4|Z|8(1|Z|)3/2,|Z|=maxi|AziA|<1,A=(z1++z5)/5. (3.15)

The duplication theorems for these two functions are more complicated than that for RF; see Ref. [10] and Ref. [9], Appendix.

Acknowledgments

This manuscript was authored by a contractor of the U.S. Government (Ames Laboratory, Department of Energy), under contract No. W-7405-ENG-82. Accordingly, the U.S. Government retains a nonexclusive, royalty-free license to publish or reproduce the published form of this contribution, or allow others to do so for U.S. Government purposes. This work was supported also, in part, by the National Science Foundation under Agreement No. 9980036. Any opinions, findings, and conclusions or recommendations expressed in this publication are those of the author and do not necessarily reflect the views of the National Science Foundation.

Biography

About the author: B. C. Carlson was formerly a professor of physics and is currently a professor emeritus of mathematics at Iowa State University and an associate at the Ames Laboratory of the U.S. Department of Energy.

4. References

  • 1.Carlson BC. Toward symbolic integration of elliptic integrals. J Symb Comput. 1999;28:739–753. [Google Scholar]
  • 2.Gradshteyn IS, Ryzhik IM. Table of Integrals, Series, and Products. Sixth Ed. Academic Press; San Diego: 2000. [Google Scholar]
  • 3.Abramowitz M, Stegun IA, editors. Handbook of Mathematical Functions. U.S. Government Printing Office; Washington, D.C: 1964. Sec. 17.8 (Examples 16 and 18). Reprinted by Dover, New York (1965) [Google Scholar]
  • 4.Bulirsch R. An extension of the Bartky-transformation to incomplete elliptic integrals of the third kind. Numer Math. 1969;13:266–284. Sec. 1.2. [Google Scholar]
  • 5.Carlson BC. Quadratic transformations of Appell functions. SIAM J Math Anal. 1976;7:291–304. [Google Scholar]
  • 6.Carlson BC. Special Functions of Applied Mathematics. Academic Press; New York: 1977. [Google Scholar]
  • 7.Zill DG, Carlson BC. Symmetric elliptic integrals of the third kind. Math Comp. 1970;24:199–214. [Google Scholar]
  • 8.Carlson BC. Numerical computation of real or complex elliptic integrals. Numer Algorithms. 1995;10:13–26. [Google Scholar]
  • 9.Carlson BC, FitzSimons J. Reduction theorems for elliptic integrands with the square root of two quadratic factors. J Comput Appl Math. 2000;118:71–85. [Google Scholar]
  • 10.Carlson BC. Computing elliptic integrals by duplication. Numer Math. 1979;33:1–16. [Google Scholar]

Articles from Journal of Research of the National Institute of Standards and Technology are provided here courtesy of National Institute of Standards and Technology

RESOURCES