Let $m,n \in \mathbb{Z_{+}}$ and let $f(x)=\begin{cases} x^m+x^n \text{ if } x \in [0,1]\cap\mathbb{Q}\\ 0 \text{ if } x \in [0,1] \setminus \mathbb{Q} \end{cases}$.
I thought of a similar function $f(x)=\begin{cases} x^m \ \text{ if } x \in [0,1]\cap\mathbb{Q}\\ 0 \text{ if } x \in [0,1] \setminus \mathbb{Q} \end{cases}$.
I've shown the second function is not Riemann integrable. I was trying to produce a similar argument, but I was told it was not so straightforward.