cutting off $H^{1,2}$-functions in the image Suppose $\Omega$ is a bounded domain in $\mathbb{R}^n.$ Let $w\in H^{1,2}$ (standard Sobolev space, order 1, integrability 2) and $L>0$ be given. Is it then true that the function $w_L:=\min (L,w)$ is also in $H^{1,2}?$
I found this assertion in the book "Riemannian geometry and geometric analysis" of Jost,  in the section concerning higher regularity of harmonic maps. There, one already knows that $f$ (the continuous weakly harmonic map) is in $H_{loc}^{1,4} \cap H^{2,2}_{loc}$ and considers $w:=|Df|^2.$
Now, the function $w_L$ can also be written as $x\mapsto w(x)\chi_L(w(x)),$  where $\chi_L$ denotes the characteristic function of the set consisting of all x s.t. $x\le L$. Considering the distributional derivative of $w_L$ gives you something involving a delta function(al), which is not in $L^2.$
Any suggestions? What am I doing wrong?
 A: Note that $\min(w,L) = \frac{1}{2} (w+L) - \frac{1}{2} |w-L|$, so the main issue is to establish that the map $w \mapsto |w|$ is bounded on $H^{1,2}$.  But this follows from the diamagnetic inequality $|\nabla |w|| \leq |\nabla w|$ (in the sense of distributions), which is obvious formally, but can be established rigorously by approximating the absolute value $|x|$ by the smoothed variant $(|x|^2+\varepsilon^2)^{1/2}$ and then letting $\varepsilon$ go to zero.  (The diamagnetic inequality can be found for instance in the text of Lieb and Loss; it is more commonly applied in the context of covariant differentiation, but already has usefully non-trivial content for ordinary differentiation.)
More generally, composition with Lipschitz functions will preserve all $W^{s,p}(\Omega)$ spaces for $0 \leq s \leq 1$ and $1 < p < \infty$ by the chain rule (if $s=1$) or fractional chain rule (if $s<1$), using regularisation arguments as necessary to make the argument rigorous.  (See for instance Taylor's book "Tools for PDE" for this sort of thing.)
A: Your formula for $w_L$ is incorrect. It should be
$$ x\mapsto w(x) \chi_L(w(x)) + L [1-\chi_L(w(x))] $$
Note that your expression is equal to 0 where $w > L$, in contrast of your earlier description of the function. Now you can see that the "delta function" "cancels out". I'll leave it as an exercise on how to make the argument rigorous. 
