TITLE: Is $C_c^{\infty} (U)$ dense in $L^p(U)$ for $U$ open in $\Bbb{R}^d$?
QUESTION [1 upvotes]: I have shown that $C_c^{\infty} (\mathbb{R}^d)$ is $L^p$-dense in $L^p(\mathbb{R}^d),$ then I want to show that for arbitrary $U \subset \mathbb{R}^d$ we also have that $C_c^{\infty} (U)$ is $L^p$ dense in $L^p(U)?$
Is there an easy argument to transfer the density argument from the big space to open subsets?

REPLY [2 votes]: Hint: If $K$ is a compact subset of $U,$ then there exists $f \in C^\infty(\mathbb R^d)$ such that $0\le f \le 1$ everywhere, $f=1$ on $K,$ with the support of $f$ contained in $U.$
{"set_name": "stack_exchange", "score": 1, "question_id": 1513637}