Order of Divisor Count Function

Theorem
For all $$x \geq 1 \ $$,

$$\sum_{n \leq x } d(n) = x \log x + (2\gamma-1)x + O \left({ \sqrt{x} }\right) \ $$

where $$\gamma \ $$ is Euler's constant and $$d(n) \ $$ is the divisor function.