Let f:[0,1] -> [0,1] be defined as follows:
f(x)=1/n if x=m/n where n,m are integers, n is not zero, and m/n is irreducible.
f(x)= 0 if x is irrational.
Prove that f(x) is Riemann integrable on [0,1]
please help me on this.


What do you have to use? That function, the "modified Dirchlet function" (the Dirichlet function itself is 0 for x rational, 1 for x irrational), can be proved to be continuous exactly on the irrational numbers and 0. That means that it is a bounded function whose set of discontinuities has measure 0. There is a theorem that says such a function is Riemann integrable.