# Prove that $L^{\infty}(\mathbb R)\cap C(\mathbb R)$ is not dense in $L^{\infty}(\mathbb R)$

Here $C(\mathbb R)$ is the set of all continuous functions in $\mathbb R$, so the problem asks me to prove that there exists $f \in L^\infty(\mathbb R)$ such that there is no sequence of functions in $\mathbb R$ converging under sup norm to $f$. Also, the continuous functions not necessarily have compact support.

Does anyone have ideas? Thank you for your time.

• Hint: Convergence in the sup norm is also known as uniform convergence. Do you know any results concerning uniform convergence of continuous functions? – mlk Jul 11 '17 at 13:29

Take the function $f(x)=1_{[0,1]}+1_{[2,3]}$.We have that $f \in L^{\infty}$ and $f$ is not continuous.
If there was a sequence of continuous functions converging uniformly(under the sup norm) to $f$ then $f$ would be continuous,which is a contradiction.