$C^\infty$ dense in Sobolev spaces I'm reading a theorem which says that $C^\infty$ intersection with $W^{k,p}$ is dense in $W^{k,p}$. I don't understand why they take the intersection. Isn't it  $C^\infty$ a subspace of  $W^{k,p}$? Thanks.
 A: You need to take intersection since smooth functions can grow arbitrarily fast near the boundary. It is another matter to talk about $W^{k,p}_0$.
A: You don't say what space the functions are on, but here let's consider functions on $\mathbb{R}$. Let $f: \mathbb{R} \longrightarrow \mathbb{R}$ be given by $f \equiv 1$. Then $f \in C^\infty(\mathbb{R})$ but certainly $f \notin L^p(\mathbb{R})$ for any $p \ge 1$ since
$$\left(\int_\mathbb{R} |f|^p \right)^{1/p} = \left(\int_\mathbb{R} 1\right)^{1/p} = \infty.$$
But if $f \in W^{k,p}(\mathbb{R})$, then in particular $f \in L^p(\mathbb{R})$. Therefore we see that it is not necessarily true that every smooth function lies in $W^{k,p}$.

$W^{k,p}(\Omega)$ is not the completion of $C^\infty(\Omega)$ for general $\Omega$ since, as was shown above, $C^\infty(\Omega)$ isn't contained in $W^{k,p}(\Omega)$. Define a norm
$$\|f\|_{k,p} = \left( \sum_{|\alpha| \leq k} \|D^{\alpha} f\|_p^p \right)^{1/p}.$$
and write
$$\widetilde{C}^k(\Omega) = \{f \in C^k(\Omega) : \|f\|_{k,p} < \infty\}.$$
Then $W^{k,p}(\Omega)$ is the completion of $(\widetilde{C}^k(\Omega), \|\cdot\|_{k,p})$ as long as $p \in [1, \infty)$. Look up the Meyers-Serrin theorem for more details.
A: In this webpage they give an answer for your problem, it is used to prove the density of $C^{\infty}_c$
http://terrytao.wordpress.com/2009/04/30/245c-notes-4-sobolev-spaces/
