Closed subset of $W^{1,2}([a, b], \mathbb{R})$ In the context of weak solutions of boundary value problems, I want to show that the set $$\{u \in W^{1, 2}([a, b], \mathbb{R}) \; : \; u(a) = 0 = u(b) \}$$ is closed in $W^{1,2}([a, b], \mathbb{R})$. 
Is there any elementary way of proving it? 
I might know one way by using the, due Sobolev's embedding theorem, well-defined and continuous dirac delta $\delta_a$ and $\delta_b$ on $W^{1,2}([a, b], \mathbb{R})$. 
However, I want to refrain from distribution theory. 
Hints are appreciated. 
 A: Usually Sobolev spaces are defined in open sets, so it should be $W^{1,2}((a,b),\mathbb{R})$. Anyway, if $u$ is a smooth function in $W^{1,2}((a,b),\mathbb{R})$, by the fundamental theorem of calculus,
$$u(x)-u(y)=\int_x^y u'(s)\,ds.$$
Using Holder's inequality you have that
$$|u(x)-u(y)|\le |x-y|^{1/2}\left( \int_x^y |u'(s)|^2\,ds\right)^{1/2}$$
for all $a<x<y<b$. If now $u$ is a function in $W^{1,2}((a,b),\mathbb{R})$, using density of smooth functions you can find a sequence of smooth functions $u_n$ that converge to $u$ in $W^{1,2}((a,b),\mathbb{R})$. By taking a subsequence you can find a subsequence which converges to $u$ a.e. in $(a,b)$. Since $$|u_n(x)-u_n(y)|\le |x-y|^{1/2}\left( \int_x^y |u'_n(s)|^2\,ds\right)^{1/2},$$ letting $n\to\infty$ you get 
that
$$|u(x)-u(y)|\le |x-y|^{1/2}\left( \int_x^y |u'(s)|^2\,ds\right)^{1/2}$$ for a.e. $x,y\in (a,b)$. This is telling you that $u$ has a representative $\bar u$ which is Holder continuous. In particular, $\bar u$ can be extended in $[a,b]$. So it makes now sense to talk about $\bar u(a)$ and $\bar u(b)$ (to answer MaoWao's question). 
Now you can use the Ascoli-Arzela theorem to prove that your set is closed. I am skipping the details. 
