How do I prove $\sum_{n \leq x} \frac{\mu (n)}{n} \log^2{\frac{x}{n}}=2\log{x}+O(1)$? Can I use Abel summation?

I am wondering if it is possible to solve this problem using Abel summation:

$$\sum_{n \leq x} \frac{\mu (n)}{n} \log^2{\frac{x}{n}}=2\log{x}+O(1)$$

Or maybe I am on the wrong track?


Solution 1:

Per conversation in the comments, here's how to prove the result using generalized Möbius inversion. In particular, watch how we deal with the error term (which I agree is the tricky part).

Theorem 2.23 in Apostol's Introduction to Analytic Number Theory gives the generalized Möbius inversion formula as the following:

If $\alpha$ is completely multiplicative we have $$G(x) = \sum_{n \leq x} \alpha(n) F\left(\frac{x}{n}\right) \Longleftrightarrow F(x) = \sum_{n \leq x} \mu(n) \alpha(n) G\left(\frac{x}{n}\right).$$

According to the statement we're trying to prove, if $G(x) = \log^2(x)$ then $F(x) = 2 \log (x) + O(1)$ (with the completely multiplicative function $\alpha(n) = 1/n$). So let's try the dominant term in $F(x)$ on the left-hand side and see what happens.

We have $$2\sum_{n \leq x} \frac{\log \left(\frac{x}{n}\right)}{n} = 2\sum_{n \leq x} \left(\frac{\log x}{n} - \frac{\log n}{n}\right) = 2\left(\log x H_x - \sum_{n \leq x}\frac{\log n}{n}\right)$$ $$= 2 \log^2 x + 2\gamma \log x + O\left(\frac{\log x}{x}\right) - \log^2 x - 2A + O\left(\frac{\log x}{x}\right)$$ $$= \log^2 x + 2\gamma \log x - 2A + O\left(\frac{\log x}{x}\right),$$ where $A$ is constant. The second-to-last step uses the asymptotic expansion for the harmonic numbers and the asymptotic order of $\sum_{n \leq x}\frac{\log n}{n}$, the latter of which is Exercise 1 in Chapter 3 of Apostol and can be proved using Euler-Maclaurin summation.

By generalized Möbius inversion, then, $$\sum_{n \leq x} \frac{\mu(n)}{n} \left(\log^2 \frac{x}{n} + R\left(\frac{x}{n}\right)\right) = 2 \log x$$ $$\Longrightarrow \sum_{n \leq x} \frac{\mu(n)}{n} \log^2 \frac{x}{n} = 2 \log x - \sum_{n \leq x} \frac{\mu(n)}{n}R\left(\frac{x}{n}\right),$$ where $R(x)$ is some function satisfying $R(x) = 2\gamma \log x - 2A + O\left(\frac{\log x}{x}\right) $. What remains, then, is to show that $\sum_{n \leq x} \frac{\mu(n)}{n} R\left(\frac{x}{n}\right) = O(1)$.

We know that $\sum_{n \leq x} \frac{1}{n} = \log x + \gamma + O\left(\frac{1}{x}\right)$, so applying generalized Möbius inversion again gives us $$\sum_{n \leq x} \frac{\mu(n)}{n} \left(\log \frac{x}{n} + S\left(\frac{x}{n}\right)\right) = 1,$$ where $S(x)$ is some function satisfying $S(x) = \gamma + O\left(\frac{1}{x}\right)$. We also know that $\sum_{n=1}^{\infty} \frac{\mu(n)}{n} = 0$ (see, for instance, Equation (10) here), so $\sum_{n \leq x} \frac{\mu(n)}{n} = o(1)$. Putting this all together, we have $$\sum_{n \leq x} \frac{\mu(n)}{n} R\left(\frac{x}{n}\right) = \sum_{n \leq x} \frac{\mu(n)}{n} \left(2\gamma \log \frac{x}{n} - 2A + O\left(\frac{n \log \frac{x}{n}}{x}\right)\right)$$ $$=2 \gamma - 2 \gamma \sum_{n \leq x} \frac{\mu(n)}{n} \left(\gamma + O\left(\frac{n}{x}\right)\right) - 2A \sum_{n \leq x} \frac{\mu(n)}{n} + O\left(\frac{1}{x}\right)\sum_{n \leq x} \mu(n) \log \frac{x}{n}$$ $$=2 \gamma - 2 (\gamma^2+A) \sum_{n \leq x} \frac{\mu(n)}{n} + O\left(\sum_{n \leq x} \frac{\mu(n)}{x} \right)+ O\left(\frac{1}{x}\right) \sum_{n \leq x} O\left(\log \frac{x}{n}\right)$$ $$= 2 \gamma + o(1) + O\left(\sum_{n \leq x} \frac{\mu(n)}{n} \right) + O\left(\frac{1}{x}\right) O\left( \sum_{n \leq x} (\log x - \log n)\right)$$ $$= O(1) + o(1) + o(1) + O\left(\frac{1}{x}\right) O\left(x \log x - (x \log x - x + O(\log x))\right)$$ $$ = O(1).$$ (The second-to-last step follows from Stirling's approximation.)