# How can I prove: $\sum_{n\leq x}\frac{\phi(n)}{n^2} = \frac{\log x}{\zeta(2)}+\frac{C}{\zeta(2)} + A + O\left(\frac{\log x}{x}\right)$

The problem is that prove that $$\sum_{n\leq x}\frac{\phi(n)}{n^2} = \frac{\log x}{\zeta(2)}+\frac{C}{\zeta(2)} + A + O\left(\frac{\log x}{x}\right)$$ where $C$ is Euler's constant and $A = \sum_{n \geq 1}\frac{\mu(n)\log n}{n^2}$

The following is things I did try:

$$\sum_{n\leq x}\frac{\phi(n)}{n^2} = \sum_{n\leq x}\frac{1}{n}\frac{\phi(n)}{n} =\\ \sum_{n\leq x}\frac{1}{n}\sum_{d\mid n} \frac{\mu(d)}{d} = \sum_{q\leq x}\frac{1}{q} \sum_{d\leq x} \frac{x}{q}\frac{\phi(d)}{d^2} =\\ \sum_{q\leq x}\frac{1}{q}\left( \frac{1}{\zeta(2)} + O\left(\frac{q}{x}\right) \right) = \frac{\log x}{\zeta(2)} + \frac{C}{\zeta(2)} + O\left(\frac{1}{x}\right) + \sum_{q\leq x}\frac{1}{q} O\left(\frac{q}{x}\right)$$

Here $\mu$ is the Möbius function and $\phi$ is the Euler totient function.

From $$\sum_{n\leq x}\varphi(n) = \frac{x^2}{2\zeta(2)}+O(x\log x) \tag{1}$$ and Abel's summation formula we get:
$$\sum_{n\geq x}\frac{\varphi(n)}{n^2}=\frac{1}{2\zeta(2)}+O\left(\frac{\log x}{x}\right)+2\int_{1}^{x}\left( \frac{u^2}{2\zeta(2)}+O(u\log u)\right)\frac{du}{u^3}\tag{2}$$ and the claim readily follows by rearranging terms.
• The $O(u\log u)$ term gives $O(1)$ in the result, so more precision is required. Aug 6 '16 at 16:42
This is to obtain the estimate OP wanted. We have in fact ($+A$ should be corrected to $-A$): $$\sum_{n\leq x }\frac{\phi(n)}{n^2}= \frac6{\pi^2}(\log x+C) -A +O\left(\frac{\log x}x\right).$$
The OP had a good start indeed: \begin{align} \sum_{n\leq x}\frac{1}{n}\sum_{d\mid n} \frac{\mu(d)}{d}&=\sum_{d\leq x} \sum_{n\leq x, \ d|n} \frac{1}{n} \frac{\mu(d)}{d}\\ &=\sum_{d\leq x}\sum_{q\leq \frac xd} \frac1{dq} \frac{\mu(d)}d \ \ \ \textrm{(Substitution n=dq)}\\ &=\sum_{d\leq x}\frac{\mu(d)}{d^2} \sum_{q\leq \frac xd} \frac 1q \\ &=\sum_{d\leq x}\frac{\mu(d)}{d^2} \left( \log\frac xd + C + O\left(\frac dx\right)\right)\\ &=\sum_{d\leq x}\frac{\mu(d)}{d^2}( \log x + C) - \sum_{d\leq x}\frac{\mu(d)\log d}{d^2} + O\left(\frac{\log x}x\right)\\ &=\frac{6}{\pi^2}(\log x+ C)-A +O\left(\frac{\log x}x\right) \ \ \ \textrm{(Replacing \sum_{d\leq x} by \sum_{d=1}^{\infty} contributes O\left(\frac{\log x}x\right))} \end{align}