\appendix \section{Bounding $\sum_{n\leq a} n^{-s} - \int_0^a \frac{du}{u^s}$, or approximating $\zeta(s)$} We want a good explicit estimate on $$\sum_{n\leq a} \frac{1}{n^s} - \int_0^{a} \frac{du}{u^s},$$ for $a$ a half-integer. As it turns out, this is the same problem as that of approximating $\zeta(s)$ by a sum $\sum_{n\leq a} n^{-s}$. This is one of the two\footnote{The other one is the approximate functional equation.} main, standard ways of approximating $\zeta(s)$. The non-explicit version of the result was first proved in \cite[Lemmas 1 and 2]{zbMATH02601353}. The proof there uses first-order Euler-Maclaurin combined with a decomposition of $\lfloor x\rfloor - x +1/2$ that turns out to be equivalent to Poisson summation. The exposition in \cite[\S 4.7--4.11]{MR882550} uses first-order Euler-Maclaurin and van de Corput's Process B; the main idea of the latter is Poisson summation. There are already several explicit versions of the result in the literature. In \cite{MR1687658}, \cite{MR3105334} and \cite{MR4114203}, what we have is successively sharper explicit versions of Hardy and Littlewood's original proof. The proof in \cite[Lemma 2.10]{zbMATH07557592} proceeds simply by a careful estimation of the terms in high-order Euler-Maclaurin; it does not use Poisson summation. Finally, \cite{delaReyna} is an explicit version of \cite[\S 4.7--4.11]{MR882550}; it gives a weaker bound than \cite{MR4114203} or \cite{zbMATH07557592}. The strongest of these results is \cite{MR4114203}. We will give another version here, in part because we wish to relax conditions -- we will work with $\left|\Im s\right| < 2\pi a$ rather than $\left|\Im s\right| \leq a$ -- and in part to show that one can prove an asymptotically optimal result easily and concisely. We will use first-order Euler-Maclaurin and Poisson summation. We assume that $a$ is a half-integer; if one inserts the same assumption into \cite[Lemma 2.10]{zbMATH07557592}, one can improve the result there, yielding an error term closer to the one here. {\em Notation.} We recall that $e(\alpha) = e^{2\pi i \alpha}$, and $O^*(R)$ means a quantity of absolute value at most $R$. \subsection{The decay of a Fourier transform} Our first objective will be to estimate the Fourier transform of $t^{-s} \mathds{1}_{[a,b]}$. In particular, we will show that, if $a$ and $b$ are half-integers, the Fourier cosine transform has quadratic decay {\em when evaluated at integers}. In general, for real arguments, the Fourier transform of a discontinuous function such as $t^{-s} \mathds{1}_{[a,b]}$ does not have quadratic decay. \begin{lemma}\label{lem:aachIBP} Let $s = \sigma + i \tau$, $\sigma\geq 0$, $\tau\in \mathbb{R}$. Let $\nu\in \mathbb{R}\setminus \{0\}$, $b>a>\frac{|\tau|}{2\pi |\nu|}$. Then \begin{equation}\label{eq:aachquno}\int_a^b t^{-s} e(\nu t) dt = \left. \frac{t^{-\sigma} e(\varphi_\nu(t))}{2\pi i \varphi_\nu'(t)}\right|_a^b + \sigma \int_a^b \frac{t^{-\sigma-1}}{2\pi i \varphi_\nu'(t)} e(\varphi_\nu(t)) dt + \int_a^b \frac{t^{-\sigma} \varphi_\nu''(t)}{2\pi i (\varphi_\nu'(t))^2} e(\varphi_\nu(t)) dt, \end{equation} where $\varphi_\nu(t) = \nu t - \frac{\tau}{2\pi} \log t$. \end{lemma} \begin{proof} We write $t^{-s} e(\nu t) = t^{-\sigma} e(\varphi_\nu(t))$ and integrate by parts with $u = t^{-\sigma}/(2\pi i \varphi_\nu'(t))$, $v = e(\varphi_\nu(t))$. Here $\varphi_\nu'(t) = \nu - \tau/(2\pi t)\ne 0$ for $t\in [a,b]$ because $t\geq a > |\tau|/(2\pi |\nu|)$ implies $|\nu|>|\tau|/(2\pi t)$. Clearly \[u dv = \frac{ t^{-\sigma}}{2\pi i \varphi_\nu'(t)} \cdot 2\pi i \varphi_\nu'(t) e(\varphi_\nu(t)) dt = t^{-\sigma} e(\varphi_\nu(t)) dt,\] while \[du = \left(\frac{-\sigma t^{-\sigma-1}}{2\pi i \varphi_\nu'(t)} - \frac{t^{-\sigma} \varphi_\nu''(t)}{2\pi i (\varphi_\nu'(t))^2}\right) dt.\] \end{proof} \begin{lemma}\label{lem:aachra} Let $g:[a,b]\to \mathbb{R}$ be continuous, with $|g(t)|$ non-increasing. Then $g$ is monotone, and $\|g\|_{\TV} = |g(a)|-|g(b)|$. \end{lemma} \begin{proof} Suppose $g$ changed sign: $g(a')>0>g(b')$ or $g(a')<0a>\frac{|\tau|}{2\pi |\nu|}$. Then, for any $k\geq 1$, $f(t) = t^{-\sigma-k} |2\pi \nu-\tau/t|^{-k-1}$ is decreasing on $[a,b]$. \end{lemma} \begin{proof} Let $a\leq t\leq b$. Since $\left|\frac{\tau}{t \nu}\right| < 2\pi$, we see that $2\pi-\frac{\tau}{\nu t} >0$, and so $|2\pi \nu-\tau/t|^{-k-1} = |\nu|^{-k-1} \left(2\pi - \frac{\tau}{t \nu}\right)^{-k-1}$. Now we take logarithmic derivatives: \[t (\log f(t))' = - (\sigma+k) - (k+1) \frac{\tau/t}{2\pi \nu - \tau/t} = -\sigma - \frac{2\pi k + \frac{\tau}{t \nu}}{2\pi - \frac{\tau}{t \nu}} < -\sigma \leq 0,\] since, again by $\frac{|\tau|}{t |\nu|} < 2\pi$ and $k\geq 1$, we have $2\pi k + \frac{\tau}{t \nu}>0$, and, as we said, $2\pi - \frac{\tau}{t \nu}>0$. \end{proof} \begin{lemma}\label{lem:aachfour} Let $s = \sigma + i \tau$, $\sigma\geq 0$, $\tau\in \mathbb{R}$. Let $\nu \in \mathbb{R}\setminus \{0\}$, $b>a>\frac{|\tau|}{2\pi |\nu|}$. Then \[\int_a^b t^{-s} e(\nu t) dt = \left. \frac{t^{-\sigma} e(\varphi_\nu(t))}{2\pi i \varphi_\nu'(t)}\right|_a^b + \frac{a^{-\sigma-1}}{2\pi^2} O^*\left(\frac{\sigma}{(\nu-\vartheta)^2} + \frac{|\vartheta|}{|\nu-\vartheta|^3}\right), \] where $\varphi_\nu(t) = \nu t - \frac{\tau}{2\pi} \log t$ and $\vartheta = \frac{\tau}{2\pi a}$. \end{lemma} \begin{proof} Apply Lemma~\ref{lem:aachIBP}. Since $\varphi_\nu'(t) = \nu - \tau/(2\pi t)$, we know by Lemma \ref{lem:aachdecre} (with $k=1$) that $g_1(t) = \frac{t^{-\sigma-1}}{(\varphi_\nu'(t))^2}$ is decreasing on $[a,b]$. We know that $\varphi_\nu'(t)\ne 0$ for $t\geq a$ by $a>\frac{|\tau|}{2\pi |\nu|}$, and so we also know that $g_1(t)$ is continuous for $t\geq a$. Hence, by Lemma \ref{lem:aachmonophase}, \[\left|\int_a^b \frac{t^{-\sigma-1}}{2\pi i \varphi_\nu'(t)} e(\varphi_\nu(t)) dt \right|\leq \frac{1}{2\pi} \cdot \frac{|g_1(a)|}{\pi} = \frac{1}{2\pi^2} \frac{a^{-\sigma-1}}{\left|\nu - \vartheta\right|^2},\] since $\varphi_\nu'(a) = \nu - \vartheta$. We remember to include the factor of $\sigma$ in front of an integral in \eqref{eq:aachquno}. Since $\varphi_\nu'(t)$ is as above and $\varphi_\nu''(t) = \tau/(2\pi t^2)$, we know by Lemma \ref{lem:aachdecre} (with $k=2$) that $g_2(t) = \frac{t^{-\sigma} |\varphi_\nu''(t)|}{|\varphi_\nu'(t)|^3} = \frac{|\tau|}{2\pi} \frac{t^{-\sigma-2}}{|\varphi_\nu'(t)|^3} $ is decreasing on $[a,b]$; we also know, as before, that $g_2(t)$ is continuous. Hence, again by Lemma \ref{lem:aachmonophase}, \[\left|\int_a^b \frac{t^{-\sigma} \varphi_\nu''(t)}{2\pi i (\varphi_\nu'(t))^2} e(\varphi_\nu(t)) dt\right|\leq \frac{1}{2\pi} \frac{|g_2(a)|}{\pi} = \frac{1}{2\pi^2} \frac{a^{-\sigma-1} |\vartheta|}{\left|\nu - \vartheta\right|^3}. \] \end{proof} \begin{lemma}\label{lem:aachcanc} Let $s = \sigma + i \tau$, $\sigma,\tau \in \mathbb{R}$. Let $n\in \mathbb{Z}_{>0}$. Let $a,b\in \mathbb{Z} + \frac{1}{2}$, $b>a>\frac{|\tau|}{2\pi n}$. Write $\varphi_\nu(t) = \nu t - \frac{\tau}{2\pi} \log t$. Then \[\frac{1}{2} \sum_{\nu = \pm n}\left. \frac{t^{-\sigma} e(\varphi_\nu(t))}{2\pi i \varphi_\nu'(t)}\right|_a^b = \left. \frac{(-1)^n t^{-s} \cdot \frac{\tau}{2\pi t}}{2\pi i \left(n^2 - \left(\frac{\tau}{2\pi t}\right)^2\right)}\right|_a^b . \] \end{lemma} It is this easy step that gives us quadratic decay on $n$. It is just as in the proof of van der Corput's Process B in, say, \cite[I.6.3, Thm.~4]{zbMATH06471876}. \begin{proof} Since $e(\varphi_\nu(t)) = e(\nu t) t^{-i \tau} = (-1)^{\nu} t^{-i \tau}$ for any half-integer $t$ and any integer $\nu$, \[\left. \frac{t^{-\sigma} e(\varphi_\nu(t))}{2\pi i \varphi_\nu'(t)}\right|_a^b = \left. \frac{(-1)^{\nu} t^{-s}}{2\pi i \varphi_\nu'(t)}\right|_a^b \] for $\nu = \pm n$. Clearly $(-1)^{\nu} = (-1)^n$. Since $\varphi_\nu'(t) = \nu - \alpha$ for $\alpha = \frac{\tau}{2\pi t}$, \[\frac{1}{2} \sum_{\nu = \pm n} \frac{1}{\varphi_\nu'(t)} = \frac{1/2}{n - \alpha} + \frac{1/2}{- n - \alpha} = \frac{-\alpha}{\alpha^2-n^2} = \frac{\alpha}{n^2-\alpha^2}. \] \end{proof} \begin{proposition}\label{prop:applem} Let $s = \sigma + i \tau$, $\sigma\geq 0$, $\tau\in \mathbb{R}$. Let $a,b\in \mathbb{Z} + \frac{1}{2}$, $b>a>\frac{|\tau|}{2\pi}$. Write $\vartheta = \frac{\tau}{2\pi a}$. Then, for any integer $n\geq 1$, $$\begin{aligned}\int_a^b t^{-s} \cos 2\pi n t\, dt &= \left. \left(\frac{(-1)^n t^{-s}}{2\pi i} \cdot\frac{\frac{\tau}{2\pi t}}{n^2 - \left(\frac{\tau}{2\pi t}\right)^2}\right)\right|_a^b \\ &\quad+ \frac{a^{-\sigma-1}}{4\pi^2}\, O^*\left(\frac{\sigma}{(n-\vartheta)^2} + \frac{\sigma}{(n+\vartheta)^2} + \frac{|\vartheta|}{|n-\vartheta|^3} + \frac{|\vartheta|}{|n+\vartheta|^3}\right).\end{aligned}$$ \end{proposition} \begin{proof} Write $\cos 2\pi n t = \frac{1}{2} (e(n t) + e(-n t))$. Since $n\geq 1$ and $a>\frac{|\tau|}{2\pi}$, we know that $a>\frac{|\tau|}{2 \pi n}$, and so we can apply Lemma \ref{lem:aachfour} with $\nu = \pm n$. We then apply Lemma~\ref{lem:aachcanc} to combine the boundary contributions $\left. \right|_a^b$ for $\nu=\pm n$. \end{proof}