# Is the Sobolev space $H^1(K)$ the same as the space of continuous functions?

This is mostly a clarification question:

If I have $f \in H^1(K)=W^{1,2}(K)$ where $K$ is a compact subset of $\mathbb{R}^n$ then by Meyer-Serrin I should be able approximate $f$ by $f_n$ where $f_n \in C^{\infty}(K)$. By Morrey's inequality (such as in this question) we find that $f_n \rightarrow f$ uniformly. Since this is happening on a compact set, this implies that the limit $f$ is continuous.

I think this is obviously incorrect but I cannot see what the main issue is here (is it the fact that $K$ is not open?). Is this reasoning completely unsalvageable?

• The logic in the linked question only works in dimension 1! In that case you do get that $H^1(K)$ is contained in the space of continuous functions (nothing in your argument would imply that they are equal). In higher dimensions you have to replace the exponent 2 with something larger. – Nate Eldredge Jun 4 '18 at 19:58
• Ah i see..there is both an $n$ and a $p$ in the embedding given in Morrey's.. – user210552 Jun 4 '18 at 20:05
• Right, and it only means anything for $p > n$. – Nate Eldredge Jun 4 '18 at 20:20

In one dimension, every $H^1$ function is continuous.
In dimensions $n>2$, not every $H^1$ function is continuous.
And in any dimension, not every continuous function is $H^1$. A one-dimensional example, $f(x) = \sqrt{|x|}$ is not in $H^1$ on the interval $(-1, 1)$.
Conclusion: the Sobolev space $H^1$ is never the same as the space of continuous functions.