# Double max of a particular sum in Montgomery-Vaughan

In the Montgomery-Vaughan's paper ''The exceptional set in Goldbach's problem'', they estimate the following sum:

$$\displaystyle \max_{0<y\leq x}\max_{0<h\leq x} \left(h+\frac{x}{P}\right)^{-1}\bigl|\sum_{y-h<p\leq y}\chi(p)\log p\bigr|$$

supposing that $\chi$ is a primitive non trivial Dirichlet character of modulus $q\leq P=x^{\delta}$, with $\delta>0$. They say that such estimate follow from the analogous estimate given by Gallagher in the paper ''A large sieve density estimate near $\sigma=1$''. This is quite clear, but I wonder for a complete proof because I think that there are trouble with the fact that $y-h$ could be negative and with the dependence of $T$ by $x$ in the use of the explicit formula:

$$\sum_{n\leq x}\chi(n)\Lambda(n)=-\sum_{|Im(\rho)|\leq T}\frac{x^{\rho}}{\rho}+O\left(\frac{x\log^{2}(qx)}{T}\right) \,\,\,\,\,\text{with} \,\, T\leq x^{\frac{3}{4}}$$

Please, could anyone write some details on the estimate of the sum above? In particular, I don't understand why we can arrive to the following form:

$$\sum_{y-h<p\leq y}\chi(p)\log p\ll \sum_{|Im(\rho)|\leq T} y^{\beta-1}\min(y,h) +O\left(\frac{y\log^{2}(qy)}{T}\right)$$

as stated in the Montgomery-Vaughan's paper.

We fix $y\in (0,2x]$ and we consider first the estimate of $\sum_{\substack{y-h<n\leq y}} \Lambda(n)\chi(n)$: If $h>y$ from the explicit formula we get \begin{equation} \sum_{\substack{y-h<n\leq y}} \Lambda(n)\chi(n)=\sum_{\substack{0<n\leq y}} \Lambda(n)\chi(n)\ll \sum_{|Im(\rho)|\leq T} \frac{y^{\beta}}{|\beta|} +\frac{y\log^{2}(qTy)}{T}+y^{\frac{1}{4}}\log y, \end{equation} where $\beta=\Re(\rho)$. We are using the explicit formula: \begin{equation} \sum_{\substack{0<n\leq y}} \Lambda(n)\chi(n)=\sum_{|Im(\rho)|\leq T} \frac{y^{\rho}}{\rho} +\frac{y\log^{2}(qTy)}{T}+y^{\frac{1}{4}}\log y, \end{equation} supposing $q\leq x$, $T\geq 2$. Using the zero-free region in the form $|\beta|\gg \frac{1}{\log(qT)}$ we have that $\sum_{\substack{0<n\leq y}} \Lambda(n)\chi(n)\ll \sum_{|Im(\rho)|\leq T} y^{\beta}\log(qT) +\frac{y\log^{2}(qTy)}{T}+y^{\frac{1}{4}}\log y$. We find that \begin{equation} \max_{0<y\leq 2x}\max_{y<h\leq x}\frac{1}{h+\frac{x}{P}}\biggl|\sum_{\substack{y-h<n\leq y}} \Lambda(n)\chi(n)\biggr| \end{equation} $$\ll \max_{0<y\leq 2x}\log(qT)\sum_{|Im(\rho)|\leq T}\frac{y^{\beta}}{y+\frac{x}{P}}+\frac{y\log^{2}(qTy)}{T(y+\frac{x}{P})}+\frac{y^{\frac{1}{4}}}{(y+\frac{x}{P})}\log y$$ $$\ll \log(qT)\sum_{|Im(\rho)|\leq T}\max_{0<y\leq 2x}\frac{y^{\beta}}{y+\frac{x}{P}}+\frac{x\log^{2}(qTx)}{T}+\left(\frac{x}{P}\right)^{\frac{-3}{4}}\log x$$ $$\ll \log(qT)\sum_{|Im(\rho)|\leq T}\left(\frac{x}{P}\right)^{\beta-1}+\frac{x\log^{2}(qTx)}{T}+\left(\frac{x}{P}\right)^{\frac{-3}{4}}\log x,$$
If otherwise $h\leq y$ from the explicit formula we get \begin{equation} \sum_{\substack{y-h<n\leq y}} \Lambda(n)\chi(n)\ll \sum_{|Im(\rho)|\leq T} \biggl|\frac{y^{\rho}-(y-h)^{\rho}}{\rho}\biggr| +\frac{y\log^{2}(qTy)}{T}+y^{\frac{1}{4}}\log y. \end{equation} Since $$\biggl|\frac{y^{\rho}-(y-h)^{\rho}}{\rho}\biggr|\leq\int_{y-h}^{y} t^{\beta-1}dt\leq\frac{y^{\beta}-(y-h)^{\beta}}{\beta}$$ we have \begin{equation} \max_{0<h\leq y}\frac{1}{h+\frac{x}{P}}\sum_{\substack{y-h<n\leq y}} \Lambda(n)\chi(n)\ll \log(qT)\sum_{|Im(\rho)|\leq T} \max_{0<h\leq y}\frac{1}{h+\frac{x}{P}}\left(y^{\beta}-(y-h)^{\beta}\right) \end{equation} $$+\frac{yP\log^{2}(qTy)}{xT}+\frac{P}{x}y^{\frac{1}{4}}\log y.$$ Finally we have $\max_{0<y\leq x}\max_{0<h\leq y}\frac{y^{\beta}-(y-h)^{\beta}}{h+\frac{x}{P}}\ll \left(\frac{x}{P}\right)^{\beta-1}.$ So we find that, in the case $0<h\leq y$, \begin{equation} \max_{0<y\leq 2x}\max_{0<h\leq y}\frac{1}{h+\frac{x}{P}}\biggl|\sum_{\substack{y-h<n\leq y}} \Lambda(n)\chi(n)\biggr| \end{equation} $$\ll \log(qT)\sum_{|Im(\rho)|\leq T}\left(\frac{x}{P}\right)^{\beta-1} +\frac{P\log^{2}(qTx)}{T}+Px^{\frac{-3}{4}}\log x.$$ The estimate for primes follow readily from this.