= Unsmoothing a logarithmically weighted sum
{title2=$|S(x)|\ll x(\log x)^{(\beta+k)/2}$}
Suppose $|a_n|\le(\log(2n))^k$ and $A(x)=\sum_{n\le x}a_n\log(x/n)=O(x(\log x)^\beta)$, with $0\le\beta\le k$. For $0<h\le1$, direct subtraction gives
$$
A(xe^h)-A(x)=h\sum_{n\le x}a_n+\sum_{x<n\le xe^h}a_n\log(xe^h/n).
$$
The last term has absolute value $O((xh^2+h)(\log x)^k)$. Choose $h=(\log x)^{(\beta-k)/2}$ to obtain the displayed bound, with an additional $O((\log x)^k)$ term harmless as $x\to\infty$ for fixed $k$. This elementary finite-difference argument converts a <logarithmically smoothed Perron formula> bound to cancellation in its original <partial sum>.
Back to article page