Let's assume that f=2 if x∈Q
For any partition 0<x1<x2<...xn<1 the Riemann's upper integral is
n→∞limk=1∑n(xk−xk−1)xk−1<x<xksupf(x)=2n→∞limk=1∑n(xk−xk−1)=2
because in each interval (xk−1;xk) there is a rational number q and hence the supremum is 2.
The lower integral is
n→∞limk=1∑n(xk−xk−1)xk−1<x<xkinff(x)=0
because in each interval (xk−1;xk) there is an irrational number α and hence the infimum is 0.
Since upper and lower interals are not equal, the function is not Riemann integrable.