I am trying nicely (and correctly) align two level optimization problem. At the moment came up with the following solution:
$
\begin{array}{llr}
\min \limits_{\mathbf{x}, \mathbf{y}} & -2x_1^2 + x_2^2 - 6y_1 + y_2^2 \\
\st & x_1^3 + 3x_2 - 10 \le 0 \\
& \displaystyle \mathbf{y} \in \argmin_{\mathbf{y}\in [0, 10]^2} \; 2x_1^2 + 2y_1^2 - 8y_2 \\
& \hspace{1.25cm} \st - x_1 + 2x_1 - x_2^2 + 2y_1 - y_2 - 3 \le 0\\
& \hspace{1.9cm} - x_1 + 2x_1 - x_2^2 + 2y_1 - y_2 - 3 \le 0 \\
& \mathbf{x} \in [-10, 10]^2,\; \mathbf{y} \in [-10, 10]^2
\end{array}
$
Which produces the following output:
Here I highlighted couple issues:
- What would be a better way (compared to manual
hspace{}
the first constraint starting with keywords "s.t." align based on the upper line min keyword (see blue line in the picture). The rest constraints should be left-aligned by the first constraint. - Why am I getting different spacing for the inner constraints? Both are completely the same, but in the first constraint there is a bigger space after the minus sign (situation highlighted in picture in red "circle")
{} - x_1
on the second line enclosed in the red circle. The{}
should create a (empty) group, which changes the minus-sign from an unary negative sign to an binary operator as in a - b.argmin
as one word and align s.t. toarg' (as you can see, the
y\in[0,10]^2` is placed underargmin
, not undermin
. What you want appears inconsistent. 2. The first-
is incorrectly recognized as a binary operator. Just surround it with braces{-}x_1...
to get the correct unary operator spacing.