Journal of Inequalities in Pure and Applied Mathematics A NOTE ON THE ACCURACY OF RAMANUJAN’S APPROXIMATIVE FORMULA FOR THE PERIMETER OF AN ELLIPSE volume 7, issue 1, article 21, 2006. MARK B. VILLARINO Escuela de Matemática, Universidad de Costa Rica, 2060 San José, Costa Rica. Received 27 June, 2005; accepted 19 November, 2005. Communicated by: S.S. Dragomir EMail: mvillari@cariari.ucr.ac.cr Abstract Contents JJ J II I Home Page Go Back Close c 2000 Victoria University ISSN (electronic): 1443-5756 192-05 Quit Abstract We present a detailed error analysis, with best possible constants, of Ramanujan’s most accurate approximation to the perimeter of an ellipse. 2000 Mathematics Subject Classification: 26D15, 33E05, 41A44. Key words: Ramanujan’s approximative formula, Best constants, Elliptic functions and integrals. Support from the Vicerrectoría de Investigación of the University of Costa Rica is acknowledged. We thank the referee for his valuable comments and additional references. A Note On the Accuracy of Ramanujan’s Approximative Formula for the Perimeter of an Ellipse Mark B. Villarino Contents 1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 2 Later History . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 3 Fundamental Lemma . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 4 Ivory’s Identity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 5 The Accuracy Lemma . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 6 The Accuracy of Ramanujan’s Approximation . . . . . . . . . . . . 19 References Title Page Contents JJ J II I Go Back Close Quit Page 2 of 22 J. Ineq. Pure and Appl. Math. 7(1) Art. 21, 2006 http://jipam.vu.edu.au 1. Introduction Let a and b be the semi-major and semi-minor axes of an ellipse with perimeter p and whose eccentricity is k. The final sentence of Ramanujan’s famous paper Modular Equations and Approximations to π, [6], says: “ The following approximation for p [was] obtained empirically: 3(a − b)2 √ (1.1) p = π (a + b) + +ε 10(a + b) + a2 + 14ab + b2 where ε is about 3ak20 .” 68719476736 Ramanujan never explained his “empirical” method of obtaining this approximation, nor ever subsequently returned to this approximation, neither in his published work, nor in his Notebooks [4]. Indeed, although the notebooks do contain the above approximation (see Entry 3 of Chapter XVIII) the statement there does not even mention his asymptotic error estimate stated above. Twenty years later Watson [7] claimed to have proven that Ramanujan’s approximation is in defect, but he never published his proof. In 1978, we established the following optimal version of Ramanujan’s approximation: Theorem 1.1 (Ramanujan’s Approximation Theorem). Ramanujan’s approximative perimeter 3(a − b)2 √ (1.2) pR := π (a + b) + 10(a + b) + a2 + 14ab + b2 A Note On the Accuracy of Ramanujan’s Approximative Formula for the Perimeter of an Ellipse Mark B. Villarino Title Page Contents JJ J II I Go Back Close Quit Page 3 of 22 J. Ineq. Pure and Appl. Math. 7(1) Art. 21, 2006 http://jipam.vu.edu.au underestimates the true perimeter, p, by (1.3) := π(a + b) · θ(λ) · λ10 , where a−b , a+b and where the function θ(λ) grows monotonically in 0 ≤ λ ≤ 1 while at the same time it satisfies the optimal inequalities 14 22 3 (1.5) < θ(λ) ≤ −π . 217 11 7 (1.4) λ := Please take note of the striking form of the sharp upper bound since it in 22 volves the number 7 − π which measures the accuracy of Archimedes’ famous approximation, 22 , to the transcendental number π! 7 Corollary 1.2. The error in defect, , as a function of λ, grows monotonically for 0 ≤ λ ≤ 1. Corollary 1.3. The error in defect, , as a function of the eccentricity, e, is given by ( 19 ) 2 √ (1.6) (e) := a δ(e) e20 . 2 1+ 1−e A Note On the Accuracy of Ramanujan’s Approximative Formula for the Perimeter of an Ellipse Mark B. Villarino Title Page Contents JJ J II I Go Back Close Moreover, (e) grows monotonically with e, 0 ≤ e ≤ 1, while δ(e) satisfies the optimal inequalities 7 22 − π 3π (1.7) < δ(e) ≤ 11 7 18 . 68719476736 2 Quit Page 4 of 22 J. Ineq. Pure and Appl. Math. 7(1) Art. 21, 2006 http://jipam.vu.edu.au This Corollary 1.3 explains the significance of Ramanujan’s own error estimate in (1.1). The latter is an asymptotic lower bound for (e) but it is not the optimal one. That is given in (1.7). A Note On the Accuracy of Ramanujan’s Approximative Formula for the Perimeter of an Ellipse Mark B. Villarino Title Page Contents JJ J II I Go Back Close Quit Page 5 of 22 J. Ineq. Pure and Appl. Math. 7(1) Art. 21, 2006 http://jipam.vu.edu.au 2. Later History We sent an (updated) copy of our 1978 preprint to Bruce Berndt in 1988 and he subsequently quoted its conclusions in his edition of Volume 3 of the Notebooks (see p. 150 [4]). However the details of our proofs have never been published and so we have decided to present them in this paper. Berndt’s discussion of Ramanujan’s approximation includes Almkvist’s very plausible suggestion that Ramanujan’s “empirical process” was to develop a continued fraction expansion of Ivory’s infinite series for the perimeter ([1]) as well as a proof, due independently to Almkvist and Askey, of our fundamental lemma (see §3). However, their proof is different from ours. The most recent work on the subject includes that by R. Barnard, K. Pearce, and K. Richards in [3], published in the year 2000, and the paper by H. Alzer and Qui, S.-L. (see [2]), which was published in the year 2004. The former also prove the major conclusion in our fundamental lemma, but their methods too are quite different from ours. The latter includes a sharp lower bound for elliptical arc length in terms of a power-mean type function. But their methods are also quite different from ours. A Note On the Accuracy of Ramanujan’s Approximative Formula for the Perimeter of an Ellipse Mark B. Villarino Title Page Contents JJ J II I Go Back Close Quit Page 6 of 22 J. Ineq. Pure and Appl. Math. 7(1) Art. 21, 2006 http://jipam.vu.edu.au 3. Fundamental Lemma Lemma 3.1 (Fundamental Lemma). Define the functions A(x) and B(x) and the coefficients An and Bn by: (3.1) (3.2) 3x √ := 1 + A1 x + A2 x2 + · · · , 10 + 4 − 3x 2 ∞ X 1 2n 1 xn := 1 + B1 x + B2 x2 + · · · . B(x) := n 2n − 1 4 n n=0 A(x) := 1 + Then: (3.3) (3.4) A1 = B1 , A2 = B2 , A3 = B3 , A4 = B4 A5 < B5 , A6 < B6 , . . . , An < Bn , . . . , where the strict inequalities in (3.4) are valid for all n ≥ 5. Proof. First we prove (3.3). We read this off directly from the numerical values of the expansion: 1 4 1 A2 = B2 = 16 1 A3 = B3 = 64 25 A4 = B4 = . 4096 A1 = B1 = A Note On the Accuracy of Ramanujan’s Approximative Formula for the Perimeter of an Ellipse Mark B. Villarino Title Page Contents JJ J II I Go Back Close Quit Page 7 of 22 J. Ineq. Pure and Appl. Math. 7(1) Art. 21, 2006 http://jipam.vu.edu.au Now we prove (3.4). For A5 , B5 , A6 , and B6 we verify (3.4) directly from their explicit numerical values. Namely, 47 21 − 32 49 , B = ⇒ A − B = <0 5 5 5 214 214 214 803 882 −79 A6 = 21 , B6 = 21 ⇒ A6 − B6 = 21 < 0. 2 2 2 Therefore it is sufficient to prove A5 = An < B n (3.5) for all n ≥ 7. (3.6) A Note On the Accuracy of Ramanujan’s Approximative Formula for the Perimeter of an Ellipse Mark B. Villarino Now the explicit formula for An is (3.7) An = an−1 + an−2 + an−3 + · · · + a1 + a0 Contents where 1 2n − 2 n−1 3 16n n−1 1 2n − 4 n−2 −1 3 16n−1 n − 2 25 1 · 2n − 3 1 an−2 := · 2n − 5 .. .. . . n−2 1 1 2 1 −1 a1 := 3 2 · 1− 1 162 1 25 n−1 4 −1 a0 := . 16 25 an−1 := (3.8) Title Page JJ J II I Go Back Close Quit Page 8 of 22 J. Ineq. Pure and Appl. Math. 7(1) Art. 21, 2006 http://jipam.vu.edu.au Next we write (3.9) An = an−1 an−2 an−3 an−4 a1 a0 1+ + + + ··· + + an−1 an−1 an−1 an−1 an−1 and assert: Claim 1. The ratios an−k−1 increase monotonically in absolute value as k inan−k creases from k = 1 to k = n − 1. Proof. For k = 1, . . . , n − 2, an−k−1 2 1 1 1 = 1+ + an−k 2n − 2k − 3 2 4n − 4k − 2 12 1 ≤ (which is the worst case and occurs when k = n − 2) 6 <1 A Note On the Accuracy of Ramanujan’s Approximative Formula for the Perimeter of an Ellipse Mark B. Villarino Title Page Contents For k = n − 1, a0 1 = < 1. a1 3 This completes the proof. an−k−1 alternate in sign. Claim 2. The ratios an−k Proof. This is a consequence of the definition of the ak . JJ J II I Go Back Close Quit Page 9 of 22 J. Ineq. Pure and Appl. Math. 7(1) Art. 21, 2006 http://jipam.vu.edu.au By Claim 1 and Claim 2 we can write (3.9) in the form An = an−1 (1 − something positive and smaller than 1) < an−1 . Therefore, to prove (3.8) for n ≥ 7, it suffices to prove that an−1 < Bn (3.10) for all n ≥ 7. By (3.8) and the definition of Bn , this last afirmation is equivalent to proving 2 1 1 2n − 2 n−1 1 1 2n , · 3 < · 2n − 3 16n n − 1 2n − 1 4n n A Note On the Accuracy of Ramanujan’s Approximative Formula for the Perimeter of an Ellipse Mark B. Villarino which, after some algebra, reduces to proving the implication Title Page n≥7⇒ n 2 · 2n−1 2n−3 2n n · 3n−1 < 1. JJ J If we define for all integers n ≥ 7 (3.11) f (n) := n 2 · 2n−1 2n−3 2n n · 3n−1 then the affirmation (3.10) turns out to be equivalent to (3.12) Contents n ≥ 7 ⇒ f (n) < 1 This latter affirmation is a consequence of the following two conditions: II I Go Back Close Quit Page 10 of 22 J. Ineq. Pure and Appl. Math. 7(1) Art. 21, 2006 http://jipam.vu.edu.au Condition 1. f (7) < 1. Condition 2. f (7) > f (8) > f (9) > · · · > f (k) > f (k + 1) > · · · Proof of Condition 1. By direct numerical computation, f (7) = 1701 < 1. 1936 Proof of Condition 2. We must show that k ≥ 7 ⇒ f (k) > f (k + 1). If we define (3.13) Mark B. Villarino Title Page g(k) := f (k) , f (k + 1) then we must show that (3.14) A Note On the Accuracy of Ramanujan’s Approximative Formula for the Perimeter of an Ellipse k ≥ 7 ⇒ g(k) > 1. Using the definition (3.11) of f (n) and the definition (3.14) of g(n), and reducing algebraically we find 2 2k 2k − 1 g(k) = , 6k − 9 k + 1 Contents JJ J II I Go Back Close Quit Page 11 of 22 J. Ineq. Pure and Appl. Math. 7(1) Art. 21, 2006 http://jipam.vu.edu.au and we must show that (3.15) 2k k≥7⇒ 6k − 9 2k − 1 k+1 2 > 1. Define the rational function of the real variable x: 2 2x 2x − 1 (3.16) g(x) := . 6x − 9 x + 1 Then the graph of y = g(x) has a vertical asymptote at x = 3 2 and lim+ g(x) = +∞. (3.17) x→ 32 Moreover, the derivative of g(x) is given by: g 0 (x) = 2(2x2 − 7x + 1) , x(x + 1)(2x − 1)(2x + 3) which implies that A Note On the Accuracy of Ramanujan’s Approximative Formula for the Perimeter of an Ellipse Mark B. Villarino Title Page Contents √ 7+ 41 3 < x < < 0 if , 4 2 √ g 0 (x) = 0 if x = 7+4 41 , √ > 0 if x > 7+4 41 . Therefore, for x ≥ 32 , g(x) decreases from “+∞” at x = 32 (see (3.17)) to an absolute minimum value (in 32 ≤ x < ∞) √ ! √ 7 + 41 37 − 41 √ = 1.0363895208 . . . g =1+ 4 399 + 69 41 JJ J II I Go Back Close Quit Page 12 of 22 J. Ineq. Pure and Appl. Math. 7(1) Art. 21, 2006 http://jipam.vu.edu.au and then increases monotonically as x → ∞ to its asymptotic limit y = this is enough to complete the proof of the Fundamental Lemma. 4 3 and A Note On the Accuracy of Ramanujan’s Approximative Formula for the Perimeter of an Ellipse Mark B. Villarino Title Page Contents JJ J II I Go Back Close Quit Page 13 of 22 J. Ineq. Pure and Appl. Math. 7(1) Art. 21, 2006 http://jipam.vu.edu.au 4. Ivory’s Identity In 1796, J. Ivory [5] published the following identity (in somewhat different notation): Theorem 4.1 (Ivory’s Identity). If 0 ≤ x ≤ 1 then the following formula for B(x) is valid: (4.1) 1 π Z 0 π q √ 1 + 2 x cos(2φ) + x dφ 2 ∞ X 1 2n 1 xn ≡ B(x). = n 2n − 1 4 n n=0 Proof. We sketch his elegant proof. Z q √ 1 π 1 + 2 x cos(2φ) + x dφ π 0 Z q q √ 2iφ √ 1 π = 1 + xe 1 + xe−2iφ dφ π 0 Z ∞ 1 πX 1 1 2m √ m 2πimφ = · ( x) e π 0 m=0 2m − 1 4m m ∞ X 1 2n √ n −2πinφ 1 × · ( x) e dφ 2n − 1 4n n n=0 ∞ 1X 1 1 2m √ m = · ( x) π m=0 2m − 1 4m m A Note On the Accuracy of Ramanujan’s Approximative Formula for the Perimeter of an Ellipse Mark B. Villarino Title Page Contents JJ J II I Go Back Close Quit Page 14 of 22 J. Ineq. Pure and Appl. Math. 7(1) Art. 21, 2006 http://jipam.vu.edu.au ∞ X Z π 1 1 2n √ n × · n ( x) e2πi(m−n)φ dφ 2n − 1 4 n 0 n=0 ∞ 2 X 1 1 2n xn = · n 2n − 1 4 n n=0 We will need the following evaluation in our investigation of the accuracy of Ramanujan’s approximation. Corollary 4.2. B(1) = (4.2) 4 . π = = = Mark B. Villarino Title Page Proof. By Ivory’s identity, B(1) = A Note On the Accuracy of Ramanujan’s Approximative Formula for the Perimeter of an Ellipse Z q √ 1 π 1 + 2 1 cos(2φ) + 1 dφ π 0 Z 1 πp 2 + 2 cos(2φ) dφ π 0 Z πp 1 4 cos2 (φ) dφ π 0 4 . π Contents JJ J II I Go Back Close Quit Page 15 of 22 J. Ineq. Pure and Appl. Math. 7(1) Art. 21, 2006 http://jipam.vu.edu.au 5. The Accuracy Lemma Theorem 5.1 (Accuracy Lemma). For 0 ≤ x ≤ 1, the function (5.1) A(x) := 1 + 3x √ 10 + 4 − 3x underestimates the function (5.2) B(x) := ∞ X n=0 2 1 1 2n xn 2n − 1 4n n 5 by a discrepancy, ∆(x) which is never more than π4 − 14 x and which is 11 always more than 2317 x5 : 3 5 4 14 (5.3) x < ∆(x) ≤ − x5 . 217 π 11 Moreover, the constants π4 − 14 and 2317 x5 are the best possible. 11 Proof. By the definition of A(x) and B(x) given in Theorem 1.1, the discrepancy ∆(x) is given by the series ∆(x) := B(x) − A(x) = (B5 − A5 )x5 + (B6 − A6 )x6 + · · · := δ5 x5 + δ6 x6 + · · · , where, again by Theorem 1.1, δk > 0 for k = 5, 6, . . . . A Note On the Accuracy of Ramanujan’s Approximative Formula for the Perimeter of an Ellipse Mark B. Villarino Title Page Contents JJ J II I Go Back Close Quit Page 16 of 22 J. Ineq. Pure and Appl. Math. 7(1) Art. 21, 2006 http://jipam.vu.edu.au On the one hand ∆(x) = x5 (δ5 + δ6 x + · · · ) ≤ x5 (δ5 + δ6 + δ7 + · · · ) = x5 ∆(1) = x5 {B(1) − A(1)} 4 14 5 − =x π 11 where we used Corollary 1.2 of Ivory’s identity in the last equality. Therefore 4 14 ∆(x) ≤ − x5 . π 11 is assumed This is half of the accuracy lemma. Moreover, the constant π4 − 14 11 for x = 1 and thus cannot be replaced by anything smaller, i.e., it is the best possible constant. On the other hand, we can write 5 ∆(x) = x {δ5 + G(x)}, where A Note On the Accuracy of Ramanujan’s Approximative Formula for the Perimeter of an Ellipse Mark B. Villarino Title Page Contents JJ J II I Go Back G(x) := δ6 x + δ7 x2 + · · · ⇒ This shows that ( G(x) ≥ 0 for all 0 ≤ x ≤ 1 , G(x) → 0 as x → 0. Close Quit Page 17 of 22 3 ∆(x) > δ5 x5 = 17 x5 2 J. Ineq. Pure and Appl. Math. 7(1) Art. 21, 2006 http://jipam.vu.edu.au and that ∆(x) 3 = 17 . 5 x 2 This proves both the other inequality in the theorem and the optimality of the constant δ5 = 2317 , i.e., that it cannot be replaced by any larger constant. This completes the proof of the Accuracy Lemma. lim x→0 A Note On the Accuracy of Ramanujan’s Approximative Formula for the Perimeter of an Ellipse Mark B. Villarino Title Page Contents JJ J II I Go Back Close Quit Page 18 of 22 J. Ineq. Pure and Appl. Math. 7(1) Art. 21, 2006 http://jipam.vu.edu.au 6. The Accuracy of Ramanujan’s Approximation Now we can achieve the main goal of this paper, namely to prove Ramanujan’s Approximation Theorem. First we express the perimeter of an ellipse and Ramanujan’s approximative perimeter in terms of the functions A(x) and B(x). Theorem 6.1. If p is the perimeter of an ellipse with semimajor axes a and b, and if pR is Ramanujan’s approximative perimeter, then: ( 2 ) a−b p = π(a + b) · B a+b (6.1) ( 2 ) a−b pR = π(a + b) · A . a+b Proof. We begin with Ivory’s Identity (§4) and in it we substitute x := Then the integral becomes 1 π Z 0 π a−b 2 a+b v s u 2 2 u a−b a−b t 1+2 cos(2φ) + dφ a+b a+b Z π 2 4 (a2 sin2 φ + b2 cos2 φ) dφ = π(a + b) 0 A Note On the Accuracy of Ramanujan’s Approximative Formula for the Perimeter of an Ellipse Mark B. Villarino Title Page Contents . JJ J II I Go Back Close Quit Page 19 of 22 J. Ineq. Pure and Appl. Math. 7(1) Art. 21, 2006 http://jipam.vu.edu.au and therefore ( 2 ) Z π 2 4 a−b (a2 sin2 φ + b2 cos2 φ) dφ. = B a+b π(a + b) 0 But, it is well known (Berndt [4]) that the perimeter, p, of an ellipse with semiaxes a and b is given by Z π 2 (a2 sin2 φ + b2 cos2 φ) dφ, p=4 A Note On the Accuracy of Ramanujan’s Approximative Formula for the Perimeter of an Ellipse 0 and thus ( (6.2) p = π(a + b) · B a−b a+b 2 ) . Moreover, some algebra shows us that ( 2 ) a−b 2 3 a+b a−b q A =1+ 2 a+b 10 + 4 − 3 a−b a+b 1 3(a − b)2 √ = (a + b) + a+b 10(a + b) + a2 + 14ab + b2 and we conclude that Ramanujan’s approximative formula, pR is given by ( 2 ) a−b (6.3) pR = π(a + b)A . a+b Mark B. Villarino Title Page Contents JJ J II I Go Back Close Quit Page 20 of 22 J. Ineq. Pure and Appl. Math. 7(1) Art. 21, 2006 http://jipam.vu.edu.au The formula for p above was the object of Ivory’s original paper [5]. Now we complete the proof of Theorem 1.1. Proof. Writing a−b , a+b and using the notation of the statement of Theorem 1.1. we conclude that λ := := π(a + b) · θ(λ) · λ10 ∆(λ2 ) 10 = π(a + b) · ·λ , λ10 where (6.4) A Note On the Accuracy of Ramanujan’s Approximative Formula for the Perimeter of an Ellipse Mark B. Villarino θ(λ) ≡ ∆(λ2 ) = δ5 + δ6 λ2 + · · · . λ10 Now we apply the Accuracy Lemma and the proof is complete. Title Page Contents JJ J II I Go Back Close Quit Page 21 of 22 J. Ineq. Pure and Appl. Math. 7(1) Art. 21, 2006 http://jipam.vu.edu.au References [1] G. ALMKVIST AND B. BERNDT, Gauss, Landen, Ramanujan, the Arithmetic-geometric Mean, Ellipses, π, and the Ladies Diary, Amer. Math. Monthly, 95 (1988), 585–608. [2] H. ALZER AND S.-L. QIU, Monotonicity theorems and inequalities for the complete elliptic integrals, J. Comp. Appl. Math., 172 (2004), 289–312. [3] R.W. BARNARD, K. PEARCE AND K.C. RICHARDS, A monotonicity property involving 3 F2 and comparisons of the classical approximations of elliptical arc length, SIAM J. Math. Anal., 32 (2000), 403–419. A Note On the Accuracy of Ramanujan’s Approximative Formula for the Perimeter of an Ellipse [4] B. BERNDT, Ramanujan’s Notebooks, Volume 3, Springer, New York, 1998. Mark B. Villarino [5] J. IVORY, A new series for the rectification of the ellipsis; together with some observations on the evolution of the formula (a2 + b2 − 2ab cos φ)n , Trans. R. Soc. Edinburgh, 4 (1796), 177–190. Title Page [6] S. RAMANUJAN, Ramanujan’s Collected Works, Chelsea, New York, 1962. [7] G.N. WATSON, The Marquis and the land agent, Mathematical Gazette, 17 (1933), 5–17. Contents JJ J II I Go Back Close Quit Page 22 of 22 J. Ineq. Pure and Appl. Math. 7(1) Art. 21, 2006 http://jipam.vu.edu.au