  We study a family of non-convex functionals $\{\mathcal{E}\}$ on the space of
measurable functions$u: \Omega_1\times\Omega_2 \subset
\mathbb{R}^{n_1}\times\mathbb{R}^{n_2} \to \mathbb{R}$. These functionals
vanish on the non-convex subset $S(\Omega_1\times\Omega_2)$ formed by functions
of the form $u(x_1,x_2)=u_1(x_1)$ or $u(x_1,x_2)=u_2(x_2)$. We investigate
under which conditions the converse implication "$\mathcal{E}(u) = 0
\Rightarrow u \in S(\Omega_1\times\Omega_2)$" holds. In particular, we show
that the answer depends strongly on the smoothness of u. We also obtain
quantitative versions of this implication by proving that (at least for some
parameters) $\mathcal{E}(u)$ controls in a strong sense the distance of $u$ to
$S(\Omega_1\times\Omega_2)$.
