Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Why are the continuous functions not dense in $L^\infty$?

I mean both concretely (i.e. a counter example) and intuitively why is this the case.

share|cite|improve this question

Consider $$f(x)=\begin{cases}0&\text{if }x<0\\1&\text{if }x\ge 0\end{cases}$$ Any continuous $g$ with $||f-g||_\infty<\frac 13$ must have $g(x)<f(x)+\frac13=\frac13$ for all $x<0$. By countinuity, $g(0)\le \frac13$, contradicting $g(0)>f(0)-\frac13=\frac 23$.

Even if we only require $|f(x)-g(x)|<\frac13$ for almost all $x$, the argument above still holds (with using continuity on the right as well).

Intuitively, the continuous $g$ cannot do the jump at once, it needs some "preparation" and "relaxation".

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.