The Pi-Function
Our investigation of the extrapolation of 'piTangent' led us
to a somewhat unexpected function
.
What about calling this function
?
pi := proc(x) 4*Im(Psi(1/2 + 2^x * (1+I))) end:
'pi(x)'=pi(x);
seq(evalf(pi(x)),x=0..5);
plot([pi(x)],x=-12..12);
The point is, why should we perform all these extrapolations on this function? All we have to do is to evaluate the function. To get a better approximation we just have to choose a larger argument. That's all. Lets look at the performance.
for i from 10 by 10 to 150 do print(i,evalf(pi(i)-Pi,100)) od;
So increasing the argument by 10 gives us 6 more decimal
digits of
.
What do we really need more than a fast way to calculate this function? We do
can evaluate the function by a series.
piSer := proc(x)
4*sum(2^x/((n+1/2+2^x)^2+(2^x)^2),n=0..infinity) end:
seq(evalf(piSer(x)),x=0..5);
pi(x)/4='sum(2^x/((n+1/2+2^x)^2+(2^x)^2),n=0..infinity)';
This series eliminates all these frightening
and
and
.
Therefore I declare that henceforward the following definition should be
used and the function called
-function (the number theorists should call their functionpri , if they
like).
'pi(x)' = 'sum(2^(x+2)/((n+1/2+2^x)^2+(2^x)^2),n=0..infinity)';
Be sure that I do not mean that the right hand side should be
used for numerical computation. Certainly there are more efficient ways to
evaluate this function. If you know one, let me know! Clearly only solutions
which do not assume
are of value here.
Let's have a quick look at the asymptotics:
simplify(piSer(x));
asympt(2*I*(Psi(1/2+x-I*x)-Psi(1/2+x+I*x)),x,20);
evalc(%); simplify(subs(x=2^x,%));
How does Maple compute
?
Note the following bug in Maple V Release 5 (The limit is evaluated to 0 instead
of Pi.)
limit(4*Im(Psi(1/2 + 2^x +2^x*I)),x=infinity);