Reading through Chapter 8 of Brezis. We see that $$C_{c}^{\infty}(\mathbb{R})$$ is dense in $$W^{1,\,p}(I)$$. Later on in the chapter we define $$W^{1,\,p}_{0}(I)$$ to be the closure of $$C_{c}^{1}(I)$$ in $$W^{1,\,p}(I)$$. This $$W^{1,\,p}_{0}(I)$$ space has really confused me.

1. What happens when look at $$C_{c}^{\infty}(I)$$ which causes us to lose density in $$W^{1,\,p}(I)$$?

2. This question is linked to the first question. Suppose $$(u_{n})\in C_{c}^{1}(I)$$, then $$(u_{n}')\in C_{c}(I)$$. Both $$C_{c}^{1}(I)$$ and $$C_{c}(I)$$ are dense in $$L^{p}(I)$$, so $$u_{n}\rightarrow u$$ and $$u_{n}'\rightarrow g$$ in $$L^{p}(I)$$. Hence why cannot we not say that $$u_{n}\rightarrow u$$ in $$W^{1,\,p}$$ by taking $$u'=g$$?

3. By definition $$\overline{C_{c}^{1}(I)}=W^{1,\,p}_{0}(I)$$ in the $$W^{1,\,p}$$ norm. So how does one show density of $$C_{c}^{\infty}(I)$$ in $$W^{1,\,p}_{0}(I)$$? Is it sufficient to show that $$C_{c}^{\infty}(I)$$ is dense in $$C_{c}^{1}(I)$$ with respect to the supremum norm?

It's not true that $$\mathcal C_c^\infty (I)$$ is dense in $$W^{1,p}(I)$$ when $$I\neq \mathbb R$$. What is true is $$\mathcal C_c^\infty (\mathbb R)$$ is dense in $$W^{1,p}(\mathbb R)$$. And indeed, if $$I\neq \mathbb R$$ is an interval, we define $$W_0^{1,p}(I)$$ as the closure of $$\mathcal C_c^\infty (I)$$ in $$W^{1,p}(I)$$.
• Yes I know this. I am asking why is $C_{c}^{\infty}(I)$ not dense in $W^{1,\,p}(I)$? What do we lose when we go from $C_{c}^{\infty}(\mathbb{R})$ to $C_{c}^{\infty}(I)$ that makes us sacrifice density? – Zeta-Squared Jun 5 at 7:40
• Just take any sequence in $\mathcal C_c^\infty (0,1)$ that converges to $f(x)=1\in W^{1,p}(0,1)$. The gradient will explose. (with a draw it's very easy to see). – Surb Jun 5 at 7:49
• I see what you are saying. But $C_{c}^{\infty}((0,1))$ is dense in $L^{p}((0,1))$. So if $f_{n}\rightarrow f$ in $L^{p}((0,1))$ and likewise since $(f_{n}')\in C_{c}((0,1))$ then $f_{n}'\rightarrow f'$ in $L^{p}((0,1))$ wont we have that $f_{n}\rightarrow f$ in the $W^{1,\,p}$ norm? – Zeta-Squared Jun 5 at 7:59
• The thing is in $W^{1,p}(0,1)$ you cannot define a function on the boundary as you want. In $W^{1,p}(0,1)$, the function $f(x)=1$ must have $f(0)=f(1)=1$. You'll find more information with the trace operator – Surb Jun 5 at 8:04
• I agree. I am clearly not understand something properly here. I think I may have identified what I am mistaken about. Please clarify for me. We can show that a function $f$ belongs to $L^{p}$ simply by showing $\|f\|_{p}<\infty$. However, I have been thinking that it is sufficient to show $f$ belongs to $W^{1,\,p}$ if $\|f\|_{W^{1,\,p}}<\infty$. This is incorrect, that is, $\|f\|_{W^{1,\,p}}\nRightarrow f\in W^{1,\,p}$ – Zeta-Squared Jun 5 at 8:09