PDF version (NAG web site
, 64-bit version, 64-bit version)
NAG Toolbox: nag_specfun_jacellip_complex (s21cb)
Purpose
nag_specfun_jacellip_complex (s21cb) evaluates the Jacobian elliptic functions ,
and for a complex argument .
Syntax
Description
nag_specfun_jacellip_complex (s21cb) evaluates the Jacobian elliptic functions
,
and
given by
where
is a complex argument,
is a real argument (the
modulus) with
and
(the
amplitude of
) is defined by the integral
The above definitions can be extended for values of
(see
Salzer (1962)) by means of the formulae
where
.
Special values include
These functions are often simply written as
,
and
, thereby avoiding explicit reference to the argument
. They can also be expressed in terms of Jacobian theta functions (see
nag_specfun_jactheta_real (s21cc)).
Another nine elliptic functions may be computed via the formulae
(see
Abramowitz and Stegun (1972)).
The values of
,
and
are obtained by calls to
nag_specfun_jacellip_real (s21ca). Further details can be found in
Further Comments.
References
Abramowitz M and Stegun I A (1972) Handbook of Mathematical Functions (3rd Edition) Dover Publications
Salzer H E (1962) Quick calculation of Jacobian elliptic functions Comm. ACM 5 399
Parameters
Compulsory Input Parameters
- 1:
– complex scalar
-
The argument of the functions.
Constraints:
- ;
- , where .
- 2:
– double scalar
-
The value of .
Constraint:
.
Optional Input Parameters
None.
Output Parameters
- 1:
– complex scalar
- 2:
– complex scalar
- 3:
– complex scalar
-
The values of the functions , and , respectively.
- 4:
– int64int32nag_int scalar
unless the function detects an error (see
Error Indicators and Warnings).
Error Indicators and Warnings
Errors or warnings detected by the function:
-
-
On entry, | , |
or | , |
or | , |
or | , where . |
-
An unexpected error has been triggered by this routine. Please
contact
NAG.
-
Your licence key may have expired or may not have been installed correctly.
-
Dynamic memory allocation failed.
Accuracy
In principle the function is capable of achieving full relative precision in the computed values. However, the accuracy obtainable in practice depends on the accuracy of the standard elementary functions such as SIN and COS.
Further Comments
The values of
,
and
are computed via the formulae
where
and
(the
complementary modulus).
Example
This example evaluates , and at when , and prints the results.
Open in the MATLAB editor:
s21cb_example
function s21cb_example
fprintf('s21cb example results\n\n');
z = -2 +3i;
k = 0.25;
[sn, cn, dn, ifail] = s21cb(z,k);
fprintf(' z = %8.4f%+8.4fi, k = %7.4f\n\n',real(z), imag(z), k);
fprintf('%16s%23s%23s\n', 'sn(z|k)', 'cn(z|k)', 'dn(z|k)');
fprintf('%10.4f%+10.4fi %10.4f%+10.4fi %10.4f%+10.4fi\n', ...
real(sn), imag(sn), real(cn), imag(cn), real(dn), imag(dn));
s21cb example results
z = -2.0000 +3.0000i, k = 0.2500
sn(z|k) cn(z|k) dn(z|k)
-1.5865 +0.2456i 0.3125 +1.2468i -0.6395 -0.1523i
PDF version (NAG web site
, 64-bit version, 64-bit version)
© The Numerical Algorithms Group Ltd, Oxford, UK. 2009–2015