Let $I =(0,1)$. Let $u \in W^{1,p}(I)$ with $1 \le p \lt \infty$. Our goal is to prove that $u' =0$ a.e. on the set $E=\{x \in I;u(x)=0\}$.
Fix a function $G\in C^1(\mathbb{R},\mathbb{R})$ such that $|G(t)|\le 1$ $\forall t\in \mathbb{R}$, $|G'(t)| \le C$ $\forall t \in \mathbb{R}$, for some constant C, and
Set G(t) such that
$\displaystyle G(t) = \begin{cases} 1 & t\ge 1 \\ t & |t|\le \frac{1}{2} \\ -1 & t \le -1 \end{cases}$
And $v_n(x) = \frac{1}{n}G(nu(x)).$
- Check that $||v_n||_{L^{\infty}(I)} \rightarrow 0$ as $n \rightarrow \infty$
- Show that $v_n \in W^{1,p}(I)$ and compute $v'_n.$
- Deduce that $|v'_n|$ is bounded by a fixed function in $L^p(I).$
- Prove that $v'_n(x) \rightarrow f(x)$ a.e on $I$, as $n \rightarrow \infty $ and identify $f$.
- Deduce that $v'_n \rightarrow f $ in $L^p(I).$
- Prove that $f=0$ a.e on $I$ and conclude that $u'=0$ a.e on $E$.
I have not found the solution anywhere so I attach my solution in case someone finds it useful, if something is wrong just let me know!
Since ${|v_n| \le \frac{1}{n}}$, ${v_n}$ converges to $0$ uniformly. By Corollary 8.11 of the same book (differentiation of a composition), ${v'_n = G'(n u(x)) u'(x)}$, then we have ${|v'_n| \le |u'| \in L^p}$. Hence ${v_n \in W^{1,p}}$. Define
$\displaystyle f(x) = \begin{cases} u'(x) &x \in E\\ 0 & x \notin E \end{cases}$
We can see that ${v'_n(x) \rightarrow f(x) }$ as ${n \rightarrow \infty}$ a.e. on ${I}$ by the construction of ${G}$. And ${|f(x)| \le |u'(x)|}$, hence in ${L^p}$. By Lebesgue dominated convergence theorem we will have ${v'_n \rightarrow f }$ in ${L^p}$. According to the definition of weak derivative, we have
$$\displaystyle \int_I v'_n \varphi = -\int_I v_n \varphi' \quad \forall \varphi \in C_c^1 (I).$$
Before we show that ${v'_n \rightarrow f }$ in ${L^p}$, and ${v_n \rightarrow 0}$ uniformly. Passing the limit we will have
$$\displaystyle \int_I f \varphi = 0 \quad \forall \varphi \in C_c^1 (I)$$
Which implies ${f = 0}$ a.e. And hence ${u' =0 }$ a.e. on ${E}$.