Perimeter of an Ellipse by Two Computational Methods
​Authors: Housam Binous and Ahmed Bellagi

We compute the perimeter of an ellipse using two different approaches: (1) Elliptic integral formulation and (2) Arc-length continuation (numerical differential approach).​The ellipse is defined by:
2
x
2
a
+
2
y
2
b
=1
​​​Method 1: Based on Elliptic Integral​The exact perimeter of an ellipse is given by:
P=4bE(
2
e
)
​where: E(m) is the complete elliptic integral of the second kind and e is the eccentricity defined as:
e=
1-
2
a
2
b
.​​Method 2: Arc-Length Continuation Method​The second approach is based on the definition of arc length, where the perimeter is computed as the total length of a parametric curve.​For
a=3andb=5
, both calculations yield
P=25.527
Method based on elliptic integral
(*Semi-axes*)​​a=3;​​b=5;
(*Eccentricity*)​​e=Sqrt[1-(a^2/b^2)];
(*Exactperimeterusingellipticintegral*)​​Pexact=4.bEllipticE[e^2]
Out[]=
25.527
Method based on arc - length continuation
eq1=x[s]^2/a^2+y[s]^2/b^2==1(*equationofanellipse*)
Out[]=
2
x[s]
9
+
2
y[s]
25
1
eq2=x'[s]^2+y'[s]^2==1(*auxiliaryequation*)
Out[]=
2
′
x
[s]
+
2
′
y
[s]
1
In[]:=
SOL=Quiet@First@NDSolve[{eq1,eq2,x[0]==0,y[0]==b,x'[0]==0.01,y'[0]==0},{x,y},{s,0,40},AccuracyGoal->20]
Out[]=
xInterpolatingFunction
Domain: {{0.,40.}}
Output: scalar
,yInterpolatingFunction
Domain: {{0.,40.}}
Output: scalar

In[]:=
ParametricPlot[{x[s],y[s]}/.SOL,{s,0,40},Frame->True,GridLines->Automatic,PlotStyle->Darker@Red,ImageSize->Medium]
Out[]=
In[]:=
P=s/.FindRoot[(x[s]/.SOL)==0,{s,25}]
Out[]=
25.527