Evaluating the definite integral $\int_{-1}^1 \lfloor \arccos x \rfloor \,dx$ involving the greatest integer function 
Evaluating the definite integral $$\int_{-1}^1 \lfloor \arccos x \rfloor \,dx .$$

I tried it but unable to do as it is discontinuous. Somebody told me that you should do this by drawing graph---how?
Can anybody please give me the start?


The floor function creates a step function which can be rewritten as
$$\begin{cases}\begin{align}
[\cos\pi,\cos3]&\to3\\
(\cos3,\cos2]&\to2\\
(\cos2,\cos1]&\to1\\
(\cos1,\cos0]&\to0.\\
\end{align}\end{cases}$$
The the Riemann integral is the sum of the rectangle areas,
$$3(\cos3-\cos\pi)+2(\cos2-\cos3)+(\cos1-\cos2).$$

