Need some help here.
I need prove that the following limit exist and is less than $1$
$$\lim_{x\to\infty}\left(\sum_{n\le x}^{}\frac{1}{n}-\ln x\right)$$
I feel a little lost here, this is my first exercise of this type, and I don't know what to use.
Any help is welcome!
This is a more general claim, but the proof of what you have is the same, just that $f$ is in incognito now.
NOTE The last claim is something you will find useful, but it does not address your question.
PROOF We have that $$\tag{ 1}t_{n+1}=\int_1^{n+1}f(x)dx=\sum_{k=1}^n \int_k^{k+1}f(x)dx\color{green}{\leq} \sum_{k=1}^n \int_k^{k+1}f(k)dx=\sum_{k=1}^n f(k)=s_n$$
which means $$0\leq f(n+1)=s_{n+1}-s_n\color{red}{\leq} s_{n+1}-t_{n+1}=d_{n+1}$$ where we used $\color{red}{(1)}$, so that $$0\leq d_{n+1}$$
Next, $$d_n-d_{n+1}=\int_n^{n+1} f(x) dx-f(n+1)\color{green}{\geq} \int_n^{n+1} f(n+1) dx-f(n+1)=0$$ so $d_n$ is decreasing. By the montone convergence theorem, $D$ exists. Since $d_1=f(1)$, it is proven that $$0\leq D\leq f(1)$$
Pay attention to where the fact that $ {f\geq 0}$ and that $\color{green}{f \text{ is decreasing}}$ has been used. A drawing should prove very, very useful!
Now use the above with $f(x)=\dfrac 1 x $.
ADD This, for example, proves with little machinery that $$\lim_{n\to\infty}\left(2\sqrt n-\sum_{k=1}^n\frac{1}{\sqrt k}\right)$$
exists and is $1<\ell<2$. The limit is $-\zeta(1/2)$ (credits to Rob), which shows its evaluation is anything but trivial.