Let
$$R(x)=\sum\_{n\leq x}\phi(n)-\frac{3x^2}{\pi^2}.$$
Montgomery has shown that $R(x)=\Omega\_{\pm}(x\sqrt{\log\log x})$, which is the best known lower bound. It seems interesting therefore that
$$\int\_0^\infty \frac{R(x)\,dx}{x^2}=0,$$
because it tells us that the oscillations (which continue indefinitely) are particularly regular.


I cannot find any references for this integral, so I am wondering if it is known. I would particularly like to find other work of this nature as I cannot prove anything about the rate of convergence of the improper integral (other than $o(1)$ as $X\rightarrow\infty$ where $X$ is the upper limit of integration).



On the oscillation of the summatory totient about its average
I am not sure if this result is explicitly mentioned in the literature, but it certainly is classical.


Let
$$R(x) = \sum\_{n \leq x}{\varphi(n)} - \frac{3x^2}{\pi^2}, \qquad H(x) = \sum\_{n \leq x}{\frac{\varphi(n)}{n}} - \frac{6x}{\pi^2}.$$


Then by partial summation,
$$\int^{x}\_{0}{\frac{R(t)}{t^2} \: dt} = H(x) - \frac{R(x)}{x}.$$
A classical result of Chowla states that
$$H(x) - \frac{R(x)}{x} = O\left((\log x)^{-4}\right).$$
See Lemma 13 of S. Chowla, "Contributions to the analytic theory of numbers", *Mathematische Zeitschrift* **35**:1 (1932), 279-299.
(If you have access to Springer Link then it is available [here](https://doi.org/10.1007/BF01186560) or [here](http://eudml.org/doc/168356).)


From a cursory glance of Chowla's proof, the negative powers of a logarithm stem from the prime number theorem applied to the summatory function of the Möbius function, so it is likely that this bound could be improved with more modern estimates for this.


For what it's worth, I answered a question closely related to this [here](https://mathoverflow.net/questions/95836/error-to-sum-of-euler-phi-functions/95975#95975).


