# How to prove Riemann integrable with partitions

I'm quite stuck on how to prove that this function: $$f(x) = \begin{cases} 1 & x \in [0,{1\over 2}) \\ x - {1\over 2} & x \in [{1 \over 2}, 1] \end{cases}$$ is Riemann integrable. I've tried setting the partition $P_1 = \{0,{1\over 2} - \delta, {1\over 2} + \delta, 2\}$, but that turned out not to work, and I've tried a partition $P_N$ of $2N$ evenly spaced points, but it seems that for $f(x) = x - {1\over 2}$, then $U_{P}$ and $L_P$ will always differ by ${1\over 2N}$ for $N$ intervals, i.e., they will always differ by ${1\over 2}$ so I'm slightly stuck. thanks for any tips.

-
Notice that the mesh of the partition you have is also getting finer. –  user39431 Nov 7 '13 at 23:16

Notice that, a function $f$ is Riemann integrable on $[a,b]$ if