Solution (source code)

= Solution

For the <log-cosh obstacle variational inequality>, the admissible <set> is convex: for any $v\in M$, $u+t(v-u)$ remains above the obstacle and in $H_0^1$ for $0\le t\le1$. Minimality and the right <derivative> at zero therefore give
$$
\boxed{\int_\Omega\nabla u\cdot\nabla(v-u)+\tanh(u)(v-u)\,dx\ge0\qquad(v\in M).}
$$
The one-sided sign comes from admissibility, which permits motion toward every $v\in M$ but does not permit an arbitrary negative variation at a contact point.

Now fix $\phi\in C_c^\infty(D)$. Smoothness on $D$ and <continuity> of the obstacle give a strictly positive minimum of $u-g$ on the <compact support> of $\phi$. Hence $u+t\phi$ is admissible for both signs of sufficiently small $t$. Applying the inequality to both variations yields
$$
\int_D\nabla u\cdot\nabla\phi+\tanh(u)\phi\,dx=0.
$$
<Integration by parts> gives $-\Delta u+\tanh u=0$ distributionally on $D$, and smoothness makes it <pointwise>. Thus
$$
\boxed{-\Delta u+\tanh u=0\quad\text{where }u>g.}
$$
On the contact <set> the <variational inequality>, rather than unrestricted stationarity, remains the governing statement. <Convexity> of the energy also makes the inequality sufficient for minimization; <strictly monotone operator>[strict monotonicity] implies at most one <minimizer>, although existence was already stipulated in this part.