Check my proof: Does $F_k(u_n)$ belong to $W_0^{1, p}(\Omega)$? Let $\Omega$ be an open bounded domain in $\mathbb{R}^N$ and let $(u_n)_n\subset W_0^{1, p}(\Omega)$ be a bounded sequence in $W_0^{1, p}(\Omega)$, $p>1$. Furthermore, fixed $k\in\mathbb{R}$, consider the function $F_k: t\in\mathbb{R} \mapsto F_k t\in\mathbb{R}$ such that
$$
F_k t = \begin{cases}
0 &\hbox{ if } t\leq k\\
t - k &\hbox{ if } t > k
\end{cases}.
$$
Clearly $F_k$ is a continuous function.
My question is: In these hypotheses, can we conclude that $(F_k(u_n))_n\subset W_0^{1, p}(\Omega)$? I would highlight that I am not interested in the possible boundness of $(F(u_n))_n$, but I just want understand if it is a sequence of $W_0^{1, p}(\Omega)$.
If yes, could anyone please give me some hints for the proof?
${\bf My\;attempt:}$ I think that, in this special case, the answer should be yes. In fact
$$ F_k(u_n) =\begin{cases}
0 &\hbox{ if } u_n\leq k\\
u_n -k &\hbox{ if } u_n>k
\end{cases}.
$$
If $u_n\leq k$, thus $F_k(u_n)=0\in W_0^{1, p}(\Omega)$. On the other hand, if $u_n>k$, it is
$$\begin{split}
\int_{\Omega} |F_k(u_n)|^p dx &=\int_{\Omega} |u_n-k|^p dx\leq 2^{p-1}\left(\int_{\Omega}|u_n|^p dx +\int_{\Omega}k^p dx\right)\\
&=2^{p-1}(\|u_n\|_{W_0^{1, p}} +k^p {\rm meas}(\Omega))\leq 2^{p-1}(m_1 +k^p {\rm meas}(\Omega))\\
&=:m_2
\end{split}
$$
for some positive constants $m_1, m_2$. Thus we have
$$\|F_k(u_n)\|_{W_0^{1, p}}\leq m_2^{\frac{1}{p}}< +\infty.$$
Similar arguments hold for the first derivative.
Could someone please tell me if it is true? Or am I missing something?
Thank you in advance!
 A: The result is true, but your proof is missing many details. In particular the first derivatives cannot be argued similarly, as it's not clear that $F_k(u_n)$ is weakly differentiable in the first place! One expects that its weak derivative is $F_k'(u_n) Du_n,$ but is it obvious that we have
$$ \int_{\Omega} F_k(u_n) \nabla \varphi \,\mathrm{d}x = - \int_{\Omega} F_k'(u_n) Du_n \varphi \,\mathrm{d}x $$
for all $\varphi \in C^{\infty}_c(\Omega)?$ Also even if you show this and argue that $F_k(u_n) \in W^{1,p}(\Omega),$ is it necessarily in $W^{1,p}_0(\Omega)$?

This composition result is well-known, and can be proved by approximation. We can first prove it for $F : \Bbb R \to \Bbb R$ which is $C^1$ with $|DF| \leq C$ and $F(0)=0;$ take a sequence $u_n \in C^{\infty}_c(\Omega)$ converging to $u$ in $W^{1,p}(\Omega)$ and show that $F(u_n) \to F(u)$ in $W^{1,p}(\Omega).$ The general case can be deduced by a further approximation argument considering functions of the form
$$F_{k,\varepsilon}(z) =\begin{cases} \sqrt{(z-k)^2+\varepsilon^2} &\text{ if } z \geq k, \\ 0 &\text{ if } z > k. \end{cases}$$
