How to prove if $u\in W^{1,p}$, then $|u|\in W^{1,p}$? How to prove if $u\in W^{1,p}$, then $|u|\in W^{1,p}$?

Since $|u|\in L_p$, I only need to show weak derivative of $|u|$ exists and $D|u| \in L_p$.

Can anyone give me some hint?
Thanks!
This is done by the celebrated Stampacchia Theorem. It can be found in books from Brezis, Kinderlehrer-Stampacchia and many more.
However, let me give the quick idea on how to show this.


You need the following chainrule: Let $f\in C^1(\mathbb{R})$ with bounded derivative. For $u\in W^{1,p}(\Omega)$ there holds: $D (f\circ u)= f'(u) D u$. This can be shown by approximating $u$ with smooth functions.
Choose a certain approximation $f_\varepsilon(\cdot) \to (\cdot)_+$. Particularly, the approximation is such that $f_\varepsilon'(x)=0$ for $x\leq 0$ and $f_\varepsilon'(x)\leq C$. More precisely, one choice is $$f_\varepsilon(x) =\begin{cases}\sqrt{x^2+\varepsilon^2}-\varepsilon, &amp;x&gt;0\\ 0,&amp; x\leq 0\end{cases}.$$ Then you can prove the chain rule for $f(\cdot)=(\cdot)_+$ passing with $\varepsilon\to 0$. You will obtain $D(u)_+=\chi_{u} Du$, where $$\chi_{u}(x)=\begin{cases}1,&amp; u(x)&gt;0\\0,&amp;\text{elsewise}\end{cases}$$ (After the next step, you will see that $Du=0$ a.e. on the set where $u(x)=0$.)
Perform Step 2 for $f(\cdot)=(\cdot)_-$ and note that $|\cdot|=(\cdot)_+ + (\cdot)_-$
Recall that $|u|=u_+ + u_-$. Since Sobolev spaces are closed under addition, it suffices to show that $u_+,u_-\in W^{1,p}$. Now to show $u_+\in W^{1,p}$, just observe that $\|Du_+\|_p\leq \|Du\|_p$ to conclude.