I'm self-studying analytic number theory from terry tao's blog, there is an exercise (Exercise 33) from the blog that I cannot solve:
Let ${\eta: {\bf R} \rightarrow {\bf C}}$ be a smooth function such that ${\eta(x)}$ vanishes for ${x>C}$ and equals ${1}$ for ${x<-C}$ for some constant ${C>0}$. Let ${s = \sigma+it}$ be in the critical strip. Show that $$ \zeta(s) = \sum_n \frac{1}{n^s} \eta( \log n - \log x) - x^{1-s} \int_{\bf R} e^{(1-s) u} \eta(u)\ du + O_{\eta, A, \sigma}( x^{-A} )\ \ \ \ \ (1)$$ for any ${A>0}$, if one has ${x \geq C' (1+|t|)}$ for some sufficiently large ${C'}$ depending on ${C}$. (Hint: use Lemma 5 of Notes 1, Exercise 31, Lemma 32, and dyadic decomposition.) Conclude in particular that $$\displaystyle \zeta(s) = \sum_n \frac{1}{n^s} \eta( \log n - \log x) + O_{\eta,\sigma,A}( (1+|t|)^{-A} ) \ \ \ \ \ (2)$$ for any ${A>0}$, if ${C'(1+|t|) \leq x \ll (1+|t|)}$.
First note that if we set $y=e^ux$, then by change of variables formula we have $$x^{1-s}\int_{{\bf R}}e^{(1-s)u}\eta(u)\,du=\int_0^\infty \frac{1}{y^s}\eta(\log y-\log x)\,dy$$ Using this and the assumption that $\eta(x)$ vanishes for $x>C$ and equals $1$ for $x<-C$, We can write the main term of the right-hand side of (1) as $$\sum_{n\leq e^{-C}x}\frac{1}{n^s}-\frac{(e^{-C}x)^{1-s}}{1-s}+\sum_{e^{-C}x<n\leq e^C x} \frac{1}{n^s}\eta(\log n-\log x)-\int_{e^{-c}x}^{e^C x}\frac{1}{y^s}\eta(\log y-\log x)\,dy$$ From the integral test $\sum_{x\leq n\leq y}f(n)=\int_x^y f(t)\,dt+O(\int_x^y|f'(t)|\,dt+f(x))$, we see that the above expression is equal to $\zeta(s)+O(\frac{|s|+1}{\sigma}x^{-s})$, thus we have $$\zeta(s) = \sum_n \frac{1}{n^s} \eta( \log n - \log x) - x^{1-s} \int_{\bf R} e^{(1-s) u} \eta(u)\ du + O(\frac{|s|+1}{\sigma}x^{-s})$$ I don't know how to cut down the error to $x^{-A}$ for any $A>0$. I think the hint may be helpful, but I don't how to use it. I don't see how can we deduce (2) from (1)? Thanks for any help