In Analytic number theory by Apostol there's a theorem:
$$\sum_{n\le x} \sigma(n)= \frac{1}{2} \zeta(2)x^2 + O(x\log x)$$
and then it claims that because we know that $\zeta (2)= \frac{\pi^2}{6} $ this theorem shows that the average order of $\sigma(n)$ is $\frac{\pi^2 n}{12}$
but i don't understand it because if we put $n$ instead 0f $x$ in the theorem and divide the equation by $n$ and $n\rightarrow \infty$ we have:
$$\lim _{n\rightarrow \infty}\sum_{n\le x} \frac{\sigma(n)}{n} = \frac{1}{2} \zeta(2)n + O(\log n) $$
but it equals infinity because $\lim_{n\rightarrow \infty} \log n = \infty$.
may be it is a stupid mistake. but what is it?
thanks
For the average order it's enough to have $$\frac{\sum_{n\le x}\sigma(n)}{x}(1+o(1))$$ which in this case means the error term needs only be $o(n),$ and so $O(\log n)$ is not a problem.