Let $U \subseteq \mathbb{R}^n$ be an open connected set. Let $p>1$, and let $f \in W^{1,p}(U)$. I have recently heard that $f$ can be locally approximated in $W^{1,p}$ by polynomials. That is, there exist a sequence of polynomials $p_n$ such that $p_n \to f$ in $W^{1,p}_{loc}(U)$.
Furthermore, if $f$ is continuous, can we choose the $p_n$ to be uniformly convergent?
I would like to find a reference for such a proof. (Or if this is rather elementary, a proof sketch given here).
Actually, I don't really need a single sequence of polynomials $p_n$ which converges on all compact subsets. It suffices that for every arbitrarily small ball $B$ in $\Omega$, there would be a sequence $p_n^{B}$ that would converge to $f$. (That is, the sequence $p_n$ can depend on the ball).
I know it suffices to assume $f \in C^{\infty}$. Moreover, we can approximate uniformly $C^{\infty}$ maps, by polynomials, due to the Stone-Weierstrass theorem. But how can we approximate all the weak derivatives and the function simultaneously?