I want to prove that for any $x\geq 2$ we have $$ \begin{split} \frac{\zeta^{\prime}}{\zeta}(s)&=\sum_{n\leq x}\frac{\Lambda(n)}{n^s}\frac{\log(x/n)}{\log x}+\frac{1}{\log x}\left(\frac{\zeta^{\prime}}{\zeta}(s)\right)^{\prime}+\frac{1}{\log x}\sum_{\rho}\frac{x^{\rhos}}{(\rhos)^2}\\ &\qquad\qquad\qquad\frac{x^{1s}}{(1s)^2\log x}+\frac{1}{\log x}\sum_{k=1}^{\infty}\frac{x^{2ks}}{(2k+s)^2}. \end{split} $$ The idea of the proof is to consider to express $\frac{\zeta^{\prime}}{\zeta}$ as a Dirichlet series and make use of the identity (for $c>0$) $$ \frac{1}{2\pi i}\int_{ci\infty}^{c+i\infty}x^s\frac{ds}{s^2}= \begin{cases} \log x &\text{if }x\geq 1,\\ 0 &\text{if } 0\leq x <1. \end{cases} $$ Indeed in this way, setting $c=\max\{1,2\sigma\}$ and interchanging the order of summation and integration (which is justified b absolute convergence), we get $$ \begin{split} \frac{1}{2\pi i}\int_{ci\infty}^{c+i\infty}\frac{\zeta^{\prime}}{\zeta}(s+w)\frac{x^w}{w^2}\,dw&=\frac{1}{2\pi i}\int_{ci\infty}^{c+i\infty}\left[\sum_{n=1}^{\infty}\frac{\Lambda(n)}{n^{s+w}}\right]\frac{x^w}{w^2}\,dw\\ &=\frac{1}{2\pi i}\sum_{n=1}^{\infty}\frac{\Lambda(n)}{n^s}\int_{ci\infty}^{c+i\infty}\left(\frac{x}{n}\right)^w\frac{dw}{w^2}\\ &=\sum_{n\leq x}\frac{\Lambda(n)}{n^s}\log(x/n). \end{split} $$ Now I would to estimate the integral in another way: moving the line of integration to the left ($c\to \infty$) and using Cauchy residue theorem. The residue I get is $$ \frac{\zeta^{\prime}}{\zeta}(s)\log x\left(\frac{\zeta^{\prime}}{\zeta}(s)\right)^{\prime}\sum_{\rho}\frac{x^{\rhos}}{(\rhos)^2}+\frac{x^{1s}}{(1s)^2}\sum_{k=1}^{\infty}\frac{x^{2ks}}{(2k+s)^2}. $$ Therefore I would get my claim if I was able to show that the other integrals go to zero. How can I show it? Let $$ f(w)=\frac{\zeta^{\prime}}{\zeta}(s+w)\frac{x^w}{w^2} $$ I have to fix $K>0$ and show that $$ \int_{c+iK}^{K+iK}f(w)\,dw,\qquad \int_{K+iK}^{KiK}f(w)\,dw,\qquad \int_{KiK}^{ciK}f(w)\,dw, $$ all tend to zero as $K\to \infty$. Do you have any hint on how to proceed? Which bound should I use? Thanks for your help!

1$\begingroup$ Use (10.27) in MontgomeryVaughan and Stirling's formula to bound the second integral, and Lemma 12.2 in MontgomeryVaughan to bound the first and third integrals. $\endgroup$ – Peter Humphries May 11 '19 at 15:04

$\begingroup$ Basically I have to follow the proof of Theorem 12.5 in MontgomeryVaughan to get the claim, right? $\endgroup$ – asd May 11 '19 at 15:56

1$\begingroup$ pretty much  basicallu the bottom half of p.401 $\endgroup$ – Peter Humphries May 11 '19 at 15:57

$\begingroup$ great! many thanks! $\endgroup$ – asd May 11 '19 at 15:59

1$\begingroup$ I suggest that either @Peter or asd post an answer based on these comments. $\endgroup$ – Gerry Myerson May 11 '19 at 23:27
As suggested by @Peter we can prove the claim as follows. We will use of the following results from the book "Multiplicative Number Theory, I" by MontgomeryVaughan.
Lemma 12.2 For each real number $T\geq 2$ there is a $T_1$ with $T\leq T_1\leq T+1$ such that $$ \frac{\zeta^{\prime}}{\zeta}(\sigma+iT_1)\ll(\log T)^2 $$ uniformly for $1\leq \sigma\leq 2$.
and
Lemma 12.4 Let $\mathcal{A}$ denote the set of points of $s\in\mathbb{C}$ such that $\sigma\leq 1$ and $s+2k\geq 1/4$ for every positive integer $k$. Then $$ \frac{\zeta^{\prime}}{\zeta}(s)\ll\log(s+1) $$ uniformly for $s\in\mathcal{A}$.
Using these two results we proceed as follows (basically following the proof of Theorem 12.5 in the same book): let $K$ be a positive integer and consider the contour of integration consisting of the line segments connecting $$ ciT_1,\quad KiT_1,\quad K+iT_1,\quad c+iT_1 $$ Moreover we split the horizontal segments $$ [K\pm iT_1,\,c\pm iT_1] $$ in $$ [K\pm iT_1,\,1\Re(s)\pm iT_1]\cup [1\Re(s)\pm iT_1,\,c\pm iT_1] $$ Since $\sigma+iT_1\geq T$, by Lemma 12.2 if follows that $$ \int_{1\Re(s)\pm iT_1}^{c\pm iT_1}\frac{\zeta^{\prime}}{\zeta}(s+w)\frac{x^w}{w^2}\,dw\ll\frac{(\log T)^2}{T^2}\int_{1\Re(s)}^{c}x^{\sigma}d\sigma\ll\frac{x(\log T)^2}{T^2 \log x} $$ which goes to 0 as $T\to \infty$. Similarly, by Lemma 12.4 we have $$ \int_{K\pm iT_1}^{1\Re(s)\pm iT_1}\frac{\zeta^{\prime}}{\zeta}(s+w)\frac{x^w}{w^2}\,dw\ll \frac{\log T}{T^2}\int_{K}^{1\Re(s)}x^{\sigma}d\sigma\ll\frac{\log T}{T^2}\int_{\infty}^{1}x^{\sigma}d\sigma\\ \ll\frac{\log T}{xT^2 \log x} $$ which again tends to 0 as $T\to \infty$. It remains to bound the vertical segment. Using again Lemma 12.4 and subsadditivity of the logarithm, we get $$ \int_{KiT_1}^{K+iT_1}\frac{\zeta^{\prime}}{\zeta}(s+w)\frac{x^w}{w^2}\,dw\ll\frac{\log (K+T)}{K^2}x^{K}\int_{T_1}^{T_1}1\,dt\ll\frac{T\log KT}{K^2x^K} $$ which tends to 0 as $K\to \infty$, proving our claim.