In this note, we consider a control theory problem involving a strictly convex energy functional, which is not Gâteaux differentiable. The functional came up in the study of a shape optimization problem, and here we focus on the minimization of this functional. We relax the problem in two different ways, and show that the relaxed variants can be solved by applying some recent results on two-phase obstacle like problems of free boundary type. We derive an important qualitative property of the solutions, i. e., we prove that the minimizers are three-valued, a result which significantly reduces the search space for the relevant numerical algorithms.