This is an extension of the simpler question [1]
This time we compare sum and integral over the squares of the harmonic numbers (see [1] for definitions)
The sum is
$$f_{s2}(n) = \sum_{k=0}^n H_k^2$$
It can be calculated to give (see (4) in [2])
$$f_{s2}(n) = (n+1) H_n^2 - (2n+1) H_n + 2n$$
Now define the integral
$$f_{i2}(n) = \int_0^n H_x^2 \, dx$$
We are interested in the difference
$$d_{f2}(n) = f_{s2}(n) - f_{i2}(n)$$
The task is to determine the asyptotic behaviour of this differences as $n\to \infty$.
While the asymptotics of $f_{s2}(n)$ is trivially deduced from that of $H_n$ the integral form seems to be tough (compare [3]).
References
[1] Comparison of sum and integral over Harmonic number.
[2] Sum of powers of Harmonic Numbers
[3] Get a good approximation of $\int_0^1 \left(H_x\right)^2 dx$, where $H_x$ is the generalized harmonic number