Saturday, August 11, 2012

[kbitlnmx] Quadratically converging ellipse perimeter

The arithmetic-geometric mean may be used to compute values the complete elliptic integral of the first kind with quadratic convergence (number of digits precision doubles each iteration).  However, for determining ellipse perimeter, we need the second kind.  Michael Press, in a post to sci.math on Sun, 08 Feb 2009 02:55:24 -0800, explains how the complete elliptic integral of the second kind can be computed with the AGM:

Arithmetic-Geometric mean:

a_{n+1}  = (a_n + b_n)/2 
b_{n+1}  = sqrt{a_n * b_n} 
c_{n+1}  = (a_n - b_n)/2 
M(a, b)  = lim_{n -> oo} a_n = \lim_{n -> oo} b_n 

K(k) and E(k) are the complete elliptic integrals of the 
first and second kind.  k' = sqrt{1 - kk}.

K(k)  = int_0^{pi/2} du / sqrt{1-k^2.sin^2 u}    
      = pi / (2.M(1, k'))

E(k)  = int_0^{pi/2} sqrt{1-k^2.sin^2 u} du    
      = (1 - S) K(k)

where S = sum_n 2^{n-1}.(c_n)^2.

The perimeter, A, of an ellipse with semiaxes a and b, 
0 < b <= a is given by
  
    A = 4.a.E(k')
      = (aa - S).2.pi/M(a, b)

where a_0 = a, b_0 = b, c_0 = aa - bb. 

I have not verified if this works.

No comments :