Order of Divisor Count Function

Theorem
For all $x \ge 1$:


 * $\ds \sum_{n \mathop \le x} \map d n = x \log x + \paren {2 \gamma - 1} x + \map \OO {\sqrt x}$

where $\gamma$ is the Euler-Mascheroni constant and $\map d n$ is the divisor function.