How to align a system of multiline equations?

the multlined environment from mathtools is your friend. (it loads amsmath, so there's no need to do that).

two things to note about this example:

  • \mathindent is set to zero width within a group so it will disappear after the display ends.
  • since multlined (like multline) automatically sets the first line flush left and the last line flush right, you don't want the \shove... commands on those lines. in fact, the spacing will be compromised if you do wrap those lines in \shove... arguments.

here's the code:

\documentclass{article}
\usepackage[fleqn]{mathtools}

\begin{document}

\noindent some text here
{\mathindent=0pt
\[
\setlength{\multlinegap}{0pt}
\left\{
\begin{multlined}
A_{PP}\sin\alpha_{P1} - A_{PS}\cos\alpha_{S1} +B_{PP} \sin\alpha_{P2} +B_{PS} \cos\alpha_{S2} = \\
\shoveright{=\sin\alpha_{P1},} \\
% 2-nd equation
\shoveleft{ A_{PP}\cos\alpha_{P1}  +A_{PS} \sin\alpha_{S1} -B_{PP}\cos\alpha_{P2} + B_{PS} \sin\alpha_{S2} = } \\
\shoveright{ =\cos\alpha_{P1},} \\
% 3-rd equation
\shoveleft{ A_{PP}\gamma_{P1} \cos 2\alpha_{S1} +A_{PS}  \gamma_{S1} \sin 2\alpha_{S1} +B_{PP}  \gamma_{P2} \cos 2\alpha_{S2} -} \\
\shoveright{- B_{PS}   \gamma_{S2} \sin 2\alpha_{S2} = \gamma_{P1} \cos 2\alpha_{S1},} \\
% 4-th equation
\shoveleft{ -A_{PP}n_1 \gamma_{S1} \sin 2\alpha_{P1} +A_{PS}  \gamma_{S1} \cos 2\alpha_{S1} +B_{PP} n_2 \gamma_{S2} \sin 2\alpha_{P2} +} \\
+ B_{PS} \gamma_{S2} \cos 2\alpha_{S2} = n_1 \gamma_{S1} \sin 2\alpha_{P1}.
\end{multlined}
\right.
\] }

\end{document}

enter image description here


This is not directly addressing your question, but more about making the information easier to parse. I would suggest the following changes to make the pattern easier to see:

  • Eliminate the double equal signs
  • align the terms across multiple lines

enter image description here

Notes:

  • The leading minus sign on the last equation has non-standard spacing but I think it looks better in this case
  • You could also consider aligning the middle +/- signs (and perhaps even the equal signs) to make the pattern ever more obvious.

There are many ways to achieve this, so this is just to show one method.

Code:

\documentclass{article}
\usepackage{amsmath}

\newcommand{\Phantom}{\phantom{{}+{}}}%
\newcommand{\Plus}{{}+{}}%
\newcommand{\Minus}{{}-{}}%

\begin{document}
\[\begin{cases}
\Phantom A_{PP}\sin\alpha_{P1} - A_{PS}\cos\alpha_{S1} \\
        \Plus B_{PP}\sin\alpha_{P2} + B_{PS}\cos\alpha_{S2} =
         \sin\alpha_{P1}, \\[7pt]
% 2-nd equation
\Phantom A_{PP}\cos\alpha_{P1}  +A_{PS} \sin\alpha_{S1} \\
\Minus B_{PP}\cos\alpha_{P2} + B_{PS} \sin\alpha_{S2} = \cos\alpha_{P1}, \\[7pt]
% 3-rd equation
\Phantom A_{PP}\gamma_{P1} \cos 2\alpha_{S1} +A_{PS}  \gamma_{S1} \sin 2\alpha_{S1} \\
\Plus B_{PP}  \gamma_{P2} \cos 2\alpha_{S2}
- B_{PS}   \gamma_{S2} \sin 2\alpha_{S2} = \gamma_{P1} \cos 2\alpha_{S1}, \\[7pt]
% 4-th equation
\Minus A_{PP}n_1 \gamma_{S1} \sin 2\alpha_{P1} +A_{PS}  \gamma_{S1} \cos 2\alpha_{S1} \\
\Plus B_{PP} n_2 \gamma_{S2} \sin 2\alpha_{P2} +
       B_{PS} \gamma_{S2} \cos 2\alpha_{S2} = n_1 \gamma_{S1} \sin 2\alpha_{P1}.
\end{cases}\]
\end{document}

To remove the space between the row and the brace you can use the declaration @{}. The declaration @{} is described here:

Spaces between rows and cols in a table - Better ways than mine?

To provide an equation about the whole contents you can use the command \resizebox. Note this results in an unwanted size of the equation.

\documentclass{article}
\usepackage{showframe}
\usepackage{array}
\usepackage{amsmath}
\usepackage{graphicx}
\begin{document}
\[
\setlength{\multlinegap}{0pt}
\left\{
\begin{array}{c}
\shoveleft{A_{PP}\sin\alpha_{P1} - A_{PS}\cos\alpha_{S1} +B_{PP} \sin\alpha_{P2} +B_{PS} \cos\alpha_{S2} =} \\ \shoveright{=\sin\alpha_{P1},} \\
% 2-nd equation
\shoveleft{ A_{PP}\cos\alpha_{P1}  +A_{PS} \sin\alpha_{S1} -B_{PP}\cos\alpha_{P2} + B_{PS} \sin\alpha_{S2} = } \\
\shoveright{ =\cos\alpha_{P1},} \\
% 3-rd equation
\shoveleft{ A_{PP}\gamma_{P1} \cos 2\alpha_{S1} +A_{PS}  \gamma_{S1} \sin 2\alpha_{S1} +B_{PP}  \gamma_{P2} \cos 2\alpha_{S2} -} \\
\shoveright{- B_{PS}   \gamma_{S2} \sin 2\alpha_{S2} = \gamma_{P1} \cos 2\alpha_{S1},} \\
% 4-th equation
\shoveleft{ -A_{PP}n_1 \gamma_{S1} \sin 2\alpha_{P1} +A_{PS}  \gamma_{S1} \cos 2\alpha_{S1} +B_{PP} n_2 \gamma_{S2} \sin 2\alpha_{P2} +} \\
\shoveright{+ B_{PS} \gamma_{S2} \cos 2\alpha_{S2} = n_1 \gamma_{S1} \sin 2\alpha_{P1}.}\end{array}
\right.
\] 


\noindent\resizebox{\linewidth}{!}{%
$\setlength{\multlinegap}{0pt}
\left\{
\begin{array}{@{}c@{}}
\shoveleft{A_{PP}\sin\alpha_{P1} - A_{PS}\cos\alpha_{S1} +B_{PP} \sin\alpha_{P2} +B_{PS} \cos\alpha_{S2} =} \\ \shoveright{=\sin\alpha_{P1},} \\
% 2-nd equation
\shoveleft{ A_{PP}\cos\alpha_{P1}  +A_{PS} \sin\alpha_{S1} -B_{PP}\cos\alpha_{P2} + B_{PS} \sin\alpha_{S2} = } \\
\shoveright{ =\cos\alpha_{P1},} \\
% 3-rd equation
\shoveleft{ A_{PP}\gamma_{P1} \cos 2\alpha_{S1} +A_{PS}  \gamma_{S1} \sin 2\alpha_{S1} +B_{PP}  \gamma_{P2} \cos 2\alpha_{S2} -} \\
\shoveright{- B_{PS}   \gamma_{S2} \sin 2\alpha_{S2} = \gamma_{P1} \cos 2\alpha_{S1},} \\
% 4-th equation
\shoveleft{ -A_{PP}n_1 \gamma_{S1} \sin 2\alpha_{P1} +A_{PS}  \gamma_{S1} \cos 2\alpha_{S1} +B_{PP} n_2 \gamma_{S2} \sin 2\alpha_{P2} +} \\
\shoveright{+ B_{PS} \gamma_{S2} \cos 2\alpha_{S2} = n_1 \gamma_{S1} \sin 2\alpha_{P1}.}\end{array}
\right.
$} 
\end{document}

enter image description here