ellipticIntegralRD

Evaluates Carlson’s elliptic integral of the second kind \(R_D(x,y, z)\).

Synopsis

ellipticIntegralRD (x, y, z)

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.

Return Value

The complete elliptic integral \(R_D(x,y,z)\)

Description

Carlson’s elliptic integral of the first kind is defined to be

\[R_D(x,y,z) = \tfrac{3}{2} \int_0^{\infty} \frac{dt}{\left[(t+x)(t+y)(t+z)^3\right]^{1/2}}\]

The arguments must be nonnegative and less than or equal to \(0.69(-\ln\varepsilon)^{1/9} s^{-2/3}\) where ɛ = machine(4) is the machine precision, s = machine(1) is the smallest representable positive number. Furthermore, x + y and z must be greater than \(\max \{3s^{2/3},3/b^{2/3}\}\), where b = machine(2) is the largest floating point number. If any of these conditions are false, then ellipticIntegralRD returns b. For more information, see the description for machine.

The function ellipticIntegralRD is based on the code by Carlson and Notis (1981) and the work of Carlson (1979).

Example

The integral \(R_D(0,2,1)\) is computed.

from __future__ import print_function
from numpy import *
from pyimsl.math.ellipticIntegralRd import ellipticIntegralRd

x = 0.0
y = 2.0
z = 1.0
ans = ellipticIntegralRd(x, y, z)
print("RD(0, 2, 1) = %f" % (ans))

Output

RD(0, 2, 1) = 1.797210