I need to typeset a text with several equations that: (#1) have to include the "maximize" and "subjet to" expressones in line with the corresponding equations; (#2) have to include three aligned right braces ; and (#3) the equations must be individually numbered.
After trying several routes (using optidef, rcases, plain arrays...) I found a clue in Align multiple equations within right braces
I've solved problem #2, and I've dealt with problem #1 by brute force, but I have no idea of how to solve requirement #3 (equation numbers).
\documentclass{memoir}
\usepackage{amsmath}
\usepackage{lipsum}
% ================================================
\begin{document}
%
\lipsum[1][1-5]
%
\begin{equation}
\begin{aligned}
\text{Maximize:}\qquad\qquad W &= W ( U_1 , U_2 ) \\[\jot]
\text{Subject to:}\qquad\qquad U_1 &= U_1 \left( x_1 , y_1 \right)\\
U_2 &= U_2 \left( x_2 , y_2 \right)\\[2\jot]
x &= x \left( K_x , L_x \right)\\
y &= y \left( K_y , L_y \right)\\[2\jot]
K_x &+ K_y = \overline{K} \\
L_x &+ L_y = \overline{L}
\end{aligned}
\begin{aligned}
&\left.\vphantom{\begin{aligned}
\text{Maximize:}\qquad\qquad W &= W ( U_1 , U_2 )\\[\jot]
\end{aligned}}\right.\\
&\left.\vphantom{\begin{aligned}
\text{Subject to:}\qquad\qquad U_1 &= U_1 \left( x_1 , y_1 \right)\\
U_2 &= U_2 \left( x_2 , y_2 \right)\\[2\jot]
\end{aligned}}\right\rbrace\quad\text{Preferences}\\
&\left.\vphantom{\begin{aligned}
x &= x \left( K_x , L_x \right)\\
y &= y \left( K_y , L_y \right)\\[2\jot]
\end{aligned}}\right\rbrace\quad\text{Tecnology}\\
&\left.\vphantom{\begin{aligned}
K_x &+ K_y = \overline{K} \\
L_x &+ L_y = \overline{L}
\end{aligned}}\right\rbrace\quad\text{Resources}\\
\end{aligned}
\end{equation}
%
\lipsum[1][1-5]
%
\end{document}
Which gives this output:
Any hint will be welcome.



equationenvironment will only ever apply a single equation number to the whole group. You have already started to segment the structure using the sub-environmentaligned. Replaceequationbygather(an environment provided byamsmath) and a separate number will be assigned to each of thealignedgroups immediately belowgather. You'll have to break this up a little more, but the approach should be straightforward. – barbara beeton Mar 23 '21 at 02:57gatherandaligned, with no success, though, I am unable to see the route I should follow. Could you elaborate a little bit? Many thanks – Macias Mar 23 '21 at 15:39