Let $ f $ defined at $ [0,1] $ by
$$f(x)=\frac{1}{p+q}\; \;\text{if }x=\frac pq \; \text{with }\; \gcd(p,q)=1$$ and $$f(x)=0 \; \;\text{if }\; x=0\; \text{or} \;x\notin \Bbb Q$$
I want to prove that $ f$ is Riemann integrable at $ [0,1] \;$ and compute $$\int_0^1f(x)dx$$
They told me to consider the set $$E_n=\left\{x\in \Bbb Q\cap [0,1]\;\;:\;f(x)\ge \frac 1n\right\} $$ and the function $ \psi $ defined by
$$\psi(x)=\epsilon \; \text{if} \;x\notin E_n$$ and $$\psi(x)=f(x)\; \text{if} \; x\in E_n.$$
I tried to construct two step functions to satisfy the definition of Riemann integrability but i don't see how to use the help given. Thanks in advance.