# Prove that $f(x)=\lfloor x\rfloor$ is Riemann integrable on $[0,5]$

I have several doubts about this exercise because one of the conditions a function must have to be Riemann integrable is to be continuous in that interval, condition $$\lfloor x\rfloor$$ does not meet. How is this exercise done? Or what does the approach have to be?

Prove that $$f(x)=\lfloor x\rfloor$$ is Riemann integrable on [0,5] and calculate $$\int_0^5 \lfloor x\rfloor \,dx$$, where $$\lfloor x\rfloor = floor(x)$$

• Where did you read that a Riemann integrable function needs to be continuous? Commented Jan 18, 2020 at 10:21
• Yes, now I notice. If a function is continuous, then is Riemann integrable, but in this case, I don't know why is it integrable. Commented Jan 18, 2020 at 10:24
• Piece-wise continuity is sufficient for Riemann integrability. Commented Jan 18, 2020 at 10:37

Hint: try to prove (or find a prove in your textbook) that a function is Riemann integrable if it has only finitely many discontinuities in the interval of integration.

More generally, a function is Riemann integrable if it has countable many discontinuities. You might also want to try to find a prove for this.

• More generally still, a function is Riemann integrable, if & only if the measure of its set of discontinuities is 0. The characteristic function of the Cantor set, for example, has uncountably many discontinuities - in particular, they lie at every point in the Cantor set - yet also has a well-defined Riemann integral of 0. Commented Jan 18, 2020 at 11:44
• I didn't say 'if and only if'. There is no point in wanting to explain lesbesgue null sets to someone who had difficulties with integrating floor function. Commented Jan 18, 2020 at 14:30
• Oh yes, of course; I never thought you did ;) it was just a side comment. I've always been fascinated by the occasional tantalizing "sneak preview" of surprising results and strange pathologies that lay just a little bit ahead of my current understanding level. They tend to spur my interest & motivate me to learn. My thought was just to motivate measure theory, rather than explain it, by drawing attention to the curious notion that a function must have a set of discontinuities that is, in a loose sense, "even worse than uncountable", before it ceases to be Riemann integrable in general. Commented Jan 21, 2020 at 13:13

Monotone functions are integrable! To calculate the integral, integrate over [j,j+1] for j=0,1,2,3,4 and add.

A bounded function on a compact interval [a, b] is Riemann integrable if and only if it is continuous almost everywhere (the set of its points of discontinuity has measure zero, in the sense of Lebesgue measure).

https://en.wikipedia.org/wiki/Riemann_integral