# Integral of step functions. Doubts with Apostol's excercise

In the "Calculus" Apostol's Book in the part of the Integral of a Step Function

The first exercise: $\int_{-1}^{3}[x]dx$ where $[x]$ is the integer part of $x$ the result is 2. (page 70).

I could not get this result. I'm doing something wrong or simply don't understand the problem.

Could someone explain this, thanks.

• Try graphing the floor (I assume this is what you meant) function and breaking it up into integrals where the function is discontinuous. The integrals should be very basic and then you can simply integrate each and sum them.
– Joe
May 25, 2012 at 4:29
• As Joe L. implied, our function is $-1$ on $[-1,0)$, $0$ on $[0,1)$, $1$ on $[1,2)$, and $2$ on $[2,3)$. Calculate the integrals separately (can just use the geometry). May 25, 2012 at 4:37
• Of course "integer part" means floor. The term "floor" for this was invented by Iverson around 1960, while the Apsotol used the classic terminology of mathematicians. May 27, 2012 at 1:42 Yes, Apostol means "the greatest integer function," [x], defined as the unique integer satisfying $x - 1 < [x] \le x.$ It is now usually referred to as the "floor function."