Peter Luschny schrieb:
Consider the Bernoulli function B(s) = -s*Zeta(1 - s).
Assume s > 0 and real. Then we have the representation
B(s) = v(s)*w(s), where
v(s) = Pi*cos(Pi*s/2)/(2^(1 - s) - 1) and
w(s) = Integral_{z=0..infinity} z^s*sech(Pi*z)^2.
Which method do you recommend for calculating the integral?
Perhaps you are looking for a general-purpose method to integrate
well-behaved real functions numerically. Your infinite integration
range is easily mapped into a finite one while keeping the integrand well-behaved.
The method of choice for this used to be Romberg integration. It is
described in the Numerical Recipes books and delivers results to the
accuracy asked for. Derive 6.10, by the way, uses an unspecified
adaptive algorithm, which I have noticed to occasionally return results
less precise than requested:
APPROX(VECTOR(INT(z^s*SECH(pi*z)^2, z, 8, 0), s, 0, 1, 1/10), 16)
[-0.3183098861, -0.263207418, -0.2201371789, -0.1859598716,
-0.1584858555, -0.1361500295, -0.1178101711, -0.1026175936,
-0.08993177896, -0.0792626207, -0.07023049277]
Thus, 16 decimal digits must be requested here to obtain results
correct to 10 digits.
The tanh-sinh method seems about to replace Romberg's one for general-
purpose integration over real intervals to a user specified accuracy.
I recall that this can be made to handle poles at the edge of an
integration range automatically; see the papers by David H. Bailey
on high-precision integrals.
To find the fastest possible yet reliable method to compute just
Zeta(1-s) numerically for any real s > 0 is a different matter. Many
people must have considered considered this too; the various open-
source implementations of the real Zeta function should reveal some of
their ideas.
Martin.
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)