# Partial sums of the divisor function

The wolframalpha page on the divisor function, http://mathworld.wolfram.com/DivisorFunction.html

Lists the asymptotic estimate,

$$\sum_{n\leq x}\sigma(n)=\frac{\pi^2}{12}x^2+O(x\ln(x))$$

However, I have tried to get the same estimate on my own by interchanging the summation on the left hand side and using the dirichlet hyperbola method.

Doing this the best estimate I can seem to get is,

$$\sum_{n\leq x}\sigma(n)=\frac{\pi^2}{12}x^2+O(x^{3/2})$$

Were non 'elementary' techniques used to obtain the first asymptotic? Or is it a typo?

It's Theorem $324$ in Hardy/Wright, using what I guess is the hyperbola method. The proof is essentially:
\begin{align} \sum_{l=1}^n \sigma(l) &= \sum_{x=1}^n \sum_{y \leqslant n/x} y = \sum_{x=1}^n \frac12 \left\lfloor\frac{n}{x}\right\rfloor \left(\left\lfloor\frac{n}{x}\right\rfloor+1\right)\\ &= \frac12 \sum_{x=1}^n \left(\frac{n}{x} + O(1)\right)\left(\frac{n}{x} + O(1)\right) = \frac12 n^2 \sum_{x=1}^n \frac{1}{x^2} + O\left(n\sum_{x=1}^n \frac{1}{x}\right) + O(n). \end{align}
Now $\displaystyle \sum_{x=1}^n \frac{1}{x^2} = \sum_{x=1}^\infty \frac{1}{x^2} + O\left(\frac{1}{n}\right) = \frac16 \pi^2 + O\left(\frac{1}{n}\right)$,
by $(17.2.2)$, and $\displaystyle \sum_{x=1}^n \frac{1}{x} = O(\log n)$.
Hence $\sum_{l=1}^n \sigma(l) = \frac{1}{12}\pi^2n^2 + O(n\log n)$.