$W^{1,p}_0 \cap C^\infty \subset C^\infty_0$?

Is this true: $W^{1,p}_0 \cap C^\infty \subset C^\infty_0$? If this is true, how to prove it? If not, what is a counter-example?

Notation: Denote $C^\infty_0$ the set of all real-valued smooth function $f$ on $\mathbb R$ such that $\lim_{x\to \pm\infty} f(x)=0$, and denote $C^\infty_c$ the set of all real-valued smooth function $f$ on $\mathbb R$such that the support of $f$ is compact.

Finally, define $W^{1,p}_0$ is the completion of $C^\infty_c$ with respect to the Sobolev norm $||\cdot||_{W^{1,p}}$

• I don't think so, as it involves the completion with respect to the Sobolev norm – Hang Jun 11 '17 at 19:55
• Are you sure that you have the right definition of $C_0^\infty$? Some people mean the space of compactly supported $C^\infty$-functions with that symbol. In your definition $C_0^\infty$ is not even a subset of $L^p$. So you can't take a completion with respect to the $W^{1,p}$-norm, it's not even a well defined norm on that space. – Tim B. Jun 11 '17 at 20:10
• Yes, you are right. I edited – Hang Jun 11 '17 at 20:58
• I was thinking something along the lines of saying that since $f \in L^p$ and $\nabla f \in L^p$ that if there is a sequence of points $x_n \to \infty$ where $|f(x_n)| > \varepsilon$ and since $\|f\|_{L^p} < \infty$ that you could try to use a Poincare' like inequality (or lack thereof) to show that there is no bound or there is a bound on the norm of the derivative. ... idk. – user357980 Jun 12 '17 at 8:01

This is true. Take $f\in W^1_p(\mathbb R) \cap C^\infty(\mathbb R)$. Let me assume for simplicity that $f(x)=0$ for all $x<0$. Since $f$ is in $W^{1,p}(\mathbb R)$ it holds $$\|f\|_{W^{1,p}}^p = \int_{\mathbb R} |f|^p + |f'|^p dx =\sum_{n=1}^\infty \int_{n-1}^n |f|^p + |f'|^p dx < \infty.$$ This proves $$\int_{n-1}^n |f|^p + |f'|^p dx \to 0$$ for $n\to\infty$. Since for $I=(0,1)$ the space $W^{1,p}(I)$ is continuously embedded into $C(\bar I)$, it follows $\|f\|_{C([n-1,n])} \to 0$, hence $$\lim_{|x|\to+\infty} f(x)=0.$$