[Math] Can every real function be approximated with a Riemann-integrable one with any precision required

fa.functional-analysisgn.general-topologyreal-analysisset-theory

Is there some proof that Riemann-integrable functions are dense in the space of all real functions?

In a sense that for every real function $f$ and number $\varepsilon>0$, there is Riemann-integrable function $R$, s.t.
$f(x)-R(x)<\varepsilon$ for all $x$.

Intuition comes from the fact that $\Bbb N$ can be bijected with $\Bbb Q$, but $\Bbb Q$ is dense in $\Bbb R$, which is as big as $2^{\Bbb N}$. So $\Bbb R$ can be bijected with the set of mostly continuous functions that maybe is dense in the set of all real functions, which is as big as $2^{\Bbb R}$.

Best Answer

Not only is is not true, as Gerald Edgar has already answered, that every real-function can be arbitrarily uniformly approximated by a Riemann-integrable one, but in fact pretty much the opposite is true: any function that can be arbitrarily uniformly approximated by a Riemann-integrable one is itself Riemann-integrable to start with:

Indeed, recall that $R\colon [0,1]\to\mathbb{R}$ is Riemann-integrable iff for every $\varepsilon>0$ there exists step functions $s,\psi$ such that $|R(x)-s(x)|\leq\psi(x)$ for all $x$ and $\int_0^1\psi \leq \varepsilon$. Assume $f$ is such that for every $\varepsilon>0$ there exists $R$ Riemann-integrable such that $|f(x)-R(x)|\leq\varepsilon$ for all $x$. Let $\varepsilon>0$: first find $R$ such that $|f(x)-R(x)|\leq\frac{\varepsilon}{2}$; then find $s,\psi$ such that $|R(x)-s(x)|\leq\psi(x)$ for all $x$ and $\int_0^1\psi \leq \frac{\varepsilon}{2}$: then we have $|f(x)-s(x)|\leq \frac{\varepsilon}{2} + \psi(x) =: \psi'(x)$ for all $x$, with $\psi'$ a step function and $\int_0^1 \psi' \leq \varepsilon$. This shows that $f$ is Riemann-integrable.