Dense subsets of $(L^p(\Omega),\|\cdot\|_p)$ The following results hold.


*

*Theorem Let $\Omega\subset\mathbb{R}^n$ be an open set. Then $C^0_c(\Omega)$ is dense in $(L^p(\Omega),\|\cdot\|_p)$, if $1\le p<\infty$.

*Theorem Let $\Omega\subset\mathbb{R}^n$ be an open set. Then $C^\infty_c(\Omega)$ is dense in $(L^p(\Omega),\|\cdot\|_p)$, if $1\le p<\infty$.


Why these result do not hold for $p=\infty$? Maybe because $L^{\infty}$ is not separable?
 A: The compactly supported part is most important. Try to $L^\infty$-approximate the constant function $g \equiv 1$ by a compactly supported function $f$. There will be a set of positive measure where $f$ is zero, so $\| f - g \|_\infty$ will always be at least $1$ no matter what $f$ we pick.
A: Taking for simplicity $\Omega$ compact, if $C^\infty_c(\Omega)$ were to be dense in $(L^\infty,\|\cdot\|_\infty)$ then having that $C^\infty_c(\Omega)$ is separable because every differentiable function can be approximated by rational polynomials, so would have to be $L^\infty(\Omega)$.
A: Well the biggest problem is that it is a classical result of analysis/topology that the space of continuous functions is closed under the $L^\infty$ topology i.e. the topology of a.e. uniform convergence (in the case of continuous functions we take a continuous representative, and a convergent sequence in uniformly Cauchy, thus converges uniformly to a continuous function). $L^\infty$ certainly contains elements that have no continuous representative: for example in $\mathbb{R}^n$ any non-zero simple function. So certainly for most robust spaces $$\overline{C_c^\infty} \subset \overline {C_c^0} \subset C^0 \neq L^\infty$$
An additional observation is that in $\mathbb{R}^n$ the closure of compactly supported smooth functions is the space of continuous functions that go to zero uniformly as norm goes to infinity. 
To see this, for an arbitrary continuous function going to zero uniformly at infinity, and some chosen $\epsilon$, first observe that it is necessarily uniformly continuous, so convolution with a sequence of smooth bump approximations to the identity give us a smooth approximation $\tilde{f}$ within $\epsilon$ uniformly of $f$, and since we took bump functions, it will also go to zero uniformly. We can then just multiply this against a smooth function $g$ that is $=1$ on a circle of radius $R$, and zero outside a circle of radius $R+1$. If $R$ is large enough that $|\tilde{f}| < \epsilon$ outside, then 
$$\|\tilde{f}g -f\|_\infty \leq \|\tilde{f}g -\tilde{f}\|_\infty+\|\tilde{f} -f\|_\infty \leq 2\epsilon $$
The other direction is a fairly easy exercise. 
