Evaluation of ζ(2) by the definition (sort of) [HP-42S & HP-71B]
|
10-27-2021, 05:12 PM
(This post was last modified: 11-02-2021 10:49 PM by Albert Chan.)
Post: #11
|
|||
|
|||
RE: Evaluation of ζ(2) by the definition (sort of) [HP-42S & HP-71B]
(10-25-2021 01:29 PM)Albert Chan Wrote: Convergence speed very impressive, n=8 converged to float(pi^2/6) 2nd version, by putting some reasonable number to b, before loop start (*) Now, n=6 already converged to float(pi^2/6) Code: function zeta2(n) lua> for n=0,8 do print(n, zeta2(n)) end 0 1.4539195555018722 1 1.6448912932530366 2 1.6449340922532778 3 1.6449340670471453 4 1.6449340668467034 5 1.6449340668482317 6 1.6449340668482264 7 1.6449340668482264 8 1.6449340668482264 (*) this is how initial b is estimated, by looking ahead. XCAS> b2 := (N+3/2)^4 / (c*N*(N+2)) XCAS> b1 := (N+1/2)^4 / ((10-c)*N*(N+1) + b2) XCAS> simplify(partfrac(b1(c=8))[1]) → (2312*N^2+1904*N+480)/4913 XCAS> simplify(partfrac(b1(c=2))[1]) → (578*N^2+476*N+120)/4913 2312/4913*2 ≈ 0.9412 If N is large, this should be the constant to use instead of 0.93 Update: Looking ahead a few more, 0.944 is about optimum |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)