# Difference between revisions of "Asymptotics of H t"

## Asymptotics for $t=0$

The approximate functional equation (see e.g. [T1986, (4.12.4)]) asserts that

$\displaystyle \zeta(s) = \sum_{n \leq N} \frac{1}{n^s} + \pi^{s-1/2} \frac{\Gamma((1-s)/2)}{\Gamma(s/2)} \sum_{n \leq N} \frac{1}{n^{1-s}} + O( t^{-\sigma/2} )$

for $s = \sigma +it$ with $t$ large, $0 \lt \sigma \lt 1$, and $N := \sqrt{t/2\pi}$. This implies that

$\displaystyle \xi(s) = F(s) + F(1-s) + O( \Gamma(\frac{s+4}{2}) t^{-\sigma/2} )$

where

$\displaystyle F(s) := \frac{s(s-1)}{2} \pi^{-s/2} \Gamma(s/2) \sum_{n=1}^N \frac{1}{n^s}.$

Writing

$\displaystyle \frac{s(s-1)}{2} \Gamma(s/2) = 2 \Gamma(\frac{s+4}{2}) - 3 \Gamma(\frac{s+2}{2})$

we have $F(s) = 2 F_0(s) - 3 F_{-1}(s)$, where

$\displaystyle F_j(s) := \pi^{-s/2} \Gamma(\frac{s+4}{2} + j) \sum_{n=1}^N \frac{1}{n^s}.$

The $F_{-1}$ term sums to $O( \Gamma(\frac{s+4}{2}) t^{-\sigma/2} )$, hence

$\displaystyle \xi(s) = 2F_0(s) + 2F_0(1-s) + O( \Gamma(\frac{s+4}{2}) t^{-\sigma/2} )$

and thus

$\displaystyle H(x+iy) = \frac{1}{4} F_0( \frac{1+ix-y}{2} ) + \frac{1}{4} \overline{F_0( \frac{1+ix+y}{2} )} + O( \Gamma(\frac{9+ix+y}{2}) x^{-(1+y)/2} ).$

One would expect the $\sum_{n=1}^N \frac{1}{n^s}$ term to remain more or less bounded (this is basically the Lindelof hypothesis), leading to the heuristics

$\displaystyle |F_0(\frac{1+ix \pm y}{2})| \asymp \Gamma(\frac{9+ix \pm y}{2}).$

Since $\Gamma(\frac{9+ix - y}{2}) \approx \Gamma(\frac{9+ix+y}{2}) (ix)^{-y}$, we expect the $F_0( \frac{1+ix+y}{2} )$ term to dominate once $y \gg \frac{1}{\log x}$.

## Asymptotics for $t \gt 0$

Let $z=x+iy$ for large $x$ and positive bounded $y$. We have

$\displaystyle H_t(z) = \frac{1}{2} \int_{-\infty}^\infty e^{tu^2} \Phi(u) \exp(izu)\ du$

where

$\displaystyle \Phi(u) = \sum_{n=1}^\infty (2\pi^2 n^4 e^{9u} - 3\pi n^2 e^{5u}) \exp(-\pi n^2 e^{4u}).$

We can shift contours to

$\displaystyle H_t(z) = \frac{1}{2} \int_{i\theta-\infty}^{i\theta+\infty} e^{tu^2} \Phi(u) \exp(izu)\ du$

to any $-\pi/8 \lt \theta \lt \pi/8$ that we please; it seems that a good choice will be $\theta = \mathrm{arg} (ix+y+9) \approx \frac{\pi}{8} - \frac{y+9}{x}$. By symmetry, we thus have

$\displaystyle H_t(z) = G_t(x+iy) + \overline{G_t(x-iy)}$

where

$\displaystyle G_t(z) := \int_{i\theta}^{i\theta+\infty} e^{tu^2} \Phi(u) \exp(izu)\ du.$

By Fubini's theorem we have

$\displaystyle G_{t}(x \pm i y) = \sum_{n=1}^\infty \pi^2 n^4 \int_{i\theta}^{i\theta+\infty} \exp( tu^2 - \pi n^2 e^{4u} + (ix \mp y + 9) u)\ du$
$\displaystyle - \sum_{n=1}^\infty \frac{3}{2} \pi n^2 \int_{i\theta}^{i\theta+\infty} \exp( tu^2 - \pi n^2 e^{4u} + (ix \mp y + 5) u)\ du.$

The second terms end up being about $O(1/x)$ the size of the first terms and we will ignore them for now. Making the change of variables $u = \frac{1}{4} \log \frac{ix \pm y + 9}{4\pi n^2} + v$, we basically have

$\displaystyle G_t(x \pm iy) \approx \sum_{n=1}^\infty \pi^2 n^4 (\frac{ix \pm y+9}{4\pi n^2})^{\frac{ix \mp y+9}{4}} \int_{-\frac{1}{4} \log \frac{|ix\pm y+9|}{4\pi n^2}}^\infty \exp( \frac{t}{16} (\log \frac{ix \pm y+9}{4\pi n^2} + v)^2 + (ix \mp y + 9) (v - \frac{1}{4} e^{4v}) )\ dv.$

The function $\exp( (ix \mp y + 9) (v - \frac{1}{4} e^{4v}) )$ decays rapidly away from $v=0$. This suggests firstly that this integral is going to be very small when $n \gg N := \sqrt{x/4\pi}$ (since the left limit of integration will then be to the right of the origin), so we will assume heuristically that $n$ is now restricted to the range $n \leq N$. Next, we approximate $\exp( \frac{t}{16} (\log \frac{ix \pm y+9}{4\pi n^2} + v)^2)$ by $\exp( \frac{t}{16} \log^2 \frac{ix \pm y+9}{4\pi n^2} )$, and then send the left limit off to infinity to obtain (heuristically)

$\displaystyle G_t(x \pm iy) \approx \sum_{n \leq N} \pi^2 n^4 (\frac{ix \pm y+9}{4\pi n^2})^{\frac{ix \mp y+9}{4}} \exp( \frac{t}{16} \log^2 \frac{ix \pm y+9}{4\pi n^2} ) \int_{-\infty}^\infty \exp( (ix \mp y + 9) (v - \frac{1}{4} e^{4v}) )\ dv.$

Making the change of variables $w := \frac{ix \mp y + 9}{4} e^{4v}$ we see that

$\int_{-\infty}^\infty \exp( (ix \mp y + 9) (v - \frac{1}{4} e^{4v}) )\ dv = \frac{1}{4} \Gamma(\frac{ix \mp y + 9}{4}) (\frac{4}{ix \mp y + 9})^{\frac{ix \mp y+9}{4}}$

and thus

$\displaystyle G_t(x \pm iy) \approx \Gamma(\frac{ix \mp y + 9}{4}) \sum_{n \leq N} \frac{\pi^2}{4} n^4 (\frac{1}{\pi n^2})^{\frac{ix \mp y+9}{4}} \exp( \frac{t}{16} \log^2 \frac{ix \pm y+9}{4\pi n^2} )$

which simplifies a bit to

$\displaystyle G_t(x \pm iy) \approx \frac{1}{4} \pi^{-\frac{ix \mp y + 1}{4}} \Gamma(\frac{ix \mp y + 9}{4}) \sum_{n \leq N} \frac{\exp( \frac{t}{16} \log^2 \frac{ix \pm y+9}{4\pi n^2} )}{n^{\frac{1 \mp y + ix}{2}}}$

and thus we heuristically have

$H_t(x+iy) \approx \frac{1}{4} F_t( \frac{1+ix-y}{2} ) + \frac{1}{4} \overline{F_t( \frac{1+ix+y}{2} )}$

where

$F_t( s ) := \pi^{-s/2} \Gamma(\frac{s+4}{2}) \sum_{n \leq N} \frac{\exp( \frac{t}{16} \log^2 \frac{s+4}{2\pi n^2} )}{n^{s}}.$

Here we can view $N$ as a function of $s$ by the formula $N = \mathrm{Im}(s)/2\pi$.

To understand these asymptotics better, let us inspect $H_t(x+iy)$ for $t\gt0$ in the region

$x+iy = T + \frac{a+ib}{\log T}; \quad t = \frac{\tau}{\log T}$

with $T$ large, $a,b = O(1)$, and $\tau \gt \frac{1}{2}$. If $s = \frac{1+ix-y}{2}$, then we can approximate

$\pi^{-s/2} \approx \pi^{-\frac{1+iT}{4}}$
$\Gamma(\frac{s+4}{2}) \approx \Gamma(\frac{9+iT}{2}) T^{\frac{ia-b}{4 \log T}} = \exp( \frac{ia-b}{4} ) \Gamma(\frac{9+iT}{2})$
$\frac{1}{n^s} \approx \frac{1}{n^{\frac{1+iT}{2}}}$
$\exp( \frac{t}{16} \log^2 \frac{s+4}{2\pi n^2} ) \approx \exp( \frac{t}{16} \log^2 \frac{s+4}{2\pi} - \frac{t}{4} \log T \log n )$
$\approx \exp( \frac{\tau}{16} \log T + \frac{i \pi \tau}{16} ) \frac{1}{n^{\frac{\tau}{4}}}$

$F_t(\frac{1+ix-y}{2}) \approx \pi^{-\frac{1+iT}{4}} \Gamma(\frac{9+iT}{2}) \exp( \frac{ia-b}{4} ) \exp( \frac{\tau}{16} \log T + \frac{i \pi \tau}{16} ) \sum_n \frac{1}{n^{\frac{1+iT}{2} + \frac{\tau}{4}}}$
$\approx \pi^{-\frac{1+iT}{4}} \Gamma(\frac{9+iT}{2}) \zeta(\frac{1+iT}{2} + \frac{\tau}{4}) \exp( \frac{ia-b}{4} ).$

Similarly for $F_t(\frac{1+ix+y}{2})$ (replacing $b$ by $-b$). If we make a polar coordinate representation

$\frac{1}{2} \pi^{-\frac{1+iT}{4}} \Gamma(\frac{9+iT}{2}) \zeta(\frac{1+iT}{2} + \frac{\tau}{4}) = r_{T,\tau} e^{i \theta_{T,\tau}}$

one thus has

$H_t(x+iy) \approx \frac{1}{2} ( r_{T,\tau} e^{i \theta_{T,\tau}} \exp( \frac{ia-b}{4} ) + r_{T,\tau} e^{-i \theta_{T,\tau}} \exp(\frac{-ia+b}{4}) )$
$= r_{T,\tau} \cos( \frac{a+ib}{4} + \theta_{T,\tau} ).$

Thus locally $H_t(x+iy)$ behaves like a trigonometric function, with zeroes real and equally spaced with spacing $4\pi$ (in $a$-coordinates) or $\frac{4\pi}{\log T}$ (in $x$ coordinates). Once $\tau$ becomes large, further increase of $\tau$ basically only increases $r_{T,\tau}$ and also shifts $\theta_{T,\tau}$ at rate $\pi/16$, causing the number of zeroes to the left of $T$ to increase at rate $1/4$ as claimed in [KKL2009].

## Riemann-Siegel formula

Proposition 1 (Riemann-Siegel formula) For any natural numbers $N,M$ and complex number $s$ that is not an integer, we have

$\zeta(s) = \sum_{n=1}^N \frac{1}{n^s} + \pi^{s-\frac{1}{2}} \frac{\Gamma((1-s)/2)}{\Gamma(s/2)} \sum_{m=1}^M \frac{1}{m^{1-s}} + \frac{e^{-i\pi s} \Gamma(1-s)}{2\pi i} \int_{C_M} \frac{w^{s-1} e^{-Nw}}{e^w-1}\ dw$

where $w^{s-1} := \exp((s-1) \log w)$ and we use the branch of the logarithm with imaginary part in $[0,2\pi)$, and $C_M$ is any contour from $+\infty$ to $+\infty$ going once anticlockwise around the zeroes $2\pi i m$ of $e^w-1$ with $|m| \leq M$, but does not go around any other zeroes.

Proof This equation is in [T1986, p. 82], but we give a proof here. The right-hand side is meromorphic in $s$, so it will suffice to establish that

1. The right-hand side is independent of $N$;
2. The right-hand side is independent of $M$;
3. Whenever $\mathrm{Re}(s)\gt1$ and $s$ is not an integer, the right-hand side converges to $\zeta(s)$ if $M=0$ and $N \to \infty$.

We begin with the first claim. It suffices to show that the right-hand sides for $N$ and $N-1$ agree for every $N \gt 1$. Subtracting, it suffices to show that

$0 = \frac{1}{N^s} + \frac{e^{-i\pi s} \Gamma(1-s)}{2\pi i} \int_{C_M} \frac{w^{s-1} (e^{-Nw} - e^{-(N-1)w}}{e^w-1}\ dw.$

The integrand here simplifies to $- w^{s-1} e^{-Nw}$, which on shrinking $C_M$ to wrap around the positive real axis becomes $N^{-s} \Gamma(s) (1 - e^{2\pi i(s-1)})$. The claim then follows from the Euler reflection formula $\Gamma(s) \Gamma(1-s) = \frac{\pi}{\sin(\pi s)}$.

Now we verify the second claim. It suffices to show that the right-hand sides for $M$ and $M-1$ agree for every $M \gt 1$. Subtracting, it suffices to show that

$0 = \pi^{s-\frac{1}{2}} \frac{\Gamma((1-s)/2)}{\Gamma(s/2)} \frac{1}{M^{1-s}} + \frac{e^{-i\pi s} \Gamma(1-s)}{2\pi i} \int_{C_M - C_{M-1}} \frac{w^{s-1} e^{-Nw}}{e^w-1}\ dw.$

The contour $C_M - C_{M-1}$ encloses the simple poles at $+2\pi i M$ and $-2\pi i M$, which have residues of $(2\pi i M)^{s-1} = - i (2\pi M)^{s-1} e^{\pi i s/2}$ and $(-2\pi i M)^{s-1} = i (2\pi M)^{s-1} e^{3\pi i s/2}$ respectively. So, on canceling the factor of $M^{s-1}$ it suffices to show that

$0 = \pi^{s-\frac{1}{2}} \frac{\Gamma((1-s)/2)}{\Gamma(s/2)} + e^{-i\pi s} \Gamma(1-s) (2\pi)^{s-1} i (e^{3\pi i s/2} - e^{\pi i s/2}).$

But this follows from the duplication formula $\Gamma(1-s) = \frac{\Gamma(\frac{1-s}{2}) \Gamma(1-\frac{s}{2})}{\pi^{1/2} 2^s}$ and the Euler reflection formula $\Gamma(\frac{s}{2}) \Gamma(1-\frac{s}{2}) = \frac{\pi}{\sin(\pi s/2)}$.

Finally we verify the third claim. Since $\zeta(s) = \lim_{N \to \infty} \sum_{n=1}^\infty \frac{1}{n^s}$, it suffices to show that

$\lim_{N \to \infty} \int_{C_0} \frac{w^{s-1} e^{-Nw}}{e^w-1}\ dw = 0.$

We take $C_0$ to be a contour that traverses a $1/N$-neighbourhood of the real axis. Writing $C_0 = \frac{1}{N} C'_0$, with $C'_0$ independent of $N$, we can thus write the left-hand side as

$\lim_{N \to \infty} N^{-s} \int_{C'_0} \frac{w^{s-1} e^{-w}}{e^{w/N}-1}\ dw,$

and the claim follows from the dominated convergence theorem. $\Box$

Applying the Riemann-Siegel formula to the Riemann xi function $\xi(s) = \frac{s(s-1)}{2} \pi^{-s/2} \Gamma(s/2) \zeta(s)$, we have

$\xi(s) = F_{0,N}(s) + \overline{F_{0,M}(\overline{1-s})} + R_{0,N,M}(s)$

where

$F_{0,N}(s) := \frac{s(s-1)}{2} \pi^{-s/2} \Gamma(s/2) \sum_{n=1}^N \frac{1}{n^s}$

and

$R_{0,N,M}(s) := \frac{s(s-1)}{2} \pi^{-s/2} \Gamma(s/2) \frac{e^{-i\pi s} \Gamma(1-s)}{2\pi i} \int_{C_M} \frac{w^{s-1} e^{-Nw}}{e^w-1}\ dw.$

In preparation for applying the heat equation, we now write $F_{0,N}(s)$ and $R_{0,N,M}(s)$ as Fourier-Laplace transforms for $s$ in the first quadrant. Firstly we have

$\frac{s(s-1)}{2} \Gamma(s/2) = 2 \Gamma(\frac{s+4}{2}) - 3 \Gamma(\frac{s+2}{2})$

so that

$F_{0,N}(s) = \sum_{n=1}^N 2 \Gamma(\frac{s+4}{2}) (\pi n^2)^{-s/2} - 3 \Gamma(\frac{s+2}{2}) (\pi n^2)^{-s/2}.$

Since (by a change of variables $x=e^u$) we have

$\Gamma(z) = \int_0^\infty x^{s} e^{-x}\ \frac{dx}{x} = \int_{-\infty}^\infty \exp( su - e^u )\ du \quad (1)$

we thus have

$F_{0,N}(s) = \sum_{n=1}^N 2 \int_{-\infty}^\infty \exp( \frac{s+4}{2} u - e^u - \frac{s}{2} \log \pi n^2 )\ du - 3 \int_{-\infty}^\infty \exp( \frac{s+2}{2} u - e^u - \frac{s}{2} \log \pi n^2 )\ du.$

We can shift the $u$ contour to a contour $\Gamma$ that starts at $i\infty$ and ends at $+\infty$, staying within a bounded distance of the lower imaginary and right real axes. One should think of the first summand as the main term and the second one as a lower order term (about $O(1/|s|)$ smaller in practice). In $s$ coordinates, the backwards heat equation becomes

$\partial_t F_{0,N}(s) = \frac{1}{4} \partial_{ss} F_{0,N}(s)$

and so the evolution becomes

$F_{t,N}(s) = \sum_{n=1}^N 2 \int_{\Gamma} \exp( \frac{s+4}{2} u - e^u - \frac{s}{2} \log \pi n^2 + \frac{t}{16} (u - \log \pi n^2)^2 )\ du - 3 \int_{\Gamma} \exp( \frac{s+2}{2} u - e^u - \frac{s}{2} \log \pi n^2 \frac{t}{16} (u - \log \pi n^2)^2 )\ du.$

Note that because we shifted contours to $\Gamma$, the integrand here remains absolutely integrable. If we shift the first variable of integration by $\log \frac{s+4}{2}$ and the second by $\log \frac{s+2}{2}$, we obtain

$F_{t,N}(s) = 2 \sum_{n=1}^N \frac{\exp( \frac{s+4}{2} \log \frac{s+4}{2} - \frac{s+4}{2})}{(\pi n^2)^{s/2}} \int_\Gamma \exp( \frac{s+4}{2} (1 + u - e^u) + \frac{t}{16} (u + \log \frac{s+4}{2\pi n^2})^2 )\ du$
$- 3 \sum_{n=1}^N \frac{\exp( \frac{s+2}{2} \log \frac{s+2}{2} - \frac{s+2}{2})}{(\pi n^2)^{s/2}} \int_\Gamma \exp( \frac{s+2}{2} (1 + u - e^u) + \frac{t}{16} (u + \log \frac{s+2}{2\pi n^2})^2 )\ du.$

Now we manipulate $R_{0,N,M}(s)$. Firstly, from the duplication formula $\Gamma(1-s) = \frac{\Gamma(\frac{1-s}{2}) \Gamma(1-\frac{s}{2})}{\pi^{1/2} 2^s}$ and the Euler reflection formula $\Gamma(\frac{s}{2}) \Gamma(1-\frac{s}{2}) = \frac{\pi}{\sin(\pi s/2)}$ we have

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

and thus

$R_{0,N,M}(s) = \frac{s(s-1)}{2} \frac{\pi^{(1-s)/2}}{2^s \sin(\pi s/2)} \Gamma(\frac{1-s}{2}) \frac{e^{-i\pi s}}{2\pi i} \int_{C_M} \frac{w^{s-1} e^{-Nw}}{e^w-1}\ dw.$

Next, we have

$\frac{s(s-1)}{2} \Gamma(\frac{1-s}{2}) = 2 \Gamma(\frac{5-s}{2}) - 3 \Gamma(\frac{3-s}{2})$

and hence by (1)

$R_{0,N,M}(s) = 2 \frac{\pi^{(1-s)/2}}{2^s \sin(\pi s/2)} \frac{e^{-i\pi s}}{2\pi i} \int_{-\infty}^\infty \int_{C_M} \frac{w^{s-1} e^{-Nw}}{e^w-1} \exp( \frac{5-s}{2} u - e^u ) \ dw du$
$- 3 \frac{\pi^{(1-s)/2}}{2^s \sin(\pi s/2)} \frac{e^{-i\pi s}}{2\pi i} \int_{-\infty}^\infty \int_{C_M} \frac{w^{s-1} e^{-Nw}}{e^w-1} \exp( \frac{3-s}{2} u - e^u ) \ dw du.$

We can shift the $u$ contour to a contour $\overline{\Gamma}$ that starts at $-i\infty$ and ends at $+\infty$, staying within a bounded distance of the lower imaginary and right real axes. Next, from the geometric series formula one has

$\frac{1}{\sin(\pi s/2)} = -2i e^{i\pi s/2} \sum_{n=0}^\infty e^{\pi i n s}$

and hence

$R_{0,N,M}(s) = - 2 \frac{\pi^{(-s-1)/2}}{2^s} \sum_{n=0}^\infty e^{\pi i (n-\frac{1}{2})s} \int_{\overline{\Gamma}} \int_{C_M} \frac{w^{s-1} e^{-Nw}}{e^w-1} \exp( \frac{5-s}{2} u - e^u ) \ dw du$
$+ 3 \frac{\pi^{(-s-1)/2}}{2^s} \sum_{n=0}^\infty e^{\pi i (n-\frac{1}{2})s} \int_{\overline{\Gamma}} \int_{C_M} \frac{w^{s-1} e^{-Nw}}{e^w-1} \exp( \frac{3-s}{2} u - e^u ) \ dw du.$

We can then evolve by the heat flow to obtain

$R_{t,N,M}(s) = - 2 \frac{\pi^{(-s-1)/2}}{2^s} \sum_{n=0}^\infty e^{\pi i (n-\frac{1}{2})s} \int_\Gamma \int_{C_M} \frac{w^{s-1} e^{-Nw}}{e^w-1} \exp( \frac{5-s}{2} u - e^u + \frac{t}{16} (-u + \pi i (2n-1) + \log \frac{w}{4\pi})^2 ) \ dw du$
$+ 3 \frac{\pi^{(-s-1)/2}}{2^s} \sum_{n=0}^\infty e^{\pi i (n-\frac{1}{2})s} \int_{\overline{\Gamma}} \int_{C_M} \frac{w^{s-1} e^{-Nw}}{e^w-1} \exp( \frac{3-s}{2} u - e^u + \frac{t}{16} (-u + \pi i (2n-1) + \log \frac{w}{4\pi})^2 ) ) \ dw du,$

noting that the integrals here are absolutely convergent for $t \gt 0$. We now have the exact formula

$H_t(x+iy) = \frac{1}{8} ( F_{t,N}(\frac{1+ix-y}{2}) + \overline{F_{t,M}(\frac{1+ix+y}{2})} + R_{t,N,M}( \frac{1+ix+y}{2} ) ).$

A good choice for $N,M$ appears to be $N=M=\lfloor \sqrt{x/4\pi}\rfloor$.

Now for asymptotics. For $\lambda$ in the first quadrant, one has

$\int_\Gamma \exp( \lambda( 1+u-e^u) )\ du = \exp( \lambda - \lambda \log \lambda ) \Gamma(\lambda)$

and then on integrating by parts

$\int_\Gamma \exp( \lambda( 1+u-e^u) ) (1 - e^u)\ du = 0$

and

$\int_\Gamma \exp( \lambda( 1+u-e^u) ) u (1 - e^u)\ du = -\frac{1}{\lambda} \exp( \lambda - \lambda \log \lambda ) \Gamma(\lambda).$

This suggests the stationary phase asymptotic

$\int_\Gamma \exp( \lambda( 1+u-e^u) ) f(u) = \exp( \lambda - \lambda \log \lambda ) \Gamma(\lambda) (f(0) + \frac{f''(0) - f'(0)}{2 \lambda} + O( \|f\|/\lambda^2) )$

for reasonable functions $f$, with a reasonable norm $\|f\|$. This suggests

$F_{t,N}(s) \approx 2 \sum_{n=1}^N \frac{\Gamma( \frac{s+4}{2} )}{(\pi n^2)^{s/2}} \exp( \frac{t}{16} \log^2 \frac{s+4}{2\pi n^2} ) (1 + (\frac{t}{16} + \frac{t^2}{128} \log^2 \frac{s+4}{2\pi n^2} - \frac{t}{16} \log \frac{s+4}{2\pi n^2} ) \frac{2}{s+4} )$
$- 3 \sum_{n=1}^N \frac{\Gamma( \frac{s+2}{2} )}{(\pi n^2)^{s/2}} \exp( \frac{t}{16} \log^2 \frac{s+2}{2\pi n^2} ).$

Now we heuristically estimate $R_{t,N,M}(s)$ term to top order. We discard the second term as being lower order. The critical point for $u$ is $u = \log \frac{5-s}{2}$, so we approximate $\frac{t}{16} (-u + \pi i (2n-1) + \log \frac{w}{4\pi})^2 )$ by $\frac{t}{16} (\pi i (2n-1) + \log \frac{w}{2\pi(5-s)})^2 )$ and arrive at

$R_{t,N,M}(s) \approx - 2 \Gamma(\frac{5-s}{2}) \frac{\pi^{(-s-1)/2}}{2^s} \sum_{n=0}^\infty e^{\pi i (n-\frac{1}{2})s} \int_{C_M} \frac{w^{s-1} e^{-Nw}}{e^w-1} \exp( \frac{t}{16} (\pi i (2n-1) + \log \frac{w}{2\pi(5-s)})^2 ) \ dw.$

The critical point of $w^s e^{-Nw}$ occurs at $w = \frac{s}{N}$. Approximating $\log \frac{w}{2\pi(5-s)}$ by $\log \frac{s}{2\pi N (5-s)}$, we thus have

$R_{t,N,M}(s) \approx - 2 \Gamma(\frac{5-s}{2}) \frac{\pi^{(-s-1)/2}}{2^s} \sum_{n=0}^\infty e^{\pi i (n-\frac{1}{2})s} \exp( \frac{t}{16} (\pi i (2n-1) + \log \frac{s}{2\pi N(5-s)})^2 ) \int_{C_M} \frac{w^{s-1} e^{-Nw}}{e^w-1} \ dw.$

The $n=0$ term should dominate quite strongly, thus

$R_{t,N,M}(s) \approx - 2 \Gamma(\frac{5-s}{2}) \frac{\pi^{(-s-1)/2}}{2^s} e^{-\pi i s/2} \exp( \frac{t}{16} (-\pi i + \log \frac{s}{2\pi N(5-s)})^2 ) \int_{C_M} \frac{w^{s-1} e^{-Nw}}{e^w-1} \ dw.$

To compute the integral, we make the change of variables $w = 2\pi i M + z$ and note that

$w^{s-1} e^{-Nw} = (2\pi i M)^{s-1} \exp( - 2\pi i MN ) \exp( (s-1) \log(1 + \frac{z}{2\pi i M}) - N z)$
$\approx (2\pi i M)^{s-1} \exp( - 2\pi i MN ) \exp( \frac{i}{4\pi} z^2 + \frac{s-2\pi i MN}{2\pi i M} z)$

so we expect

$\int_{C_M} \frac{w^{s-1} e^{-Nw}}{e^w-1} \ dw \approx (2\pi i M)^{s-1} \exp( - 2\pi i MN )\Phi(\frac{s-2\pi i MN}{2\pi i M})$

where

$\Phi(\alpha) := \int_C \frac{\exp( \frac{i}{4\pi} z^2 + \alpha z)}{e^z - 1}\ dz$

where $C$ is a contour that goes counter-clockwise around the origin (as well as all the lower imaginary zeroes of $e^{z-1}$).

We can calculate the integral explicitly:

Lemma 2 For any complex $\alpha$, we have $\Phi(\alpha) = 2\pi \frac{\cos \pi(\frac{1}{2} \alpha^2 - \alpha - \frac{\pi}{8})}{\cos(\pi \alpha)} \exp( \frac{i \pi}{2} \alpha^2 - \frac{5 \pi}{8} )$.

Proof The integrand has a residue of $1$ at $0$, hence on shifting the contour downward by $2\pi i$ we have

$\Phi(\alpha) = 2\pi i + \int_C \frac{\exp( \frac{i}{4\pi} (z-2\pi i)^2 + \alpha (z-2\pi i) )}{e^z-1}\ dz.$

The right-hand side expands as

$2\pi i - e^{-2\pi i \alpha} \int_C \frac{\exp( \frac{i}{4\pi} z^2 + (\alpha+1) z)}{e^z-1}\ dz$

which we can write as

$2\pi i - e^{-2\pi i \alpha} (\Phi(\alpha) + \int_C \exp( \frac{i}{4\pi} z^2 + \alpha z\ dz).$

The last integral is a standard gaussian integral, which can be evaluated as $\sqrt{\frac{\pi}{i/4\pi}} \exp( \pi i \alpha^2)$. Hence

$\Phi(\alpha) = 2\pi i - e^{-2\pi i \alpha} (\Phi(\alpha) + \sqrt{\frac{\pi}{i/4\pi}} \exp( \pi i \alpha^2)),$

and the claim then follows after some algebra. $\Box$