# Riemann-Siegel formula

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Lemma 1 For any complex number $z$, one has

$\int_{0 \nearrow 1} \frac{e^{i\pi u^2 + 2\pi i z u}}{e^{i\pi u} - e^{-i\pi u}}\ du = \frac{e^{i\pi z} - e^{-i\pi z^2}}{e^{i \pi z} - e^{-i\pi z}}$

where $0 \nearrow 1$ denotes a line passing through the line segment $[0,1]$ oriented in the direction $e^{i\pi/4}$.

Proof Denote the left-hand side by $F(z)$. Observe that

$F(z) - F(z-1) = \int_{0 \nearrow 1} e^{i\pi u^2 + 2\pi i z u - i \pi u}\ du$
$= e^{-i \pi (z^2 - z + 1/4)} \int_{0 \nearrow 1} e^{i \pi (u + z-\frac{1}{2})^2}\ du$
$= e^{-i \pi (z^2 - z)}$

while from the residue theorem one has

$F(z) = 1 + \int_{-1 \nearrow 0} \frac{e^{i\pi u^2 + 2\pi i z u}}{e^{i\pi u} - e^{-i\pi u}}\ du$
$= 1 + \int_{0 \nearrow 1} \frac{e^{i\pi (u-1)^2 + 2\pi i z (u-1)}}{e^{i\pi (u-1)} - e^{-i\pi (u-1)}}\ du$
$= 1 + e^{-2\pi i z} F(z-1).$

The claim then follows from elementary algebra. $\Box$

We can rearrange the above lemma as

$\frac{e^{i\pi z}}{e^{i\pi z} -e^{-i\pi z}} = \int_{0 \nearrow 1} \frac{e^{i\pi u^2 + 2\pi i z u}}{e^{i\pi u} - e^{-i\pi u}}\ du + \frac{e^{-i\pi z^2}}{e^{i\pi z} - e^{-i\pi z}}.$

Now let $s$ be a complex number with $\mathrm{Re} s \gt 1$. Multiplying both sides of the above equation by $(1 + e^{-i\pi s}) \pi^{-\frac{1-s}{2}} \Gamma(\frac{1-s}{2}) z^{s-1}$ and integrating on the ray $\nwarrow 0$ from $0$ in the direction $e^{3\pi i/4}$, we have

$A = B + C$

where

$A := (1 + e^{-i\pi s}) \pi^{-\frac{1-s}{2}} \Gamma(\frac{1-s}{2}) \int_{\nwarrow 0} \frac{z^{s-1} e^{i\pi z}}{e^{i\pi z} -e^{-i\pi z}}\ dz$
$B := (1 + e^{-i\pi s}) \pi^{-\frac{1-s}{2}} \Gamma(\frac{1-s}{2}) \int_{\nwarrow 0} \int_{0 \nearrow 1} \frac{e^{i\pi u^2 + 2\pi i z u} z^{s-1}}{e^{i\pi u} - e^{-i\pi u}}\ du dz$
$C := (1 + e^{-i\pi s}) \pi^{-\frac{1-s}{2}} \Gamma(\frac{1-s}{2}) \int_{\nwarrow 0} \frac{z^{s-1} e^{-i\pi z^2}}{e^{i\pi z} -e^{-i\pi z}}\ dz.$

Lemma 2 For any $u$ to the right of the line $e^{i\pi/4} {\bf R}$, We have

$(1 + e^{-i\pi s}) \pi^{-\frac{1-s}{2}} \Gamma(\frac{1-s}{2}) \int_{\nwarrow 0} z^{s-1} e^{2\pi i z u}\ du = \pi^{-s/2} \Gamma(s/2) u^{-s}.$

Proof Using the duplication formula

$\Gamma(\frac{s}{2}) \Gamma(\frac{1+s}{2}) = 2^{1-s} \sqrt{\pi} \cos(\pi s/2)$

and the reflection formula

$\Gamma(\frac{1-s}{2}) \Gamma(\frac{1+s}{2}) = \frac{\pi}{\cos(\pi s/2)}$

one can rewrite the claim after some algebra as

$\int_{\nwarrow 0} z^{s-1} e^{2\pi i z u}\ du = e^{\pi i s/2} (2\pi )^{-s} \Gamma(s) u^{-s}.$

But by making the change of variables $w = -2\pi i zu$ and shifting contours we see that the left-hand side is

$(-2\pi i z)^{-s} \int_0^\infty w^{s-1} e^{-w}\ dw$

and the claim follows from the definition of the Gamma function. $\Box$

From this Lemma and Fubini (carefully verifying the absolute integrability) we have

$B = \pi^{-s/2} \Gamma(s/2) \int_{0 \nearrow 1} \frac{u^{-s} e^{i\pi u^2}}{e^{i\pi u} - e^{-i\pi u}}\ du.$

Similarly, using the geometric series formula

$\frac{e^{i\pi z}}{e^{i\pi z}-e^{-i\pi z}} = -\sum_{n=1}^\infty e^{2\pi i n z}$

and Fubini again one has

$A = -\pi^{-s/2} \Gamma(s/2) \zeta(s).$

Finally by reflecting the ray $\nwarrow 0$ around the origin and then shifting slightly to the right we have

$C = \pi^{-\frac{1-s}{2}} \Gamma(\frac{1-s}{2}) \int_{0 \nwarrow 1} \frac{z^{s-1} e^{-i\pi z^2}}{e^{i\pi z} -e^{-i\pi z}}\ dz,$

where $0 \nwarrow 1$ is a line in the direction $e^{3\pi i 4}$ passing through $[0,1]$. By analytic continuation we conclude the Riemann-Siegel formula (see also equation (2.10.6) of [T1986])

$\pi^{-s/2} \Gamma(s/2) \zeta(s) = - \pi^{-s/2} \Gamma(s/2) \int_{0 \nearrow 1} \frac{u^{-s} e^{i\pi u^2}}{e^{i\pi u} - e^{-i\pi u}}\ du - \pi^{-\frac{1-s}{2}} \Gamma(\frac{1-s}{2}) \int_{0 \nwarrow 1} \frac{z^{s-1} e^{-i\pi z^2}}{e^{-i\pi z} -e^{i\pi z}}\ dz.$

From the residue theorem we can also write

$\int_{0 \nearrow 1} \frac{u^{-s} e^{i\pi u^2}}{e^{i\pi u} - e^{-i\pi u}}\ du =\sum_{n=1}^N \frac{1}{n^s} + \int_{N \nearrow N+1} \frac{u^{-s} e^{i\pi u^2}}{e^{i\pi u} - e^{-i\pi u}}\ du$

for any natural number $N$; similarly

$\int_{0 \nwarrow 1} \frac{z^{s-1} e^{-i\pi z^2}}{e^{-i\pi z} -e^{i\pi z}}\ dz = \sum_{m=1}^M \frac{1}{m^{1-s}} + \int_{M \nwarrow M+1} \frac{z^{s-1} e^{-i\pi z^2}}{e^{-i\pi z} -e^{i\pi z}}\ dz.$