============================================================================= Average, Average, Average, an(d) alternating Series, Series, Series (with homage to ZETA(n) yet again) by Richard N. Barshinger Penn State-Scranton rxb10@psu.edu ============================================================================== Ready! Fire! Aim! In this paper we apply an interative process--hence the catchy characterization of interation given above--of succesive averages to partial sums of slowly convergent alternating series (at least those that satisfy more stringent, yet typical, conditions than the conditions imposed by the standard alternating series test) and, in so doing, accelerate convergence. We also see how this averaging process can be applied to series of positive constants in order to develop tighter integral remainder bounds that are based on a simple form of the Euler-Maclaurin formulas. Examples given throughout this paper are based mostly on series inf n associated with ZETA(n) = SUM 1/k , the Riemann Zeta function. k=1 Since the method is very natural and straightforward, it is easily teachable to Calculus II students (even weaker ones) and provides opportunity to discuss equally well the famous ZETA(2n), the more inf k+1 n mysterious ZETA(2n-1), and their variants: ETA(n) = SUM (-1) /k , k=1 inf n inf k+1 n LAMBDA(n) = SUM 1/(2k-1) , and BETA(n) = SUM (-1) /(2k-1) . k=1 k=1 Successively Averaging the Partial Sums of an Alternating Series ---------------------------------------------------------------- That the partial sums of a convergent alternating series, at least one that satisfies the standard alternating series test, oscillate about the sum (back and forth convergence) leads us to consider forming averages of successive pairs of those partial sums, thus obtaining a better sense of the final value. In turn, we then often observe that these averages themselves form a back and forth shrinking zoom window that appears to converge to the sum of the series, tempting us to average the averages--and so on. To make this precise, we follow Calabrese [9] and Pinsky [19], summarizing and extending their results. inf k+1 Let S = SUM (-1) a = a -a +a -..., and we define the following k=1 k 1 2 3 successive differences: b = a -a , b = a -a ,..., b = a -a ; 1 1 2 2 2 3 n n n+1 c = b -b , c = b -b ,..., c = b -b ; and so on. We define a 1 1 2 2 2 3 n n n+1 convergent alternating series as completely monotonic when the terms a and all successive differences b , c ,..., tend monotoni- n n n cally to zero. Alternating series encountered in the standard calculus texts are almost uniformly of this type. To understand why, let f(n) = a , and consider f(x). The sequences {b }, {c }, n n n ... , are just successive divided differences, with stepsize = 1 (see [8]), and, as such, are approximations to -f', +f'', -f''', n (n) etc. For the typical alternating series, (-1) f , n = 0,1,2,..., all strictly decrease to zero, proving the point. By contrast, article [19] presents concrete algebraic computations for {b } n and {c } for a specific series. n inf k+1 As a first example, consider SUM (-1) /(2k-1) = pi/4, its partial k=1 sums s (up to s ) and successive averages A , A , A ,..., n 11 1n 2n 3n A . The calculations, performed with MATLAB [16] are given in 101 Table 1 below, and, as such, this table reorganizes and extends the table given in [19]. [Editorial note: see Table 1 at end.] We make these observations about Table 1: 1. The numbers down an individual column form the beginning of a back and forth sequence that converges to S = pi/4. 2. Values across each odd numbered row form the beginning of a decreasing sequence of upper bounds that converge to S. 3. Values across each even numbered row for the beginning of an increasing sequence of lower bounds that converge to S. 4. The final two values in adjacent colums are alternate upper/lower or lower/upper bounds. 5. The largest lower bound and smallest upper bound occur at bottoms of columns that are not necessarily those columns furthest to the right. In particular, the tightest lower and upper bounds in Table 1 reside at the feet of columns A and A (A and A ). 7n 8n 74 83 It is an irresistable temptation to form one last average for these tightest bounds (we call this a back average), a value that is the best value obtainable by the successive simple pairwise averaging of the information given. Thus, S = (Best low + Best high)/2; best in the case of the information given in Table 1, S = (A + best 74 _ _ A )/2 = 0.785398296..., with a tightest bound window 0.7853969 < 83 _ pi/4 < 0.7853997. [In later analysis we shall, for ease of compar- ison, write S to two decimal places truncated (chopped) past best the places in agreement with the exact value. In addition, the lower and upper bounds will be written to two places past their similar digits, with the lower bound always properly truncated for error analysis and the upper bound always rounded upward. The overlined digit in all cases represents the last place of agree- ment between the values appropriately compared.] Article [19] presents, with proof, a proposition which, in the notation of our paper, reads as follows: For any alternating series of completely monotonic terms, and with s the last partial sum computed, the averages given by n A , n = 2,3,4,..., converge geometrically fast to the (n-1)1 sum of the series; in particular, A gives a value with (n-1)1 at least n binary places of accuracy. Table 2 below illustrates this proposition for the alternating series discussed above. The doubling function, f(x) = FLOOR(2x), was used to compute the binary expansions easily. [For example, in order to compute the binary expansion of 0.25, multiply by successive 2's. At each step, if the result is less than one, the binary digit is zero; if greater than one, subtract one, make the binary digit one, then repeat. Thus (2)(0.25)=0.50, (2)(0.50)=1.00, and (2)(0.00) remains zero. Hence 0.25 = . 0 1 0 0 0... .] base 2 [Editorial note: see Table 2 at end.] In Table 2 we observe that A (i.e., n = 11) agrees with pi/4 to 101 st exactly eleven binary digits, and S agrees up to the 21 best binary place. Similar computations for other series presesented here give even better agreement between the final A average 101 and exact value. Table 3 below summarizes results for other completely monotonic series, with successive averages based on s as the last partial 11 sum computed. As above, S and the exact value of the series are best carried to two decimal places (chopped) beyond their digits of agreement; lower bounds (chopped) and upper bounds (rounded upward) are carried to two places beyond agreement with one another. [Editorial note: see Table 3 at end.] Observe from Table 3 that, as a series converges more rapidly, the best bounds tend to appear further to the left in their appropriate tables of averages; pairwise agreement between values becomes all the better; and, averaging begins to lose its appeal. [Formal analysis of how and why this occurs will at present remain a tale for another time.] In particular, though the partial sum s was 66 included for comparision (since there are sixty-six values in the table of averages based on s ), for ZETA(6) we obtain ten-place 11 rounded accuracy with MicroCalc by s , significantly better than 47 averaging. Readers may humor themselves by calculating the almost inf k-1 -1 comical results for the series SUM (-1) /(k-1)! = e . k=1 Averaging as Applied to Convergent Series of Positive Constants --------------------------------------------------------------- We shall now show how the above method of successive averaging may inf be applied to other convergent series. To this end, consider SUM a , k=1 n a convergent series of positive constants, with f(n) = a decreas- n th ing to zero and with f' increasing to zero, S the n partial sum, n and R the remainder after n terms. As shown in [5], R is given n n by this simple form of the Euler-Maclaurin formulas: inf inf R(n) = INTEGRAL f + INTEGRAL Pf' n+1/2 n+1/2 inf n+1 n+3/2 n+2 = INTEGRAL f + INTEGRAL Pf' + INTEGRAL Pf' + INTEGRAL Pf' + ..., n+1/2 n+1/2 n+1 n+3/2 (+) (-) (+) (-) where P(x) = x - FLOOR(x) - 1/2 Call these terms b , b , b , b ,..., respectively, and define 1 2 3 4 inf F = INTEGRAL f . m n+m Integrating the Stieljas integrals b , b and b by parts, we get 2 3 4 b = F , b = (1/2)f(n+1) - F + F 1 1/2 2 1/2 1 b = (1/2)f(n+1) - F + F , b = (1/2)f(n+2) - F + F . 3 1 3/2 4 3/2 2 The first several partial sums of this alternating series for R(n), denoted by s , can then, with some telescoping, be written as n s = F , s = F + (1/2)f(n+1), 1 1/2 2 1 s = f(n+1) + F , s = f(n+1) + F + (1/2)f(n+2). 3 3/2 4 2 st It is clear that, since s is the (n+1) version of s , s is the 3 1 4 st the (n+1) version of s , and so on, there is nothing to be gained 2 by calculating arbitrarily high order successive averages. We now restrict our attention to three successively tighter lower bounds given by repeated averaging; namely, s , A , and A , as 2 12 22 defined earlier. Specifically, s is as given just above; it is 2 one of the lower bounds given in both [3] and [5] and is a clear improvement on the lower bound for the basic integral test, found in all calculus texts, for series of positive constants. Also, A = (1/2)(F + F ) + (3/4)f(n+1), 12 1 3/2 A = (1/4)F + (1/2)F + (1/4)F + (7/8)f(n+1) + (1/8)f(n+2). 22 1 3/2 2 For interest, we adopt a different approach for the decreasing upper bounds. One upper bound will be s , as above; another one is 1 the tightest upper bound given in [5]--we call it Boas best; and, an upper bound back average, A . The latter two are as follows: b Boas best = F + (1/2)f(n+1) + (1/8)ABS(f'(n+1)); 1 A = (1/2)(s + A ) = (1/2)F + (1/4)F + (1/4)F + (3/8)f(n+1). b 1 12 1/2 1 3/2 For a positive series with partial sums S and sum S, we have S + (Chosen Lower bound) < S < S + (Chosen Upper bound) , n n n n which is a convergent digital zoom window that shrinks, with fixed chosen bound types and increasing n, to the sum S. As examples of the use of the above method we consider ZETA(n), the Riemann Zeta function, for n = 2,3,4, and 5. In the case of ZETA(2), 2 3 we have f(n) = 1/n , F = 1/(n+m) and ABS(f'(n+1)) = 1/(n+1) . m Similarly easy formulas follow for the other values of n, whether even or odd. In Table 4 below, the first of two entries for each ZETA(n) is the earliest iteration giving five decimal place truncated accuracy for S + Bound , the value of the partial sum plus the n n lower or upper bound. For instance, the number 34 immediately under s (for ZETA(2)), means that S + Lower bound = 1.64493 (chopped) 2 34 34 is the earliest occurrence of that value (at iteration step 34). The second parenthecized value is the earliest iteration step at which nine decimal place truncated accuracy is obtained when using s (n). All computations were implemented with Harley Flander's 2 MicroCalc software, which includes an easy menu-driven Sequences subroutine. [Editorial note: see Table 4 at end.] As a final example of the use of the above error bounds for aver- aging the remainder of a series of positive constant, we consider an alternate approach for evaluation of BETA(2), Catalan's constant. By pairwise grouping this absolutely convergent series, we can write it with positive terms as k+1 inf (-1) BETA(2) = SUM ------- = (1 - 1/9) + (1/25 - 1/49) + (1/81 - 1/121) + ... k=1 2 (2k-1) inf 1 1 inf 8(2k-1) = SUM (------- - -------) = SUM -------------- . k=1 2 2 k=1 2 2 (4k-3) (4k-1) (4k-3) (4k-1) Some easy computation shows that 8(2n-1) 1/2 f(n) = --------------, F = -------------------- , 2 2 m (4(n+m)-3)(4(n+m)-1) (4n-3) (4n-1) 8 and ABS(f'(n+1)) = -------------- . 3 3 (4n+1) (4n+3) The final two entries in Table 4 above illustrate the quite rapid convergence of this method. Indeed, by using the tightest error bounds, we obtain a value for Catalan's constant of 0.91596 (trunc- ated)--five decimal place accuracy--after only five (count them, five!) iterations. The accuracy and advantages of the methods describe above--that for alternating series and that for series of positive constants-- may be further informally compared by the reader's using these two calculations linking some of the above examples: n-1 n ETA(n) = (1 - 1/2 )ZETA(n) and LAMBDA(n) = (1 - 1/2 )ZETA(n). Retrospective ------------- We have seen here how an easy--somewhat known but overlooked-- averaging procedure may be applied to accelerate the convergence of those slowly converging alternating series that satisfy more stringent requirements than those for the standard alternating series test. Since most of the alternating series that Calculus II students encounter in their study do satisfy these additional requirements, there is little reason why this method should not be more used. By framing the remainder for a series of positive constants in terms of an alternating series--via Euler-Maclaurin formulas--we have also seen how to apply averaging to convergent series of positive terms. In addition, by pairwise grouping the terms of an absolutely convergent alternating series, we could rewrite such series with positive terms and then use this method to accelerate convergence even further. In the author's opinion, none of these techniques is beyond the freshman calculus student, even the weak one. There are certainly more sophisticated methods that accelerate convergence and are well documented in the literature, but the above one is, perhaps, easy and natural enough to warrant wider use at an elementary level. REFERENCES ---------- Note: Most references given below are not specifically referred to in the text. All are included as of interest to the topic of accel- erated convergence of series; many include additional references. 1. M. Abramowitz and I. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards, Appl. Math. Series 55, U.S. Government Printing Office, Washington, D.C., 1964; repr., Dover Publ., New York, 1965. 2. R.P. Agnew and R.P. Boas, Jr., An integral test for conver- gence, Amer. Math. Monthly 56 (1949) 677-678. 3. R. Barshinger, Calculus II and Euler also, Amer. Math. Monthly 101 (1994) 244-249. 4. J. Baxley, Euler's constant, Taylor's formula, and slowly converging series, Math. Mag. 65 (1992) 302-313. 5. R.P. Boas, Jr., Estimating Remainders, Math. Mag., 51 (1978) 83-89. 6. R.P. Boas, Jr., Partial sums of infinite series and how they grow, Amer. Math. Monthly 84 (1977) 237-258. 7. B. Braden, Calculating sums of infinite series, Amer. Math. Monthly 99 (1992) 649-655. 8. R. Burden and J. Faires, Numerical Analysis, 5th ed., PWS Publ., Boston, 1993. 9. P. Calabrese, A note on alternating series, Amer. Math. Monthly 69 (1962) 215-217; repr. in Selected Papers on Calculus, MAA, 1968, pp. 352-353. 10. R.J. Collins, Approximating series, Coll. Math. J. 23 (1992) 153-157. 11. H. Edwards, Riemann's Zeta Function, Academic Press, New York, 1974. 12. H. Flanders, MicroCalc ver. 6.l, MathCalcEduc, Ann Arbor, MI, 1994. 13. C. Goldsmith, Calculation of ln 2 and pi, Math. Gaz. 55 (1971) 434-436. 14. G.H. Hardy, Orders of Infinity, 2nd ed., Cambridge Univ. Press, London, 1924. 15. K. Knopp, Theory and Application of Infinite Series, Blackie, London and Glasgow, 1951; repr. Dover Publ., Mineola, NY, 1990. 16. C. Moler et.al., MATLAB, the MathWorks, Natick, MA (various). 17. R.K. Morley, The remainder in computing by series, Amer. Math. Monthly 57 (1950) 550-551; repr. in Selected Papers on Calc- ulus, MAA, 1968, pp. 324-325. 18. R.K. Morley, Further note on the remainder in computing by series, Amer. Math. Monthly 58 (1951) 410-412. 19. M. Pinsky, Averaging an alternating series, Math. Mag. 51 (1978) 235-237. inf -s 20. E.L. Stark, The series SUM k , s=2,3,4,..., once more, k=1 Math. Mag. 47 (1974) 197-202. 21. S.R. Tims and J.A. Tyrrell, Approximate evaluation of Euler's constant, Math. Gaz. 55 (1971) 65-67. ============================================================================= +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ============================================================================= Table 1. ======= inf k+1 SUM (-1) /(2k-1) = pi/4 = 0.78539816339744... k=1 ============================================================================= s A A A n 1n 2n 3n ----------------------------------------------------------------------------- 1.00000000000000 0.83333333333333 0.80000000000000 0.79047619047619 0.66666666666667 0.76666666666667 0.78095238095238 0.78412698412698 0.86666666666667 0.79523809523810 0.78730158730159 0.78585858585859 0.72380952380952 0.77936507936508 0.78441558441558 0.78519258519259 0.83492063492064 0.78946608946609 0.78596958596959 0.78550338550339 0.74401154401154 0.78247308247308 0.78503718503719 0.78533884416237 0.82093462093462 0.78760128760129 0.78564050328756 0.78543410493875 0.75426795426795 0.78367971897384 0.78522770658994 0.78537513398195 0.81309148367972 0.78677569420604 0.78552256137395 0.76045990473235 0.78426942854187 0.80807895235140 A A A A 4n 5n 6n 7n ----------------------------------------------------------------------------- 0.78730158730159 0.78614718614719 0.78570318570319 0.78552558552559 0.78499278499279 0.78525918525919 0.78534798534799 0.78537932655580 0.78552558552559 0.78543678543679 0.78541066776361 0.78540242007734 0.78534798534799 0.78538455009043 0.78539417239108 0.78539692161983 0.78542111483288 0.78540379469172 0.78539967084859 (best lower bound) 0.78538647455056 0.78539554700545 0.78540461946035 A A A 8n 9n 10n ----------------------------------------------------------------------------- 0.78545245604069 0.78542166467863 0.78540846838060 0.78539087331657 0.78539527208258 0.78539967084859 (best upper bound) [All preceding MATLAB values are rounded.] _____________________________________________________________________________ inf k+1 Table 1. Partial Sums and Successive Averages for SUM (-1) /(2k-1) k=1 Table 2. _ _ ======= pi/4 = 0.785398163... _ _ = . 1 1 0 0 1 0 0 1 0 0 0 0 1 1 1 1 1 1 0 1 1 0 ... _ base 2 A = 0.785408... 101 _ = . 1 1 0 0 1 0 0 1 0 0 0 1 ... _ base 2 S = 0.785398296... best _ = . 1 1 0 0 1 0 0 1 0 0 0 0 1 1 1 1 1 1 0 1 1 1 ... base 2 _____________________________________________________________________________ inf k+1 Table 2. Binary Representations for Values Associated with SUM (-1) /(2k-1). k=1 Table 3. ======= Alternating Series S s s (continued below) Generator 11 66 ----------------------------------------------------------------------------- 1/SQRT(ln(k+2)) ---- ---- ---- 1/ln(k+1) ---- ---- ---- _ _ _ 1/k ln 2 = 0.69314718 0.73 0.685 _ _ _ 1/(2k-1) pi/4 = 0.78539816 0.80 0.7816 2 2 _ _ _ 1/k pi /12 = 0.82246703 0.8262 0.82235 2 _ _ _ 1/(2k-1) "Catalan"= 0.915965594 0.9169 0.915936 3 _ _ _ 1/k ---- = 0.901542677 0.90186 0.9015409 3 3 _ _ _ 1/(2k-1) pi /32 = 0.968946146 0.968992 0.9689459 4 4 _ _ _ 1/k 7pi /720 = 0.9470328294 0.947060 0.947032803 6 6 _ _ (s47=) _ 1/k 31pi /3024 = 0.98555109129 0.98555129 0.9855510913 (continuation of above table 3) Best Lower Bound S Best Upper Bound best ----------------------------------------------------------------------------- _ (rounded) _ A = 0.5108777 0.510878 A = 0.5108782 92 83 _ (rounded) _ A = 0.92429 0.9243 A = 0.92431 74 83 _ _ _ A = 0.6931457 0.69314722 A = 0.6931488 74 83 _ _ _ A = 0.7853969 0.78539829 A = 0.7853997 74 83 _ _ _ A = 0.8224655 0.82246710 A = 0.8224687 74 65 _ _ _ A = 0.9159648 0.915965583 A = 0.9159663 74 65 _ _ _ A = 0.9015417 0.901542626 A = 0.9015435 74 65 _ _ _ A = 0.9689459 0.968946136 A = 0.9689464 56 65 _ _ _ A = 0.9470325 0.9470328273 A = 0.9470332 56 65 _ _ _ A = 0.98555107 0.9855510909 A = 0.98555111 56 47 _____________________________________________________________________________ Table 3. Value Comparisons. All values truncated except for best upper bound, which is rounded up. Table 4. ======= Positive Series s A A S A Boas s Generator 2 12 22 b best 1 ----------------------------------------------------------------------------- 2 34 22 21 1.64493(4066)... 15 24 24 1/k (571) (359) (358) (576) (907) (907) 3 13 10 9 1.20205(6903)... 10 14 14 1/k (186) (132) (131) (79) (112) (112) 4 10 7 7 1.08232(3233)... 6 7 8 1/k (53) (41) (40) (44) (58) (58) 5 6 5 4 1.03692(7755)... 5 6 7 1/k (36) (29) (28) (20) (25) (25) k+1 2 9 7 6 0.82246(7033)... 8 10 10 (-1) /k (107) (76) (75) (62) (87) (88) k+1 2 7 5 5 0.91596(5594) 5 7 7 (-1) /(2k-1) (92) (66) (65) Catalan's Constant (40) (56) (57) _____________________________________________________________________________ th th Table 4. Earliest iteration n that fixes the 5 (or 9 ) decimal place truncated. For final pairs of entries, the series are pariwise grouped as series of positive constants. Dr. Richard N. Barshinger Penn State-Scranton 120 Ridge View Drive Dunmore, PA 18512 fax: (717) 964-4783 email: rxb10@psu.edu