I was working on the following function, trying to find its Riemann integrability: $$f(x) = \begin{cases} x & x \in \mathbb{Q}\cap [-1,0] \\ -x & x \in \mathbb{R}\backslash \mathbb{Q}\cap [-1,0] \end{cases}$$ For a function(call it $g$) which was defined exactly same as above but on interval [0,1], I was able to show that $U(P,g) - L(P,g)$ was bounded below by 1 and thus is not Riemann integrable. But it turns out that similar workout for this function gets me stuck. My workout is below, please help me out.
Note that $$M_i=sup\{f(x): x \in [x_{i-1},x_i]\}$$ and $$m_i=inf\{f(x): x \in [x_{i-1},x_i]\}$$ Then we have, $U(P,f)=\sum_{i=1}^{m} M_i(x_i-x_{i-1})= \sum_{i=1}^{m} x_i(x_i-x_{i-1})$
and $L(P,f)=\sum_{i=1}^{m} m_i(x_i-x_{i-1})= \sum_{i=1}^{m} x_{i-1}(x_i-x_{i-1})$
Thus, $U(P,f)-L(P,f)=\sum_{i=1}^{m} (x_i-x_{i-1})(x_i-x_{i-1})= \sum_{i=1}^{m} (x_i-x_{i-1})^2.$ How do I proceed from here to show that this is greater than or equal to some positive quantity? There might be alternate ways to this problem but I am supposed to find an $\epsilon$ such that $U(P,f)-L(P,f)\geq \epsilon$ $\forall P \in \mathbb{P}.$
EDIT: As pointed out by user251257 in the answer, the $M_i$ would be $-x_{i-1}$ instead of $x_i$. The error is left intact as it appeared in original version of this question so that answers make sense.
First you have an error: Notice that $M_i = -x_{i-1}$.
Now as for integrable: If $f$ is integral, then it is also integrable on say $[-1, -1/2]$. Now it should be pretty easy to estimate the upper and lower sums.