Class CarlsonEllipticIntegral
This utility class computes the various symmetric elliptic integrals defined as: \[ \left\{\begin{align} R_F(x,y,z) &= \frac{1}{2}\int_{0}^{\infty}\frac{\mathrm{d}t}{s(t)}\\ R_J(x,y,z,p) &= \frac{3}{2}\int_{0}^{\infty}\frac{\mathrm{d}t}{s(t)(t+p)}\\ R_G(x,y,z) &= \frac{1}{4}\int_{0}^{\infty}\frac{1}{s(t)} \left(\frac{x}{t+x}+\frac{y}{t+y}+\frac{z}{t+z}\right)t\mathrm{d}t\\ R_D(x,y,z) &= R_J(x,y,z,z)\\ R_C(x,y) &= R_F(x,y,y) \end{align}\right. \]
where \[ s(t) = \sqrt{t+x}\sqrt{t+y}\sqrt{t+z} \]
The algorithms used are based on the duplication method as described in B. C. Carlson 1995 paper "Numerical computation of real or complex elliptic integrals", with the improvements described in the appendix of B. C. Carlson and James FitzSimons 2000 paper "Reduction theorems for elliptic integrands with the square root of two quadratic factors". They are also described in section 19.36(i) of Digital Library of Mathematical Functions.
Beware that when computing elliptic integrals in the complex plane, many issues arise due to branch cuts. See the user guide for a thorough explanation.
- Since:
- 2.0
-
Method Summary
Modifier and TypeMethodDescriptionstatic double
rC
(double x, double y) Compute Carlson elliptic integral RC.static Complex
Compute Carlson elliptic integral RC.static <T extends CalculusFieldElement<T>>
FieldComplex<T>rC
(FieldComplex<T> x, FieldComplex<T> y) Compute Carlson elliptic integral RC.static <T extends CalculusFieldElement<T>>
TrC
(T x, T y) Compute Carlson elliptic integral RC.static double
rD
(double x, double y, double z) Compute Carlson elliptic integral RD.static Complex
Compute Carlson elliptic integral RD.static <T extends CalculusFieldElement<T>>
FieldComplex<T>rD
(FieldComplex<T> x, FieldComplex<T> y, FieldComplex<T> z) Compute Carlson elliptic integral RD.static <T extends CalculusFieldElement<T>>
TrD
(T x, T y, T z) Compute Carlson elliptic integral RD.static double
rF
(double x, double y, double z) Compute Carlson elliptic integral RF.static Complex
Compute Carlson elliptic integral RF.static <T extends CalculusFieldElement<T>>
FieldComplex<T>rF
(FieldComplex<T> x, FieldComplex<T> y, FieldComplex<T> z) Compute Carlson elliptic integral RF.static <T extends CalculusFieldElement<T>>
TrF
(T x, T y, T z) Compute Carlson elliptic integral RF.static double
rG
(double x, double y, double z) Compute Carlson elliptic integral RG.static Complex
Compute Carlson elliptic integral RG.static <T extends CalculusFieldElement<T>>
FieldComplex<T>rG
(FieldComplex<T> x, FieldComplex<T> y, FieldComplex<T> z) Compute Carlson elliptic integral RG.static <T extends CalculusFieldElement<T>>
TrG
(T x, T y, T z) Compute Carlson elliptic integral RG.static double
rJ
(double x, double y, double z, double p) Compute Carlson elliptic integral RJ.static double
rJ
(double x, double y, double z, double p, double delta) Compute Carlson elliptic integral RJ.static Complex
Compute Carlson elliptic integral RJ.static Complex
Compute Carlson elliptic integral RJ.static <T extends CalculusFieldElement<T>>
FieldComplex<T>rJ
(FieldComplex<T> x, FieldComplex<T> y, FieldComplex<T> z, FieldComplex<T> p) Compute Carlson elliptic integral RJ.static <T extends CalculusFieldElement<T>>
FieldComplex<T>rJ
(FieldComplex<T> x, FieldComplex<T> y, FieldComplex<T> z, FieldComplex<T> p, FieldComplex<T> delta) Compute Carlson elliptic integral RJ.static <T extends CalculusFieldElement<T>>
TrJ
(T x, T y, T z, T p) Compute Carlson elliptic integral RJ.static <T extends CalculusFieldElement<T>>
TrJ
(T x, T y, T z, T p, T delta) Compute Carlson elliptic integral RJ.
-
Method Details
-
rC
public static double rC(double x, double y) Compute Carlson elliptic integral RC.The Carlson elliptic integral RCis defined as \[ R_C(x,y,z)=R_F(x,y,y)=\frac{1}{2}\int_{0}^{\infty}\frac{\mathrm{d}t}{\sqrt{t+x}(t+y)} \]
- Parameters:
x
- first symmetric variable of the integraly
- second symmetric variable of the integral- Returns:
- Carlson elliptic integral RC
-
rC
Compute Carlson elliptic integral RC.The Carlson elliptic integral RCis defined as \[ R_C(x,y,z)=R_F(x,y,y)=\frac{1}{2}\int_{0}^{\infty}\frac{\mathrm{d}t}{\sqrt{t+x}(t+y)} \]
- Type Parameters:
T
- type of the field elements- Parameters:
x
- first symmetric variable of the integraly
- second symmetric variable of the integral- Returns:
- Carlson elliptic integral RC
-
rC
Compute Carlson elliptic integral RC.The Carlson elliptic integral RCis defined as \[ R_C(x,y,z)=R_F(x,y,y)=\frac{1}{2}\int_{0}^{\infty}\frac{\mathrm{d}t}{\sqrt{t+x}(t+y)} \]
- Parameters:
x
- first symmetric variable of the integraly
- second symmetric variable of the integral- Returns:
- Carlson elliptic integral RC
-
rC
public static <T extends CalculusFieldElement<T>> FieldComplex<T> rC(FieldComplex<T> x, FieldComplex<T> y) Compute Carlson elliptic integral RC.The Carlson elliptic integral RCis defined as \[ R_C(x,y,z)=R_F(x,y,y)=\frac{1}{2}\int_{0}^{\infty}\frac{\mathrm{d}t}{\sqrt{t+x}(t+y)} \]
- Type Parameters:
T
- type of the field elements- Parameters:
x
- first symmetric variable of the integraly
- second symmetric variable of the integral- Returns:
- Carlson elliptic integral RC
-
rF
public static double rF(double x, double y, double z) Compute Carlson elliptic integral RF.The Carlson elliptic integral RF is defined as \[ R_F(x,y,z)=\frac{1}{2}\int_{0}^{\infty}\frac{\mathrm{d}t}{\sqrt{t+x}\sqrt{t+y}\sqrt{t+z}} \]
- Parameters:
x
- first symmetric variable of the integraly
- second symmetric variable of the integralz
- third symmetric variable of the integral- Returns:
- Carlson elliptic integral RF
-
rF
Compute Carlson elliptic integral RF.The Carlson elliptic integral RF is defined as \[ R_F(x,y,z)=\frac{1}{2}\int_{0}^{\infty}\frac{\mathrm{d}t}{\sqrt{t+x}\sqrt{t+y}\sqrt{t+z}} \]
- Type Parameters:
T
- type of the field elements- Parameters:
x
- first symmetric variable of the integraly
- second symmetric variable of the integralz
- third symmetric variable of the integral- Returns:
- Carlson elliptic integral RF
-
rF
Compute Carlson elliptic integral RF.The Carlson elliptic integral RF is defined as \[ R_F(x,y,z)=\frac{1}{2}\int_{0}^{\infty}\frac{\mathrm{d}t}{\sqrt{t+x}\sqrt{t+y}\sqrt{t+z}} \]
- Parameters:
x
- first symmetric variable of the integraly
- second symmetric variable of the integralz
- third symmetric variable of the integral- Returns:
- Carlson elliptic integral RF
-
rF
public static <T extends CalculusFieldElement<T>> FieldComplex<T> rF(FieldComplex<T> x, FieldComplex<T> y, FieldComplex<T> z) Compute Carlson elliptic integral RF.The Carlson elliptic integral RF is defined as \[ R_F(x,y,z)=\frac{1}{2}\int_{0}^{\infty}\frac{\mathrm{d}t}{\sqrt{t+x}\sqrt{t+y}\sqrt{t+z}} \]
- Type Parameters:
T
- type of the field elements- Parameters:
x
- first symmetric variable of the integraly
- second symmetric variable of the integralz
- third symmetric variable of the integral- Returns:
- Carlson elliptic integral RF
-
rJ
public static double rJ(double x, double y, double z, double p) Compute Carlson elliptic integral RJ.The Carlson elliptic integral RJ is defined as \[ R_J(x,y,z,p)=\frac{3}{2}\int_{0}^{\infty}\frac{\mathrm{d}t}{\sqrt{t+x}\sqrt{t+y}\sqrt{t+z}(t+p)} \]
- Parameters:
x
- first symmetric variable of the integraly
- second symmetric variable of the integralz
- third symmetric variable of the integralp
- fourth not symmetric variable of the integral- Returns:
- Carlson elliptic integral RJ
-
rJ
public static double rJ(double x, double y, double z, double p, double delta) Compute Carlson elliptic integral RJ.The Carlson elliptic integral RJ is defined as \[ R_J(x,y,z,p)=\frac{3}{2}\int_{0}^{\infty}\frac{\mathrm{d}t}{\sqrt{t+x}\sqrt{t+y}\sqrt{t+z}(t+p)} \]
- Parameters:
x
- first symmetric variable of the integraly
- second symmetric variable of the integralz
- third symmetric variable of the integralp
- fourth not symmetric variable of the integraldelta
- precomputed value of (p-x)(p-y)(p-z)- Returns:
- Carlson elliptic integral RJ
-
rJ
Compute Carlson elliptic integral RJ.The Carlson elliptic integral RJ is defined as \[ R_J(x,y,z,p)=\frac{3}{2}\int_{0}^{\infty}\frac{\mathrm{d}t}{\sqrt{t+x}\sqrt{t+y}\sqrt{t+z}(t+p)} \]
- Type Parameters:
T
- type of the field elements- Parameters:
x
- first symmetric variable of the integraly
- second symmetric variable of the integralz
- third symmetric variable of the integralp
- fourth not symmetric variable of the integral- Returns:
- Carlson elliptic integral RJ
-
rJ
Compute Carlson elliptic integral RJ.The Carlson elliptic integral RJ is defined as \[ R_J(x,y,z,p)=\frac{3}{2}\int_{0}^{\infty}\frac{\mathrm{d}t}{\sqrt{t+x}\sqrt{t+y}\sqrt{t+z}(t+p)} \]
- Type Parameters:
T
- type of the field elements- Parameters:
x
- first symmetric variable of the integraly
- second symmetric variable of the integralz
- third symmetric variable of the integralp
- fourth not symmetric variable of the integraldelta
- precomputed value of (p-x)(p-y)(p-z)- Returns:
- Carlson elliptic integral RJ
-
rJ
Compute Carlson elliptic integral RJ.The Carlson elliptic integral RJ is defined as \[ R_J(x,y,z,p)=\frac{3}{2}\int_{0}^{\infty}\frac{\mathrm{d}t}{\sqrt{t+x}\sqrt{t+y}\sqrt{t+z}(t+p)} \]
- Parameters:
x
- first symmetric variable of the integraly
- second symmetric variable of the integralz
- third symmetric variable of the integralp
- fourth not symmetric variable of the integral- Returns:
- Carlson elliptic integral RJ
-
rJ
Compute Carlson elliptic integral RJ.The Carlson elliptic integral RJ is defined as \[ R_J(x,y,z,p)=\frac{3}{2}\int_{0}^{\infty}\frac{\mathrm{d}t}{\sqrt{t+x}\sqrt{t+y}\sqrt{t+z}(t+p)} \]
- Parameters:
x
- first symmetric variable of the integraly
- second symmetric variable of the integralz
- third symmetric variable of the integralp
- fourth not symmetric variable of the integraldelta
- precomputed value of (p-x)(p-y)(p-z)- Returns:
- Carlson elliptic integral RJ
-
rJ
public static <T extends CalculusFieldElement<T>> FieldComplex<T> rJ(FieldComplex<T> x, FieldComplex<T> y, FieldComplex<T> z, FieldComplex<T> p) Compute Carlson elliptic integral RJ.The Carlson elliptic integral RJ is defined as \[ R_J(x,y,z,p)=\frac{3}{2}\int_{0}^{\infty}\frac{\mathrm{d}t}{\sqrt{t+x}\sqrt{t+y}\sqrt{t+z}(t+p)} \]
- Type Parameters:
T
- type of the field elements- Parameters:
x
- first symmetric variable of the integraly
- second symmetric variable of the integralz
- third symmetric variable of the integralp
- fourth not symmetric variable of the integral- Returns:
- Carlson elliptic integral RJ
-
rJ
public static <T extends CalculusFieldElement<T>> FieldComplex<T> rJ(FieldComplex<T> x, FieldComplex<T> y, FieldComplex<T> z, FieldComplex<T> p, FieldComplex<T> delta) Compute Carlson elliptic integral RJ.The Carlson elliptic integral RJ is defined as \[ R_J(x,y,z,p)=\frac{3}{2}\int_{0}^{\infty}\frac{\mathrm{d}t}{\sqrt{t+x}\sqrt{t+y}\sqrt{t+z}(t+p)} \]
- Type Parameters:
T
- type of the field elements- Parameters:
x
- first symmetric variable of the integraly
- second symmetric variable of the integralz
- third symmetric variable of the integralp
- fourth not symmetric variable of the integraldelta
- precomputed value of (p-x)(p-y)(p-z)- Returns:
- Carlson elliptic integral RJ
-
rD
public static double rD(double x, double y, double z) Compute Carlson elliptic integral RD.The Carlson elliptic integral RD is defined as \[ R_D(x,y,z)=\frac{3}{2}\int_{0}^{\infty}\frac{\mathrm{d}t}{\sqrt{t+x}\sqrt{t+y}\sqrt{t+z}(t+z)} \]
- Parameters:
x
- first symmetric variable of the integraly
- second symmetric variable of the integralz
- third symmetric variable of the integral- Returns:
- Carlson elliptic integral RD
-
rD
Compute Carlson elliptic integral RD.The Carlson elliptic integral RD is defined as \[ R_D(x,y,z)=\frac{3}{2}\int_{0}^{\infty}\frac{\mathrm{d}t}{\sqrt{t+x}\sqrt{t+y}\sqrt{t+z}(t+z)} \]
- Type Parameters:
T
- type of the field elements- Parameters:
x
- first symmetric variable of the integraly
- second symmetric variable of the integralz
- third symmetric variable of the integral- Returns:
- Carlson elliptic integral RD
-
rD
Compute Carlson elliptic integral RD.The Carlson elliptic integral RD is defined as \[ R_D(x,y,z)=\frac{3}{2}\int_{0}^{\infty}\frac{\mathrm{d}t}{\sqrt{t+x}\sqrt{t+y}\sqrt{t+z}(t+z)} \]
- Parameters:
x
- first symmetric variable of the integraly
- second symmetric variable of the integralz
- third symmetric variable of the integral- Returns:
- Carlson elliptic integral RD
-
rD
public static <T extends CalculusFieldElement<T>> FieldComplex<T> rD(FieldComplex<T> x, FieldComplex<T> y, FieldComplex<T> z) Compute Carlson elliptic integral RD.The Carlson elliptic integral RD is defined as \[ R_D(x,y,z)=\frac{3}{2}\int_{0}^{\infty}\frac{\mathrm{d}t}{\sqrt{t+x}\sqrt{t+y}\sqrt{t+z}(t+z)} \]
- Type Parameters:
T
- type of the field elements- Parameters:
x
- first symmetric variable of the integraly
- second symmetric variable of the integralz
- third symmetric variable of the integral- Returns:
- Carlson elliptic integral RD
-
rG
public static double rG(double x, double y, double z) Compute Carlson elliptic integral RG.The Carlson elliptic integral RGis defined as \[ R_{G}(x,y,z)=\frac{1}{4}\int_{0}^{\infty}\frac{1}{s(t)} \left(\frac{x}{t+x}+\frac{y}{t+y}+\frac{z}{t+z}\right)t\mathrm{d}t \]
- Parameters:
x
- first symmetric variable of the integraly
- second symmetric variable of the integralz
- second symmetric variable of the integral- Returns:
- Carlson elliptic integral RG
-
rG
Compute Carlson elliptic integral RG.The Carlson elliptic integral RGis defined as \[ R_{G}(x,y,z)=\frac{1}{4}\int_{0}^{\infty}\frac{1}{s(t)} \left(\frac{x}{t+x}+\frac{y}{t+y}+\frac{z}{t+z}\right)t\mathrm{d}t \]
- Type Parameters:
T
- type of the field elements- Parameters:
x
- first symmetric variable of the integraly
- second symmetric variable of the integralz
- second symmetric variable of the integral- Returns:
- Carlson elliptic integral RG
-
rG
Compute Carlson elliptic integral RG.The Carlson elliptic integral RGis defined as \[ R_{G}(x,y,z)=\frac{1}{4}\int_{0}^{\infty}\frac{1}{s(t)} \left(\frac{x}{t+x}+\frac{y}{t+y}+\frac{z}{t+z}\right)t\mathrm{d}t \]
- Parameters:
x
- first symmetric variable of the integraly
- second symmetric variable of the integralz
- second symmetric variable of the integral- Returns:
- Carlson elliptic integral RG
-
rG
public static <T extends CalculusFieldElement<T>> FieldComplex<T> rG(FieldComplex<T> x, FieldComplex<T> y, FieldComplex<T> z) Compute Carlson elliptic integral RG.The Carlson elliptic integral RGis defined as \[ R_{G}(x,y,z)=\frac{1}{4}\int_{0}^{\infty}\frac{1}{s(t)} \left(\frac{x}{t+x}+\frac{y}{t+y}+\frac{z}{t+z}\right)t\mathrm{d}t \]
- Type Parameters:
T
- type of the field elements- Parameters:
x
- first symmetric variable of the integraly
- second symmetric variable of the integralz
- second symmetric variable of the integral- Returns:
- Carlson elliptic integral RG
-