# How to differentiate an expression involving big-o notation?

From Apostol - Introduction to analytic number theory (Theorem 3.3) we have $$x\geq1, \sum_{n\leq x}d(n)=x\log x+(2\gamma-1)x+O(\sqrt{x}):=E(x),$$ I want to differentiate $E$ -- to get a rough estimate for $d(n)$ -- but I don't know how to deal with the big-o part (even by proceeding with its rigorous definition doesn't get me anywhere).

• How to differentiate a function with a big-o?

Thanks

• I don't think you can differentiate a function in a big-O notation: consider a function that is bounded by $\sqrt{x}$ (so that it is in $O(\sqrt{x})$) but with many oscillations – angryavian Sep 5 '14 at 17:35
• ^ Exactly, take $\sin(x^2)$ for example. Belongs to $O(1)$ but its derivative $2x\cos(x^2)$ has no bound. – A.E Sep 5 '14 at 17:37
• Understood. Thanks. – user173987 Sep 5 '14 at 17:45

$$\sum_{n\leq x}d(n)=x\log x+(2\gamma-1)x+O(\sqrt{x}) \tag{1}$$ implies $$d(x) \le x\log x+(2\gamma-1)x+O(\sqrt{x}) \tag2$$ Obviously, this is totally useless since by definition of $d$ we have $d(x) \le x$ anyway.
But if we didn't know anything about $d$ except (1) and $d\ge 0$, then (2) is the best bound one can have, since it is conceivable that $d$ is zero for $1,\dots,x-1$ and all of the partial sum in (1) is just $d(x)$.