TITLE: Tight error terms for partial sums $\sum_{n\leq x} 1/n^s$
QUESTION [6 upvotes]: (a) Let $s>1$, $x>0$ be real. Then it is not hard to see that
$$\sum_{n\leq x} \frac{1}{n^s} \leq \zeta(s) - \frac{1}{(s-1) x^{s-1}} + \frac{1}{2 x^s},$$
basically because $x\mapsto 1/x^s$ is convex. (The naive bound would have $1/x^s$ instead of $1/2 x^2$.) By Euler-Maclaurin, this bound is tight, in the sense that the inequality would not be valid for large $x$ if $1/2$ were replaced by a smaller constant.
This bound looks as if it should be completely standard (in fact, known since the umpteenth century). Is there an easy reference? Also, what happens for real $0<s<1$? (Is the term $1/2 x^2$ still correct? It seems so to me.)
(b) Let $s = \sigma + i t$, $0<\sigma\leq 1$, $s\ne 1$. Let $x\geq |t|$ be real. After trying a little, my students and I showed that
$$\zeta(s) = \sum_{n\leq x} \frac{1}{n^s} + \frac{x^{1-s}}{s-1} + O^*\left(\frac{c}{x^\sigma}\right)$$
with $c=5/6$, where $O^*(y)$ stands for a complex number whose norm is bounded by $y$. The bound is well-known with $c=1$. My question is: what is the optimal value of $c$? Again, this matter must be in some standard reference.

REPLY [2 votes]: Let $x$ be half an odd integer. Then, by the discussion in Section 4.14 of Titchmarsh: The theory of the Riemann zeta-function, the error term is bounded in absolute value by
$$\frac{x^{-\sigma}}{2\pi-|t|/x}.$$
Hence one can take $c=1/(2\pi-1)=0.189279\dots$ for these values of $x$.
Added. For general $x$, it follows with a bit of thought that the error term is bounded in absolute value by
$$\left(\frac{1}{2}+\frac{1}{2\pi-1}\right)x_0^{-\sigma},$$
where $x_0$ is a half odd integer nearest to $x$. Hence, for large $x$, one can take $c=0.689280$.