# naginterfaces.library.specfun.ellipint_​symm_​1¶

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

ellipint_symm_1 returns a value of the symmetrised elliptic integral of the first kind.

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

https://www.nag.com/numeric/nl/nagdoc_29.3/flhtml/s/s21bbf.html

Parameters
xfloat

The arguments , and of the function.

yfloat

The arguments , and of the function.

zfloat

The arguments , and of the function.

Returns
rffloat

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

Raises
NagValueError
(errno )

On entry, , and .

Constraint: and and .

The function is undefined.

(errno )

On entry, , and .

Constraint: at most one of , and is .

The function is undefined and returns zero.

Notes

ellipint_symm_1 calculates an approximation to the integral

where , , and at most one is zero.

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

, ,

remaining third intermediate value argument.

(This ordering, which is possible because of the symmetry of the function, is done for technical reasons related to the avoidance of overflow and underflow.)

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

where , .

The truncation error involved in using this approximation is bounded by and the recursive process is stopped when this truncation error is negligible compared with the machine precision.

Within the domain of definition, the function value is itself representable for all representable values of its arguments. However, for values of the arguments near the extremes the above algorithm must be modified so as to avoid causing underflows or overflows in intermediate steps. In extreme regions arguments are prescaled away from the extremes and compensating scaling of the result is done before returning to the calling program.

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