Let $k \in \mathbb{R}$, $x_0 \in [a, b]$, and define $f:[a, b] \to \mathbb{R}$ via $$ \begin{cases} 0 & x \ne x_0\\ k & x= x_0 \end{cases} $$ Show that $f$ is Riemann integrable and that $\int_a^b f (x)dx = 0$.
I know that I need to show that the lower and upper Riemann sums must be equal, but in my mind they are not equal, because at the point $x=x_0$, it will have an upper sum of $k$ but a lower sum of $0$. However, I understand and can visualize how the entire integral is equal to $0$.
Edit: I find the upper Riemann sum by $$ U(f,P_n)=\sum_{i=1}^n M_i\Delta x_i. $$ I know that $\Delta x_i =\frac{1}{n}$, but I don't know how to write $M_i$ because the function will suddenly jump up to $k$ at a certain point.