Let $ \ f :[-1,2] \rightarrow \mathbb{R} $ be defined by : $$ \ f(x) = \ \begin{cases} 1 & -1 \leq x < 1 \\ 2 & x=1 \\ 3 & 1 <x \leq2 \end{cases} $$
Let $P_\sigma$ be a partition of [-1,2] defined by $ [-1, \frac {\sigma}{2}][\frac {\sigma}{2}, \sigma][\sigma,2]$ note $ 0 < \sigma < 2$ $$ L(f,P_\sigma) = 1(\frac {\sigma}{2}+1) + 1(\sigma - \frac {\sigma}{2}) +1(2-\sigma) = 3 \\ U(f,P_\sigma) = 2(\frac {\sigma}{2}+1) + 3(\sigma - \frac {\sigma}{2}) +3(2-\sigma) = 8 - \frac {\sigma}{2} \\ so, U(f,P_\sigma) - L(f,P_\sigma)=5- \frac {\sigma}{2} \\ Let \ \epsilon > 0 , choose\ \sigma = 20-2\epsilon \\ therefore, U(f,P_\sigma) - L(f,P_\sigma) < \epsilon $$ So by the Riemann epsilon condition f is integrable.
I am not quite sure if my partitioning was right, any feedback would be appreciated!
First of all, note two things in your solution
The idea is to take partitions such that as we make finer and finer partitions, the $\limsup$ and $\liminf$ converge on them. For a function with finite or countable discontinuities, imagine it as follows: take some discontinuity point and make sure that in your partition, rectangle containing the point of discontinuity is so small that it does not affect the Reimann sum. So if you take partitions such that the point $x=1$ is contained in some rectangle of length $\frac{1}{n}$, then the contribution to the upper sum is $\frac{3}{n}$ and to the lower sum is $\frac{1}{n}$. It is continuous in the remaining part of the interval, so it does not affect that.