I am dealing with the integral: $$\int_0^1f(x)dx$$ with $$\begin{equation} f(x)=\begin{cases} 0, & \text{if $x<0.5$}\\ 1, & \text{if x $\geq$ 0.5} \end{cases} \end{equation} $$ And I would like to find the Riemann integral and test for Riemann integrability. I know that the integral must be equal to $0.5$ but when I look at the definition, I dont quite know how to formally write up a proof for this. The way I learned is, is that I split my interval $[0,1]$ in arbitrarily many smaller intervals, such that $0=x_0 < x_1 < \ ... \ < x_m=1$. Then I can choose points in between those smaller intervals $\xi_1,\xi_2,.....,\xi_m $ and have a Riemann sum defined as $\sum_{j=1}^mf(\xi_j)*|I_j|$ where $|I_j|$ denotes the length of an interval.
Where do I start when I want to prove that the integral is equal to $0.5$? What confuses me in a way is that I dont know how I split the interval, since I have to prove it so that it applies to all intervals, no matter how I split $[0,1]$ up. Any help is greatly apreciated.
Here's a little bit to start you off with:
Let $N$ be the largest index for which $x_i<0.5$.
Then you know that $f(x_i)=0$ if $i\leq N$ and $f(x_i)=1$ if $i>N$.
This means that $$\sum_{i=1}^m f(\xi_i)|I_i| = \sum_{i=1}^{N-1} f(\xi_i)|I_i| +f(\xi_N)|I_N| + \sum_{i=N+1}^m f(\xi_i)|I_i|$$
and you can simplify this sum quite a lot. Both of the sums can be simplified a lot, and for the middle point, you know that no matter what $\xi_N$ is, the term $|I_N|$ must be small do it doesn't really matter.