the following question appeared in my calc exam:prove that there exists some $c>0$ such that for all $n \in \Bbb N$,$$cn \le\int_0^n f(x)dx$$whereas $f(x)=x^2-floor(x^2)$
I've tried evaluating it directly, by
$$\int_0^n f(x)dx = \sum_{k=0}^{n^2-1} \int_{\sqrt(k)}^{\sqrt(k+1)} x^2-k = \sum_{k=0}^{n^2-1} \int_{\sqrt(k)}^{\sqrt(k+1)} x^2 - \sum_{k=0}^{n^2-1} \int_{\sqrt(k)}^{\sqrt(k+1)} k = \int_0^n x^2dx - \sum_{k=0}^{n^2-1} k\cdot(\sqrt{k+1} -\sqrt k) \ge \frac{n^3}{3}-\sum_{k=0}^{n^2-1} \frac{k}{2\sqrt k} = \frac{n^3}{3}- \frac{1}{2}\cdot \sum_{k=0}^{n^2-1}\sqrt k $$
which seems promising but I couldn't get any further. I believe there is some integral theorem to be applied rather then the calculation I did. would really appreciate a hint/direction