Let $I= (0, 1)$. Let $u \in L^2 (I)$ such that $u'' \in L^2 (I)$. Below is a proof (from this answer) that $u' \in L^2 (I)$.
Let $v (x) := \int_0^x u'' (s) \, \mathrm d s$ for $x \in I$. By Hölder's inequality, $|v(x)| \le \| u'' \|_{L^2} \sqrt x$. Then $v \in L^2 (I)$. For $\varphi \in C^\infty_c (I)$ we have $$ \begin{align*} \int_I v \varphi' &= \int_I \left ( \int_0^x u'' (s) \, \mathrm d s \right ) \varphi' (x) \, \mathrm d x \\ &= \int_I \left ( \int_s^1 \varphi' (x) \, \mathrm d x \right ) u'' (s) \, \mathrm d s \quad\text{by Fubini's theorem}\\ &= -\int_I \varphi (s) u'' (s) \, \mathrm d s \quad\text{by FTC}\\ &= -\int_I \varphi'' (s) u (s) \, \mathrm d s, \end{align*} $$ which implies $$ \int_I u \varphi' = -\int_I v \varphi \, \mathrm d s. $$
It follows that $v = u'$.
My question It follows from the construction of $v$ that $v(0)=0$ (for every such $u$). This does not make sense for me.
Could you elaborate on my confusion?
Thank you so much for your help!