How can I prove the integral exists and has an upper and lower bound for the sums for a discontinuous function?
Solution 1:
Start with the definition. Partition the interval first; as the function is constant except on the boundary, this partition doesn't really matter at all. (Beyond the fact that this will turn out to be Riemann integrable, in which case it really won't matter.) Given $\epsilon>0$, we can just take $0 < \epsilon < x_2 < ... < x_{n-1} < 1$ as our partition, and say the difference between the $x_n$ gets small.
On every interval, the supremum and infimum of $f$ is 1, except on the first. Here, the sup is 3, while the inf is 1. But the width of the interval is $\epsilon$, making the contribution to the upper sum just $3\epsilon$. The contribution everywhere else is $1-\epsilon$. The lower sum is just 1.
Given $\epsilon$ can be made arbitrarily small, the integral converges, showing this function is Riemann integrable with an integral of 1.