({{, (RefLink[EllipticPi, paclet:ref/EllipticPi])[n,m]
gives the complete elliptic integral of the third kind Π(n|m). }, {, (RefLink[EllipticPi, paclet:ref/EllipticPi])[n,ϕ,m]
gives the incomplete elliptic integral Π(n;ϕ|m). }})

OpenersNotesSection(Spacer1)Details

Mathematical function, suitable for both symbolic and numerical manipulation.

Π(n;ϕ|m)=(∫_0^ϕ)(((((1-n (sin^2)(θ)))^(-1))[1-m (sin^2)(θ)])^(-1/2))d θ.

Π(n|m)=Π(n;(π/2)|m).

For certain special arguments, (RefLink[EllipticPi, paclet:ref/EllipticPi]) automatically evaluates to exact values.

(RefLink[EllipticPi, paclet:ref/EllipticPi]) can be evaluated to arbitrary numerical precision.

(RefLink[EllipticPi, paclet:ref/EllipticPi]) automatically threads over lists.

OpenersPrimaryExamplesSection(Spacer1)Examples  (39)

OpenersExampleSection0(Spacer1)Basic Examples  (3)

Evaluate numerically:

EllipticPi[0.4,0.6]

Plot[EllipticPi[m,0.6],{m,0,1}]

Series expansions:

Series[EllipticPi[n,ϕ,m],{m,0,1}]

Series[EllipticPi[n,ϕ,m],{ϕ,0,5}]

OpenersExampleSection1(Spacer1)Scope  (26)

OpenersExampleSubsection0(Spacer1)Numerical Evaluation  (5)

Evaluate the incomplete elliptic integral numerically:

EllipticPi[1/3,Pi/5,0.3]

Evaluate to high precision:

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,0.999999999999999999990000000000]

Evaluate for complex arguments:

EllipticPi[-2,1-2.I]

EllipticPi[-1,2.5+I,1/3-I]

Evaluate (RefLink[EllipticPi, paclet:ref/EllipticPi]) efficiently at high precision:

EllipticPi[1/2,0.6`500]//Timing

EllipticPi[1/2,0.6`50000];//Timing

(RefLink[EllipticPi, paclet:ref/EllipticPi]) threads elementwise over lists:

EllipticPi[{0.2,0.5,1.8},1/2]

OpenersExampleSubsection1(Spacer1)Specific Values   (3)

Simple exact values are generated automatically:

{EllipticPi[0,m],EllipticPi[n,0]}

{EllipticPi[n,0,m],EllipticPi[n,ϕ,0]}

Values at infinity:

EllipticPi[Infinity,m]

EllipticPi[n,Infinity]

Find a real root of the equation (EllipticPi[x, (6/10)])==3:

f[x_]:=EllipticPi[x,6/10]-3;
xzero=Solve[f[x]==0&&0<x<1.0,x][[1,1,2]]//Quiet

Plot[f[x],{x,0,1},Epilog->{PointSize[Large],Red,Point[{xzero,f[xzero]}]}]

OpenersExampleSubsection2(Spacer1)Visualization  (4)

Plot (RefLink[EllipticPi, paclet:ref/EllipticPi]) for various values of the second parameter m:

Plot[{EllipticPi[n,-2],EllipticPi[n,1/7],EllipticPi[n,6/7]},{n,-1,2}]

Plot (RefLink[EllipticPi, paclet:ref/EllipticPi]) for various values of the first parameter n:

Plot[{EllipticPi[-2,m],EllipticPi[1/6,m],EllipticPi[5/6,m]},{m,-2,1.5},]

Plot the incomplete elliptic integral (EllipticPi3[n, (π/3), m]) for various values of parameter m:

Plot[{EllipticPi[n,Pi/3,-2],EllipticPi[n,Pi/3,1/7],EllipticPi[n,Pi/3,6/7]},{n,-1,1.5},]

Plot the real part of (EllipticPi[-2, x+i y]):

ContourPlot[Re[EllipticPi[-2,x+I y]],{x,-3,3},{y,-3,3},]

Plot the imaginary part of (EllipticPi[-2, x+i y]):

ContourPlot[Im[EllipticPi[-2,x+I y]],{x,-3,3},{y,-3,3},]

OpenersExampleSubsection3(Spacer1)Differentiation  (4)

First derivative with respect to the first parameter:

D[EllipticPi[n,m],n]//Simplify

Higher derivatives:

derivs=Table[D[EllipticPi[n,m],{n,k}],{k,1,3}]//Simplify

Plot higher derivatives for m=-2:

Plot[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]

Higher derivatives:

derivs=Table[D[EllipticPi[n,m],{m,k}],{k,1,3}]//Simplify

Plot higher derivatives for n=-2:

Plot[Evaluate[derivs/.n->-2],{m,-4,1},PlotLegends->{"First Derivative","Second Derivative","Third Derivative"}]

OpenersExampleSubsection4(Spacer1)Integration  (3)

Indefinite integral with respect to m:

Integrate[EllipticPi[n,m],m]//Simplify

Definite integral:

Integrate[EllipticPi[n,m],{m,-1,0}]

Integral involving the incomplete elliptic integral:

Integrate[Cos[ϕ] EllipticPi[n,ϕ,m],ϕ]

OpenersExampleSubsection5(Spacer1)Series Expansions  (3)

Taylor expansion for (RefLink[EllipticPi, paclet:ref/EllipticPi]) around m=0:

Series[EllipticPi[n,m],{m,0,3}]//Simplify

Plot the first three approximations for (EllipticPi[-2, m]) around m=0:

terms=Normal@Table[Series[EllipticPi[-2,m],{m,0,k}],{k,1,3}];
Plot[{EllipticPi[-2,m],terms},{m,-1,1},PlotLegends->{"(EllipticPi[-2, m])","\!\(\*FractionBox[\(π\), \(2\\ \*SqrtBox[\(3\)]\)]\) + ((π/8)-\!\(\*FractionBox[\(π\), \(8\\ \*SqrtBox[\(3\)]\)]\)) m","\!\(\*FractionBox[\(π\), \(2\\ \*SqrtBox[\(3\)]\)]\) + ((π/8)-\!\(\*FractionBox[\(π\), \(8\\ \*SqrtBox[\(3\)]\)]\)) m + ((π (Sqrt[3]))/64) (m^2)","Third approximation"}]

Series expansion for (RefLink[EllipticPi, paclet:ref/EllipticPi]) around the branch point n=1:

Series[EllipticPi[n,m],{n,1,1}]//Simplify

Plot the first three approximations for (EllipticPi[n, -2]) around n=1:

terms=Normal@Table[Series[EllipticPi[n,-2],{n,1,k}],{k,1,3}];
Plot[{EllipticPi[n,-2],terms},{n,-1.3,1},PlotLegends->{"(EllipticPi[n, -2])","First approximation","Second approximation","Third approximation"}]

(RefLink[EllipticPi, paclet:ref/EllipticPi]) can be applied to power series:

EllipticPi[n,Exp[ϕ]-1+O[ϕ]^5,m]

OpenersExampleSubsection6(Spacer1)Function Representations  (4)

Integral representation:

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]

(RefLink[EllipticPi, paclet:ref/EllipticPi]) can be represented as a (RefLink[DifferentialRoot, paclet:ref/DifferentialRoot]):

DifferentialRootReduce[EllipticPi[n,m],m]

(RefLink[TraditionalForm, paclet:ref/TraditionalForm]) formatting:

EllipticPi[n,m]//TraditionalForm

EllipticPi[n,ϕ,m]//TraditionalForm

OpenersExampleSection2(Spacer1)Applications  (4)

Evaluate an elliptic integral:

Integrate[(1/(x(Sqrt[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 x, y-plane from a point (ρ,0,h):

Ω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>ρ}}];

Numerical comparison:

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)])\[DifferentialD]ρ;

The action can be expressed using (RefLink[EllipticPi, paclet:ref/EllipticPi]) (for brevity, occurring roots are abbreviated):

HamiltonS /. MapIndexed[#1->(Subscript[ℛ, #2[[1]]])&,Union[Cases[HamiltonS,_Root,∞]]] // Simplify

A conformal map:

f[w_]=Integrate[(Sqrt[((Cos[w]+1/2)/(Cos[w]-1/3))]),w]//PowerExpand

Visualize 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]

OpenersExampleSection3(Spacer1)Properties & Relations  (3)

Expand special cases using assumptions:

EllipticPi[n,z,1]//FunctionExpand

FunctionExpand[%,0<z<Pi/2]

This shows the branch cuts of the (RefLink[EllipticPi, paclet:ref/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}]

OpenersExampleSection4(Spacer1)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]//N

The defining integral converges only under additional conditions:

(∫_0^(π/2))(1/((1-n ((Sin[t])^2)) (Sqrt[1-m ((Sin[t])^2)])))\[DifferentialD]t

Different 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]&

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[EllipticK, paclet:ref/EllipticK])  ▪  (RefLink[EllipticF, paclet:ref/EllipticF])  ▪  (RefLink[EllipticE, paclet:ref/EllipticE])}})}})

({{DocumentationFooterIconsRelatedTutorial.png, ({{Tutorials}, {▪(RefLinkPlain[Elliptic Integrals and Elliptic Functions, paclet:tutorial/EllipticIntegralsAndEllipticFunctions])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Elliptic Integrals, paclet:guide/EllipticIntegrals])}, {▪(RefLinkPlain[Special Functions, paclet:guide/SpecialFunctions])}})}})

({{(Spacer1), ({{(Spacer1)Related Links}, {(WebLink[DocumentationFooterIconsRelatedLinks-MathWorld.png(Spacer1)MathWorld, http://mathworld.wolfram.com/EllipticIntegraloftheThirdKind.html])}, {DocumentationFooterIconsRelatedLinks-Functions.png(Spacer1)The Wolfram Functions Site}})}})