C346: Elliptic Integrals of First, Second, and Third Kind

Author(s): K.S. Kölbig Library: MATHLIB
Submitter: Submitted: 07.06.1992
Language: Fortran Revised:

Function subprograms RELI1, RELI2, RELI3 and DELI1, DELI2, DELI3 calculate, for real argument x, the elliptic integrals of the first, second and third kind, respectively.

On CDC and Cray computers, the double-precision versions DELI1, DELI2 and DELI3 are not available.

Mainly for reasons of numerical stability, the algorithms are based on the following definitions:

First kind:

eqnarray51

Second kind:

eqnarray58

Third kind:

eqnarray65

Note that tex2html_wrap_inline230 . For p < 0, the integral tex2html_wrap_inline234 is defined by its principal value.

For the integral of the second kind, a special entry-mode argument is provided which allows tex2html_wrap_inline236 to be calculated when tex2html_wrap_inline238 , i.e. when k' is imaginary.

Other common definitions of the elliptic integrals and their relations to tex2html_wrap_inline242 , tex2html_wrap_inline244 , tex2html_wrap_inline246 are listed here for convenience ( tex2html_wrap_inline248 ):

First kind:

eqnarray82

eqnarray87

Second kind:

eqnarray95

eqnarray100

Third kind:

displaymath250

Structure:

FUNCTION subprograms
User Entry Names: RELI1, RELI2, RELI3, DELI1, DELI2, DELI3
Files Referenced: Unit 6
External References: ASINH, DASINH, MTLMTR, ABEND

Usage:

In any arithmetic expression, with tex2html_wrap_inline252 ,

RELI1(X,AKP) or DELI1(X,AKP) has the value tex2html_wrap_inline254 ,
RELI2(X,AKP,A,B,MODE) or DELI2(X,AKP,A,B,MODE) has the value tex2html_wrap_inline256 ,
RELI3(X,AKP,P) or DELI3(X,AKP,P) has the value tex2html_wrap_inline258 ,

where RELI1, RELI2, RELI3 are of type REAL, where DELI1, DELI2, DELI3 are of type DOUBLE PRECISION, and X, AKP, A, B and P have the same type as the function name. MODE is of type INTEGER.

The notation k'' indicates that, when calling RELI2 or DELI2, the parameters AKP and MODE must be set as follows:
If tex2html_wrap_inline262 : tex2html_wrap_inline264 and tex2html_wrap_inline266 ,
if tex2html_wrap_inline268 : tex2html_wrap_inline270 and tex2html_wrap_inline272 Im k' = -ik' (real).

Method:

The evaluation of tex2html_wrap_inline276 and tex2html_wrap_inline278 is based on the Landen transformation, that of tex2html_wrap_inline280 on the Bartky transformation. tex2html_wrap_inline282 for tex2html_wrap_inline284 is calculated by using a transformation of the arguments. See Ref. 1 and 2 for details.

Accuracy:

The REAL functions (except on CDC and Cray computers) have full single-precision accuracy. The REAL functions on CDC and Cray, and the DOUBLE PRECISION functions on all computers have an accuracy approximately two significant digits less than the machine precision.

Restrictions:

1. RELI2 and DELI2: \ AKP*X**2 < 1 if MODE =-1.
2. RELI2 and DELI2: \ tex2html_wrap_inline290 or tex2html_wrap_inline292 .
3. RELI3 and DELI3: P*X**2 tex2html_wrap_inline294 1.

Error handling:

Error C346.1: Restriction 1 is not satisfied.
Error C346.2: Restriction 2 is not satisfied.
Error C346.3: Restriction 3 is not satisfied.
In all cases, the function value is set equal to zero, and a message is written on Unit 6, unless subroutine MTLSET (N002) has been called.

The subprograms are based on the Algol60 procedures el1, el2 in Ref. 1 and el3 in Ref. 2.

References:

  1. R. Bulirsch, Numerical calculation of elliptic integrals and elliptic functions, Numer. Math. 7 (1965) 78-90.
  2. R. Bulirsch, Numerical calculation of elliptic integrals and elliptic functions III, Numer. Math. 13 (1969) 305-315.
tex2html_wrap_inline296

Michel Goossens Tue Jun 4 22:53:27 METDST 1996