Let $f \in W^{1,p}(U)$, then how to prove that $|f| \in W^{1,p}(U)$, where $W$ means the sobolev space over some open subset $U \in \mathbb{R}^n$.


In Lieb's Analysis he prove that Let $f$ be in $W^{1, p}(\Omega)$. Then the absolute value of $f$, denoted by $|f|$ and defined by $|f|(x)=|f(x)|$, is in $W^{1, p}(\Omega)$ with $\nabla|f|$ being the function
$$
(\nabla|f|)(x)= \begin{cases}\frac{1}{|f|(x)}(R(x) \nabla R(x)+I(x) \nabla I(x)) & \text { if } f(x) \neq 0 \\ 0 & \text { if } f(x)=0\end{cases}
$$
here $R(x),I(X)$ denote the real part and imaginary part of $f(x)$.


In the proof he uses the inequality $|\frac{1}{|f|(x)}(R(x) \nabla R(x)+I(x) \nabla I(x))|^2 \leq |\nabla R(x)|^2+|\nabla I(x)|^2$ and chain rule to show that $\nabla|f| \in L^p$, but how it implies $\partial |f| \in L^p(U)$, do we have $|\frac{1}{|f|(x)}(R(x) \partial R(x)+I(x) \partial I(x))|^2 \leq |\partial R(x)|^2+|\partial I(x)|^2$ ?


In all, I have three question:


1. How to prove that $|\frac{1}{|f|(x)}(R(x) \nabla R(x)+I(x) \nabla I(x))|^2 \leq |\nabla R(x)|^2+|\nabla I(x)|^2$
2. How to prove that $\partial |f| \in L^p(U)$.
3. I wonder whether or not $|f| \in W\_0^{1,p}(U)$ when $f \in W\_0^{1,p}(U)$. I can't find a counterexample



Derivative of the absolute value
Part 1 follows from the Cauchy-Schwartz inequality, applied to the two vectors $(R(x), I(x))$, $(\nabla R(x), \nabla I(x))$.


Part 2 follows from the simple inequality $|\partial\_j R(x)| \leq \sqrt {\sum\_i (\partial\_i R(x))^2 } = |\nabla R(x)|$ for all $j$ (and similarly for $I$).


I am not sure about part 3 myself.


