Here is a question that's been bothering me:
Suppose $f$ is a monotonic and bounded (say, real-valued) function on $[a, b) \subset \mathbb{R}$, and that $f(b) = f(a)$. (Let's also assume that $f$ is not constant.)
Is $f$ Riemann-integrable on $[a, b]$?
My thought is that, since $f$ is bounded on $[a,b]$, it should be integrable by Lebesgue's Theorem—that is, if its set of discontinuities in that interval is of measure zero (which seems plausible, but I am having trouble proving this).
Well, $f$ is bounded and monotonic on $[a, b) $ and hence $L=\lim_{x\to b^{-}} f(x) $ exists. Define $f(b) =L$ and then $f$ is monotonic on $[a, b] $ and hence Riemann integrable on $[a, b]$.
The function $f$ in your question differs from the one mentioned in last paragraph only due the value taken at $b$ (you have $f(b) =f(a) $ which may or may not be equal to the number $L$ used in last paragraph). Now remember that changing the values of a function at a finite number of points does not change its Riemann integrability or the value of its integral (provided the integral exists) and hence your function is also Riemann integrable on $[a, b] $.
There is no need to invoke the Lebesgue's criterion of Riemann integrability and a simpler analysis as presented above suffices for most problems dealing with Riemann integration.