'Aligned' does not work for multiple equations

I have four equations and the second one is not aligned with the others. I have tried 'aligned' in the code below but it doesn't work as expected.

    \begin{aligned} \min_{w} \quad & \frac{\mu_{s_i}^Tw - r_f}{\sqrt{w^T\sum_{s_i} w}} + \gamma w^T w\\ \textrm{s.t.} \quad & 1^T w = 1\\ & 0 \leq w_i \leq 0.5 \quad & \textrm{i = 1,2,..,7} \\ \end{aligned}

\begin{aligned} \max_{w} \quad & \mu_{s_i}^Tw + \gamma w^T w\\ \textrm{s.t.} \quad & \sqrt{w^T\sum_{s_i} w} = \sigma_{s_i}\\ & 1^T w = 1\\ & 0 \leq w_i \leq 0.5 \quad & \textrm{i = 1,2,..,7} \\ \end{aligned}

\begin{aligned} \min_{w} \quad & \sqrt{w^T\sum_{s_i} w} + \gamma w^T w\\ \textrm{s.t.} \quad & \mu_{s_i}^Tw = R_{s_i}\\ & 1^T w = 1\\ & 0 \leq w_i \leq 0.5 \quad & \textrm{i = 1,2,..,7} \\ \end{aligned}

\begin{aligned} \min_{w} \quad & \sqrt{w^T\sum_{s_i} w} + \gamma w^T w\\ \textrm{s.t.} \quad & 1^T w = 1\\ & 0 \leq w_i \leq 0.5 \quad & \textrm{i = 1,2,..,7} \\ \end{aligned}


Here is the screen shot:

• Welcome to TSE.
– user108724
Commented Aug 7, 2020 at 4:52
• What exactly are you asking? Equations are centered, your equations does not have the same width and thus are not "aligned" when compared to each other. Btw use \dots for the ...  part Commented Aug 7, 2020 at 5:09

Your equations are completely distinct and are not grouped in one environment. eqs 15, 17, 18 are aligned properly by chance because their widths are equal. here is a simple example (also there are many tricks and ways for doing this):

\begin{align}
&\begin{aligned}
\min_{w} \quad & \frac{\mu_{s_i}^Tw - r_f}{\sqrt{w^T\sum_{s_i} w}}
+ \gamma w^T w\\
\textrm{s.t.} \quad & 1^T w = 1\\
& 0 \leq w_i \leq 0.5 \quad & \textrm{i = 1,2,..,7}   \\
\end{aligned}\\
&\begin{aligned}
\max_{w} \quad & \mu_{s_i}^Tw + \gamma w^T w\\
\textrm{s.t.} \quad & \sqrt{w^T\sum_{s_i} w} = \sigma_{s_i}\\
& 1^T w = 1\\
& 0 \leq w_i \leq 0.5 \quad & \textrm{i = 1,2,..,7}   \\
\end{aligned}
\end{align}