How to show that a function is not Riemann integrable by using Cauchy criterion? Let $f:[-2,2] \to \mathbb{R}$ is defined as follows:
$f(x) = \begin{cases} x+1, x \in \mathbb{Q} \\ -x, x \in \mathbb{Q^c} \end{cases}$.
Is $f \in \mathcal{R}[-2, 2]$? Explain your answer!
I think this function is not Riemann integrable. I need to show this by using the negation of Cauchy criterion for integral.
Negation of Cauchy criterion for integral: $f \notin \mathcal{R}[a, b]$ if and only if there exists $\varepsilon_0 > 0$ such that for all $\eta > 0$ there exists tag partition $\dot{P}$ and $\dot{Q}$ where $||\dot{P}||<\eta$ and $||\dot{Q}||<\eta$ such that $|S(f; \dot{P}) - S(f; \dot{Q})| \geq \varepsilon_0$.
I'm stuck in choosing the tag partition. I've tried the tag partition $\dot{P}$ with the tag are rational numbers and tag partition $\dot{Q}$ with the tag are irrational numbers and didn't get good answer. Can you help me?
Note: please do not use upper and lower integral
 A: Since $x \mapsto x+1$ is Riemann integrable, it follows that as $\|P\| \to 0$ for partitions $P$ with rational tags,
$$S(f,P) \to \int_{-2}^2(x+1) \, dx = \left.\frac{1}{2}x^2 \right|_{-2}^2 + \left. x \right|_{-2}^2 = 4$$
Similarly, since $x \mapsto -x$ is Riemann integrable, it follows that as $\|Q\| \to 0$ for partitions $Q$ with irrational tags,
$$S(f,Q) \to \int_{-2}^2(-x) \, dx = -\left.\frac{1}{2}x^2 \right|_{-2}^2  = 0$$
Hence, there exist $\delta_1,\delta_2 > 0$ such that if $P$ has rational tags and $\| P\| < \delta_1$ and if $Q$ has irrational tags and $\|Q\| < \delta_2$, then
$$ |S(f,P) - 4| < 1,\quad |S(f,Q)| = |S(f,Q) - 0| < 1$$
This implies that if $\|P\| < \delta = \min(\delta_1,\delta_2)$, then $S(f,P) - 4  > -1$, and, hence $|S(f,P)|= S(f,P)  > 3$. Also, if $\|Q\| < \delta = \min(\delta_1,\delta_2)$, then $-|S(f,Q)| > -1 $.
Take $\varepsilon_0$ = 1. For any $\eta > 0$ we can choose partitions $P$ (with rational tags) and $Q$ (with irrational tags) such that
$$\|P\|, \|Q\| < \min(\delta, \eta) \leqslant \eta,$$
but, by the reverse triangle inequality,
$$|S(f,P) - S(f,Q)|\geqslant |S(f,P)| - |S(f,Q)|>3 -1 = 2 > \varepsilon_0$$
Therefore, the Cauchy criterion is violated and $f$ is not Riemann integrable.
