First of all apologies for the typo I made in an earlier question, I decided to delete that post and reformulate it
I am asked to prove that
$$\int_{(0,1)} \lfloor nx\rfloor^2\,\mathrm{d}x =\frac{1}{n}\sum_{k=1}^{n-1} k^2$$
If $x \in (0,1)$, then the values of $\lfloor nx\rfloor^2$ will be integers on the interval $[0,n^2-1]$.
For any given $k$ in this interval, we will have $\lfloor nx\rfloor^2 = k$ for $\lfloor nx \rfloor \in [\sqrt{k}, \sqrt{k+1})$
After this I am not sure how to proceed