# Is it possible to calculate perimeter of an ellipse? [closed]

Is it possible to integrate a function that would give the perimeter of an ellipse?

• Something like ArcLength[Circle[{0, 0}, {1, 2}]] or RegionMeasure[Circle[{0,0}, {1, 2}]]? – Carl Woll Feb 6 '17 at 23:50
• How to determine the arc length of ellipse? – C. E. Feb 6 '17 at 23:52
• Why using numerical methods when there are complete elliptical integrals implemented in Mathematica? en.wikipedia.org/wiki/Ellipse#Circumference – Felix Feb 7 '17 at 1:26
• @CarlWoll Do you know why I get two difference answer? – yode Jun 15 '17 at 18:20
• I think they are equal under the assumption a>0 && b>0. – Carl Woll Jun 15 '17 at 18:41

$c = 4 a \int\limits_{\theta = 0}^{\pi/2} \sqrt{1 - e^2 \sin^2(\theta)} d\theta = a \pi (2 + e^2)$,

where

$a$ is the semi-major axis length and $e$ the eccentricity.

c[a_, e_] := 4 a Integrate[1 + e^2 Sin[θ]^2, {θ, 0, π/2}]


You can visualize the ellipse by:

ellipseplotter[a_, e_] :=
ParametricPlot[
a {Cos[θ], e Sin[θ]}, {θ, 0, 2π}]

ellipseplotter[1, .5]


• first formula shows one minus, but the same (?) formula in the definition of c says one plus... did I miss something? – Michael Sep 6 '20 at 5:47
• $a \pi (2 + e^2)$ is NOT the perimeter. The integral you start with is correct but you have missed the Sqrt when evaluating this integral. The correct expression is c[a_, e_] = 4 a Integrate[Sqrt[1 - e^2 Sin[θ]^2], {θ, 0, π/2}, Assumptions -> {0 < e < 1}] which yields 4 a EllipticE[e^2] – lakshayg Sep 6 '20 at 18:23
• The ellipseplotter expression is a little misleading as well, the parametric equation of an ellipse is {a Cos[θ], b Sin[θ]} which is equivalent to a {Cos[θ], Sqrt[1 - e^2] Sin[θ]}. The equation that you have used represents an ellipse with eccentricity $\sqrt{1 - e^2}$ and not $e$ – lakshayg Sep 6 '20 at 18:38

To illustrate parametric approach and ArcLength (I acknowledge this was mentioned by @Carl Woll):

r[a_, b_, u_] := {a Cos[u], b Sin[u]}
perimeter[a_, b_] :=
NIntegrate[
Sqrt[FullSimplify[D[r[a, b, u], u].D[r[a, b, u], u]]], {u, 0, 2 Pi}]
Manipulate[
ParametricPlot[r[a, b, t], {t, 0, 2 Pi},
PlotLabel ->
Grid[{{"perimeter:", perimeter[a, b]}, {Style["ArcLength", Bold],
ArcLength[r[a, b, u], {u, 0, 2 Pi}]}}],
PlotRange -> Table[{-3, 3}, 2]], {a, 1, 3}, {b, 1, 3}]