I'm trying to figure out a lecture example given on our Analysis course. We are currently going through Riemann integrals.
Let $g:[0,1] \to R, g(x) = 1$ when $x \in [0, \frac{1}{2}]$ and $g(x) = 2$ when $x \in ]\frac{1}{2},1]$.
Is g integrable?
The example goes on to prove that g is indeed integrable by choosing $P_n = \{0, \frac{1}{2}, \frac{1}{2} + \frac{1}{n}, 1\}$ as the partition.
I don't understand why simply $P = \{0, \frac{1}{2}, 1\}$ isn't enough to prove that the lower and upper Darboux integrals are the same, thus $g$ is integrable.