When we say that "a function rarely is Riemann integrable", what exactly are we talking about? I have read some authors saying that the class of all Riemann integrable functions is "quite small". In what sense? How can we prove this statement?
 A: There are a number of possible ways of viewing this statement. One might like to say that it is small in the sense of cardinality. This is not true: the indicator function of any subset of the standard Cantor set is Riemann integrable, and there are as many of these functions as there are real-valued functions of real variables. (An interesting corollary: there are Riemann integrable functions which are not Borel measurable.)
The simplest correct view that I can think of goes as follows. First consider the space $R_0[a,b]$, which consists of all $f : [a,b] \to \mathbb{R}$ such that the Riemann integrals $\int_a^b f(x) dx$ and $\int_a^b |f(x)| dx$ both exist as finite numbers. This is a pseudonormed vector space. To make it normed, consider the space $R[a,b]$, which is the quotient of $R_0[a,b]$ by the subspace of functions with $\int_a^b |f(x)| dx = 0$. Finally take the completion of $R[a,b]$. This completion is (isomorphic to) the Lebesgue space $L^1([a,b])$. Since there are Lebesgue integrable functions which are not Riemann integrable, it follows that $R[a,b]$ is incomplete. In fact in a sense it is "very" incomplete, in that there are a great deal of Lebesgue integrable functions which are not Riemann integrable, or even "essentially" Riemann integrable (i.e. Riemann integrable after a modification on a set of measure zero). 
A concrete example of the latter point: $f_n(x)=x^{-1/2}$ for $x \in [1/n,1]$ and $0$ otherwise is Cauchy, because it converges in $L^1$ to a Lebesgue integrable function, but it does not converge to an element of $R[0,1]$, since the limit is not essentially bounded.
A: Here're two ways to state it.
Claim 1: Let $B$ be the Banach space of all bounded functions on the unit interval under pointwise addition, scalar multiplication and sup norm: $\|f\| = \sup \{|f(x)| : x \in [0, 1]\}$. Then, the class of Riemann integrable (or even Lebesgue integrable) functions in $B$ is of first category (in fact, it is even closed nowhere dense).
Claim 2: Let $L$ be the Banach space of all bounded Lebesgue integrable functions on the unit interval under pointwise addition, scalar multiplication and sup norm: $\|f\| = \sup \{|f(x)| : x \in [0, 1]\}$. Then, the class of Riemann integrable functions in $B$ is of first category (in fact, even closed nowhere dense).
The choice of the norm in Claim 2 is flexible. You can use an $L^1$-norm and the statement remains true.
A: For example the function $f:[0,1]\to\mathbb R$ defined by $f(x)=1, x\in [0,1]\setminus \mathbb Q $ and $f(x)=0, x\in \mathbb Q$. Then $f$ is not Riemann integrable, because every small Darboux sum is $0$ and every big Darboux sum is $1$. Now if you change the value of some irrational $x$ from $1$ to something else you get another function that is not Riemann integrable. In the same way you can get uncountably many functions that are not integrable. This might give you some idea, but definitely not in terms of cardinality. In other words, a function to be Riemann integrable, it has to have at most a set of discontinuities with Lebesgue measure $0$ (this is also sufficient).
A: A Riemann integrable function must have a set of discontinuities of measure 0. And the set of all continuous functions has the same size of ${\mathbb R}$, which is definitively smaller (in the sense of sizes of infinity) than the set of all functions from ${\mathbb R}$ to ${\mathbb R}$. So if you put that together, you get that the set of integrable functions is defined by a set of continuous functions (smaller infinite size), combined with measure zero sets of discontinuities (not smaller in the sense of size of infinities, but small in the sense of measure).
