I'm asked to show that $\int_{0}^{1}f=1$ where $f$ is defined with piece-wise: $$ f=\begin{cases} 0 & x=0 \\ 1 & x\ne0.\\ \end{cases} $$ To show this I am using the upper/lower sums definition of a Riemann integral. This is what I have so far.
Let $H$ be the set of all refinements of the partition $P \in [0,1]$ of $f$. Take the upper integral of $f \in [0,1]$ to be $U(f) = \inf\{U(P,f) \colon P \in H\}$. Then,
\begin{align*} U(f) &= M_{1}(x_{1}-x_{0})+M_{2}(x_{2}-x_{1})+ \dots +M_{n}(x_{n}-x_{n-1})\\ &= 0+M_{2}(x_{2}-x_{1})+ \dots +M_{n}(x_{n}-x_{n-1})\\ &=0+1((x_{2}-x_{1})+ \dots +(x_{n}-x_{n-1})). \end{align*}
This is where I am confused, I know $M_{i}$, the supremum of each partition is $1$ once $x>0$. In my proof I assume there is one case where an area is $0$ since $0 \in I$ but if this is the case I'm confused as to how $1(x_{i}-x_{i-1})$ sums up to $1$.
Sorry about this choppy question I can't quite seem to word it the way I want to. After I finish this part of the proof I intend to show it for the lower sums, then since both upper/lower sums are equal to $1$ the integral from $0$ to $1$ is $1$.
The supremum in the first subinterval should be $1$ as well, not $0$. This is because the subinterval goes from $x_0=0$ to $x_1>0$, so the function takes both the values $0$ (at $x=0$) and $1$ (elsewhere) in this subinterval.
...and even though you didn't ask yet... for the lower sum you will have the first infimum being $0$ so your sum will be $1-x_1$. But when you refine the partitions, $x_1$ will go to $0$ so the sum goes to $1$.