is the following result valid?:
If $ u \in W^{1,p} (\mathbb{R}^n) \cap C^{1}(\mathbb{R}^n)$, then $\forall \epsilon > 0 ~ \exists f \in C_{c}^{\infty}$ s.t. $\|u-f\|_{W^{1,p}(\mathbb{R}^n)} < \epsilon$
I can't find it anywhere. I tried to look on Evans, partial differential equation, and Adams, Fournier, Sobolev spaces. Thank you
Yes. Take a function $\varphi_n\in C^\infty_c(\mathbb{R}^n)$ with $0\le\varphi_n\le1$, $\varphi_n=1$ in $B(0,n)$ and $\varphi_n=0$ outside $B(0,n+1)$, and (this is important) $\Vert \nabla\varphi_n\Vert_\infty\le C$ for all $n$. Then $f_n=u\varphi_n$ converges in $W^{1,p}$ to $u$. Indeed, $f_n\to u$ pointwise and $\vert f_n\vert\le \vert u\vert$ and so by the Lebesgue dominated convergence theorem $f_n\to u$ in $L^p$. On the other hand, $$\nabla f_n= \varphi_n \nabla u+u\nabla \varphi_n$$ and so $\nabla f_n\to \nabla u$ pointwise and $$\vert \nabla f_n\vert \le \vert \nabla u\vert +C\vert u\vert $$and so again by the Lebesgue dominated convergence theorem we have that $\nabla f_n\to \nabla u$ in $L^p$.