[Tex/LaTex] Wrap a long, multiline, unwieldy equation in case environment

casesequationssplit

This is ugly:

enter image description here

But, the equation is hard to reduce without making convoluted substitutions. I have ideas to improve, but don't know how:

  • Remove spacing after the commas
  • Pad between the lines containing conditions
  • It would be nice if the equation number (1) was to the right, but I don't believe there's any way it could fit.

Any other suggestions?

Here is my MWE:

\documentclass[preprint,12pt]{elsarticle}
\usepackage{amsmath}

\begin{document}

\begin{equation}
    \begin{split}
        & E^{G4}_{f}[\textbf{k}] = \\
        & \begin{cases}
            \min\Big \{ \max \{ E^G_{f|H}[\textbf{k}] + (E^G_{f'|H}[\textbf{k}] - E^G_{f',min}[\textbf{k}]), & E^G_{f,min}[\textbf{k}] \}, E^G_{f,max}[\textbf{k}] \Big \} \\ & \text{for } E^G_{f'|H}[\textbf{k}] < E^G_{f',min}[\textbf{k}]\\
            \min\Big \{ \max \{ E^G_{f|H}[\textbf{k}] + (E^G_{f'|H}[\textbf{k}] - E^G_{f',max}[\textbf{k}]), & E^G_{f,min}[\textbf{k}] \}, E^G_{f,max}[\textbf{k}] \Big \} \\ & \text{for } E^G_{f'|H}[\textbf{k}] > E^G_{f',max}[\textbf{k}]\\
            \min\Big \{ \max \{ E^G_{f|H}[\textbf{k}], E^G_{f,min}[\textbf{k}] \}, E^G_{f,max}[\textbf{k}] \Big \} & \\ & \text{otherwise}
        \end{cases}
    \end{split}
\end{equation}

\end{document}

Best Answer

Given the overall constraints imposed by the document class and the font size, there's nothing "huge" that can be done. However, there are a few smaller aspects of the equation that can be changed. I suggest (a) using a dcases environment instead of the current cases environment, (b) placing the "for ..." conditions for cases 1 and 2 on separate lines, (c) using upright letters for "min" and "max" in the subscript terms, (d) increasing the sizes of the inner curly braces and round parentheses to \big, (e) providing a bit more vertical whitespace after the first two "for ..." lines, and (f) using an align environment instead of an equation environment, so that the equation number is placed at the height of the middle \min term.

enter image description here

\documentclass[preprint,12pt]{elsarticle}
\usepackage{mathtools} % for 'dcases' env.
\DeclareMathOperator{\E}{E} % expectations operator
\begin{document}
\hrule % just to illustrate width of textblock
\bigskip\noindent
Before:
\begin{equation}
    \begin{split}
        & E^{G4}_{f}[\textbf{k}] = \\
        & \begin{cases}
            \min\Big \{ \max \{ E^G_{f|H}[\textbf{k}] + (E^G_{f'|H}[\textbf{k}] - E^G_{f',min}[\textbf{k}]), & E^G_{f,min}[\textbf{k}] \}, E^G_{f,max}[\textbf{k}] \Big \} \\ & \text{for } E^G_{f'|H}[\textbf{k}] < E^G_{f',min}[\textbf{k}]\\
            \min\Big \{ \max \{ E^G_{f|H}[\textbf{k}] + (E^G_{f'|H}[\textbf{k}] - E^G_{f',max}[\textbf{k}]), & E^G_{f,min}[\textbf{k}] \}, E^G_{f,max}[\textbf{k}] \Big \} \\ & \text{for } E^G_{f'|H}[\textbf{k}] > E^G_{f',max}[\textbf{k}]\\
            \min\Big \{ \max \{ E^G_{f|H}[\textbf{k}], E^G_{f,min}[\textbf{k}] \}, E^G_{f,max}[\textbf{k}] \Big \} & \\ & \text{otherwise}
        \end{cases}
    \end{split}
\end{equation}

\bigskip\noindent
After:
\begin{align}
& E^{G4}_{f}[\textbf{k}] = \notag \\
& \begin{dcases}
   \min\Bigl\{ \max \bigl\{ E^G_{f\mid H}[\textbf{k}] + \bigl(E^G_{f'\mid H}[\textbf{k}] - E^G_{f',\min}[\textbf{k}]\bigr), 
   E^G_{f,\min}[\textbf{k}] \bigr\}, 
   E^G_{f,\max}[\textbf{k}] \Bigr\} \\ 
   \qquad\text{for $E^G_{f'\mid H}[\textbf{k}] < E^G_{f',\min}[\textbf{k}]$}\\[1ex]
   \min\Bigl\{ \max \bigl\{ E^G_{f\mid H}[\textbf{k}] + \bigl(E^G_{f'\mid H}[\textbf{k}] - E^G_{f',\max}[\textbf{k}]\bigr), 
   E^G_{f,\min}[\textbf{k}] \bigr\}, 
   E^G_{f,\max}[\textbf{k}] \Bigr\} \\ 
   \qquad\text{for $E^G_{f'\mid H}[\textbf{k}] > E^G_{f',\max}[\textbf{k}]$}\\[1ex]
   \min\Bigl\{ \max \bigl\{ E^G_{f\mid H}[\textbf{k}], E^G_{f,\min}[\textbf{k}] \bigr\}, 
   E^G_{f,\max}[\textbf{k}] \Bigr\} \quad\text{otherwise}
\end{dcases}
\end{align}


\end{document}