next up previous index
Next: C320 Jacobian Elliptic Up: CERNLIB Previous: C316 Psi (Digamma)

C318 Jacobian Elliptic Functions sn, cn, dn

Routine ID: C318
Author(s): K.S. Kölbig, H.-H. UmstätterLibrary: MATHLIB
Submitter: Submitted: 30.01.1980
Language: FortranRevised: 01.12.1994

Function subprograms RELFUN and DELFUN calculate, for real argument x and real modulus k, the Jacobian elliptic functions sn(x,k) , cn(x,k) and dn(x,k) . The function sn(x,k) is the inverse of the elliptic integral of the first kind and is defined implicitly by

x = ∫0sn( x, k ){du(1-u2)(1-k2u2)}(k2≤1).

The functions cn(x,k) and dn(x,k) are defined by

sn2(x,k) + cn2(x,k) = 1, &quad;k2sn2(x,k) + dn2(x,k) = 1, &quad;cn(0,k) = dn(0,k) = 1.

This definition can be extended for k2> 1 (Ref. 2) by means of

sn(x,k) = k1sn(kx,k1), &quad;cn(x,k) = dn(kx,k1), &quad;dn(x,k) = cn(kx,k1),

where k1= 1/k . For k = 0 and k2= 1 these functions are elementary:

sn(x,0) = sinx, &quad;cn(x,0) = cosx, &quad;dn(x,0) = 1,

sn(x,±1) = tanhx, &quad;cn(x,±1) = dn(x,±1) = sech x.

Note that for k2≠1 the Jacobian elliptic functions are periodic (with respect to x) with period 4K(k) if k2< 1 and 4k1K(k1) if k2> 1 , where K(k)

is the complete elliptic integral of the first kind.

On CDC and Cray computers, the double-precision version DELFUN is not available.

Structure:

SUBROUTINE subprograms
User Entry Names: RELFUN, DELFUN
Obsolete User Entry Names: ELFUN RELFUN

Usage:

For t=R (type REAL), t=D (type DOUBLE PRECISION),

    CALL tELFUN(X,AK2,SN,CN,DN)
X
(type according to t) The argument x.
AK2
(type according to t) The value of k2 (the square of the modulus).
SN
(type according to t) On exit, SN=sn(X,k) .
CN
(type according to t) On exit, CN=cn(X,k) .
DN
(type according to t) On exit, DN=dn(X,k) .

Method:

The sequence of the Gaussian arithmetic-geometric mean is used together with the Gauss transformation and, where appropriate, the Jacobi imaginary transformation. For values AK2 > 1 , the reciprocal modulus transformation is performed. For details see References.

Accuracy:

RELFUN (except on CDC and Cray computers) has full single-precision accuracy. For most values of the arguments, DELFUN (and RELFUN on CDC and Cray computers) has an accuracy of approximately two significant digits less than the machine precision.

Restrictions:

|x| ≤3 K(k) (0 < k2< 1) , |x| ≤3 k1K(k1) (k2> 1) , where K(x) is the complete elliptic integral of the first kind. (See entries RELIKC and DELIKC in RELI1C (C347)).

References:

  1. M. Abramowitz and I.A. Stegun, ed., Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables, Sections 16.12 and 17.6, 9th printing with corrections, (Dover, New York 1972).
  2. H.E. Salzer, Quick calculation of Jacobian elliptic functions, Comm. ACM 5 (1962) 399.
  3. L.V. King, On the dirct numerical calculation of elliptic functions and integrals, Cambridge Univ. Press (1924) 32.
  4. D.J. Hofsommer and R.P. van de Riet, On the numerical calculation of elliptic integrals of the first and second kind and the elliptic functions of Jacobi, Numer. Math. 5 (1963) 291--302.
  5. P.F. Byrd and M.D. Friedman, Handbook of elliptic integrals for engineers and scientists, 2nd ed., Springer-Verlag Berlin (1971).

C320



next up previous index
Next: C320 Jacobian Elliptic Up: CERNLIB Previous: C316 Psi (Digamma)


Janne Saarela
Mon Apr 3 15:06:23 METDST 1995