The Tangent Approximation
If we isolate the initial approximating sum to the integral
of our function in the Romberg quadrature, we find an initial approximation to
. Note that this implies a shift in the basic quadrature formula form the
secant-trapezoid to the tangent-trapezoid formula.
piTangent := proc(n) local k;
2^(n+4)*sum(1/(4^(n+1)+(2*k+1)^2),k=0..2^n-1);
end:
'piTangent(n)'='sum(2^(n+4)/(4^(n+1)+(2*k+1)^2),k=0..2^n-1)';
seq(evalf(piTangent(m)),m=0..6);
First we reduce this infinite series to a finite series of psi functions.
psi := proc(n)
(2*I) * (
(Psi(1/2 + 2^n + 2^n*I) - Psi(1/2 + 2^n*I)) -
(Psi(1/2 + 2^n - 2^n*I) - Psi(1/2 - 2^n*I)) )
end:
psi(n);
seq(evalf(psi(n)),n=0..6);
Obviously the first value is infected by rounding errors and should be 3.2. Now we begin to play with Maple. 'expand' simplifies a little...
expand(psi(n));
psiPi := proc(n)
2*I*Psi(1/2+2^n+I*2^n)-2*I*Psi(1/2+2^n-I*2^n)+2*Pi*tanh(Pi*2^n)
end:
seq(evalf(psiPi(n)),n=0..6);
... and if we solve for Pi ...
psiTanh := n -> (2*I*Psi(1/2+2^n-I*2^n)-2*I*Psi(1/2+2^n+I*2^n))/(tanh(Pi*2^n));
seq(evalf(psiTanh(n)),n=0..6);
... Maple can evaluate the limit.
limit(psiTanh(n),n=infinity);
But this means ...
'2*I*ln((1-I)/(1+I))'=2*I*ln((1-I)/(1+I));