Evaluate $\int_{-1}^{3} [ x+ \frac{1}{2}] dx$ Evaluate
$\int_{-1}^{3} [ x+ \frac{1}{2}] dx$ where $[.]$ denotes the greatest integer  less than or equal to $x$.
My attempt : $\int_{-1}^{3} [ x+ \frac{1}{2}] dx= \int_{-1}^{0} [x +1/2]dx + \int_{0}^{1} [x +1/2]dx + \int_{1}^{2} [x +1/2]dx + \int_{2}^{3} [x +1/2]dx = - 1 + 0 +1 +2=2$
Is it true ?
 A: No.
$\int_{-1}^3\lfloor x+\frac12\rfloor dx$
$$=\int_{-1}^{-1/2}-1 dx+\int_{-1/2}^{1/2} 0 dx + \int_{1/2}^{3/2} 1 dx + \int_{3/2}^{5/2} 2 dx + \int_{5/2}^3 3 dx $$
$= -\frac12+1+2+\frac32=4$
A: You may or may not have already recognized this explicitly, but I'll point it out just in case:
Even though you are want to find the integral of a function, that doesn't actually mean you have to go through the integration process. Those are two distinct ideas. All you really $\textit{have}$ to do is find the area under the curve of the given function. Whether you do that by integrating, or by some other geometric method is up to you. And since the floor function is constant over certain intervals, it is definitely easier to just find the area under the curve, since it is just a bunch of rectangles. Now the only thing you need to do is find over what intervals (within the overall interval of $[-1, 3]$) does the floor function of $x + \frac{1}{2}$ stay constant, and where does it change. And it looks like others have already effectively given the solution for said intervals.
Just remember, integration (over a bounded interval) is a number, not necessarily a process. Whether or not you want to perform the integration process via antiderivatives is always up to you (unless of course you're in a class and are being forced to do it a certain way, but that's obviously besides the point).
