Solution (source code)

= Solution

Write points of $U$ as $(x,y)$ with $x>0$. For $h>0$, translate $u$ into the domain by
$$
u^h(x,y)=u(x+h,y),
\qquad x>-h.
$$
Continuity of translations in $L^p$ applied to $u,D_xu,D_yu$ gives
$$
u^h|_U\longrightarrow u
\quad\text{in }W^{1,p}(U)
$$
as $h\downarrow0$. Choose a standard <mollifier> $\rho_\varepsilon$ supported in a ball of radius $\varepsilon<h/2$. For $(x,y)\in U$, the convolution
$$
u_{h,\varepsilon}(x,y)=(\rho_\varepsilon*u^h)(x,y)
$$
only samples points with first coordinate greater than $-h$, so it is well-defined and smooth throughout $U$. The approximation-to-the-identity theorem, applied also to each <weak derivative>, allows $\varepsilon(h)<h/2$ to be chosen so that
$$
\|u_{h,\varepsilon(h)}-u^h\|_{W^{1,p}(U)}<h.
$$
Taking $h=1/j$ and using the <triangle inequality> proves the <density of smooth functions in a Sobolev space>.