Approximating Sobolev functions in $W^{1,p}(\mathbb{R}_+^n)$ Let $p \geq 1$. I know that there exists a continuous and linear extension operator $$ E : W^{1,p}(\mathbb{R}_+^n) \to W^{1,p}(\mathbb{R}^n) .$$

I read that from the existence of such an extension one can deduce that $C_c^{\infty}(\bar{\mathbb{R}^n_+})$ is dense in  $W^{1,p}(\mathbb{R}_+^n)$, where for $C_c^{\infty}(\bar{\mathbb{R}^n_+})$ I mean smooth functions on $\mathbb{R}_+^n$ whose support is contained in $\bar{\mathbb{R}_+^n}$(I don't know whether this is a standard notation or not).

I tried to use convolution and use that $C_c^{\infty}(\mathbb{R}^n)$ is dense in $W^{1,p}(\mathbb{R}^n)$ but I wasn't able to get anything .
$C_c^{\infty}(\bar{\mathbb{R}^n_+})$ is dense in  $W^{1,p}(\mathbb{R}_+^n)$, 


This is not correct. We choose $n=1,p=1$.
Lets assume that we can approximate the constant function $1\in W^{1,p}(\mathbb R^n_+)$ with functions from $C_c^\infty (\overline{\mathbb R_+^n})$.

Let $\phi\in C_c^\infty (\overline{\mathbb R_+^n})$.
Then $\phi(0)=0$.

If $\phi(x) \leq \frac12$ for all $x\in (0,1)$, then we have
$$ \| 1- \phi |_{W^{1,1}} \geq \|1-\phi|_{L^1} \geq \frac12.$$
So we can assume that $\phi(x)&gt;\frac12$ for some $x\in (0,1)$.
Then
$$
\frac12 = \int_0^x \phi'(y) \mathrm dy \leq \int_0^1 | \phi'(y) |\mathrm dy
\leq \|\phi'\|_{L^1} \leq \|1-\phi\|_{W^{1,1}}.
$$
So in any case, we cannot approximate $1$ with $\phi$.
$C_c^{\infty}(\bar{\mathbb{R}^n_+})$ is dense in  $W^{1,p}(\mathbb{R}_+^n)$, 


This is not correct. We choose $n=1,p=1$.
Lets assume that we can approximate the constant function $1\in W^{1,p}(\mathbb R^n_+)$ with functions from $C_c^\infty (\overline{\mathbb R_+^n})$.

Let $\phi\in C_c^\infty (\overline{\mathbb R_+^n})$.
Then $\phi(0)=0$.

If $\phi(x) \leq \frac12$ for all $x\in (0,1)$, then we have
$$ \| 1- \phi |_{W^{1,1}} \geq \|1-\phi|_{L^1} \geq \frac12.$$
So we can assume that $\phi(x)&gt;\frac12$ for some $x\in (0,1)$.
Then
$$
\frac12 = \int_0^x \phi'(y) \mathrm dy \leq \int_0^1 | \phi'(y) |\mathrm dy
\leq \|\phi'\|_{L^1} \leq \|1-\phi\|_{W^{1,1}}.
$$
So in any case, we cannot approximate $1$ with $\phi$.