TITLE: How to integrate greatest integer function $\int^{1.5}_0 \lfloor x^2 \rfloor \, dx$
QUESTION [5 upvotes]: How to integrate greatest integer function 
$$\int\lfloor x\rfloor \, dx$$ 
I don't have any idea how to integrate greatest integer function, only have idea about the function viz. If $x = 1.5$ then the value of function will be $2$. 
Request you to please elaborate on this, I will be grateful to you.
Thanks in advance.

REPLY [10 votes]: Hint: Break up into three integrals, (i) $0$ to $1$; (ii) $1$ to $\sqrt{2}$; (iii) the rest. Each will be quick. 
To see why this works, plot $\lfloor x^2\rfloor$ in our interval. You will get a staircase pattern.