Consider the series $\sum_{n = 1}^{N}\frac{1}{n}$. It is well known that we have the asymptotic: $$\sum_{n = 1}^{N}\frac{1}{n} = \log N + \gamma + \frac{1}{2N} + \frac{1}{12N^{2}} + O(N^{-3}).$$
My question: Consider the similar sum $F(x) = \sum_{1 \leq n \leq x}\frac{1}{n}$. Note that $F(N) = \sum_{n = 1}^{N}\frac{1}{n}$. Then does $F$ has the same asymptotic above? That is, is $$F\sum_{1 \leq n \leq x}\frac{1}{n} = \log x + \gamma + \frac{1}{2x} + \frac{1}{12x^{2}} + O(x^{-3})?$$ I think this should be true, but the only thing I can come up with is to look at $F(\lfloor x \rfloor)$ and use the asymptotic for $\sum_{n = 1}^{\lfloor x \rfloor}\frac{1}{n}$ but I am unsure how to compare $\log x$ and $\log \lfloor x \rfloor$ in a way that the error that occurs is $O(x^{-3})$.
Let $g(x)$ denote any $C^2$ function such that $$g(x)=\log x + \gamma+\frac{1}{2x}+\frac{1}{12x^2}+O(x^{-3})$$ Then $g'(x)= \frac{1}{x}-\frac{1}{2x^2}+O(x^{-3})$ and $g''(x)=-\frac{1}{x^2}+O(x^{-3})$, so the Taylor Series gives: $$g(x)=g(\lfloor x\rfloor)+\{x\}\left(\frac{1}{x}-\frac{1}{2x^2}\right)-\frac{1}{2}\left(\frac{\{x\}}{x}\right)^2+O(x^{-3})$$ Therefore by a density argument, we have the following growth of $F(\lfloor x\rfloor)$: $$ F(\lfloor x\rfloor)=\log x + \gamma + \left(\frac{1}{2}-\{x\}\right)\frac{1}{x} +\left(\frac{1}{12}-\frac{\{x\}+\{x\}^2}{2}\right)\frac{1}{x^2}+O(x^{-3})$$