We use the Van der Corput sum-integral lemma. Put and . The Fourier series of the periodization of gives
where integer endpoints have half weight. This is the Dirichlet-Jordan convergence theorem for a piecewise smooth, or more generally bounded-variation, periodic function. Here is , so the periodized function has bounded variation. Changing to the requested endpoint convention costs at most one.
Write . For , . Since is continuous and monotone, the reciprocal has bounded variation, and integration by parts in the Riemann-Stieltjes sense yields
The variation of the reciprocal is at most . Summing over gives , separating and using convergence of . For each endpoint, use
The symmetric partial sums of the first term are a constant multiple of , uniformly bounded in and ; this standard Fourier series bound follows by splitting at and applying Abel summation to the remaining sine sum. The second term is absolutely summable with bound . The same bound therefore holds for the whole sum of the integrals. Since is the ordinary integral,
No second derivative is required; monotonicity supplies the needed variation estimate.
For the Hardy-Littlewood approximation to the Riemann zeta function, take . On , and is monotone. The proved lemma says that the difference between the partial sum of and its integral over is uniformly in . Weighted Abel summation with the decreasing weight then makes the weighted difference , since its total variation on is . Initially for , the tail integral is . The bounded primitive of the discrepancy gives a locally uniformly convergent weighted discrepancy integral for every , continuing the identity to that region. Thus, away from the pole,
If the ordinary sum-integral comparison supplies the same estimate. At the formula is understood meromorphically. It approximates the Riemann zeta function by a finite Dirichlet polynomial, transfers exponential sum estimates to bounds in the critical strip, yields elementary near-one bounds for and its derivative, and supports estimates for the mean value of Dirichlet polynomials and numerical calculations.
Let , a Dirichlet polynomial supported on primes. The cosine sum is , so its th power is a finite linear combination of , .
The Dirichlet polynomial is supported on integers that are products of exactly primes, counted with multiplicity. Each coefficient is at most by unique prime factorization; for the only coefficient is the one at . As is odd, , so no integer can appear in both supports. Thus every diagonal term vanishes in the mean value of Dirichlet polynomials from part (a).
Both supports lie in . The first error bound in part (a), with that common length, now gives for each term
Summing the finitely many terms proves the odd moment of a prime cosine sum estimate:
The argument holds for all real and all ; no cancellation estimate involving is needed once the diagonal is absent.