I am trying to read the following [paper](https://arxiv.org/pdf/1706.03755.pdf) by Granville-Harper-Soundararajan and I had a few questions regarding the paper. They prove, for $S(x):=\sum\_{n\leq x}f(n)$ and $F\_x(s):=\prod\_{p\leq x}\left(1+\prod\_{p\leq x}\frac{f(p^k)}{p^{ks}}\right)$, the following theorem:


Suppose that $f$ is a multiplicative function with $|f(n)|\leq 1$,
$$|S(x)|\ll x\frac{L(x)}{\log x}\log\left(100 \frac{\log x}{L(x)}\right)+x\frac{\log\log x}{\log x}\tag{1}$$



> 
> One of my questions is: why is this error term in $(1)$ better than the trivial
> bound $x$?
> 
> 
> 


The second error term on the right, $x\frac{\log\log x}{\log x}$ is clearly better than $x$. But what about the left one? It seems, as the authors state, that $L(x)\leq 6 \log x$ for large $x$. However, that means that
$x\frac{L(x)}{\log x}\log\left(100 \frac{\log x}{L(x)}\right)\ll x\log\left(100 \frac{\log x}{L(x)}\right)$. Call $L(x)/\log x$, $a(x)$. Then our error term is clearly $\ll x(\log 100-\log a(x))$, which to me does not seem to be better than $x$.


My second question is:
One of the inequalities in the paper is: $$\sum\_{x/pq\leq n \leq 2x/pq}\min\left(1, \frac{x}{T|x-pqn|}\right)\ll \left(1+\frac{x}{Tpq}\log T\right)\tag{2}$$ Here $p$ and $q$ are primes such that $p\in \mathcal{P\_k}$ (as defined in the paper) and $q\leq 2x/p$. Further, $n$ is a natural number whose largest prime factor $\leq x$.



> 
> I was wondering how one could prove inequality $(2)$.
> 
> 
> 


Maybe, it is something standard. Thank you for your time.



On a sharp version of Halasz's theorem
Let h(x)=log(100 log x/L(x)) which is >3 for large x. Then the first term in (1) is << x h(x)/e^{h(x)}. This is evidently << x always, and significantly better than that the larger h(x) gets


