# Is $C_0^\infty(\mathbb{R}_+)$ a dense subspace of $W_0^{1,2}(\mathbb{R}_+)$?

I read that in some lecture notes that the space of $C^\infty$ funtions compactly supported on the positive real line is a dense subspace of the Sobolev space $W_0^{1,2}(\mathbb{R}_+)$. How can one show that, or at least what is the intuition behind this? Can anyone recommend an accessible reference?Somehow one it could seem that a space of functions which are differentiable for all degrees of differentiation cannot be a subspace of a space of functions that have weak derivatives only up to first order (and belonging to $L^2$). Where is the flaw?

$$C^{\infty}_c(\mathbb{R^+}) \subset C^{\infty}_0(\mathbb{R^+})$$
But $W^{1,2}_0(\mathbb{R^+})$ is usually defined as the closure of $C^{\infty}_c(\mathbb{R^+})$ for the $W^{1,2}$ norm
$$W^{1,2}_0(\mathbb{R^+}) := \overline{C^{\infty}_c(\mathbb{R^+})}$$
• Usually it is the $C^{\infty}$ functions where all the derivative converge to 0 at infinity. For exemple, $e^{-x^2}$ is in $C^{\infty}_0(\mathbb{R})$ but not in $C^{\infty}_c(\mathbb{R})$. Did you want to describe another space in your question? – Tryss Jun 26 '15 at 16:54
• By $C_0^\infty$ I had in mind compactly supported functions. Then your answer is even simpler. – wondering Jun 26 '15 at 17:33