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

46 Views Asked by At

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.