# Carlson symmetric form

In mathematics, the Carlson symmetric forms of elliptic integrals are a small canonical set of elliptic integrals to which all others may be reduced. They are a modern alternative to the Legendre forms. The Legendre forms may be expressed in terms of the Carlson forms and vice versa.
The Carlson elliptic integrals are: $R_{F}(x,y,z)={\tfrac {1}{2}}\int _{0}^{\infty }{\frac {dt}{\sqrt {(t+x)(t+y)(t+z)}}}$ $R_{J}(x,y,z,p)={\tfrac {3}{2}}\int _{0}^{\infty }{\frac {dt}{(t+p){\sqrt {(t+x)(t+y)(t+z)}}}}$ $R_{G}(x,y,z)={\tfrac {1}{4}}\int _{0}^{\infty }{\frac {1}{\sqrt {(t+x)(t+y)(t+z)}}}{\biggl{\frac {x}{t+x}}+{\frac {y}{t+y}}+{\frac {z}{t+z}}{\biggr )}t\,dt$ $R_{C}(x,y)=R_{F}(x,y,y)={\tfrac {1}{2}}\int _{0}^{\infty }{\frac {dt}{(t+y){\sqrt {(t+x)}}}}$ $R_{D}(x,y,z)=R_{J}(x,y,z,z)={\tfrac {3}{2}}\int _{0}^{\infty }{\frac {dt}{(t+z)\,{\sqrt {(t+x)(t+y)(t+z)}}}}$
Since $R_{C}$ and $R_{D}$ are special cases of $R_{F}$ and $R_{J}$, all elliptic integrals can ultimately be evaluated in terms of just $R_{F}$, $R_{J}$, and $R_{G}$.
The term symmetric refers to the fact that in contrast to the Legendre forms, these functions are unchanged by the exchange of certain subsets of their arguments. The value of $R_{F}(x,y,z)$ is the same for any permutation of its arguments, and the value of $R_{J}(x,y,z,p)$ is the same for any permutation of its first three arguments.
The Carlson elliptic integrals are named after Bille C. Carlson (1924-2013).

## Relation to the Legendre forms
### Incomplete elliptic integrals

Incomplete elliptic integrals can be calculated easily using Carlson symmetric forms:
    $F(\phi ,k)=\sin \phi R_{F}\left(\cos ^{2}\phi ,1-k^{2}\sin ^{2}\phi ,1\right)$
    $E(\phi ,k)=\sin \phi R_{F}\left(\cos ^{2}\phi ,1-k^{2}\sin ^{2}\phi ,1\right)-{\tfrac {1}{3}}k^{2}\sin ^{3}\phi R_{D}\left(\cos ^{2}\phi ,1-k^{2}\sin ^{2}\phi ,1\right)$
    $\Pi (\phi ,n,k)=\sin \phi R_{F}\left(\cos ^{2}\phi ,1-k^{2}\sin ^{2}\phi ,1\right)+{\tfrac {1}{3}}n\sin ^{3}\phi R_{J}\left(\cos ^{2}\phi ,1-k^{2}\sin ^{2}\phi ,1,1-n\sin ^{2}\phi \right)$
(Note: the above are only valid for $-{\frac {\pi }{2}}\leq \phi \leq {\frac {\pi }{2}}$ and $0\leq k^{2}\sin ^{2}\phi \leq 1$)

### Complete elliptic integrals

Complete elliptic integrals can be calculated by substituting φ = 1⁄2π:
    $K(k)=R_{F}\left(0,1-k^{2},1\right)$
    $E(k)=R_{F}\left(0,1-k^{2},1\right)-{\tfrac {1}{3}}k^{2}R_{D}\left(0,1-k^{2},1\right)$
    $\Pi (n,k)=R_{F}\left(0,1-k^{2},1\right)+{\tfrac {1}{3}}nR_{J}\left(0,1-k^{2},1,1-n\right)$

## Special cases

When any two, or all three of the arguments of $R_{F}$ are the same, then a substitution of ${\sqrt {t+x}}=u$ renders the integrand rational. The integral can then be expressed in terms of elementary transcendental functions.
    $R_{C}(x,y)=R_{F}(x,y,y)={\frac {1}{2}}\int _{0}^{\infty }{\frac {dt}{{\sqrt {t+x}}(t+y)}}=\int _{\sqrt {x}}^{\infty }{\frac {du}{u^{2}-x+y}}={\begin{cases}{\frac {\arccos {\sqrt {{x}/{y}}}}{\sqrt {y-x}}},&x<y\\{\frac {1}{\sqrt {y}}},&x=y\\{\frac {\operatorname {arcosh} {\sqrt {{x}/{y}}}}{\sqrt {x-y}}},&x>y\\\end{cases}}$
Similarly, when at least two of the first three arguments of $R_{J}$ are the same,
    $R_{J}(x,y,y,p)=3\int _{\sqrt {x}}^{\infty }{\frac {du}{(u^{2}-x+y)(u^{2}-x+p)}}={\begin{cases}{\frac {3}{p-y}}(R_{C}(x,y)-R_{C}(x,p)),&y\neq p\\{\frac {3}{2(y-x)}}\left(R_{C}(x,y)-{\frac {1}{y}}{\sqrt {x}}\right),&y=p\neq x\\{\frac {1}{y^{{3}/{2}}}},&y=p=x\\\end{cases}}$

## Properties
### Homogeneity

By substituting in the integral definitions $t=\kappa u$ for any constant $\kappa$, it is found that
    $R_{F}\left(\kappa x,\kappa y,\kappa z\right)=\kappa ^{-1/2}R_{F}(x,y,z)$
    $R_{J}\left(\kappa x,\kappa y,\kappa z,\kappa p\right)=\kappa ^{-3/2}R_{J}(x,y,z,p)$

### Duplication theorem

    $R_{F}(x,y,z)=2R_{F}(x+\lambda ,y+\lambda ,z+\lambda )=R_{F}\left({\frac {x+\lambda }{4}},{\frac {y+\lambda }{4}},{\frac {z+\lambda }{4}}\right),$
where $\lambda ={\sqrt {x}}{\sqrt {y}}+{\sqrt {y}}{\sqrt {z}}+{\sqrt {z}}{\sqrt {x}}$.
    ${\begin{aligned}R_{J}(x,y,z,p)&=2R_{J}(x+\lambda ,y+\lambda ,z+\lambda ,p+\lambda )+6R_{C}(d^{2},d^{2}+(p-x)(p-y)(p-z))\\&={\frac {1}{4}}R_{J}\left({\frac {x+\lambda }{4}},{\frac {y+\lambda }{4}},{\frac {z+\lambda }{4}},{\frac {p+\lambda }{4}}\right)+6R_{C}(d^{2},d^{2}+(p-x)(p-y)(p-z))\end{aligned}}$
where $d=({\sqrt {p}}+{\sqrt {x}})({\sqrt {p}}+{\sqrt {y}})({\sqrt {p}}+{\sqrt {z}})$ and $\lambda ={\sqrt {x}}{\sqrt {y}}+{\sqrt {y}}{\sqrt {z}}+{\sqrt {z}}{\sqrt {x}}$

## Series Expansion

In obtaining a Taylor series expansion for $R_{F}$ or $R_{J}$ it proves convenient to expand about the mean value of the several arguments. So for $R_{F}$, letting the mean value of the arguments be $A=(x+y+z)/3$, and using homogeneity, define $\Delta x$, $\Delta y$ and $\Delta z$ by
    ${\begin{aligned}R_{F}(x,y,z)&=R_{F}(A(1-\Delta x),A(1-\Delta y),A(1-\Delta z))\\&={\frac {1}{\sqrt {A}}}R_{F}(1-\Delta x,1-\Delta y,1-\Delta z)\end{aligned}}$
that is $\Delta x=1-x/A$ etc. The differences $\Delta x$, $\Delta y$ and $\Delta z$ are defined with this sign (such that they are subtracted), in order to be in agreement with Carlson's papers. Since $R_{F}(x,y,z)$ is symmetric under permutation of $x$, $y$ and $z$, it is also symmetric in the quantities $\Delta x$, $\Delta y$ and $\Delta z$. It follows that both the integrand of $R_{F}$ and its integral can be expressed as functions of the elementary symmetric polynomials in $\Delta x$, $\Delta y$ and $\Delta z$ which are
    $E_{1}=\Delta x+\Delta y+\Delta z=0$
    $E_{2}=\Delta x\Delta y+\Delta y\Delta z+\Delta z\Delta x$
    $E_{3}=\Delta x\Delta y\Delta z$
Expressing the integrand in terms of these polynomials, performing a multidimensional Taylor expansion and integrating term-by-term...
    ${\begin{aligned}R_{F}(x,y,z)&={\frac {1}{2{\sqrt {A}}}}\int _{0}^{\infty }{\frac {1}{\sqrt {(t+1)^{3}-(t+1)^{2}E_{1}+(t+1)E_{2}-E_{3}}}}dt\\&={\frac {1}{2{\sqrt {A}}}}\int _{0}^{\infty }\left({\frac {1}{(t+1)^{\frac {3}{2}}}}-{\frac {E_{2}}{2(t+1)^{\frac {7}{2}}}}+{\frac {E_{3}}{2(t+1)^{\frac {9}{2}}}}+{\frac {3E_{2}^{2}}{8(t+1)^{\frac {11}{2}}}}-{\frac {3E_{2}E_{3}}{4(t+1)^{\frac {13}{2}}}}+O(E_{1})+O(\Delta ^{6})\right)dt\\&={\frac {1}{\sqrt {A}}}\left(1-{\frac {1}{10}}E_{2}+{\frac {1}{14}}E_{3}+{\frac {1}{24}}E_{2}^{2}-{\frac {3}{44}}E_{2}E_{3}+O(E_{1})+O(\Delta ^{6})\right)\end{aligned}}$
The advantage of expanding about the mean value of the arguments is now apparent; it reduces $E_{1}$ identically to zero, and so eliminates all terms involving $E_{1}$ - which otherwise would be the most numerous.
An ascending series for $R_{J}$ may be found in a similar way. There is a slight difficulty because $R_{J}$ is not fully symmetric; its dependence on its fourth argument, $p$, is different from its dependence on $x$, $y$ and $z$. This is overcome by treating $R_{J}$ as a fully symmetric function of five arguments, two of which happen to have the same value $p$. The mean value of the arguments is therefore taken to be
    $A={\frac {x+y+z+2p}{5}}$
and the differences $\Delta x$, $\Delta y$ $\Delta z$ and $\Delta p$ defined by
    ${\begin{aligned}R_{J}(x,y,z,p)&=R_{J}(A(1-\Delta x),A(1-\Delta y),A(1-\Delta z),A(1-\Delta p))\\&={\frac {1}{A^{\frac {3}{2}}}}R_{J}(1-\Delta x,1-\Delta y,1-\Delta z,1-\Delta p)\end{aligned}}$
The elementary symmetric polynomials in $\Delta x$, $\Delta y$, $\Delta z$, $\Delta p$ and (again) $\Delta p$ are in full
    $E_{1}=\Delta x+\Delta y+\Delta z+2\Delta p=0$
    $E_{2}=\Delta x\Delta y+\Delta y\Delta z+2\Delta z\Delta p+\Delta p^{2}+2\Delta p\Delta x+\Delta x\Delta z+2\Delta y\Delta p$
    $E_{3}=\Delta z\Delta p^{2}+\Delta x\Delta p^{2}+2\Delta x\Delta y\Delta p+\Delta x\Delta y\Delta z+2\Delta y\Delta z\Delta p+\Delta y\Delta p^{2}+2\Delta x\Delta z\Delta p$
    $E_{4}=\Delta y\Delta z\Delta p^{2}+\Delta x\Delta z\Delta p^{2}+\Delta x\Delta y\Delta p^{2}+2\Delta x\Delta y\Delta z\Delta p$
    $E_{5}=\Delta x\Delta y\Delta z\Delta p^{2}$
However, it is possible to simplify the formulae for $E_{2}$, $E_{3}$ and $E_{4}$ using the fact that $E_{1}=0$. Expressing the integrand in terms of these polynomials, performing a multidimensional Taylor expansion and integrating term-by-term as before...
    ${\begin{aligned}R_{J}(x,y,z,p)&={\frac {3}{2A^{\frac {3}{2}}}}\int _{0}^{\infty }{\frac {1}{\sqrt {(t+1)^{5}-(t+1)^{4}E_{1}+(t+1)^{3}E_{2}-(t+1)^{2}E_{3}+(t+1)E_{4}-E_{5}}}}dt\\&={\frac {3}{2A^{\frac {3}{2}}}}\int _{0}^{\infty }\left({\frac {1}{(t+1)^{\frac {5}{2}}}}-{\frac {E_{2}}{2(t+1)^{\frac {9}{2}}}}+{\frac {E_{3}}{2(t+1)^{\frac {11}{2}}}}+{\frac {3E_{2}^{2}-4E_{4}}{8(t+1)^{\frac {13}{2}}}}+{\frac {2E_{5}-3E_{2}E_{3}}{4(t+1)^{\frac {15}{2}}}}+O(E_{1})+O(\Delta ^{6})\right)dt\\&={\frac {1}{A^{\frac {3}{2}}}}\left(1-{\frac {3}{14}}E_{2}+{\frac {1}{6}}E_{3}+{\frac {9}{88}}E_{2}^{2}-{\frac {3}{22}}E_{4}-{\frac {9}{52}}E_{2}E_{3}+{\frac {3}{26}}E_{5}+O(E_{1})+O(\Delta ^{6})\right)\end{aligned}}$
As with $R_{J}$, by expanding about the mean value of the arguments, more than half the terms (those involving $E_{1}$) are eliminated.

## Negative arguments

In general, the arguments x, y, z of Carlson's integrals may not be real and negative, as this would place a branch point on the path of integration, making the integral ambiguous. However, if the second argument of $R_{C}$, or the fourth argument, p, of $R_{J}$ is negative, then this results in a simple pole on the path of integration. In these cases the Cauchy principal value (finite part) of the integrals may be of interest; these are
    $\mathrm {p.v.} \;R_{C}(x,-y)={\sqrt {\frac {x}{x+y}}}\,R_{C}(x+y,y),$
and
    ${\begin{aligned}\mathrm {p.v.} \;R_{J}(x,y,z,-p)&={\frac {(q-y)R_{J}(x,y,z,q)-3R_{F}(x,y,z)+3{\sqrt {y}}R_{C}(xz,-pq)}{y+p}}\\&={\frac {(q-y)R_{J}(x,y,z,q)-3R_{F}(x,y,z)+3{\sqrt {\frac {xyz}{xz+pq}}}R_{C}(xz+pq,pq)}{y+p}}\end{aligned}}$
where
    $q=y+{\frac {(z-y)(y-x)}{y+p}}.$
which must be greater than zero for $R_{J}(x,y,z,q)$ to be evaluated. This may be arranged by permuting x, y and z so that the value of y is between that of x and z.

## Numerical evaluation

The duplication theorem can be used for a fast and robust evaluation of the Carlson symmetric form of elliptic integrals and therefore also for the evaluation of Legendre-form of elliptic integrals. Let us calculate $R_{F}(x,y,z)$: first, define $x_{0}=x$, $y_{0}=y$ and $z_{0}=z$. Then iterate the series
    $\lambda _{n}={\sqrt {x_{n}}}{\sqrt {y_{n}}}+{\sqrt {y_{n}}}{\sqrt {z_{n}}}+{\sqrt {z_{n}}}{\sqrt {x_{n}}},$
    $x_{n+1}={\frac {x_{n}+\lambda _{n}}{4}},y_{n+1}={\frac {y_{n}+\lambda _{n}}{4}},z_{n+1}={\frac {z_{n}+\lambda _{n}}{4}}$
until the desired precision is reached: if $x$, $y$ and $z$ are non-negative, all of the series will converge quickly to a given value, say, $\mu$. Therefore,
    $R_{F}\left(x,y,z\right)=R_{F}\left(\mu ,\mu ,\mu \right)=\mu ^{-1/2}.$
Evaluating $R_{C}(x,y)$ is much the same due to the relation
    $R_{C}\left(x,y\right)=R_{F}\left(x,y,y\right).$

## References and External links

* ↑ F.W.J. Olver, D.W. Lozier, R.F. Boisvert, and C.W. Clark, editors, 2010, NIST Handbook of Mathematical Functions (Cambridge University Press), Section 19.16, "Symmetic Integrals". Retrieved 2024-04-16..
* ↑ Carlson, Bille C. (1994). "Numerical computation of real or complex elliptic integrals". Numerical Algorithms. 10: 13–26. arXiv:math/9409227v1. doi:10.1007/BF02198293.
* B. C. Carlson, John L. Gustafson 'Asymptotic approximations for symmetric elliptic integrals' 1993 arXiv
* B. C. Carlson 'Numerical Computation of Real Or Complex Elliptic Integrals' 1994 arXiv
* B. C. Carlson 'Elliptic Integrals:Symmetric Integrals' in Chap. 19 of Digital Library of Mathematical Functions. Release date 2010-05-07. National Institute of Standards and Technology.
* 'Profile: Bille C. Carlson' in Digital Library of Mathematical Functions. National Institute of Standards and Technology.
* Press, WH; Teukolsky, SA; Vetterling, WT; Flannery, BP (2007), "Section 6.12. Elliptic Integrals and Jacobian Elliptic Functions", Numerical Recipes: The Art of Scientific Computing (3rd ed.), New York: Cambridge University Press, ISBN 978-0-521-88068-8, archived from the original on 2011-08-11, retrieved 2011-08-10
* Fortran code from SLATEC for evaluating RF, RJ, RC, RD,