I am working with equations that are should be broken to multiple lines. The code I wrote is as follows:
\begin{equation}
\begin{aligned}
O_{max} = w_1 \Sigma_{a=1}^{m} \Sigma_{b=a+1}^{n} (-\left|CPT_a
- CPT_b\right|)\\
& + w_2 \Sigma_{j=1}^{m} (DIF_j) + w_3 \Sigma_{j=1}^{m}
(INT_j/\Sigma_{x=1}^{n} x_{ij})
\end{aligned}
\label{equ:ho}
\end{equation}
and the other one is
\begin{align}
\begin{split}
nr(G_i,r) =
\begin{cases}
1 & \text{r is naturally played by one member of $G_i$}\\
-2 & \text{r is not naturally played in $G_i$} \\
-p & \text{r is naturally played by p members in $G_i$}\\
\end{cases}
\end{split} \nonumber \\
\begin{split}
nb(G_i) = \Sigma_{r=1}^{9} nr(G_i,r)\\
& max_{\forall G\in C} \left( b(G) =
\frac{\Sigma_{i=1}^{g}nb(G_i)}{g}\right)
\end{split}
\label{equ:yannibelli}
\end{align}
Alignment of each equation is not the same (second part goes to the right and out of the margin of the pages). How can I fix them, please??
Best Answer
EDIT: 2020/01/01 for the comment of the user @Mico. The first alignment with the important suggestion of the user @Sigur is:
For the second code my proposal to align is: