Solve the following:
Q: Consider a function f:[0,1]→[0,1] given by
f(x)={(1/q, if x=p/q,where p,q∈N are coprime,
0, if x is irrational
1, if x=0.}
a Show that if x∈[0,1] is rational, then f is not continuous at x.
b Show that L(f,P)=0 for any partition P of [0,1].
c Show that for any q∈N the number of elements in the set
X(q)={x∈[0,1]:f(x)≥1/q }
can be bounded by q(q+3)⁄2. (Better bounds are possible, but not required.)
d Using that X(q) is finite, show that f is continuous at any irrational x∈[0,1].
e Show that for any ε>0, we can find a partition P_ε of [0,1] such that U(f,P_ε )<ε.
f Deduce that f is Riemann integrable and
01∫f(x)dx=0