1

I have two questions.

First: How can I align to the left all S?

Second: How to make the second line of each S be aligned with the first and not centered as it is.

\begin{equation}
\begin{gathered}\label{eq:suav2}
S_0^+ = \frac{240}{36}[11f_i - 18f_{i-1} + 9f_{i-2} - 2f_{i-3}]^2 + 
1040[2f_i - 5f_{i-1} + 4f_{i-2} - f_{i-3}]^2 + \\
9732[f_i - 3f_{i-1} + 3f_{i-2} - f_{i-3}]^2 \\
S_1^+ = \frac{240}{36}[f_{i-2} - 6f_{i-1} + 3f_{i} + 2f_{i+1}]^2 + 
1040[-2f_{i} + f_{i-1} + f_{i+1}]^2 + \\
9732[-3f_i + 3f_{i-1} - f_{i-2} + f_{i+1}]^2 \\
S_2^+ = \frac{240}{36}[-2f_{i-1} - 3f_{i} + 6f_{i+1} - 2f_{i+2}]^2 + 
1040[-2f_{i} + f_{i-1} + f_{i+1}]^2 + \\
9732[3f_i - f_{i-1} - 3f_{i+1} + f_{i+2}]^2 \\
S_3^+ = \frac{240}{36}[-11f_{i} + 18f_{i+1} - 9f_{i+2} + 2f_{i+3}]^2 + 
1040[2f_{i} - 5f_{i+1} + 4f_{i+2} - f_{i+3}]^2 + \\
9732[-f_i + 3f_{i+1} - 3f_{i+2} + f_{i+3}]^2 
\end{gathered}
\end{equation}

enter image description here

0

Use aligned instead of gathered:

enter image description here

\documentclass{article}

\usepackage{amsmath}

\begin{document}

\begin{equation}
  \begin{aligned}
  S_0^+ ={}& \frac{240}{36}[11f_i - 18f_{i-1} + 9f_{i-2} - 2f_{i-3}]^2 + 
            1040[2f_i - 5f_{i-1} + 4f_{i-2} - f_{i-3}]^2 + {} \\
          & 9732[f_i - 3f_{i-1} + 3f_{i-2} - f_{i-3}]^2 \\
  S_1^+ ={}& \frac{240}{36}[f_{i-2} - 6f_{i-1} + 3f_{i} + 2f_{i+1}]^2 + 
            1040[-2f_{i} + f_{i-1} + f_{i+1}]^2 + {} \\
          & 9732[-3f_i + 3f_{i-1} - f_{i-2} + f_{i+1}]^2 \\
  S_2^+ ={}& \frac{240}{36}[-2f_{i-1} - 3f_{i} + 6f_{i+1} - 2f_{i+2}]^2 + 
            1040[-2f_{i} + f_{i-1} + f_{i+1}]^2 + {} \\
          & 9732[3f_i - f_{i-1} - 3f_{i+1} + f_{i+2}]^2 \\
  S_3^+ ={}& \frac{240}{36}[-11f_{i} + 18f_{i+1} - 9f_{i+2} + 2f_{i+3}]^2 + 
            1040[2f_{i} - 5f_{i+1} + 4f_{i+2} - f_{i+3}]^2 + {} \\
          & 9732[-f_i + 3f_{i+1} - 3f_{i+2} + f_{i+3}]^2 
  \end{aligned}
\end{equation}

\end{document}

For ease of use I've used ={}& instead of &=... the more traditional way of aligning around the relation.

  • @Werner: Perhaps + {} \\ rather than + \\ at the end of the first lines? – Bernard Oct 4 '17 at 19:09
0

I suggest two other variants:

\documentclass{article}
\usepackage{geometry}
\usepackage{amsmath}

\begin{document}

\begin{equation}
  \raisetag{2cm}
  \begin{aligned}
    S₀^+ & =
    \begin{aligned}[t]
      \frac{240}{36}[11f_i - 18f_{i-1} + 9f_{i-2} - 2f_{i-3}]² & +
      1040[2f_i - 5f_{i-1} + 4f_{i-2} - f_{i-3}]² \\[-0.7ex]
                                                                & + 9732[f_i - 3f_{i-1} + 3f_{i-2} - f_{i-3}]²
    \end{aligned} \\
    S₁^+ & =
    \begin{aligned}[t]
      \frac{240}{36}[f_{i-2} - 6f_{i-1} + 3f_{i} + 2f_{i+1}]² & +
      1040[-2f_{i} + f_{i-1} + f_{i+1}]² \\[-0.7ex]
                                                               & + 9732[-3f_i + 3f_{i-1} - f_{i-2} + f_{i+1}]²
    \end{aligned} \\
    S₂^+ & =
    \begin{aligned}[t]
      \frac{240}{36}[-2f_{i-1} - 3f_{i} + 6f_{i+1} - 2f_{i+2}]² & +
      1040[-2f_{i} + f_{i-1} + f_{i+1}]² \\[-0.7ex]
                                                                 & + 9732[3f_i - f_{i-1} - 3f_{i+1} + f_{i+2}]²
    \end{aligned} \\
    S₃^+ & =
    \begin{aligned}[t]
      \frac{240}{36}[-11f_{i} + 18f_{i+1} - 9f_{i+2} + 2f_{i+3}]² & +
      1040[2f_{i} - 5f_{i+1} + 4f_{i+2} - f_{i+3}]² \\[-0.7ex]
                                                                   & + 9732[-f_i + 3f_{i+1} - 3f_{i+2} + f_{i+3}]²
    \end{aligned}
  \end{aligned}
\end{equation}
\vspace{1cm}
\begin{equation}
  \begin{aligned}
    S₀^+ & =
    \begin{aligned}[t]
      \frac{240}{36}[11f_i - 18f_{i-1} + 9f_{i-2} - 2f_{i-3}]² +
      1040[2f_i - 5f_{i-1} + 4f_{i-2} - f_{i-3}]² \\[-0.7ex]
      {} + 9732[f_i - 3f_{i-1} + 3f_{i-2} - f_{i-3}]²
    \end{aligned} \\
    S₁^+ & =
    \begin{aligned}[t]
      \frac{240}{36}[f_{i-2} - 6f_{i-1} + 3f_{i} + 2f_{i+1}]² +
      1040[-2f_{i} + f_{i-1} + f_{i+1}]² \\[-0.7ex]
      {} + 9732[-3f_i + 3f_{i-1} - f_{i-2} + f_{i+1}]²
    \end{aligned} \\
    S₂^+ & =
    \begin{aligned}[t]
      \frac{240}{36}[-2f_{i-1} - 3f_{i} + 6f_{i+1} - 2f_{i+2}]² +
      1040[-2f_{i} + f_{i-1} + f_{i+1}]² \\[-0.7ex]
      {} + 9732[3f_i - f_{i-1} - 3f_{i+1} + f_{i+2}]²
    \end{aligned} \\
    S₃^+ & =
    \begin{aligned}[t]
      \frac{240}{36}[-11f_{i} + 18f_{i+1} - 9f_{i+2} + 2f_{i+3}]² +
      1040[2f_{i} - 5f_{i+1} + 4f_{i+2} - f_{i+3}]² \\[-0.7ex]
      {} + 9732[-f_i + 3f_{i+1} - 3f_{i+2} + f_{i+3}]²
    \end{aligned}
  \end{aligned}
\end{equation}

\end{document} 

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.