Let $u, v \in L^2 (\mathbb R)$ such that $$ \int_{\mathbb R} u \varphi'' = \int_{\mathbb R} v \varphi \quad \forall \varphi \in C^\infty_c (\mathbb R). $$
I think that it is not necessarily true that $u \in H^2 (\mathbb R)$.
Could you provide an example of such $u$ with $u \notin H^2 (\mathbb R)$?
Thank you so much for your elaboration!
If $u$ and $v$ are both in $L^{2}$ which means that $u''$(weak derivative) belongs to $L^{2}$. If we know $u'$ is also in $L^{2}$ thus we can get $u\in H^{2}$.
If ALSO $u\in C_{0}^{\infty}(\mathbb{R})$, $\int_{\mathbb{R}}u'u'dx=\int_{\mathbb{R}}u'du=-\int_{\mathbb{R}}uu''dx$. Thus by Cauchy inequality, we have $\|u'\|_{L^{2}}\lesssim \|u''\|_{L^{2}}+\|u\|_{L^{2}}$.