I’m not understanding the following line in a proof
I believe it should be $O(h^2\psi(2h))$ since $\sum_{j=1}^{h}\frac{1}{j}\leqslant h\cdot1=h$
Best Answer
The notation $=O$ needs to be discouraged; it should be $\in O$. It's also important to note $o(f(h))\subseteq O(f(h))$, so very different looking arguments can go in the $O$. In this example,$$\sum_{j=1}^h\frac1j\sim\int_1^h\frac1JdJ=\ln h\in O(\ln h)\subseteq o(h)\subseteq O(h).$$
Quickly, $O(n^2)$ is any function $f=f(n)$ such that $$\left| \frac{f(n)}{n^2} \right|$$ remains bounded as $n \to +\infty$. It may be $n^2$ itself, but it may also be $n$, or $\sin \cos n$, etc.
Best Answer
The notation $=O$ needs to be discouraged; it should be $\in O$. It's also important to note $o(f(h))\subseteq O(f(h))$, so very different looking arguments can go in the $O$. In this example,$$\sum_{j=1}^h\frac1j\sim\int_1^h\frac1JdJ=\ln h\in O(\ln h)\subseteq o(h)\subseteq O(h).$$