Consider $$f(x)=\begin{cases} x^2 & x \in Q \\ x^3 & x\in R-Q \end{cases}$$ Is $f:[0,1] \rightarrow R$ Riemann Integrable?
My Attempt:
I tried defining a Partition $P=\{x_i: x_i = \frac in ;0\le i \le n\} $
Then I tried using Riemann Criterion of Integrability to try to prove that $L(P,f)=U(P,f)$.
However using the fact that $x^3<x^2$ in $[0,1]$.
The best I have gotten so far is showing that $U(P,f)-L(P,f) \rightarrow 1/3-1/4 =1/12$
Given this partition $P_{n}=\{0,\frac{1}{n},...,\frac{n-1}{n},1\}$.
Here $||P_{n}||\to 0$.
So $\lim_{n\to\infty}L(P_{n},f)=\int_{\bar{a}}^{b}f$.
We have $$\inf_{x\in(\mathbb{R\setminus Q})\cap[\frac{i-1}{n},\frac{i}{n}]} x^{3} =(\frac{(i-1)}{n})^{3}$$ But $$L(P_{n},f)=\sum_{i=1}^{n}(\frac{i-1}{n})^{3}\frac{1}{n}$$
So $$\int_{\bar{a}}^{b}f=\frac{1}{4}$$ by just summing and evaluating the limit. You can also do it by Riemann integrability of $x^{3}$ and convert summation to integral.
Similarly $$\sup_{x\in\mathbb{Q}\cap [\frac{i-1}{n},\frac{i}{n}]}x^{2}=(\frac{i}{n})^{2}$$
And hence $$\int_{a}^{\bar{b}}f=\lim_{n\to\infty}\sum_{i=1}^{n}\frac{1}{n}(\frac{i}{n})^{2}=\frac{1}{3}$$
The inequality of the upper and lower Darboux sums show that the function is not Riemann integrable.