Let $f = \chi_A$, where $A = \mathbb{Q} \bigcap [0, 1]$. Prove that $f$ is not Riemann integrable.
From what I understand, Riemann integration is only defined for compact sets. Is $f$ not Riemann integrable because $A = \mathbb{Q} \bigcap [0, 1]$ is not compact? Or am I thinking of Riemann integration the wrong way? Any help would be very helpful. Thank you.
One is considering the integral of the function $f$. This function is defined by $f(x)=1$ if $x$ is rational and $0\le x\le 1$, and $f(x)=0$ otherwise. You don't specify the interval of integration, but integrating over $[0,1]$ seems reasonable, as $f$ is zero outside this interval.
But one finds that each upper Riemann sum for $\int_0^1 f(x)\,dx$ is $\ge1$ and each lower Riemann sum is $\le0$. Therefore, from first principles, one sees that $\int_0^1 f(x)\,dx$ does not exist as a Riemann integral.