CarlsonRK[x,y]
gives the Carlson's elliptic integral
.
CarlsonRK
CarlsonRK[x,y]
gives the Carlson's elliptic integral
.
Details
- Mathematical function, suitable for both symbolic and numerical manipulation.
- For non-negative arguments,
. - CarlsonRK[x,y] has a branch cut discontinuity at
. - For certain arguments, CarlsonRK automatically evaluates to exact values.
- CarlsonRK can be evaluated to arbitrary precision.
- CarlsonRK automatically threads over lists.
Examples
open all close allBasic Examples (3)
CarlsonRK[2., 3.]Plot3D[CarlsonRK[x, y], {x, 0, 3}, {y, 0, 3}]CarlsonRK is related to the complete elliptic integral of the first kind EllipticK:
π / 2 CarlsonRK[1, 1 - m] /. m -> 0.3EllipticK[m] /. m -> 0.3Scope (12)
Numerical Evaluation (5)
CarlsonRK[1.0, Sqrt[2] - 1]N[CarlsonRK[5, 7], 50]Precision of the output tracks the precision of the input:
CarlsonRK[5, 7.67890123456789012345]CarlsonRK[5, 7.678901234567890123456789012345]Evaluate for complex arguments:
CarlsonRK[1 + I, 1. - I]Evaluate efficiently at high precision:
Timing[CarlsonRK[11, 4`500]]Timing[Precision[CarlsonRK[11, 4`100000]]]CarlsonRK threads elementwise over lists:
CarlsonRK[4, {1., 2., 3., 4., 5.}]Specific Values (1)
Differentiation and Integration (2)
Functional Representation (1)
TraditionalForm formatting:
CarlsonRK[x, y]//TraditionalFormFunction Identities and Simplifications (3)
CarlsonRK satisfies the Euler–Poisson partial differential equation:
(x - y)Subscript[∂, xy]CarlsonRK[x, y] + (1/2) Subscript[∂, y]CarlsonRK[x, y] - (1/2)Subscript[∂, x]CarlsonRK[x, y] == 0//FunctionExpand//FullSimplifyCarlsonRK satisfies Euler's homogeneity relation:
x Subscript[∂, x]CarlsonRK[x, y] + y Subscript[∂, y]CarlsonRK[x, y] == -(1/2) CarlsonRK[x, y]//FunctionExpand//FullSimplifyA partial differential equation satisfied by CarlsonRK:
Subscript[∂, x]CarlsonRK[x, y] + Subscript[∂, y]CarlsonRK[x, y] == -(1/2 x y)CarlsonRE[x, y]//FunctionExpand//FullSimplifyApplications (5)
Total arc length of a lemniscate of Bernoulli:
N[2π CarlsonRK[1, 2], 25]Compare with the result of ArcLength:
ArcLength[{(Cos[t]/1 + Sin[t]^2), (Sin[t]Cos[t]/1 + Sin[t]^2)}, {t, 0, 2π}, WorkingPrecision -> 25]Evaluate an elliptic singular value:
N[{2π CarlsonRK[16, 8 + 3 Sqrt[7]], (Gamma[(1/7)]Gamma[(2/7)]Gamma[(4/7)]/47^(1/(4))π)}]Expectation value of the reciprocal square root of a quadratic form over a normal distribution:
MatrixForm[mat = HilbertMatrix[2]]NExpectation[(Sqrt[2]/Sqrt[{u, v}.mat.{u, v}]), {u, v}BinormalDistribution[0]]//QuietCompare with the closed-form result in terms of CarlsonRK:
N[Gamma[(1/2)](CarlsonRK@@Eigenvalues[mat]), 25]Visualize the solid angle subtended by a circular disk:
With[{L = 2, r0 = 2 / 5, rm = 1},
Graphics3D[{EdgeForm[], Polygon[PadRight[N@CirclePoints[rm, 24], {Automatic, 3}]], {Dashed, Line[{{r0, 0, 0}, {r0, 0, L}}]}, Sphere[{r0, 0, L}, rm / 20]}, Boxed -> False, ViewPoint -> {-2.4, -1.3, 2.}]]With[{L = 2, r0 = 2 / 5, rm = 1},
N[2π Boole[r0 < rm] - (2π L rm/rm - r0)(CarlsonRK[L^2 + (rm - r0)^2, L^2 + (rm + r0)^2] - (r0(L^2 + (rm - r0)^2)/(rm^2 - r0^2)^2) CarlsonRM[(L^2 + (rm + r0)^2/(rm + r0)^2), (L^2 + (rm - r0)^2/(rm + r0)^2), (L^2 + (rm - r0)^2/(rm - r0)^2)]), 20]]Compare with the result of NIntegrate:
With[{L = 2, r0 = 2 / 5, rm = 1},
L NIntegrate[(r/(r^2 - 2r0 r Cos[θ] + r0^2 + L^2)^3 / 2), {r, 0, rm}, {θ, 0, 2π}]]Visualize the intersection of a cylinder and a ball:
R = 1 / 6;r = 5 / 9;b = 5 / 11;
cyl = Cylinder[{{0, 0, 0}, {0, 0, 2r}}, R];
ball = Ball[{b, 0, r}, r];Show@{
Graphics3D[{Opacity[1 / 2], cyl, ball}], Region[RegionIntersection[cyl, ball], PlotTheme -> "Web"]}Volume of cylinder-ball intersection:
N[(2π/9 )(2R(3 R (2 r^2 - R^2) - b (b^2 - 4 r^2 + 5 b R + 7 R^2) + (3 r^4/b - R))CarlsonRK[(b - r + R) (b + r + R), 4b R] +
(b^2 - 4 r^2 + 7 R^2)CarlsonRE[(b - r + R) (b + r + R), 4b R] +
6b R r^4(b + r - R) (b + R) (b - r - R)CarlsonRM[(b - R)^2 (b - r + R) (b + r + R), 4 b R(b - R)^2, 4 b R r^2]), 20]Compare with the result of Volume:
Volume[RegionIntersection[cyl, ball], WorkingPrecision -> 20]Properties & Relations (3)
CarlsonRK is invariant under a permutation of its arguments:
CarlsonRK[x, y] == CarlsonRK[y, x]CarlsonRK and CarlsonRE satisfy Legendre's relation:
CarlsonRE[y - x, y]CarlsonRK[x, y] + CarlsonRE[x, y]CarlsonRK[y - x, y] - y CarlsonRK[x, y]CarlsonRK[y - x, y] == (2/π) /. {{x -> 5`50, y -> 7`50}, {x -> 5`50, y -> 3`50}}CarlsonRK is related to ArithmeticGeometricMean:
FullSimplify[CarlsonRK[x^2, y^2] == (1/ArithmeticGeometricMean[x, y]), x > 0 && y > 0]Neat Examples (1)
Probability that a random walker in a 3D cubic lattice returns to the origin:
1 - (6 + 2 Sqrt[3] + Sqrt[6]/18)CarlsonRK[1, 14 Sqrt[6] + 20 Sqrt[3] - 24 Sqrt[2] - 34]^-2 //NCarry out a modeling run of 1000 walks and count how many return to the origin:
BlockRandom[SeedRandom[11];Count[Table[walkerPosition = {0, 0, 0};steps = 0;While[steps++;walkerPosition += {{1, 0, 0}, {-1, 0, 0}, {0, 1, 0}, {0, -1, 0}, {0, 0, 1}, {0, 0, -1}}[[Random[Integer, {1, 6}]]];
steps < 100 && walkerPosition =!= {0, 0, 0}];steps, {1000}], _ ? (LessThan[100])]]Related Guides
History
Text
Wolfram Research (2021), CarlsonRK, Wolfram Language function, https://reference.wolfram.com/language/ref/CarlsonRK.html.
CMS
Wolfram Language. 2021. "CarlsonRK." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/CarlsonRK.html.
APA
Wolfram Language. (2021). CarlsonRK. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/CarlsonRK.html
BibTeX
@misc{reference.wolfram_2026_carlsonrk, author="Wolfram Research", title="{CarlsonRK}", year="2021", howpublished="\url{https://reference.wolfram.com/language/ref/CarlsonRK.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_carlsonrk, organization={Wolfram Research}, title={CarlsonRK}, year={2021}, url={https://reference.wolfram.com/language/ref/CarlsonRK.html}, note=[Accessed: 13-June-2026]}