TITLE: Asymptotic formula for $\sum_{n\leq x}\mu(n)[x/n]^2$ and the Totient summatory function $\sum_{n\leq x} \phi(n)$
QUESTION [7 upvotes]: I would like to show (for $x \ge 2$) that $$\sum_{n \le x}\mu(n)\left[\frac{x}{n}\right]^2 = \frac{x^2}{\zeta(2)} + O(x \log(x)).$$
I already have the identity $$\sum_{n \le x}\mu(n)\left[\frac{x}{n}\right] = 1$$ but the method to show this does not extend to my case.
I don't know how to approach this problem so any advice would be very welcome!

Since $$\left[\frac{x}{n}\right]^2 = \left(\frac{x}{n}\right)^2 + O(\frac{x}{n})$$ we have $$\sum_{n \le x}\mu(n)\left[\frac{x}{n}\right]^2 = \sum_{n \le x} \mu(n) \left(\frac{x}{n}\right)^2 + O(\sum_{n \le x} \mu(n) \frac{x}{n})$$ and the value estimate is $\frac{1}{\zeta(2)}$ so it remains to show that the error estimate is $O(x \log(x))$.

REPLY [3 votes]: So you have 
\begin{align*}
\sum\limits_{n \leq x} \mu(n)\biggl[\frac{x}{n}\biggr]^{2} &= \sum\limits_{n \leq x} \mu(n)\cdot\biggl(\frac{x}{n}-\biggl\{\frac{x}{n}\biggr\}\biggr)^{2} \\ &= x^{2}\sum\limits_{n \leq x }\frac{\mu(n)}{n^{2}} -2x \cdot\mathcal{O}(\log{x}) + \mathcal{O}(x)
\end{align*}
To find the first sum note that: 
\begin{align*}x^{2} \sum\limits_{n \leq x } \frac{\mu(n)}{n^{2}} &= x^{2}\sum\limits_{n=1}^{\infty} \frac{\mu(n)}{n^{2}} - x^{2}\sum\limits_{n > x} \frac{\mu(n)}{n^{2}} \\ &= \frac{x^{2}}{\zeta(2)} + \mathcal{O}\biggl(x^{2}\sum\limits_{n >x}\frac{1}{n^{2}}\biggr) \\ &= \frac{x^{2}}{\zeta(2)} + \mathcal{O}\Biggr(x^{2}\Biggl[\sum\limits_{n=1}^{\infty} \frac{1}{n^{2}}-\sum\limits_{n \leq x } \frac{1}{n^{2}}\Biggr]\Biggr) \\ &= \frac{x^2}{\zeta(2)} + \mathcal{O}\biggl(\frac{x^{2}}{\zeta(2)} + \sum\limits_{n \leq x} \frac{1}{n^{2}}\biggr)
\end{align*}
and finally note that for $s > 0$ $$\sum\limits_{n \leq x} \frac{1}{n^s} = \frac{x^{1-s}}{1-s} + \zeta(s) + \mathcal{O}(x^{-s})$$