In my economics class, we saw a proof that if an allocation $ ((\hat x_h), (\hat y_f)), h\in H$ (the set of households), $f\in F$ (the set of firms) is Pareto optimal/efficient, it must necessarily be a solution to the maximization problem:
$$ max \quad U_1(x_1) $$
Subject to:
$$ U_h(x_h) \ge U_h(\hat x_h), h=2,...,m $$ $$ x_h, y_f \quad feasible \quad \forall h \in H, \ f \in F $$ $$ \sum_{h=1}^m x_h \le \omega + \sum_{f=1}^r y_f $$
Where $\omega$ is the total endowment in the economy, m is the total number of households, r is the total number of firms, and $U_h:\mathbb{R}^n_+ \to \mathbb{R}$ is the utility function of household h.
I am curious if anyone can give me a simple example in a pure exchange economy (so obviously removing the firms from what is given above) where the utilities are such that $\hat x_h$ solves the maximization problem, but is NOT Pareto optimal (i.e. something showing that the converse of the statement above does not always hold). Preferably, I'd like to be able to draw it in an Edgeworth box, to convince myself of the need for additional assumptions on the utility function(s) to make the fact that $\hat x_h$ is a solution a sufficient condition for $\hat x_h$ being Pareto optimal.