  We consider an optimal control problem where the state is governed by a free
boundary problem called the two-phase membrane problem and the control appears
in the coefficients of the characteristic function of the positivity and
negativity parts of the solution. Our investigation focuses on various
properties associated with the control-to-state map. Due to the
non-differentiability of this map, we regularize the state equation. The
existence, uniqueness, and characterization of the optimal pairs are
established.
