# 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:

${\displaystyle R_{F}(x,y,z)={\tfrac {1}{2}}\int _{0}^{\infty }{\frac {dt}{\sqrt {(t+x)(t+y)(t+z)}}}}$
${\displaystyle R_{J}(x,y,z,p)={\tfrac {3}{2}}\int _{0}^{\infty }{\frac {dt}{(t+p){\sqrt {(t+x)(t+y)(t+z)}}}}}$
${\displaystyle R_{C}(x,y)=R_{F}(x,y,y)={\tfrac {1}{2}}\int _{0}^{\infty }{\frac {dt}{(t+y){\sqrt {(t+x)}}}}}$
${\displaystyle 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 ${\displaystyle \scriptstyle {R_{C}}}$ and ${\displaystyle \scriptstyle {R_{D}}}$ are special cases of ${\displaystyle \scriptstyle {R_{F}}}$ and ${\displaystyle \scriptstyle {R_{J}}}$, all elliptic integrals can ultimately be evaluated in terms of just ${\displaystyle \scriptstyle {R_{F}}}$ and ${\displaystyle \scriptstyle {R_{J}}}$.

The term symmetric refers to the fact that in contrast to the Legendre forms, these functions are unchanged by the exchange of certain of their arguments. The value of ${\displaystyle \scriptstyle {R_{F}(x,y,z)}}$ is the same for any permutation of its arguments, and the value of ${\displaystyle \scriptstyle {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.

## Relation to the Legendre forms

### Incomplete elliptic integrals

Incomplete elliptic integrals can be calculated easily using Carlson symmetric forms:

${\displaystyle F(\phi ,k)=\sin \phi R_{F}\left(\cos ^{2}\phi ,1-k^{2}\sin ^{2}\phi ,1\right)}$
${\displaystyle 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)}$
${\displaystyle \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 ${\displaystyle 0\leq \phi \leq 2\pi }$ and ${\displaystyle 0\leq k^{2}\sin ^{2}\phi \leq 1}$)

### Complete elliptic integrals

Complete elliptic integrals can be calculated by substituting φ = 12π:

${\displaystyle K(k)=R_{F}\left(0,1-k^{2},1\right)}$
${\displaystyle 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)}$
${\displaystyle \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 ${\displaystyle R_{F}}$ are the same, then a substitution of ${\displaystyle {\sqrt {t+x}}=u}$ renders the integrand rational. The integral can then be expressed in terms of elementary transcendental functions.

${\displaystyle R_{C}(x,y)=R_{F}(x,y,y)={\frac {1}{2}}\int _{0}^{\infty }{\frac {1}{{\sqrt {t+x}}(t+y)}}dt=\int _{\sqrt {x}}^{\infty }{\frac {1}{u^{2}-x+y}}du={\begin{cases}{\frac {\arccos {\sqrt {\frac {x}{y}}}}{\sqrt {y-x}}},&xy\\\end{cases}}}$

Similarly, when at least two of the first three arguments of ${\displaystyle R_{J}}$ are the same,

${\displaystyle R_{J}(x,y,y,p)=3\int _{\sqrt {x}}^{\infty }{\frac {1}{(u^{2}-x+y)(u^{2}-x+p)}}du={\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^{\frac {3}{2}}}},&y=p=x\\\end{cases}}}$

## Properties

### Homogeneity

By substituting in the integral definitions ${\displaystyle t=\kappa u}$ for any constant ${\displaystyle \kappa }$, it is found that

${\displaystyle R_{F}\left(\kappa x,\kappa y,\kappa z\right)=\kappa ^{-1/2}R_{F}(x,y,z)}$
${\displaystyle R_{J}\left(\kappa x,\kappa y,\kappa z,\kappa p\right)=\kappa ^{-3/2}R_{J}(x,y,z,p)}$

### Duplication theorem

${\displaystyle 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 ${\displaystyle \lambda ={\sqrt {xy}}+{\sqrt {yz}}+{\sqrt {zx}}}$.

{\displaystyle {\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 ${\displaystyle d=({\sqrt {p}}+{\sqrt {x}})({\sqrt {p}}+{\sqrt {y}})({\sqrt {p}}+{\sqrt {z}})}$ and ${\displaystyle \lambda ={\sqrt {xy}}+{\sqrt {yz}}+{\sqrt {zx}}}$

## Series Expansion

In obtaining a Taylor series expansion for ${\displaystyle \scriptstyle {R_{F}}}$ or ${\displaystyle \scriptstyle {R_{J}}}$ it proves convenient to expand about the mean value of the several arguments. So for ${\displaystyle \scriptstyle {R_{F}}}$, letting the mean value of the arguments be ${\displaystyle \scriptstyle {A=(x+y+z)/3}}$, and using homogeneity, define ${\displaystyle \scriptstyle {\Delta x}}$, ${\displaystyle \scriptstyle {\Delta y}}$ and ${\displaystyle \scriptstyle {\Delta z}}$ by

{\displaystyle {\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 ${\displaystyle \scriptstyle {\Delta x=1-x/A}}$ etc. The differences ${\displaystyle \scriptstyle {\Delta x}}$, ${\displaystyle \scriptstyle {\Delta y}}$ and ${\displaystyle \scriptstyle {\Delta z}}$ are defined with this sign (such that they are subtracted), in order to be in agreement with Carlson's papers. Since ${\displaystyle \scriptstyle {R_{F}(x,y,z)}}$ is symmetric under permutation of ${\displaystyle \scriptstyle {x}}$, ${\displaystyle \scriptstyle {y}}$ and ${\displaystyle \scriptstyle {z}}$, it is also symmetric in the quantities ${\displaystyle \scriptstyle {\Delta x}}$, ${\displaystyle \scriptstyle {\Delta y}}$ and ${\displaystyle \scriptstyle {\Delta z}}$. It follows that both the integrand of ${\displaystyle \scriptstyle {R_{F}}}$ and its integral can be expressed as functions of the elementary symmetric polynomials in ${\displaystyle \scriptstyle {\Delta x}}$, ${\displaystyle \scriptstyle {\Delta y}}$ and ${\displaystyle \scriptstyle {\Delta z}}$ which are

${\displaystyle E_{1}=\Delta x+\Delta y+\Delta z=0}$
${\displaystyle E_{2}=\Delta x\Delta y+\Delta y\Delta z+\Delta z\Delta x}$
${\displaystyle 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...

{\displaystyle {\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 ${\displaystyle \scriptstyle {E_{1}}}$ identically to zero, and so eliminates all terms involving ${\displaystyle \scriptstyle {E_{1}}}$ - which otherwise would be the most numerous.

An ascending series for ${\displaystyle \scriptstyle {R_{J}}}$ may be found in a similar way. There is a slight difficulty because ${\displaystyle \scriptstyle {R_{J}}}$ is not fully symmetric; its dependence on its fourth argument, ${\displaystyle \scriptstyle {p}}$, is different from its dependence on ${\displaystyle \scriptstyle {x}}$, ${\displaystyle \scriptstyle {y}}$ and ${\displaystyle \scriptstyle {z}}$. This is overcome by treating ${\displaystyle \scriptstyle {R_{J}}}$ as a fully symmetric function of five arguments, two of which happen to have the same value ${\displaystyle \scriptstyle {p}}$. The mean value of the arguments is therefore taken to be

${\displaystyle A={\frac {x+y+z+2p}{5}}}$

and the differences ${\displaystyle \scriptstyle {\Delta x}}$, ${\displaystyle \scriptstyle {\Delta y}}$ ${\displaystyle \scriptstyle {\Delta z}}$ and ${\displaystyle \scriptstyle {\Delta p}}$ defined by

{\displaystyle {\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 ${\displaystyle \scriptstyle {\Delta x}}$, ${\displaystyle \scriptstyle {\Delta y}}$, ${\displaystyle \scriptstyle {\Delta z}}$, ${\displaystyle \scriptstyle {\Delta p}}$ and (again) ${\displaystyle \scriptstyle {\Delta p}}$ are in full

${\displaystyle E_{1}=\Delta x+\Delta y+\Delta z+2\Delta p=0}$
${\displaystyle 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}$
${\displaystyle 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}$
${\displaystyle 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}$
${\displaystyle E_{5}=\Delta x\Delta y\Delta z\Delta p^{2}}$

However, it is possible to simplify the formulae for ${\displaystyle \scriptstyle {E_{2}}}$, ${\displaystyle \scriptstyle {E_{3}}}$ and ${\displaystyle \scriptstyle {E_{4}}}$ using the fact that ${\displaystyle \scriptstyle {E_{1}=0}}$. Expressing the integrand in terms of these polynomials, performing a multidimensional Taylor expansion and integrating term-by-term as before...

{\displaystyle {\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 ${\displaystyle \scriptstyle {R_{J}}}$, by expanding about the mean value of the arguments, more than half the terms (those involving ${\displaystyle \scriptstyle {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 ${\displaystyle \scriptstyle {R_{C}}}$, or the fourth argument, p, of ${\displaystyle \scriptstyle {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

${\displaystyle \mathrm {p.v.} \;R_{C}(x,-y)={\sqrt {\frac {x}{x+y}}}\,R_{C}(x+y,y),}$

and

{\displaystyle {\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

${\displaystyle q=y+{\frac {(z-y)(y-x)}{y+p}}.}$

which must be greater than zero for ${\displaystyle \scriptstyle {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 ${\displaystyle R_{F}(x,y,z)}$: first, define ${\displaystyle x_{0}=x}$, ${\displaystyle y_{0}=y}$ and ${\displaystyle z_{0}=z}$. Then iterate the series

${\displaystyle \lambda _{n}={\sqrt {x_{n}y_{n}}}+{\sqrt {y_{n}z_{n}}}+{\sqrt {z_{n}x_{n}}},}$
${\displaystyle 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 ${\displaystyle x}$, ${\displaystyle y}$ and ${\displaystyle z}$ are non-negative, all of the series will converge quickly to a given value, say, ${\displaystyle \mu }$. Therefore,

${\displaystyle R_{F}\left(x,y,z\right)=R_{F}\left(\mu ,\mu ,\mu \right)=\mu ^{-1/2}.}$

Note: for complex arguments and MATLAB use ${\displaystyle {\sqrt {x_{n}}}{\sqrt {y_{n}}}}$ instead of ${\displaystyle {\sqrt {x_{n}y_{n}}}}$ to get the correct values because of the complex square root branch choice ambiguity.

Evaluating ${\displaystyle R_{C}(x,y)}$ is much the same due to the relation

${\displaystyle R_{C}\left(x,y\right)=R_{F}\left(x,y,y\right).}$