I have three equations of different lengths, each having alignments within them (at the '=' and'+') sign. However, I also want to align the three equations at the first '=' of each equation (marked in yellow in the picture below) and also maintain the space between them ,which is produced by the three align environments.
\documentclass{article}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{mathtools}
\begin{document}
\begin{align*}
\frac{\partial F(\phi)}{\partial \beta_1} &= \sum_{i: x_i =0} y_i .... \\
&\mathrel{\phantom{=}} + \sum_{i: y_i > 0} 2y_i + ab
\end{align*}
\begin{align*}
\frac{\partial F(\phi)}{\partial \beta_2} &= \sum_{i: x_i =0} y_i + 2y_{i}^{2} \\
&\mathrel{\phantom{=}} + \sum_{i: y_i > 0} 2y_i + ab + 2x
\end{align*}
\begin{align*}
\frac{\partial F(\phi)}{\partial \beta_3} &= \sum_{i: x_i =0} y_i + (y+1)^2 - (y-1)^2 \\
&\mathrel{\phantom{=}} + \sum_{i: y_i > 0} 2y_i + ab
\end{align*}
\end{document}
I have tried it by using the alignat command but I did not manage to obtain the result I want . The result at the moment looks like
align