Define $f(x)=0$ if $x\in \mathbb{Q}^c$; $f(x)=p-q$ if $x\in \mathbb{Q}$ where $x=\frac{p}{q}$ in lowest terms

76 Views Asked by At

Define $f(x)=0$ if $x\in \mathbb{Q}^c$; $f(x)=p-q$ if $x\in \mathbb{Q}$ where $x=\frac{p}{q}$ in lowest terms (conventional way to represent rationals). The question asks that whether f is Riemann integrable on [0,1]. I think this is kind of similar to the popcorn function but have no idea how to (dis)prove it...