Solution (source code)

= Solution

Set $w=(u-k)^+$, the <positive part> of $u-k$. The allowed <Sobolev chain rule> gives
$$
\nabla w=\mathbf1_{\{u>k\}}\nabla u\quad\text{almost everywhere}.
$$
Use the admissible zero-boundary <Sobolev space> function $\varphi^2w$ in the <weak formulation>, with a valid <cutoff function> as explained in (ii). Its <gradient> is $\varphi^2\nabla w+2\varphi w\nabla\varphi$, so
$$
0=\int\varphi^2 A\nabla w\cdot\nabla w
+2\int\varphi w A\nabla w\cdot\nabla\varphi.
$$
Indeed the <integrands> vanish off $\{u>k\}$, and on that set $\nabla w=\nabla u$. The <uniform ellipticity> and <Cauchy-Schwarz inequality> estimates from (ii) now apply to $w$ and give
$$
\boxed{\int_{B_{1/2}\cap\{u>k\}}|\nabla u|^2\,dx
\leq\frac{4\Lambda^2 M^2}{\lambda^2}
\int_{B_1\cap\{u>k\}}(u-k)^2\,dx,\qquad M=\|\nabla\varphi\|_\infty.}
$$
Fixing the <cutoff function> gives the required constant independent of $k$. This is a <superlevel Caccioppoli inequality>; it uses the <positive part> as a test and does not require the truncated function itself to solve the original equation.