Solution (source code)

= Solution

The <weak formulation> is
$$
\boxed{\int_\Omega[Du\cdot D\phi+(u^3-u^2)\phi]dx=-\int_\Omega f\phi\,dx\quad(\phi\in H_0^1(\Omega)).}
$$
The boundary condition is encoded by $u\in H_0^1$. The <Sobolev embedding> in dimension three gives $H_0^1\hookrightarrow L^6$, hence also $L^4,L^3,L^2$ on the bounded domain. All energy terms and all the displayed pairings are therefore finite.

Pointwise, $t^4/4-t^3/3\geq t^4/8-C$ for a constant $C$, since the difference is a quartic with positive leading coefficient. The <Poincaré inequality> and <Young inequality> give $\int fv\geq-\tfrac14\|Dv\|_2^2-C_f$. Consequently
$$
I(v)\geq\frac14\|Dv\|_2^2+\frac18\|v\|_4^4-C_0.
$$
Thus the <infimum> is finite and a <minimizing sequence> is bounded in $H_0^1$. Extract a weakly convergent subsequence there. The <Rellich-Kondrachov theorem> states that on a bounded $C^1$ domain in dimension three the embedding $H^1\hookrightarrow L^q$ is compact for $q<6$. A subsequence therefore converges strongly in $L^2,L^3,L^4$ to the same limit $u$. The potential terms and forcing converge, while the gradient <norm> is weakly lower semicontinuous. The weak limit retains zero trace. Hence $I(u)\leq\liminf I(v_j)$ and \b[$u$ attains the absolute minimum].

For any $\phi\in H_0^1$, the function $t\mapsto I(u+t\phi)$ has a minimum at zero. Differentiating its polynomial terms gives $\int[Du\cdot D\phi+(u^3-u^2+f)\phi]=0$. These differentiations are justified by the Sobolev integrability already noted. This is the <weak formulation>, proving \b[every energy minimizer is a <weak solution>].