I am doing the exercises about Sobolev spaces on the book of Haim Brezis, and I am geting stuck with this,
Let $I=(0,1)$, given a function $u$ defined on $I$,
$$\bar{u}(x)=\begin{cases} u(x), & x \in I \\ 0, & x \in \mathbb{R} \setminus I \end{cases}$$ Assume that $u\in L^p(I)$ with $1\leq p <\infty$, such that $\bar{u}\in W^{1,p}(\mathbb{R})$, prove that $u \in W^{1,p}_0(I)$
Since $\bar{u}$ is a continous function, so I am trying to use a Cutt-Off technic to get a sequence with a compac support converging to $u$ but I couldn't apply this idea, Any hint or intermediate question please?
Proof: $u \in W_0^{1,p}(0,1)$