naginterfaces.library.specfun.ellipint_​symm_​2

naginterfaces.library.specfun.ellipint_symm_2(x, y, z)[source]

ellipint_symm_2 returns a value of the symmetrised elliptic integral of the second kind.

For full information please refer to the NAG Library document for s21bc

https://support.nag.com/numeric/nl/nagdoc_30.3/flhtml/s/s21bcf.html

Parameters
xfloat

The arguments , and of the function.

yfloat

The arguments , and of the function.

zfloat

The arguments , and of the function.

Returns
rdfloat

The value of the symmetrised elliptic integral of the second kind.

Raises
NagValueError
(errno )

On entry, and are both .

Constraint: at most one of and is .

The function is undefined.

(errno )

On entry, and .

Constraint: and .

The function is undefined.

(errno )

On entry, .

Constraint: .

The function is undefined.

(errno )

On entry, , , and .

Constraint: and ( or ).

The function is undefined.

(errno )

On entry, , , and .

Constraint: and and .

There is a danger of setting underflow and the function returns zero.

Notes

ellipint_symm_2 calculates an approximate value for the integral

where , , at most one of and is zero, and .

The basic algorithm, which is due to Carlson (1979) and Carlson (1988), is to reduce the arguments recursively towards their mean by the rule:

For sufficiently large,

and the function may be approximated adequately by a fifth order power series

where The truncation error in this expansion is bounded by and the recursive process is terminated when this quantity is negligible compared with the machine precision.

The function may fail either because it has been called with arguments outside the domain of definition, or with arguments so extreme that there is an unavoidable danger of setting underflow or overflow.

Note: , so there exists a region of extreme arguments for which the function value is not representable.

References

NIST Digital Library of Mathematical Functions

Carlson, B C, 1979, Computing elliptic integrals by duplication, Numerische Mathematik (33), 1–16

Carlson, B C, 1988, A table of elliptic integrals of the third kind, Math. Comput. (51), 267–280