I incorrectly proved that $$\int_0^x\frac{\lfloor t\rfloor}{t^2}dt=H_x$$According to Desmos, it should be $$\int_0^x\frac{\lfloor t\rfloor}{t^2}dt+1=H_x\tag{1}$$Here's my proof $$\int_0^x\frac{\lfloor t\rfloor}{t^2}dt=\sum_{k=0}^{x-1}\int_k^{k+1}\frac{\lfloor t\rfloor}{t^2}dt=\sum_{k=0}^{x-1}k\int_k^{k+1}\frac1{t^2}dt=\sum_{k=0}^{x-1}k\left(\frac1k-\frac1{k+1}\right)=\sum_{k=0}^{x-1}\frac k{k(k+1)}=\sum_{k=0}^{x-1}\frac1{k+1}=H_x$$ I think simplifying $\frac k{k(k+1)}$ to $\frac1{k+1}$ is where I got things wrong, but how do I prove that this is illegitimate?
Edit: $x$ is an integer.
Also, other proofs for $(1)$ are appreciated.
When you do this:
$$ \sum_{k=0}^{x-1}\int_k^{k+1}\frac{\lfloor t\rfloor}{t^2}dt=\sum_{k=0}^{x-1}k\int_k^{k+1}\frac1{t^2}dt $$
you assume that all the integrals in the RHS converge. But this is not true for $k=0$, because $\int_0^1 1/t^2dt$ does not converge - it's infinity, so the first term in the sum (at $k=0$) is actually $$k\cdot \int_0^1 1/t^2dt=0\cdot \infty,$$ which is undefined because you have to precisely measure "exactly how" infinite the integral is. Instead, you can take the first term in front of the sum:
$$ \sum_{k=0}^{x-1}\int_k^{k+1}\frac{\lfloor t\rfloor}{t^2}dt =\underbrace{\int_0^1\frac{\lfloor t\rfloor}{t^2}dt}_0 + \sum_{k=1}^{x-1}\int_k^{k+1}\frac{\lfloor t\rfloor}{t^2}dt. $$
So the first term is actually 0 (because the function inside the integral is a constant 0 a.e.) and you have to evaluate the sum only for $k\ge 1$.