I would like to know whether my observations have led me to the right path. Ok, so suppose we wanted to integrate $\int_{0}^{x}$ $\lfloor x \rfloor dx$. How would one find a formula for such a function?
Well, if you graph this function, you obtain these steps. Now what an integral would do is find the area underneath those steps. (It is like Riemann integration). Also if one graphs this function, you can observe that the area of each rectangle is $n^2$, for any value of $n$ on the $x$-axis. So we have that $\int_{0}^{x}$ $\lfloor x \rfloor dx$ =$\sum_{n=0}^{x} n^2$=$\frac{x(x+1)(2x+1)}{6}-1$, and the $-1$ came from the fact that $\lfloor x \rfloor$=$0$, for $x$$\in$$[0,1)$.
Now using this fact, we can also conclude that the integral of the ceiling function is $\frac{x(x+1)(2x+1)}{6}-1$. (More generally if we are integrating on an interval $[a,b]$, we have the value of the integral of the floor function is $\frac{b(b+1)(2b+1)}{6}-1-(\frac{a(a+1)(2a+1)}{6}-1)$).