The Final Result
First we note that 'piTangent' is 'overkill'. Recall from above that 'piTangent' is aquivalent to
This amounts to
(for n -> oo).
Therefore we decide to drop the hyperbolic function altogether.
So we are left with
But, second, this simplifies to
2*I*(Psi(1/2+2^n*(1-I))-Psi(1/2+2^n*(1+I))) = 4*Im(Psi(1/2 + 2^n*(1+I)));
pi := proc(n) (4*Im(Psi(1/2 + 2^n * (1 + I)))) end:
'pi(n)'=pi(n);
r := Richardson(pi,5,0,20,2):
evalf(r,20),evalf(Pi,20),evalf(Pi-r,20);
The simplification pays off. The asymptotic development, the extrapolation procedure has to cope with, became smoother, the coefficients smaller.
i T[i]
0 +3.0597620713
1 +3.1207885429 +3.1411307001
2 +3.1363847886 +3.1415835372 +3.1416137263
3 +3.1402905776 +3.1415925072 +3.1415931052 +3.1415927779
4 +3.1412671329 +3.1415926513 +3.1415926609 +3.1415926538 +3.1415926534
5 +3.1415112734 +3.1415926536 +3.1415926537 +3.1415926536 +3.1415926536 +3.1415926536
r := Richardson(pi,13,0,60,1):
evalf(Pi,60),evalf(Pi-r,60);
0 +3.05976207126351713055249801982309579200449598709914052014112
1 +3.14113070013807390286998543428096563286433111609737044802305
2 +3.14161372634166930752181799995609724663500054106468824271080
3 +3.14159277792292478000974877290895591200483568050221985939703
4 +3.14159265336311275422516618721171823301833654238578275443568
5 +3.14159265358928506756849485489884483683339412528054790864654
6 +3.14159265358979322746465778677723062650533015391308331177287
7 +3.14159265358979323848468359997688741776683820599545973558594
8 +3.14159265358979323846264384493861008951102438722276923873126
9 +3.14159265358979323846264338327145501006792731975937720493482
10 +3.14159265358979323846264338327950285034945054664004921063283
11 +3.14159265358979323846264338327950288419718870660006359458402
12 +3.14159265358979323846264338327950288419716939939040073498500
13 +3.14159265358979323846264338327950288419716939937510582085156
Richardson(pi,18,0,100,0): evalf(%-Pi,100);
Error:
This is, finally, our proposal to compute Pi by extrapolation.