# Riemann–Siegel formula

In mathematics, the Riemann–Siegel formula is an asymptotic formula for the error of the approximate functional equation of the Riemann zeta function, an approximation of the zeta function by a sum of two finite Dirichlet series. It was found by Siegel (1932) in unpublished manuscripts of Bernhard Riemann dating from the 1850s. Siegel derived it from the Riemann–Siegel integral formula, an expression for the zeta function involving contour integrals. It is often used to compute values of the Riemann–Siegel formula, sometimes in combination with the Odlyzko–Schönhage algorithm which speeds it up considerably. When used along the critical line, it is often useful to use it in a form where it becomes a formula for the Z function.

If M and N are non-negative integers, then the zeta function is equal to

${\displaystyle \zeta (s)=\sum _{n=1}^{N}{\frac {1}{n^{s}}}+\gamma (1-s)\sum _{n=1}^{M}{\frac {1}{n^{1-s}}}+R(s)}$

where

${\displaystyle \gamma (s)=\pi ^{{\tfrac {1}{2}}-s}{\frac {\Gamma \left({\tfrac {s}{2}}\right)}{\Gamma \left({\tfrac {1}{2}}(1-s)\right)}}}$

is the factor appearing in the functional equation ζ(s) = γ(1 − s) ζ(1 − s), and

${\displaystyle R(s)={\frac {-\Gamma (1-s)}{2\pi i}}\int {\frac {(-x)^{s-1}e^{-Nx}}{e^{x}-1}}dx}$

is a contour integral whose contour starts and ends at +∞ and circles the singularities of absolute value at most 2πM. The approximate functional equation gives an estimate for the size of the error term. Siegel (1932) and Edwards (1974) derive the Riemann–Siegel formula from this by applying the method of steepest descent to this integral to give an asymptotic expansion for the error term R(s) as a series of negative powers of Im(s). In applications s is usually on the critical line, and the positive integers M and N are chosen to be about (2πIm(s))1/2. Gabcke (1979) found good bounds for the error of the Riemann–Siegel formula.

## Riemann's integral formula

Riemann showed that

${\displaystyle \int _{0\searrow 1}{\frac {e^{-i\pi u^{2}+2\pi ipu}}{e^{\pi iu}-e^{-\pi iu}}}\,du={\frac {e^{i\pi p^{2}}-e^{i\pi p}}{e^{i\pi p}-e^{-i\pi p}}}}$

where the contour of integration is a line of slope −1 passing between 0 and 1 (Edwards 1974, 7.9).

He used this to give the following integral formula for the zeta function:

${\displaystyle \pi ^{-{\tfrac {s}{2}}}\Gamma \left({\tfrac {s}{2}}\right)\zeta (s)=\pi ^{-{\tfrac {s}{2}}}\Gamma \left({\tfrac {s}{2}}\right)\int _{0\swarrow 1}{\frac {x^{-s}e^{\pi ix^{2}}}{e^{\pi ix}-e^{-\pi ix}}}\,dx+\pi ^{-{\frac {1-s}{2}}}\Gamma \left({\tfrac {1-s}{2}}\right)\int _{0\searrow 1}{\frac {x^{s-1}e^{-\pi ix^{2}}}{e^{\pi ix}-e^{-\pi ix}}}\,dx}$

## References

• Berry, Michael V. (1995), "The Riemann–Siegel expansion for the zeta function: high orders and remainders", Proceedings of the Royal Society of London. Series A: Mathematical, Physical and Engineering Sciences, 450 (1939): 439–462, doi:10.1098/rspa.1995.0093, ISSN 0962-8444, MR 1349513, Zbl 0842.11030
• Edwards, H.M. (1974), Riemann's zeta function, Pure and Applied Mathematics, 58, New York-London: Academic Press, ISBN 0-12-232750-0, Zbl 0315.10035
• Gabcke, Wolfgang (1979), Neue Herleitung und Explizite Restabschätzung der Riemann-Siegel-Formel (in German), Georg-August-Universität Göttingen, hdl:11858/00-1735-0000-0022-6013-8, Zbl 0499.10040
• Patterson, S.J. (1988), An introduction to the theory of the Riemann zeta-function, Cambridge Studies in Advanced Mathematics, 14, Cambridge: Cambridge University Press, ISBN 0-521-33535-3, Zbl 0641.10029
• Siegel, C. L. (1932), "Über Riemanns Nachlaß zur analytischen Zahlentheorie", Quellen Studien zur Geschichte der Math. Astron. Und Phys. Abt. B: Studien 2: 45–80, JFM 58.1037.07, Zbl 0004.10501 Reprinted in Gesammelte Abhandlungen, Vol. 1. Berlin: Springer-Verlag, 1966.