EllipticPi[n,m]
gives the complete elliptic integral of the third kind
.
EllipticPi[n,ϕ,m]
gives the incomplete elliptic integral
.
EllipticPi
EllipticPi[n,m]
gives the complete elliptic integral of the third kind
.
EllipticPi[n,ϕ,m]
gives the incomplete elliptic integral
.
Details
- Mathematical function, suitable for both symbolic and numerical manipulation.
- For real
,
,
and
,
where the principal value integral is understood for
.
.- EllipticPi[n,m] has branch cut discontinuities at
and at
. - EllipticPi[n,ϕ,m] has branch cut discontinuities at
, at
and at
. - For certain special arguments, EllipticPi automatically evaluates to exact values.
- EllipticPi can be evaluated to arbitrary numerical precision.
- EllipticPi automatically threads over lists.
- EllipticPi can be used with Interval and CenteredInterval objects. »
Examples
open all close allBasic Examples (6)
EllipticPi[0.4, 0.6]Plot over a subset of the reals:
Plot[EllipticPi[n, 0.6], {n, 0, 1}]Plot over a subset of the complexes:
ComplexPlot3D[EllipticPi[z, 0.5], {z, -2 - 2I, 2 + 2I}, PlotLegends -> Automatic]Plot the incomplete elliptic integral over a subset of the complexes:
ComplexPlot3D[EllipticPi[z, Pi / 3, -2], {z, -2 - 2I, 2 + 2I}, PlotLegends -> Automatic]Series expansions at the origin:
Series[EllipticPi[n, ϕ, m], {m, 0, 1}]Series[EllipticPi[n, ϕ, m], {ϕ, 0, 5}]Series expansion at Infinity:
Series[EllipticPi[n, m], {m, ∞, 2}]//Normal//FullSimplifyScope (36)
Numerical Evaluation (6)
Evaluate the incomplete elliptic integral numerically:
EllipticPi[1 / 3, Pi / 5, 0.3]N[EllipticPi[3 / 10, 4 / 10], 50]N[EllipticPi[3 / 10, 2, 4 / 10], 50]The precision of the output tracks the precision of the input:
EllipticPi[1 / 2, 2, 0.111111111111111111110000000000]Evaluate for complex arguments:
EllipticPi[-2, 1 - 2.I]EllipticPi[-1, 2.5 + I, 1 / 3 - I]Evaluate EllipticPi efficiently at high precision:
EllipticPi[1 / 2, 0.6`500]//TimingEllipticPi[1 / 2, 0.6`50000];//TimingCompute worst-case guaranteed intervals using Interval and CenteredInterval objects:
EllipticPi[1, 0.2, Interval[{0.3, 0.4}]]EllipticPi[1 / 2, CenteredInterval[-4, 1 / 10]]EllipticPi[1 / 2, 1 / 3, CenteredInterval[1 / 4, 1 / 5]]Or compute average-case statistical intervals using Around:
EllipticPi[1 / 2, Around[1 / 3, 0.01]]Compute the elementwise values of an array:
EllipticPi[{{-1, 0}, {0, 1 / 2}}, 0]//FunctionExpandOr compute the matrix EllipticPi function using MatrixFunction:
MatrixFunction[EllipticPi[#, 0]&, {{-1, 0}, {0, 1 / 2}}]//FunctionExpandSpecific Values (3)
Simple exact values are generated automatically:
{EllipticPi[0, m], EllipticPi[n, 0]}{EllipticPi[n, 0, m], EllipticPi[n, ϕ, 0]}EllipticPi[Infinity, m]EllipticPi[n, Infinity]Find a real root of the equation
:
f[x_] := EllipticPi[x, 6 / 10] - 3;
xzero = Solve[f[x] == 0 && 0 < x < 1.0, x][[1, 1, 2]]//QuietPlot[f[x], {x, 0, 1}, Epilog -> Style[Point[{xzero, f[xzero]}], PointSize[Large], Red]]Visualization (4)
Plot EllipticPi for various values of the second parameter
:
Plot[{EllipticPi[n, -2], EllipticPi[n, 1 / 7], EllipticPi[n, 6 / 7]}, {n, -1, 2}]Plot EllipticPi for various values of the first parameter
:
Plot[{EllipticPi[-2, m], EllipticPi[1 / 6, m], EllipticPi[5 / 6, m]}, {m, -2, 1.5}, IconizedObject[«PlotOptions»]]Plot the incomplete elliptic integral
for various values of parameter
:
Plot[{EllipticPi[n, Pi / 3, -2], EllipticPi[n, Pi / 3, 1 / 7], EllipticPi[n, Pi / 3, 6 / 7]}, {n, -1, 1.5}, IconizedObject[«PlotOptions»]]ComplexContourPlot[Re[EllipticPi[-2, z]], {z, -5 - 5I, 5 + 5I}, IconizedObject[«PlotOptions»]]ComplexContourPlot[Im[EllipticPi[-2, z]], {z, -5 - 5I, 5 + 5I}, IconizedObject[«PlotOptions»]]Function Properties (9)
EllipticPi is not an analytic function:
FunctionAnalytic[EllipticPi[n, m], {n, m}]Has both singularities and discontinuities:
FunctionSingularities[EllipticPi[n, m], {n, m}]FunctionDiscontinuities[EllipticPi[n, m], {n, m}]EllipticPi is not a meromorphic function:
FunctionMeromorphic[EllipticPi[n, m], {n, m}]FunctionDomain[EllipticPi[n, 1 / 5], n]FunctionRange[EllipticPi[n, 1 / 5], n, y]Convert to a numerical approximation:
%//N
is neither nondecreasing nor nonincreasing:
FunctionMonotonicity[{EllipticPi[n, 1 / 5], n != 0}, n]FunctionInjective[EllipticPi[n, 1 / 5], n]Plot[{EllipticPi[n, 1 / 5], 5}, {n, -2, 2}]FunctionSurjective[EllipticPi[n, .2], n]Plot[{EllipticPi[n, .2], -2}, {n, -2, 2}]
is neither non-negative nor non-positive:
FunctionSign[{EllipticPi[n, 1 / 5], n != 1}, n]
is neither convex nor concave:
FunctionConvexity[{EllipticPi[n, 2], n != 1}, n]Differentiation (4)
First derivative with respect to the first parameter:
D[EllipticPi[n, m], n]//Simplifyderivs = Table[D[EllipticPi[n, m], {n, k}], {k, 1, 3}]//SimplifyPlot[Evaluate[derivs /. m -> -2], {n, -4, 1}, PlotLegends -> {"First Derivative", "Second Derivative", "Third Derivative"}]Differentiate with the respect to the second argument:
D[EllipticPi[n, m], m]derivs = Table[D[EllipticPi[n, m], {m, k}], {k, 1, 3}]//SimplifyPlot[Evaluate[derivs /. n -> -2], {m, -4, 1}, PlotLegends -> {"First Derivative", "Second Derivative", "Third Derivative"}]Integration (3)
Indefinite integral with respect to
:
Integrate[EllipticPi[n, m], m]//SimplifyIntegrate[EllipticPi[n, m], {m, -1, 0}, Assumptions -> 0 < n < 1]Integral involving the incomplete elliptic integral:
Integrate[Cos[ϕ] EllipticPi[n, ϕ, m], ϕ]Series Expansions (3)
Taylor expansion for EllipticPi around
:
Series[EllipticPi[n, m], {m, 0, 3}]//SimplifyPlot the first three approximations for
around
:
terms = Normal@Table[Series[EllipticPi[-2, m], {m, 0, k}], {k, 1, 3}];
Plot[{EllipticPi[-2, m], terms}, {m, -2, 2}]Series expansion for EllipticPi around the branch point
:
Series[EllipticPi[n, m], {n, 1, 1}]//SimplifyPlot the first three approximations for
around
:
terms = Normal@Table[Series[EllipticPi[n, -2], {n, 1, k}], {k, 1, 3}];
Plot[{EllipticPi[n, -2], terms}, {n, -1.3, 1}]EllipticPi can be applied to power series:
EllipticPi[n, Exp[ϕ] - 1 + O[ϕ] ^ 5, m]Function Representations (4)
Integrate[1 / ((1 - n Sin[t] ^ 2) Sqrt[1 - m Sin[t] ^ 2]), {t, 0, ϕ}, Assumptions -> 0 < n < 1 && 0 < m < 1 && ϕ > 0]The complete elliptic integral of the third kind is a partial case of the incomplete elliptic integral:
EllipticPi[n, (π/2), m]EllipticPi can be represented as a DifferentialRoot:
DifferentialRootReduce[EllipticPi[n, m], m]TraditionalForm formatting:
EllipticPi[n, m]//TraditionalFormEllipticPi[n, ϕ, m]//TraditionalFormApplications (6)
Evaluate an elliptic integral:
Integrate[(1/xSqrt[x ^ 3 + 2 x - 3]), x]Definition of the solid angle subtended by a disk (for instance a detector, a road sign) at the origin in the
,
‐plane from a point
:
ΩInt[R_, ρ_, h_] := With[{ray = {ρ, 0, h} - {r Cos[φ], r Sin[φ], 0}}, NIntegrate[Evaluate[(((ray/Norm[ray])).{0, 0, 1}/ray.ray)r ], {r, 0, R}, {φ, 0, 2Pi}]]Closed form result for the solid angle:
Ω[R_, ρ_, h_] = Piecewise[{{2 π (1 - (h/Sqrt[h^2 + R^2])), ρ == 0}, {2 Sqrt[(h^2/h^2 + (R + ρ)^2)] (-EllipticK[(4 R ρ/h^2 + (R + ρ)^2)] + Sqrt[1 - (4 R ρ/(R + ρ)^2)] EllipticPi[(4 R ρ/(R + ρ)^2), (4 R ρ/h^2 + (R + ρ)^2)]), R < ρ}, {π - 2 Sqrt[(h^2/h^2 + 4 R^2)] EllipticK[(4 R^2/h^2 + 4 R^2)], R == ρ}, {2 π (1 - (1/π)Sqrt[(h^2/h^2 + (R + ρ)^2)] (EllipticK[(4 R ρ/h^2 + (R + ρ)^2)] + Sqrt[1 - (4 R ρ/(R + ρ)^2)] EllipticPi[(4 R ρ/(R + ρ)^2), (4 R ρ/h^2 + (R + ρ)^2)])), R > ρ}}];With[{R = 1}, Module[{ρ = 2.3, h = 3.4}, {ΩInt[R, ρ, h], Ω[R, ρ, h]}]]Plot the solid angle as a function of horizontal distance and height:
Plot3D[Ω[1, ρ, h], {ρ, 0, 3}, {h, 0, 3}]This calculates the classical action for a relativistic 3D oscillator:
HamiltonS = -ℰ t + ℒ φ + ∫Sqrt[(1/c^2)(ℰ - (1/2) m ω ρ^2)^2 - (ℒ^2/ρ^2) - m^2 c^2]ⅆρ;The action can be expressed using EllipticPi (for brevity, occurring roots are abbreviated):
HamiltonS /. MapIndexed[#1 -> Subscript[ℛ, #2[[1]]]&, Union[Cases[HamiltonS, _Root, ∞]]] // Simplifyf[w_] = Integrate[Sqrt[(Cos[w] + 1 / 2/Cos[w] - 1 / 3)], w]//PowerExpandVisualize the image of lines of constant real and imaginary parts:
ParametricPlot[{Re[f[u + I v]], Im[f[u + I v]]}, {u, -Pi / 2, Pi / 2}, {v, 1 / 100, 2}, Mesh -> 15]Parameterization of genus‐1 constant mean-curvature Wente torus:
WenteEmbedding[params : {H_, 𝓂_, m_, γ_, ℽ_, Γ_, α_, 𝒶_, b_, p_}, {u_, v_}] := Module[{𝓏, ω, 𝒿},
𝓏 = Sqrt[(2/H)](1/𝒶^2)((((𝒶^2 - b)(γ Cos[u])^2 + p)ℽ JacobiCN[v, 𝓂] - (p(γ Cos[u])^2 + 𝒶^2 + b)γ Cos[u]) / ((1 - Γ Cos[u]JacobiCN[v, 𝓂])Sqrt[p - 2b(γ Cos[u])^2 - p(γ Cos[u])^4]));
ω = (2 Sqrt[H]/α)((2/1 - Γ^2)EllipticPi[(Γ^2/Γ^2 - 1), u, m] - EllipticF[u, m]);
𝒿 = u - ArcTan[((2 Sqrt[H] - α Sqrt[1 - m Sin[u]^2]) Sin[2 u]/2 (2 Sqrt[H] Cos[u]^2 + α Sin[u]^2 Sqrt[1 - m Sin[u]^2]))];
{𝓏 Cos[ω - 𝒿] + (Cos[ω]/2 H), 𝓏 Sin[ω - 𝒿] + (Sin[ω]/2 H), ((1/𝒶 Sqrt[H])) ((2Γ Cos[u] JacobiSN[v, 𝓂] JacobiDN[v, 𝓂]/1 - Γ Cos[u] JacobiCN[v, 𝓂]) + (2/ℽ)JacobiZN[v, 𝓂])}]WenteSineSquaredValues[r_Rational /; 1 < r < 2, m_Real /; 0 < m < 1] := N[ /. FindRoot[With[{g = Sqrt[(/1 - )]Sqrt[(m/1 - m)]}, (2/1 - g)EllipticPi[(g/g - 1), ] - EllipticK[]] == r (Pi/2)(1/Sqrt[1 - 2 - (2m - 1)Sqrt[(1 - ) / (m(1 - m))]]), {, 1 / 10, 0, 4 / 23}, WorkingPrecision -> Precision[m] - 2], Precision[m] - 5]WenteTorusFunction[lobes_Integer /; lobes ≥ 2, u_, v_] := Module[{𝓂, m, g = lobes, H = 1 / 2, b, f, p, α, 𝒶, γ, ℽ, Γ},
(* elliptic parameter related to Halphen's constant *)
𝓂 = /. FindRoot[EllipticK[] == 2EllipticE[], {, 4 / 5}, WorkingPrecision -> 50];
m = WenteSineSquaredValues[1 + 1 / g, 𝓂];
γ = (m/1 - m)^(1/(4));ℽ = (𝓂/1 - 𝓂)^(1/(4));Γ = γ ℽ;
f = H / ((1 - 2m)Sqrt[𝓂(1 - 𝓂)] + (1 - 2𝓂)Sqrt[m(1 - m)]);
α = 2Sqrt[fSqrt[𝓂(1 - 𝓂)]];𝒶 = 2Sqrt[fSqrt[m(1 - m)]];
b = 4f Sqrt[m(1 - m)] (2 𝓂 - 1);p = 8f Sqrt[m(1 - m)] Sqrt[𝓂(1 - 𝓂)];
Sequence @@ {WenteEmbedding[{H, 𝓂, m, γ, ℽ, Γ, α, 𝒶, b, p}, {u, v}], {u, -π / 2, (2 g - 1)π / 2}, {v, 0, 4EllipticK[𝓂]}}
]Visualize 3‐lobe, 5‐lobe, 7‐lobe and 11‐lobe tori:
Table[ParametricPlot3D@@{WenteTorusFunction[l, u, v], Lighting -> "Neutral", Mesh -> False, PlotPoints -> 55, PlotStyle -> Opacity[1 / 2, Gray], Ticks -> None}, {l, {3, 5, 7, 11}}]//MulticolumnNumerically verify various change of parameter relations for EllipticPi:
EllipticPi[n, ϕ, m] + EllipticPi[m / n, ϕ, m] == EllipticF[ϕ, m] + Csc[ϕ]CarlsonRC[(Csc[ϕ]^2 - 1)(Csc[ϕ]^2 - m), (Csc[ϕ]^2 - n)(Csc[ϕ]^2 - m / n)] /. {{n -> 1 / 3, ϕ -> Pi / 3, m -> 1 / 4.}, {n -> 2, ϕ -> Pi / 3, m -> 1 / 4.}, {n -> -1, ϕ -> Pi / 3, m -> 1 / 4.}}(m - n)EllipticPi[n, ϕ, m] + (m - (m - n/1 - n))EllipticPi[(m - n/1 - n), ϕ, m] == m EllipticF[ϕ, m] - n (m - n/1 - n)Cot[ϕ]CarlsonRC[Csc[ϕ]^2(Csc[ϕ]^2 - m), (Csc[ϕ]^2 - n)(Csc[ϕ]^2 - (m - n/1 - n))] /. {{n -> 1 / 3, ϕ -> Pi / 3, m -> 1 / 4.}, {n -> 2, ϕ -> Pi / 3, m -> 1 / 4.}, {n -> -1, ϕ -> Pi / 3, m -> 1 / 4.}}(1 - n)EllipticPi[n, ϕ, m] + (1 - (m (1 - n)/m - n))EllipticPi[(m (1 - n)/m - n), ϕ, m] == EllipticF[ϕ, m] + (1 - n - (m (1 - n)/m - n))Sqrt[Csc[ϕ]^2 - m]CarlsonRC[Cot[ϕ]^2 Csc[ϕ]^2, (Csc[ϕ]^2 - n)(Csc[ϕ]^2 - (m (1 - n)/m - n))] /. {{n -> 1 / 3, ϕ -> Pi / 3, m -> 1 / 4.}, {n -> 2, ϕ -> Pi / 3, m -> 1 / 4.}, {n -> -1, ϕ -> Pi / 3, m -> 1 / 4.}}Properties & Relations (4)
EllipticPi[n,m] is real‐valued for
and
:
FunctionDomain[EllipticPi[n, m], {n, m}, Reals]Expand special cases using assumptions:
EllipticPi[n, z, 1]//FunctionExpandFunctionExpand[%, 0 < z < Pi / 2]This shows the branch cuts of the EllipticPi function:
Plot3D[Im[EllipticPi[1 / 2, x + I y]], {x, -2, 2}, {y, -2, 2}, Exclusions -> {y == 0}]Plot3D[Re[EllipticPi[0.2, x + I y, 1 / 4]], {x, -Pi, Pi}, {y, -2, 2}, ViewPoint -> {-2.5, -1.4, 1.8}, BoxRatios -> Automatic, Mesh -> None, Boxed -> False]Numerically find a root of a transcendental equation:
FindRoot[EllipticPi[z, 2]^3 + EllipticPi[z, 2] + z == 2, {z, I}]Possible Issues (3)
Limits at branch cuts can be wrong:
Limit[EllipticPi[2, (π/2) + ε I], ε -> 0, Direction -> -1]Limit[EllipticPi[2, (π/2) + ε I], ε -> 0, Direction -> +1]EllipticPi[2, Pi / 2 + 10^-6{-1, 1}I]//NThe defining integral converges only under additional conditions:
Subsuperscript[∫, 0, (π/2)](1/(1 - n Sin[t]^2) Sqrt[1 - m Sin[t]^2])ⅆtDifferent argument conventions exist that result in modified results:
Integrate[(1/(1 - n Sin[t]^2) Sqrt[1 - k^2 Sin[t]^2]), {t, 0, z}, GenerateConditions -> False]Integrate[(1/(1 - n t^2) Sqrt[(1 - m t^2) (1 - t^2)]), {t, 0, z}, GenerateConditions -> False]//Simplify[#, 0 < m < 1 && 0 < z < 1]&See Also
EllipticK EllipticF EllipticE CarlsonRM CarlsonRJ CarlsonRC
Function Repository: BulirschCEL BulirschEL3 BulirschEL HeumanLambda
Tech Notes
Related Guides
Related Links
History
Introduced in 1988 (1.0) | Updated in 2020 (12.2) ▪ 2021 (13.0) ▪ 2022 (13.1)
Text
Wolfram Research (1988), EllipticPi, Wolfram Language function, https://reference.wolfram.com/language/ref/EllipticPi.html (updated 2022).
CMS
Wolfram Language. 1988. "EllipticPi." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2022. https://reference.wolfram.com/language/ref/EllipticPi.html.
APA
Wolfram Language. (1988). EllipticPi. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/EllipticPi.html
BibTeX
@misc{reference.wolfram_2026_ellipticpi, author="Wolfram Research", title="{EllipticPi}", year="2022", howpublished="\url{https://reference.wolfram.com/language/ref/EllipticPi.html}", note=[Accessed: 12-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_ellipticpi, organization={Wolfram Research}, title={EllipticPi}, year={2022}, url={https://reference.wolfram.com/language/ref/EllipticPi.html}, note=[Accessed: 12-June-2026]}