Let $f : \mathbb R \rightarrow \mathbb R$ be a continuous function. I am trying to prove that for each $\epsilon > 0$, there is a continuous function $g$ whose derivative exists and equals 0 almost everywhere such that $|f(x) - g(x)| < \epsilon$ for each $x \in \mathbb R$. So far, I've considered trying to use linear combinations of the cantor-lebesgue function (which is continuous and has zero derivative a.e.), but have not met with much success.
- Anybody can ask a question
- Anybody can answer
- The best answers are voted up and rise to the top
This cries out loud for the Stone-Weierstrass theorem.
The singular functions are a subalgebra of $C[a,b]$, they contain the constant functions and they separate points, hence every continuous function on $[a,b]$ can be uniformly approximated by singular functions.
Now we can paraphrase Robert Israel's answer here:
Here is how to do this on $I=[0,1]$. $f$ is uniformly continuous on $I$, so find the $n$ so that if $|x-y|<1/n\;$, $|f(x)-f(y)|<\epsilon\;$. For $x\in[k/n,(k+1)/n]$ define $$ g(x)=f(k/n)+C(nx-k)(f((k+1)/n)-f(k/n)) $$ Where $C$ is the Cantor-Lebesgue function. This can then be repeated for other compact intervals.