Routine ID: C347 | |
---|---|
Author(s): K.S. Kölbig | Library: MATHLIB |
Submitter: | Submitted: 07.06.1992 |
Language: Fortran | Revised: |
Function subprograms RELI1C, RELI2C, RELI3C and DELI1C, DELI2C, DELI3C calculate the complete elliptic integrals of the first, second and third kind, respectively.
Function subprograms RELIGC and DELIGC calculate a general complete elliptic integral.
Function subprograms RELIKC, RELIEC and DELIKC, DELIEC calculate the complete elliptic integrals K and E .
On CDC and Cray computers, the double-precision versions DELI1C etc. are not available.
Mainly for reasons of numerical stability, the algorithms are based on the following definitions:
First kind:
|
Second kind:
|
Third kind:
|
Note that . For p < 0, the integral is defined by its principal value.
The general integral:
| ||
|
For p < 0, this integral is defined by its principal value. See Notes for special cases.
The functions K(k) and E(k):
| ||
|
Other common definitions of the complete elliptic integrals and their
relations to
,
,
are
listed here for convenience (
):
First kind:
| ||
|
Second kind:
| ||
|
Third kind:
| ||||
|
Structure:
FUNCTION subprograms
User Entry Names:
RELI1C, | RELI2C, | RELI3C, | RELIGC, | RELIKC, | RELIEC |
DELI1C, | DELI2C, | DELI3C, | DELIGC, | DELIKC, | DELIEC |
ELLICK RELIKC, | ELLICE RELIEC, |
DELLIK DELIKC, | DELLIE DELIEC |
Usage:
In any arithmetic expression, with and ,
RELI1C(AKP) | DELI1C(AKP) | , |
RELI2C(AKP,A,B) | DELI2C(AKP,A,B) | , |
RELI3C(AKP,AK2,P) | DELI3C(AKP,AK2,P) | , |
RELIGC(AKP,P,A,B) | DELIGC(AKP,P,A,B) | , |
RELIKC(AK) | DELIKC(AK) | K , |
RELIEC(AK) | DELIEC(AK) | E , |
where RELI1C etc are of type REAL, DELI1C etc are of type DOUBLE PRECISION, and AKP, AK, AK2, A, B and P have the same type as the function name.
The redundant parameter AK2 in RELI3C and DELI3C permits improved accuracy when is small, i.e. . In this case, should be calculated using higher-precision arithmetic and then truncated before calling the subprogram.
Method:
The evaluation of , ,
is based on the Landen transformation, that of on the Bartky transformation. For details, see Ref. 1--3. For K and E
Chebyshev approximations are used (see Ref. 4).
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. RELI1C and DELI1C:
.
2. RELI2C and DELI2C:
.
or
and
.
3. RELI3C and DELI3C: AKP*P
0.
4. RELIGC and DELIGC:
.
5. RELIKC and DELIKC:
,
RELIEC and DELIEC:
.
Error handling:
Error C347.1: Restriction 1 is not satisfied.
Error C347.2: Restriction 2 is not satisfied.
Error C347.3: Restriction 3 is not satisfied.
Error C347.4: Restriction 4 is not satisfied.
Error C347.5: Restriction 5 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.
Notes:
Every linear combination of the three special complete elliptic integrals K , E , may be expressed in terms of :
| ||
|
Special examples are
| ||
| ||
| ||
| ||
| ||
|
If then will evaluate any linear combination of K , E , without cancellation (such as would occur, for example, if (K E were to be computed from values of K and E which had been computed separately.
Other functions which can be represented by are the Jacobian Zeta function and the Heuman Lambda function (see Ref. 5):
| |||
|
(Quoted from Ref. 3, slightly modified).
The subprograms for , are based on the Algol60 procedures cel1, cel2 in Ref. 1, those for on cel3 in Ref. 2, and those for
on cel in Ref. 3.
References: