scipy.special.elliprg
- scipy.special.elliprg(x, y, z, out=None) = <ufunc 'elliprg'>
Completely-symmetric elliptic integral of the second kind.
The function RG is defined as [1]
Completely-symmetric elliptic integral of the second kind.
The function RG is defined as [1]
Real or complex input parameters. x, y, or z can be any number in the complex plane cut along the negative real axis.
Optional output array for the function values
Value of the integral. If all of x, y, and z are real, the return value is real. Otherwise, the return value is complex.
The implementation uses the relation [1]
and the symmetry of x, y, z when at least one non-zero parameter can be chosen as the pivot. When one of the arguments is close to zero, the AGM method is applied instead. Other special cases are computed following Ref. [2]
B. C. Carlson, “Numerical computation of real or complex elliptic integrals,” Numer. Algorithm, vol. 10, no. 1, pp. 13-26, 1995. DOI:10.1007/BF02198293. https://arxiv.org/abs/math/9409227
B. C. Carlson, ed., Chapter 19 in “Digital Library of Mathematical Functions,” NIST, US Dept. of Commerce. https://dlmf.nist.gov/19.16.E1 https://dlmf.nist.gov/19.20.ii
Basic homogeneity property:
>>> import numpy as np
>>> from scipy.special import elliprg
>>> x = 1.2 + 3.4j
>>> y = 5.
>>> z = 6.
>>> scale = 0.3 + 0.4j
>>> elliprg(scale*x, scale*y, scale*z)
(1.195936862005246+0.8470988320464167j)
>>> elliprg(x, y, z)*np.sqrt(scale)
(1.195936862005246+0.8470988320464165j)
Simplifications:
>>> elliprg(0, y, y)
1.756203682760182
>>> 0.25*np.pi*np.sqrt(y)
1.7562036827601817
>>> elliprg(0, 0, z)
1.224744871391589
>>> 0.5*np.sqrt(z)
1.224744871391589
The surface area of a triaxial ellipsoid with semiaxes a, b, and
c is given by
>>> def ellipsoid_area(a, b, c):
... r = 4.0 * np.pi * a * b * c
... return r * elliprg(1.0 / (a