ellipticIntegralRJ¶
Evaluates Carlson’s elliptic integral of the third kind \(R_J(x,y,z, \rho)\).
Synopsis¶
ellipticIntegralRJ (x, y, z, rho)
Required Arguments¶
- float
x
(Input) - First variable of the incomplete elliptic integral. It must be nonnegative.
- float
y
(Input) - Second variable of the incomplete elliptic integral. It must be nonnegative.
- float
z
(Input) - Third variable of the incomplete elliptic integral. It must be positive.
- float
rho
(Input) - Fourth variable of the incomplete elliptic integral. It must be positive.
Return Value¶
The complete elliptic integral \(R_J(x,y,z,\rho)\).
Description¶
Carlson’s elliptic integral of the third kind is defined to be
The arguments must be nonnegative. In addition, \(x+y\), \(x+z\),
\(y+z\) and ρ must be greater than or equal to \((5s)^{1/3}\) and
less than or equal to \(0.3(b/5)^{1/3}\), where s = machine(1)
is
the smallest representable floating-point number. Should any of these
conditions fail, ellipticIntegralRJ
is set to b = machine(2)
, the
largest floating-point number. For more information, see the description for
machine.
The function ellipticIntegralRJ
is based on the code by Carlson and
Notis (1981) and the work of Carlson (1979).
Example¶
The integral \(R_J(2,3,4,5)\) is computed.
from __future__ import print_function
from numpy import *
from pyimsl.math.ellipticIntegralRj import ellipticIntegralRj
x = 2.0
y = 3.0
z = 4.0
rho = 5.0
ans = ellipticIntegralRj(x, y, z, rho)
print("RJ(2, 3, 4, 5) = %f" % ans)
Output¶
RJ(2, 3, 4, 5) = 0.142976