# Why is the following equality involving big $O$-notation true?

Suppose I know that $$\Delta(x)$$ is a function on $$\mathbb{R}$$ such that $$\Delta(x) = O(\sqrt{x}).$$ Suppose that $$x$$ is a large real number and that $$h < x/2.$$ Given this, why does the equality
$$\dfrac{x \log{x} + (2\gamma-1)x+\Delta(x)}{h}-\dfrac{(x-h)\log{x-h}+(2\gamma-1)(x-h)+\Delta(x-h)}{h}$$ $$= \log(x) + 2\gamma + O(\frac{h}{x})+O(\frac{x^{1/2}}{h})$$ hold? Here $$\gamma$$ is Euler's constant.

• $\frac{\Delta(x)-\Delta(x-h)}{h} = O(\frac{x^{1/2}}{h})$ and you are supposed to say $\Delta$ is the error term in the en.wikipedia.org/wiki/… – reuns Jul 27 at 22:28
• @reuns The term I was having trouble explaining was $O(h/x),$ not the $O(x^{1/2}/h).$ Do you have a quick way to deduce this error term? – inequalitynoob2 Jul 28 at 8:25
• $\log x - \log (x-h) = -\log(1-h/x) = O(h/x)$ – reuns Jul 28 at 12:42