What I want to prove is the following inequality
$\Vert u \Vert_{L^2[0,1]} \leq \Vert u' \Vert_{L^2[0,1]}, \quad u \in W^{1,2}_0 [0,1], $
which I am trying to derive from
$$ \int_\Omega \vert u(x+h) - u(x) \vert^p \leq \Vert \nabla u \Vert^p_{L^p(\Omega)} \Vert h \Vert_q^p, $$
where $\Omega\subset \mathbb{R}^n, 1\leq p < \infty, 1/p + 1/q = 1,$ and $u \in C_0^\infty (\Omega), h\in \mathbb{R}^n$ arbitrary.
Now, setting $h=1$ is probably the way to go, since then $u(t+h)$ vanishes, and we get the result directly. However, there are two problems.
We have a closed interval $[0,1]$. Can we simply replace it with $(0,1)$? I just know that both intervals have the same Lebesgue measure, but until now I have always encountered oven intervals in Sobolev spaces.
We have in general $W_0^{k,p}(\Omega) = \overline{C_0^\infty(\Omega)}$, where the closure is taken with respect to the norm of $W$. So $u$ is not necessarily in $C_0^\infty(\Omega)$, but there is a sequence which converges to it.
So basically I can take an $(u_n)_{n\in \mathbb{N}} \subset C_0^\infty(\Omega)$, such that $ u_n \rightarrow u $ in the W-norm, and I can show that the inequality holds for all $u_n$. But I am not sure about how to proceed.
Edit: $u_n \rightarrow u$ in the W-Norm implies $\Vert u_n \Vert_W \rightarrow \Vert u \Vert_W$, and if I am not mistaken we also have in this case $\Vert x\Vert_W = \Vert x' \Vert_{L^2}$ by the definition of the W-norm. This gives $\Vert u'_n \Vert_{L^2} \rightarrow \Vert u' \Vert_{L^2}$. So the only missing piece would be then to show that $\Vert u_n \Vert_{L_2} \rightarrow \Vert u \Vert_{L_2}$. Any ideas?
I think it is simpler to argue from scratch. Functions $u \in W^{1,2}_0 [0,1]$ are absolutely continuous on $[0,1]$ and satisfy $u(0) = u(1) = 0$. The fundamental theorem of calculus gives $$|u(x)| = |u(x) - u(0)| = \left| \int_0^x u'(t) \, dt \right| \le \sqrt x \|u'\|_{L^2[0,1]}$$ whenever $x \in [0,1]$. Thus $$ \|u\|_{L^2[0,1]}^2 = \int_0^1 |u(x)|^2 \, dx \le \|u'\|_{L^2[0,1]}^2 \int_0^1 x \, dx = \frac 12 \|u'\|_{L^2[0,1]}^2 .$$