Sobolev space with a 1-dim domain. Let $U\subset \mathbb{R}^n$ be a bounded open subset and $W^{1,p}(U)$ be the Sobolev space. Is it true that functions in $W^{1,p}(U)$ are automatically continuous when $n=1$? Could anyone kindly tell me why? I think this is not true in general. 
 A: I suggest you take a look at the chapter 5 in Evans'PDE. More details as follows:
DEFINITION. We say $u^*$ is a version of a given function $u$ provided $$u=u^*\quad a.e.$$
THEOREM. Let $n<p\leq\infty$, $\partial U$ is $C^1$,$u\in W^{1,p}(U)$. Then $u$ has a version $u^*\in C^{0,\alpha}(\bar U)$, for $\alpha=1-\frac{n}{p}$.
In your question, when $n=1$, we can see that if $p>1$, then $\forall u\in W^{1,p}(U)$ has a Holder continuous (of course continuous) version $u^*$. 
A: Let $I$ be a open interval in $\mathbb{R}$.
Lemma $1$. Let $f\in L_{loc}^1(I)$ be such that $$\int f\phi'=0,\ \forall\ \phi\in C_c^1(I)$$
Then, there exists a constant $C$ such that $f=C$ a.e. on $I$.
Lemma $2$. Let $g\in L_{loc}^1(I)$. Fo4 $y_0$ fixed in $I$, set $$v(x)=\int_{y_0}^x g(t)dt,\ x\in I$$
Then $v\in C(I)$ and $$\int_I v\phi'=-\int _I g\phi,\ \phi\ \in C_c^1(I)$$
$\bf{\mbox{Proof that every function in $W^{1,p}(I)$ is continuous }}$: Fix $y_0\in I$ and set $\overline{u}(x)=\int _{y_0}^x u'(t)dt$. By Lemma $2$, we have that $$\int_I \overline{u}\phi'=-\int _I u'\phi,\ \phi\ \in C_c^1(I)$$
Therefore, $\int_I (u-\overline{u})\phi'=0$, $\phi\ \in C_c^1(I)$ . It follows from Lemma $1$ that $u-\overline{u}=C$ a.e. on $I$, hence, $u=\overline{u}+C$ and you can redefine $u$ in a set of zero measure in such a way that $u$ is continuous.
Remark 1: The demonstrations of all this results can be found in Brezis book on the pages $204-206$.
Remark 2: Note that Lemma $1$ is an version of du Bois-Reymond lemma with derivatives.
