Showing a function is not Riemann integrable 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.
 A: Show that the set of discontinuity points of $f$ carries full mass of $1$, and thus $f$ is not Riemann integrable.
First, consider $x\in(0,1]\cap \mathbb{Q}$. Now $f(x)=x^{n}+x^{m}:=r>0$ and thus $0\notin B(f(x),r)$, where $B(a,r)$ denotes the open $r$-radius ball around $a$. But $B(x,\epsilon)\cap ([0,1]\setminus\mathbb{Q})\neq\emptyset$ for all $\varepsilon>0$, so $f(B(x,\varepsilon))\not\subseteq B(f(x),r)$ for every $\varepsilon>0$, as $f(y)=0$ for all $y\in [0,1]\setminus\mathbb{Q}$. Hence $f$ is not continuous at $x$.
Consider then $x\in [0,1]\setminus\mathbb{Q}$ and a sequence $(q_{i})_{i=1}^{\infty}\subseteq [0,1]\cap\mathbb{Q}$ so that $q_{i}\to x$. Now $f(q_{i})=q_{i}^{m}+q_{i}^{n}\to x^{m}+x^{n}\neq 0=f(x)$, which shows that $f$ is not continuous at $x$.
We have shown that the discontinuity points of $f$ contains $(0,1]$, which has Lebesgue measure of $1$, and thus $f$ is not Riemann integrable.
A: If it is riemann integrable then integral must be $0$ (why?), so $\int_{0}^{1} (x^m+x^n)dx=0$ so $\frac{1}{m+1}+\frac{1}{n+1}=0$ so $m+n+2=0$ 
