Big equation writing in LaTeX

Some suggestions and observations (some already made by @KersouMan):

  • Don't provide all-blank lines in a display math environment

  • Write \pm rather than +/-

  • Encase the exponent terms in curly braces, i.e., write z^{-19} rather than z^-19

  • Since the numerator and denominator contain 17 and 18 separate additive terms, respectively, using conventional \frac notation cannot possibly work. I suggest you list the numerator and denominator separately.

enter image description here

\documentclass{article}
\usepackage{mathtools}
\newcommand{\mybox}[1]{\parbox[t]{0.75\textwidth}{\raggedright$\displaystyle #1$}}
\begin{document}

\begin{align*}
C(Z)&=\frac{U(Z)}{V(Z)}\,,\\
\shortintertext{where}
U(z)&=\mybox{ -0.5002 (\pm 0.1000)\,z^{-1} + 2.161 (\pm 0.1821)\,z^{-2} 
              -1.744  (\pm 0.1489)\,z^{-3} - 2.138 (\pm 0.2009)\,z^{-4} 
              +2.0073 (\pm 0.2002)\,z^{-5} + 1.047 (\pm 0.1986)\,z^{-6} 
              -1.124  (\pm 0.1978)\,z^{-7} - 2.1009(\pm 0.2176)\,z^{-8} 
              +0.1732 (\pm 0.1959)\,z^{-9} + 2.305 (\pm 0.2109)\,z^{-10} 
              +0.7807 (\pm 0.1846)\,z^{-11}- 1.436 (\pm 0.225 )\,z^{-12} 
              -2.605  (\pm 0.2003)\,z^{-13}+ 2.405 (\pm 0.2306)\,z^{-14} 
              +1.517  (\pm 0.1872)\,z^{-15}- 2.244 (\pm 0.1778)\,z^{-16} 
              +0.6634 (\pm 0.05466)\,z^{-19}}\\
\shortintertext{and} 
V(Z)&=\mybox{1-2.738  (\pm 0.07274)\,z^{-1}+ 1.241 (\pm 0.2085)\,z^{-2} 
              +1.997  (\pm 0.1935)\,z^{-3} - 1.033 (\pm 0.2873)\,z^{-4} 
              -0.2646 (\pm 0.3029)\,z^{-5} - 1.415 (\pm 0.2352)\,z^{-6} 
              +0.4815 (\pm 0.2701)\,z^{-8} + 1.313 (\pm 0.249 )\,z^{-8} 
              +0.3993 (\pm 0.2877)\,z^{-9} - 0.7446(\pm 0.2492)\,z^{-10} 
              -1.7777 (\pm 0.2392)\,z^{-11}+ 1.443 (\pm 0.2471)\,z^{-12} 
              -1.054  (\pm 0.2877)\,z^{-13}+ 0.7   (\pm 0.277719)\,z^{-14} 
              +1.47   (\pm 0.1926)\,z^{-15}- 1.847 (\pm 0.20771)\,z^{-16} 
              +0.6023 (\pm 0.06359)\,z^{-17}\,.}
\end{align*}

\end{document}

In the same vein as Mico's fine answer, I propose also to do other alignments, in order to get a better overall view.

\documentclass{article}
\usepackage{mathtools,array}
\newcommand{\mybox}[1]{\parbox[t]{0.75\textwidth}{\raggedright$\displaystyle #1$}}
\begin{document}

\begin{align*}
C(Z)&=\frac{U(Z)}{V(Z)},\\
\shortintertext{where}
U(z)&=
  \begin{array}[t]{*{2}{ @{}>{{}}l@{}>{(}l<{)}@{\,}l } @{}}
  -0.5002 & \pm 0.1000  & z^{-1}  & + 2.161  & \pm 0.1821 & z^{-2} \\ 
  -1.744  & \pm 0.1489  & z^{-3}  & - 2.138  & \pm 0.2009 & z^{-4} \\ 
  +2.0073 & \pm 0.2002  & z^{-5}  & + 1.047  & \pm 0.1986 & z^{-6} \\ 
  -1.124  & \pm 0.1978  & z^{-7}  & - 2.1009 & \pm 0.2176 & z^{-8} \\ 
  +0.1732 & \pm 0.1959  & z^{-9}  & + 2.305  & \pm 0.2109 & z^{-10} \\ 
  +0.7807 & \pm 0.1846  & z^{-11} & - 1.436  & \pm 0.225  & z^{-12} \\ 
  -2.605  & \pm 0.2003  & z^{-13} & + 2.405  & \pm 0.2306 & z^{-14} \\ 
  +1.517  & \pm 0.1872  & z^{-15} & - 2.244  & \pm 0.1778 & z^{-16} \\ 
  +0.6634 & \pm 0.05466 & z^{-19} 
  \end{array}
\\
\shortintertext{and} 
V(Z)&=1
  \begin{array}[t]{*{2}{ @{}>{{}}l@{}>{(}l<{)}@{\,}l } @{}}
  -2.738  & \pm 0.07274 & z^{-1}  & + 1.241  & \pm 0.2085   & z^{-2} \\ 
  +1.997  & \pm 0.1935  & z^{-3}  & - 1.033  & \pm 0.2873   & z^{-4} \\ 
  -0.2646 & \pm 0.3029  & z^{-5}  & - 1.415  & \pm 0.2352   & z^{-6} \\ 
  +0.4815 & \pm 0.2701  & z^{-8}  & + 1.313  & \pm 0.249    & z^{-8} \\ 
  +0.3993 & \pm 0.2877  & z^{-9}  & - 0.7446 & \pm 0.2492   & z^{-10} \\ 
  -1.7777 & \pm 0.2392  & z^{-11} & + 1.443  & \pm 0.2471   & z^{-12} \\ 
  -1.054  & \pm 0.2877  & z^{-13} & + 0.7    & \pm 0.277719 & z^{-14} \\ 
  +1.47   & \pm 0.1926  & z^{-15} & - 1.847  & \pm 0.20771  & z^{-16} \\ 
  +0.6023 & \pm 0.06359 & z^{-17}\makebox[0pt][l]{.}
  \end{array}
\end{align*}

\end{document}

enter image description here


As your original proposal. Maybe not so aesthetic, but it also works.

enter image description here

\documentclass{article}
\usepackage{mathtools}
\usepackage[usestackEOL]{stackengine}
\stackMath

\begin{document}

\[
C(Z)=\frac{
\Longstack[l]{-0.5002 (\pm 0.1000)\,z^{-1} + 2.161 (\pm 0.1821)\,z^{-2} 
                -1.744 (\pm 0.1489)\,z^{-3} - 2.138 (\pm 0.2009)\,z^{-4} \\
                +2.0073 (\pm 0.2002)\,z^{-5} + 1.047 (\pm 0.1986)\,z^{-6} 
                -1.124  (\pm 0.1978)\,z^{-7} - 2.1009(\pm 0.2176)\,z^{-8} \\
                +0.1732 (\pm 0.1959)\,z^{-9} + 2.305 (\pm 0.2109)\,z^{-10} 
                +0.7807 (\pm 0.1846)\,z^{-11}- 1.436 (\pm 0.225 )\,z^{-12} \\
                -2.605  (\pm 0.2003)\,z^{-13}+ 2.405 (\pm 0.2306)\,z^{-14} 
                +1.517  (\pm 0.1872)\,z^{-15}- 2.244 (\pm 0.1778)\,z^{-16} \\ 
                +0.6634 (\pm 0.05466)\,z^{-19}}
                }
                {
\Longstack[l]{1-2.738  (\pm 0.07274)\,z^{-1}+ 1.241 (\pm 0.2085)\,z^{-2} 
              +1.997  (\pm 0.1935)\,z^{-3} - 1.033 (\pm 0.2873)\,z^{-4} \\
              -0.2646 (\pm 0.3029)\,z^{-5} - 1.415 (\pm 0.2352)\,z^{-6} 
              +0.4815 (\pm 0.2701)\,z^{-8} + 1.313 (\pm 0.249 )\,z^{-8} \\
              +0.3993 (\pm 0.2877)\,z^{-9} - 0.7446(\pm 0.2492)\,z^{-10} 
              -1.7777 (\pm 0.2392)\,z^{-11}+ 1.443 (\pm 0.2471)\,z^{-12} \\
              -1.054  (\pm 0.2877)\,z^{-13}+ 0.7   (\pm 0.277719)\,z^{-14} 
              +1.47   (\pm 0.1926)\,z^{-15}- 1.847 (\pm 0.20771)\,z^{-16} \\
              +0.6023 (\pm 0.06359)\,z^{-17}}
              }
\]

\end{document}

Tags:

Equations