next up previous index
Next: C321 Nielsen's Generalized Up: CERNLIB Previous: C318 Jacobian Elliptic

C320 Jacobian Elliptic Functions sn, cn, dn for Complex Argument

Routine ID: C320
Author(s): H.-H. UmstätterLibrary: MATHLIB
Submitter: K.S. KölbigSubmitted: 30.01.1980
Language: FortranRevised: 07.06.1992

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

z = ∫0sn( z, k ){dw(1-w2)(1-k2w2)}(k2≤1).

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

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

For k = 0 and k2= 1 these functions are elementary:

sn(z,0) = sinz, &quad;cn(z,0) = cosz, &quad;dn(z,0) = 1,

sn(z,±1) = tanhz, &quad;cn(z,±1) = dn(z,±1) = sech z.

Note that the Jacobian elliptic functions are doubly-periodic in the z-plane. For details see the relevant treatises or handbooks.

The double-precision version WELFUN is available only on computers which support a COMPLEX*16 Fortran data type.

Structure:

SUBROUTINE subprograms
User Entry Names: CELFUN, WELFUN
External References: MTLMTR (N002), ABEND (Z035)

Usage:

For t=C (type COMPLEX), t=W (type COMPLEX*16),

    CALL tELFUN(Z,AK2,SN,CN,DN)
Z
(type according to t) The argument z.
AK2
( REAL for t=C , DOUBLE PRECISION for t=W ) The value of k2 (the square of the modulus).
SN
(type according to t) On exit, SN=sn(Z,k) .
CN
(type according to t) On exit, CN=cn(Z,k) .
DN
(type according to t) On exit, DN=dn(Z,k) .

Method:

The Jacobian elliptic functions with complex argument z=x+iy are computed from their representations in terms of Jacobian elliptic functions with real arguments x or y (Ref. 1, formula 125.01). See also the Short Write-up for ELFUN (C318).

Accuracy:

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

Restrictions:

|Re z| ≤3 K(k) , |Im z| ≤3 K(k')

where k'=1-k2 is the complementary modulus, and K(x) is the complete elliptic integral of the first kind. (See entries RELIKC and DELIKC in RELI1C (C347)).

Error handling:

Error C320.1: |AK2| > 1 . The function value is set equal to zero, and a message is written on Unit 6, unless subroutine MTLSET (N002) has been called.

References:

  1. P.F. Byrd and M.D. Friedman, Handbook of elliptic integrals for engineers and scientists, 2nd ed., Springer-Verlag Berlin (1971).

C321



next up previous index
Next: C321 Nielsen's Generalized Up: CERNLIB Previous: C318 Jacobian Elliptic


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