Post Reply 
(12C Platinum) Length of An Ellipse
01-16-2020, 10:18 PM (This post was last modified: 01-18-2020 01:04 AM by Albert Chan.)
Post: #7
RE: (12C Platinum) Length of An Ellipse
For ellipse perimeter using integrals, we can use Weierstrass Substitution.

\(t = \tan(x/2)\quad\quad\quad → dt = sec^2(x/2)/2\;dx\quad\quad\quad\quad\quad\quad
\; → dx = \left({2\over 1+t^2}\right)\;dt \)

Ellipse perimeter = \(4a \int _0 ^{\pi \over 2} \sqrt{1 - e^2\sin^2 x}\;dx
= 4a \int _0 ^1 \sqrt{1 - e^2\left({2t \over 1+t^2}\right)^2}
\left({2\over 1+t^2}\right)\;dt \)

Example, Casio FX-115ES Plus, a=50, b=10 → e² = 1-(b/a)² = 24/25

Perimeter   = 210.100445396890       // 4*50*EllipticE(24/25)
dx integral = 210.100445053320       // time = 4.0 sec
dt integral = 210.100445398816       // time = 2.8 sec

Turns out dx integral work better with simple Trapezoidal rule !

John D Cook's blog: Three surprises with the trapezoid rule
Quote:2. Although the trapezoid rule is inefficient in general, it can be shockingly efficient for periodic functions.

Redo above example for ellipse perimeter. (n = number of trapezoids)
Code:
n   dx trapezoid    dx simpson      dx romberg
2   207.519513599   213.860831727
4   209.945722803   210.754459204   210.547367702
8   210.098446673   210.149354630   210.102056335
16  210.100444351   210.101110244   210.097700423
32  210.100445397   210.100445745   210.100454618
64                  210.100445397   210.100446082
128                                 210.100445394
256                                 210.100445397
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
(12C Platinum) Length of An Ellipse - Gamo - 07-07-2019, 05:44 AM
RE: (12C Platinum) Length of An Ellipse - Albert Chan - 01-16-2020 10:18 PM



User(s) browsing this thread: 1 Guest(s)