Question about the Sobolev space $W^{1,p}(I)$. Let $\{u_n\}$ be a bounded sequence in $W^{1,p}(I)$ where $1<p\leq\infty$ and $I$ is bounded. Then
there is a subsequence $\{u_{n_k}\}$ and $u\in W^{1,p}$ such that $\|u_{n_k}-u\|_{L^\infty}\to 
0$ and $u'_{n_k}$ converges weakly to $u_{n_k}$.
My Try:
We have that the embedding $W^{1,p}\to C(\overline{I})$ is compact, which by 
definition means that every bounded set in $W^{1,p}$ is totally bounded in 
$C(\overline{I})$. Now since the sequence $\{u_n\}$ is bounded, then it forms a 
bounded set in $W^{1,p}$ and hence a totally bounded set in $C(\overline{I})$. Hence 
the sequence $\{u_n\}$ has a Cauchy subsequence $\{u_{n_k}\}$ in $C(\overline{I})$ endowed with the $L^\infty$ norm and thus converges to 
some element $u\in L^\infty(I).$ 
Is it possible to show that $u\in W^{1,p}$? Any hints on how to show that $u'_{n_k}$ converges weakly to $u'$?
 A: Let $M = \sup_n \|u_n\|_{1,p}$.
If $\phi \in C_0^\infty(0,1)$ then
$$ \int_0^1 u \phi' \, dx = \lim_{k \to \infty} \int_0^1 u_{n_k} \phi' \, dx = - \lim_{k \to \infty} \int_0^1 u_{n_k}' \phi \, dx.$$ 
Define a functional $L : C_0^\infty(0,1) \to \mathbf R$ by $L\phi = \displaystyle \int_0^1 u \phi' \, dx.$ In light of the equality above it follows that
$$|L\phi|  \le M \|\phi\|_{p'}$$
for all $\phi \in C_0^\infty(0,1)$. Thus $\phi$ extends to a bounded linear functional on all of $L^{p'}(0,1)$ due to the density of $C_0^\infty(0,1)$ in that space. According to the Riesz Representation Theorem there exists $v \in L^p(0,1)$ with
$$ Lg = - \int_0^1 vg \, dx$$ for all $g \in L^{p'}(0,1)$.  In particular, 
$$ \int_0^1 u \phi' \, dx = - \int_0^1 v \phi \, dx$$ for all $\phi \in C_0^\infty(0,1)$. This means $v$ is the weak derivative of $u$ and thus $u \in W^{1,p}(0,1)$. Finally for $\phi \in C_0^\infty(0,1)$ you have
$$ \int_0^1 u_{n_k}' \phi \, dx = - \int_0^1 u_{n_k} \phi' \, dx \to - \int_0^1 u \phi' \, dx = \int_0^1 v \phi.$$
