Let $u$ be a function with $u(x):=|x-2|^2$ on $I:=(-1,1)$.
I want to test whether $u \in H^2(I) \backslash H^3(I)$.
Let $\phi$ be in $C_0^\infty(I)$. Then:
$T_u(\phi '') = \int_{-1}^1 |x-2|^2 \phi '' dx=\int_{-1}^1 (x^2-4x+4) \phi ''dx $ $= [\phi ' (x^2-4x+4)]_{-1}^1-\int_{-1}^1 \phi' (2x-4)dx $ $= - ( [\phi (2x-4)]_{-1}^1 -\int_{-1}^1 2\phi dx) $ $= \int_{-1}^1 2 \phi dx= T_2(\phi)$.
Therefore $g''(x):=2$ is the second weak derivate of u.
Correct?
Analog we get
$T_u(\phi''')=-\int_{-1}^1 \phi \cdot 0 dx$
so that $g'''(x):=0$ is the thrid weak derivate of u.
Correct?
$g'',g'''$ are in $L^2(I)$. Thus $u$ would be in $u \in H^2(I) \backslash H^3(I)$.
I appreciate your help. Im insecure if my solution is correct.
You have showed that $u'''=0$, hence $u\in H^3(I)$. Moreover, all weak derivatives of order greater than $3$ are zero, too. Hence $u\in H^k(I)$ for all $k$.
The function $v(x) = \frac16 x |x|^2$ is in $H^2(I)\setminus H^3(I)$. It holds $v''(x)= |x|$, and $T_u(\phi''')=-\phi(0)$.