# Optimization problem over two pages

I have written the optimization problem below. Here the ellipses represent several additional rcases. Since my optimization problem is so long, it does not fit on a single page and the last couple of constraints are not displayed at all.

Is there a way to write the problem so that is flows from one page to the next?

    \usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{mathtools}

\begin{equation*}
\begin{aligned}
\smash[b]{\underset{\substack{{x_{ij}\in\mathbb{R} \\ i=1,2,3 \\ j=1,\dots,4}}}{\textnormal{minimize}}} \quad
&4x_{11}+3x_{12}+10x_{13}+9x_{14}\\
&+9x_{21}+6x_{22}+13x_{23}+7x_{24}\\
&+12x_{31}+9x_{32}+16x_{33}+6x_{34}\\
&\begin{rcases}
x_{11}+x_{12}+x_{13}+x_{14}\leq 30, \ \\
x_{21}+x_{22}+x_{23}+x_{24}\leq 55, \ \\
x_{31}+x_{32}+x_{33}+x_{34}\leq 40, \ \\
\end{rcases} (\text{supply constraints}) \\
...
...
...
&\begin{rcases}
-x_{11}-x_{21}-x_{31}\leq -40, \ \\
-x_{12}-x_{22}-x_{32}\leq -25, \ \\
-x_{13}-x_{23}-x_{33}\leq -30, \ \\
-x_{14}-x_{24}-x_{34}\leq -30, \ \\
\end{rcases} (\text{demand constraints}) \\
&x_{ij}\geq 0, \ \ i=1,2,3, \ j=1,\dots,4\,. \ \   (\text{hidden constraints})
\end{aligned}
\end{equation*}


With the ellipses removed (and only two rcases included), the optimization problem looks as follows.

• Your code is both incomplete and with errors. Please augment/correct. Also, perhaps \allowdisplaybreaks is what you are looking for. – Steven B. Segletes Apr 18 at 0:50
• @StevenB.Segletes I forgot to add in the mathtools package, my apologies. If the ellipses are removed, the optimization problem will be displayed as the included image. I can remove the ellipses and add in the addtional 22 constraints, but this is quite lengthy. Should \allowdisplayebreaks be inserted where I'd like the break to occur? – M B Apr 18 at 0:58

While the MWE is incomplete, the issue can be seen... equation* cannot break across pages, but amsmath environments can, if \allowdisplaybreaks is set. Thus, ditch the equation* environment, convert aligned into align, add \notag to each line to suppress equation numbers, and add \allowdisplaybreaks to the preamble.

EDIT: Thanks to Mico for suggesting to use align* instead of align. In this way, the \notags are not needed.

\documentclass{article}

\usepackage{amsfonts,mathtools}
\usepackage{amssymb}
\usepackage{amsthm}
\allowdisplaybreaks
\begin{document}
\vspace*{6in}
%\begin{equation*}
\begin{align*}
%\smash[b]{\underset{\substack{{x_{ij}\in\mathbb{R} \\ i=1,2,3 \\ j=1,\dots,4}}}{\textnormal{minimize}}} \quad
&4x_{11}+3x_{12}+10x_{13}+9x_{14} \\
&+9x_{21}+6x_{22}+13x_{23}+7x_{24} \\
&+12x_{31}+9x_{32}+16x_{33}+6x_{34} \\
&\begin{rcases}
x_{11}+x_{12}+x_{13}+x_{14}\leq 30, \ \\
x_{21}+x_{22}+x_{23}+x_{24}\leq 55, \ \\
x_{31}+x_{32}+x_{33}+x_{34}\leq 40, \ \\
\end{rcases} (\text{supply constraints})  \\
...
...
... \\
&\begin{rcases}
-x_{11}-x_{21}-x_{31}\leq -40, \ \\
-x_{12}-x_{22}-x_{32}\leq -25, \ \\
-x_{13}-x_{23}-x_{33}\leq -30, \ \\
-x_{14}-x_{24}-x_{34}\leq -30, \ \\
\end{rcases} (\text{demand constraints})  \\
&x_{ij}\geq 0, \ \ i=1,2,3, \ j=1,\dots,4\,. \ \   (\text{hidden constraints})
\end{align*}
%\end{equation*}
\end{document}


• Phenomenal, thank you! My optimization problem now flows between pages (it is nearly three pages long!) – M B Apr 18 at 1:07
• +1. Since equation numers aren't needed, you could switch from an align to an align* environment, letting you omit all 14 \notag directives. – Mico Apr 18 at 5:24
• @mico Another brain burp. I forgot. – Steven B. Segletes Apr 18 at 12:01