# Do you have any suggestions to make this equations system more legible

I have the following equation system. I am aware that it does not look legible and as it is for my thesis (not in mathematics), I was wondering if anyone could help with making it more legible?

\documentclass{article}
\usepackage{amsmath, amssymb}
\usepackage{calc}
\newlength{\maxmin}
\setlength{\maxmin}{\widthof{$\max$}-\widthof{$\min$}}

\begin{document}
$$\left |{\dfrac{ Im \left[S_{na}(n_{i}f_{0})\right]}{Im \left[S_{na} ((n_{i}+2)f_{0})\right]}}\right| \geq 1 \begin{cases} \begin{cases} 1 \leq \left |{\dfrac{ Im \left[S_{a}(n_{i}f_{0})\right]}{Im \left[S_{a}((n_{i}+2)f_{0})\right]}}\right| \leq 1+\frac{2}{n} \\ \sqrt{\left| \dfrac{(n+2)Im \left[S_{a}((n_{i}+2)f_{0})\right] - n Im \left[S_{a}(n_{i}f_{0})\right]}{n(n+2)^2 Im \left[S_{a}(n_{i}f_{0})\right] - (n+2)n^2 Im \left[S_{a}((n_{i}+2)f_{0})\right]} \right|} \leq \phi \end{cases} &\text{Or} \\ \begin{cases} \left |{\dfrac{ Im \left[S_{a}(n_{i}f_{0})\right]}{Im \left[S_{a} ((n_{i}+2)f_{0})\right]}}\right| \geq 1+\frac{2}{n} \\ \forall \phi \in \mathbb{R_{+}} \end{cases} \end{cases}$$

$$\left |{\dfrac{ Im \left[S_{na}(n_{i}f_{0})\right]}{Im \left[S_{na} ((n_{i}+2)f_{0})\right]}}\right| \leq 1 \begin{cases} \begin{cases} 1 \leq \left |{\dfrac{ Im \left[S_{a}(n_{i}f_{0})\right]}{Im \left[S_{a}((n_{i}+2)f_{0})\right]}}\right| \leq 1+\frac{2}{n} \\ \sqrt{\left| \dfrac{(n+2)Im \left[S_{a}((n_{i}+2)f_{0})\right] - n Im \left[S_{a}(n_{i}f_{0})\right]}{n(n+2)^2 Im \left[S_{a}(n_{i}f_{0})\right] - (n+2)n^2 Im \left[S_{a}((n_{i}+2)f_{0})\right]} \right|} \geq \phi \end{cases} \end{cases}$$

$\forall\ \ n_{i} =\{2k+1, k\in \mathbb {N} \}$

\end{document}


• Welcome to TeX.SX! Please make your code compilable (if possible), or at least complete it with \documentclass{...}, the required \usepackage's, \begin{document}, and \end{document}. That may seem tedious to you, but think of the extra work it represents for TeX.SX users willing to give you a hand. Help them help you: remove that one hurdle between you and a solution to your problem. – dexteritas Aug 4 '17 at 18:53
• Welcome to TeX SX! Your second line is contradictory: if I understand well, it is the case, and the expression on the left of the big brace is supposed to be ≤ 1, but in the first line on the right, it is between 1 and 1+2/n! – Bernard Aug 4 '17 at 18:55
• It won't change much in this case, but Im written as it is now in your code means “the product of a variable I and a variable m”. I doubt that's what you mean. Consider using \mathit or \mathrm or \operatorname or \Im or something else, depending on what it's supposed to express. Just writing letters one after another in math mode makes the kerning look rather bad (try compiling ff \mathit{ff} and you'll see the difference, I think). – Alice M. Aug 4 '17 at 18:56
• That may be important to decide the final layout, as it is linked to the semantics of the formula. – Bernard Aug 4 '17 at 19:04
• Could you make the correction so you formulae are consistent? – Bernard Aug 4 '17 at 19:11

Here's a solution that uses a single align environment.

\documentclass{article}
\usepackage{mathtools,amsfonts}
\DeclarePairedDelimiter{\abs}{\lvert}{\rvert} % modulus
\DeclareMathOperator{\im}{Im}                 % imaginary part

\newcommand{\sa}{ S_{\textit{a} }}
\newcommand{\sna}{S_{\textit{na}}}
\newcommand{\terma}{ \im\bigl[\sa (n_{i}f_{0})\bigr]}
\newcommand{\terman}{\im\bigl[\sna(n_{i}f_{0})\bigr]}
\newcommand{\termb}{ \im\bigl[\sa \bigl((n_{i}+2)f_{0}\bigr)\bigr]}
\newcommand{\termbn}{\im\bigl[\sna\bigl((n_{i}+2)f_{0}\bigr)\bigr]}
\newcommand{\termc}{ \abs[\bigg]{\frac{\terma }{\termb }}}
\newcommand{\termcn}{\abs[\bigg]{\dfrac{\terman}{\termbn}}}
\newcommand{\termd}{ \abs[\bigg]{\frac{(n+2)\termb
- n\terma}{n(n+2)^2\terma - n^2(n+2)\termb}}}
\begin{document}

\begin{align}
\shortintertext{$\termcn\geq1\colon$}
&\begin{dcases}
1\leq\termc\leq 1+2/n \\[1.25ex]
\termd \leq \phi'
\end{dcases}  \label{eq:first}\\
\shortintertext{or}
&\begin{dcases}
\termc\geq 1+2/n \\[1ex]
\forall \phi'\in\mathbb{R_+}
\end{dcases}  \label{eq:first_prime}\tag{$\ref{eq:first}'$}\\[2ex]
\shortintertext{$\termcn\leq1\colon$}
&\begin{dcases}
1\leq\termc\leq 1+2/n \\[1.25ex]
\termd \geq \phi'
\end{dcases} \label{eq:second}
\end{align}
for all $n_i=2k+1$, $k\in\mathbb{N}$.

Some cross-references: equations \eqref{eq:first}, \eqref{eq:first_prime}, and \eqref{eq:second}.

\end{document}


Because there are many redundancies in the formulas I would introduce some variables s, t, x, y.

For the funcion Im I declared an operator with \DeclareMathOperator. If you mean the Imaginary part of the number you should use \Im.

\documentclass{article}

\usepackage{amssymb}
\usepackage{mathtools}

\DeclareMathOperator{\Imx}{Im}

\begin{document}

\begin{align}
s &\coloneqq \Imx \left[S_{a}(n_{i}f_{0})\right]
\\
t &\coloneqq \Imx \left[S_{a}((n_{i}+2)f_{0})\right]
\\
x &\coloneqq \left|\dfrac{s}{t}\right|
\\
y &\coloneqq \sqrt{\left|\dfrac{
(n+2) \cdot t - n \cdot s
}{
n(n+2)^2 \cdot s - (n+2)n^2 \cdot t
} \right|}
\\
x &\geq 1
\begin{cases}
\begin{cases}
1 \leq x \leq 1+\frac{2}{n}  \\
y \leq  \phi
\end{cases}
&\text{Or} \\
\begin{cases}
x \geq 1+\frac{2}{n} \\
\forall \phi \in \mathbb{R}_{+}
\end{cases}
\end{cases}
\\
x &\leq 1
\begin{cases}
\begin{cases}
1 \leq x \leq 1+\frac{2}{n}  \\
y \geq  \phi
\end{cases}
\end{cases}
\\
&\forall\ \  n_{i} =\{2k+1, k\in \mathbb {N}\}\notag
\end{align}

\end{document}


Edit: Since the question was edited you now need another variable for the left part of the inequations, because now there is used S_{na}.

\documentclass{article}
\usepackage{geometry}
\usepackage{mathtools,amssymb}

\begin{document}
Let be
\begin{align}
S_A     & = \dfrac{\Im \left[S_{a}(n_{i}f_{0})\right]}
{\Im \left[S_{a}((n_{i}+2)f_{0})\right]}  \\
S_A'    & = \dfrac{(n+2)\Im \left[S_{a}((n_{i}+2)f_{0})\right] -
n\Im\left[S_{a}(n_{i}f_{0})\right]}
{n(n+2)^2 \Im \left[S_{a}(n_{i}f_{0})\right] -
n^2(n+2) \Im \left[S_{a}((n_{i}+2)f_{0})\right]}
\intertext{than:}
\left|\dfrac{\Im \left[S_{na}(n_{i}f_{0})\right]}
{\Im \left[S_{na}((n_{i}+2)f_{0})\right]}\right|
&   \geq 1 \Rightarrow
\begin{dcases}
1 \leq \left| S_A  \right| \leq 1 + \dfrac{2}{n}    &   \\
\sqrt{\left| S_A' \right|} \leq  \phi              &   \\
\text{or}                                          &   \\
\left | S_A \right| \geq 1+ \dfrac{2}{n}            &   \\
\forall \phi \in \mathbb{R_{+}}                     &
\end{dcases}
\intertext{and}
\left|\dfrac{\Im \left[S_{na} (n_{i}f_{0})\right]}
{\Im \left[S_{na} ((n_{i}+2)f_{0})\right]}\right|
&   \leq 1 \Rightarrow
\begin{dcases}
1 \leq \left| S_A  \right| \leq 1+\dfrac{2}{n}     &   \\
\sqrt{\left| S_A' \right|} \geq  \phi
\end{dcases}
\end{align}
for all $\{2k+1, k\in \mathbb {N} \}$

\end{document}


edit:

as i mentioned in comment below question, for setting these equations you need to understand, what they like tell to readers. i suspect that equation (3) in above mwe is wrong and should be as it is written in mwe below.

in mwe below are also introduced new command \abs{...} for use instead of \left| ... \right| and set difference in height in successive parents:

\documentclass{article}
\usepackage{geometry}
\usepackage{mathtools,amssymb}
\delimitershortfall-1sp
\newcommand\abs[1]{\left\lvert #1 \right\rvert}

\begin{document}
Let be
\begin{align}
S_A     & = \dfrac{\Im \left[S_{a}(n_{i}f_{0})\right]}
{\Im \left[S_{a}\left((n_{i}+2)f_{0}\right)\right]}  \\
S_A'    & = \dfrac{(n+2)\Im \left[S_{a}\left((n_{i}+2)f_{0}\right)\right] -
n\Im\left[S_{a}(n_{i}f_{0})\right]}
{n(n+2)^2 \Im \left[S_{a}\left(n_{i}f_{0}\right)\right] -
n^2(n+2) \Im \left[S_{a}\left((n_{i}+2)f_{0}\right)\right]}
\intertext{than:}
\abs{\dfrac{\Im \left[S_{na}(n_{i}f_{0})\right]}
{\Im \left[S_{na}\left((n_{i}+2)f_{0}\right)\right]}
}
& \geq 1 \Rightarrow
\begin{dcases}
1 \leq \abs{ S_A }   \leq 1 + \dfrac{2}{n}          &   \\
\sqrt{\abs{ S_A' }} \leq  \phi                      &   \\[1ex]
\text{or}                                          &   \\
\abs{ S_A } \geq 1+ \dfrac{2}{n},                   &  \forall \phi \in \mathbb{R_{+}}
\end{dcases}
\intertext{and}
\abs{\dfrac{\Im \left[S_{na} \left(n_{i}f_{0}\right)\right]}
{\Im \left[S_{na} \left((n_{i}+2)f_{0}\right)\right]}
}
&   \leq 1 \Rightarrow
\begin{dcases}
1 \leq \abs{ S_A  } \leq 1+\dfrac{2}{n}           &   \\
\sqrt{\abs{ S_A' }} \geq  \phi
\end{dcases}
\end{align}
for all $\{2k+1, k\in \mathbb {N} \}$

\end{document}


• +1. You could simplify the expression even further by replacing the longish terms ahead of the inequality symbols in equations 3 and 4 with \abs{S_A}. – Mico Aug 5 '17 at 6:10
• @Mico, those expression are not equal to S_A (they contain S_{na} and SA contain S_{a}). i'm not sure if this is intentionally or only typo error. to be honest, i not understand equation, i suspect that equation (3) should be as I wrote in edit of answer. – Zarko Aug 5 '17 at 7:03
• You're right -- I had overlooked the difference between S_{a} and S_{na}. For what it's worth, I don't understand the equation either... – Mico Aug 5 '17 at 7:06

Here is a solution with flalign. I also defined a \abs command which has a starred version that adds a pair of \left ... \right to the pair of \vert ... \rvert, and accepts an optional argument (\big, \Big, &c.) to fine-tune the size of the delimiters. This requires loading mathtools (no need to load amsmath in this case).

\documentclass{article}
\usepackage{mathtools, amsfonts}
\DeclarePairedDelimiter{\abs}{\lvert}{\rvert}
\usepackage{calc}
\newlength{\maxmin}
\setlength{\maxmin}{\widthof{$\max$}-\widthof{$\min$}}

\DeclareMathOperator{\im}{Im}

\begin{document}

\begin{flalign}
& \mathrlap{\abs*{\frac{ \im \bigl[S_{na}(n_{i}f_{0})\bigr]}{\im \bigl[S_{na}\bigl ((n_{i}+2)f_{0}\bigr)\bigr]}} \geq 1 :} \notag\\
& & & \begin{dcases}
1 \leq \abs*{\frac{ \im \bigl[S_{na}(n_{i}f_{0})\bigr]}{\im \bigl[S_{na}\bigl ((n_{i}+2)f_{0}\bigr)\bigr]}} \leq 1+\frac{2}{n} \\
\sqrt{\abs*{ \frac{(n+2)\im \bigl[S_{a}\bigl((n_{i}+2)f_{0}\bigr)\bigr] - n \im \bigl[S_{a}(n_{i}f_{0})\bigr]}{n(n+2)^2 \im \bigl[S_{a}(n_{i}f_{0})\bigr] - (n+2)n^2 \im \bigl[S_{a}\bigl((n_{i}+2)f_{0}\bigr)\bigr]}}} \leq \phi
\end{dcases}\notag & & \\
& & \text{or} & \\
& & & \begin{dcases}
\abs*{\frac{ \im \bigl[S_{na}(n_{i}f_{0})\bigr]}{\im \bigl[S_{na}\bigl ((n_{i}+2)f_{0}\bigr)\bigr]}}\geq 1+\frac{2}{n} & \\
\forall \phi  \in \mathbb{R_{+}}
\end{dcases} \notag\\[3ex]
& \mathrlap{\abs*{\frac{ \im \bigl[S_{na}(n_{i}f_{0})\bigr]}{\im \bigl[S_{na}\bigl ((n_{i}+2)f_{0}\bigr)\bigr]}} \leq 1:} \notag\\
& & & \begin{dcases}
1 \leq \abs*{\frac{ \im \bigl[S_{na}(n_{i}f_{0})\bigr]}{\im \bigl[S_{na}\bigl ((n_{i}+2)f_{0}\bigr)\bigr]}} \leq 1+\frac{2}{n} \\
\sqrt{\abs*{ \frac{(n+2)\im \bigl[S_{a}\bigl((n_{i}+2)f_{0}\bigr)\bigr] - n \im \bigl[S_{a}(n_{i}f_{0})\bigr]}{n(n+2)^2 \im \bigl[S_{a}(n_{i}f_{0})\bigr] - (n+2)n^2 \im \bigl[S_{a}\bigl((n_{i}+2)f_{0}\bigr)\bigr]}}} \geq \phi
\end{dcases}\\[1ex]
\rlap{for all \enspace $n_{i} =\{2k+1, k \in \mathbb {N} \}$}\notag
\end{flalign}

\end{document}