# how to write a multi-row equation with a lot of material in each row

$\frac{1}{z^p}\left[ f(z)*\left( \frac{z^p - D z^{p+1}}{(1-z)^{2}} + \frac{\beta e^{i\theta}(D-1)z^{p+1}}{(1-z)^{2}}\right) \right]$

$=\frac{1}{z^p}\left[ f(z)*\left( z^p + \sum _{k=p+1}^{\infty} (k-p+1) z^k - D \sum _{k=p+1}^{\infty} (k-p) z^k +\beta e^{i\theta}(D-1)\sum _{k=p+1}^{\infty} (k-p) z^k\right) \right]$

$=\frac{1}{z^p}\left[ f(z)*\left( z^p + \sum _{k=p+1}^{\infty} z^k + (1- \beta e^{i \theta })(1-D) \sum _{k=p+1}^{\infty}k z^k +p(1-\beta e^{i\theta})(D-1)\sum _{k=p+1}^{\infty} z^k\right) \right]$

$=\frac{1}{z^p}\left[ f(z) + (1- \beta e^{i \theta })(1-D) \sum _{k=p+1}^{\infty}k \alpha _k z^k +p(1-\beta e^{i\theta})(D-1)\sum _{k=p+1}^{\infty} \alpha _k z^k \right]$

$=\frac{1}{z^p}\left[ zf^{'}(z) (1-D) - \beta e^{i\theta }(1-D)(zf^{'}(z)-pf(z)) + (1+pD-p)f(z) \right]$

• you need to use array... than you will be able to split the equation in multiple lines. Nov 11, 2014 at 13:44
• never put display environments one one after another, use align here (from amsmath package) also f^{'} should be f' Nov 11, 2014 at 13:56

Another amsmath possibility:

\documentclass{article}
\usepackage{amsmath}
\begin{document}

$\begin{split} \frac{1}{z^p}&\Bigl[ f(z)*\Bigl( \frac{z^p - D z^{p+1}}{(1-z)^{2}} + \frac{\beta e^{i\theta}(D-1)z^{p+1}}{(1-z)^{2}}\Bigr) \Bigr]\\[\jot] &{}=\frac{1}{z^p}\Bigl[ f(z)*\Bigl( z^p + \sum _{k=p+1}^{\infty} (k-p+1) z^k - D \sum _{k=p+1}^{\infty} (k-p) z^k\\ &\qquad {}+\beta e^{i\theta}(D-1)\sum _{k=p+1}^{\infty} (k-p) z^k\bigr)\Bigr] \\[\jot] &{}=\frac{1}{z^p}\Bigl[ f(z)*\Bigl( z^p +\\ & \qquad \sum _{k=p+1}^{\infty} z^k + (1- \beta e^{i \theta })(1-D) \sum _{k=p+1}^{\infty}k z^k +p(1-\beta e^{i\theta})(D-1)\sum _{k=p+1}^{\infty} z^k\Bigr) \Bigr] \\[\jot] &=\frac{1}{z^p}\Bigl[ f(z) + (1- \beta e^{i \theta })(1-D) \sum _{k=p+1}^{\infty}k \alpha _k z^k + p(1-\beta e^{i\theta})(D-1)\sum _{k=p+1}^{\infty} \alpha _k z^k \Bigr] \\[\jot] &=\frac{1}{z^p}\Bigl[ zf'(z) (1-D) - \beta e^{i\theta }(1-D)(zf'(z)-pf(z)) + (1+pD-p)f(z) \Bigr] \end{split}$

\end{document}

• would look better with the first line shoved left a bit. Nov 11, 2014 at 16:12
• @barbarabeeton I know, but was in a hurry:-) Can you suggest an edit? Nov 11, 2014 at 16:53
• it's pretty wide, so there's not much room to fiddle. two possibilities: in the first line, move the & just after the \Bigl[; or call mathtools instead of amsmath and wrap \mathllap around the same chunk. Nov 11, 2014 at 17:04
• @barbarabeeton done; it's a bit over full but I won't tell if you don't. Nov 11, 2014 at 17:27

You should use align here or align*, if you do not want to get the lines numbered. These environments are part of the package amsmath. You could load the package mathtools instead in order to move the first row to the left. Looks nicer in my eyes. Just adapt the [number] of \MoveEqLeft to your needs:

% arara: pdflatex

\documentclass{article}
\usepackage{mathtools}
\newcommand*{\e}{\mathrm{e}}

\begin{document}
\begin{align*}
\MoveEqLeft[4]\frac{1}{z^p}\biggl[ f(z)\biggl( \frac{z^p - D z^{p+1}}{(1-z)^{2}} + \frac{\beta\e^{i\theta}(D-1)z^{p+1}}{(1-z)^{2}}\biggr) \biggr]\\
&=\frac{1}{z^p}\biggl[ f(z)\biggl( z^p + \sum _{k=p+1}^{\infty} (k-p+1) z^k - D \sum _{k=p+1}^{\infty} (k-p) z^k\\
&\hphantom{{}=\frac{1}{z^p}\biggl[}+\beta \e^{i\theta}(D-1)\sum _{k=p+1}^{\infty} (k-p) z^k\biggr) \biggr]\\
&=\frac{1}{z^p}\biggl[ f(z)\biggl( z^p + \sum _{k=p+1}^{\infty} z^k + (1- \beta\e^{i \theta })(1-D) \sum _{k=p+1}^{\infty}k z^k\\
&\hphantom{{}=\frac{1}{z^p}\biggl[}+p(1-\beta\e^{i\theta})(D-1)\sum _{k=p+1}^{\infty} z^k\biggr) \biggr]\\
&=\frac{1}{z^p}\biggl[ f(z) + (1- \beta e^{i \theta })(1-D) \sum _{k=p+1}^{\infty}k \alpha_k z^k\\
&\hphantom{{}=\frac{1}{z^p}\biggl[}+p(1-\beta\e^{i\theta})(D-1)\sum _{k=p+1}^{\infty} \alpha _k z^k \biggr]\\
&=\frac{1}{z^p}\Bigl[ zf'(z) (1-D) - \beta\e^{i\theta}(1-D)(zf'(z)-pf(z))\\
&\hphantom{{}=\frac{1}{z^p}\biggl[}+(1+pD-p)f(z) \Bigr]
\end{align*}
\end{document}


• For the sake of simplicity, you could replace all instances of &\hphantom{{}=\frac{1}{z^p}\biggl[}+ with &\qquad.
– Mico
Nov 11, 2014 at 14:33
• @Mico Yes, I had that in the first version. But I did not like it that much. But a good information for the OP. Thanks. Nov 11, 2014 at 14:35

I suggest you make the following adjustments:

• Most importantly, use an align* environment instead of consecutive $...$ constructs. Use \qquad to indent the subsidiary lines of each equation.

• You have some redundant parentheses in several of the equations. Keep things as visually uncluttered as possible -- you only need one large pair, not two.

• The subscripts below the 8 [!] \sum symbols are wider than the symbol itself, leading to a lot of wasted (and probably undesirable) whitespace on either side of the summation signs. Encase the subscript terms in \mathclap{...} (a macro of the mathtools package) to keep this from happening.

• Don't use \left and \right to size the parentheses, as they'll give you parentheses that are too large, typographically speaking. Use \biggl and \biggr instead.

• Optional: Some people suggest (insist?!) that the letters for Euler's number e and the imaginary number i be typeset in an upright font. If you do so, it's handy to create macros called, say, \e and \im, for this purpose.

\documentclass{article}
\usepackage{mathtools}       % for '\mathclap' macro
\newcommand{\e}{\mathrm{e}}  % typeset Euler's number in upright font
\newcommand{\im}{\mathrm{i}} % ditto for the square root of -1

\begin{document}
\begin{align*}
\frac{1}{z^p}\, f(z)
&*\biggl[ \frac{z^p - D z^{p+1}}{(1-z)^{2}} + \frac{\beta\e^{\im\theta}(D-1)z^{p+1}}{(1-z)^{2}}\biggr] \\
&=\frac{1}{z^p}\, f(z)*\biggl[ z^p + \sum_{\mathclap{k=p+1}}^{\infty} (k-p+1) z^k - D \sum_{\mathclap{k=p+1}}^{\infty} (k-p) z^k\\
&\qquad +\beta \e^{\im\theta}(D-1)\sum_{\mathclap{k=p+1}}^{\infty} (k-p) z^k\biggr] \\
&=\frac{1}{z^p} \, f(z)*\biggl[ z^p + \sum_{\mathclap{k=p+1}}^{\infty} z^k + (1- \beta\e^{\im\theta})(1-D) \sum_{\mathclap{k=p+1}}^{\infty}k z^k\\
&=\frac{1}{z^p}\biggl[ f(z) + (1- \beta\e^{\im\theta})(1-D) \sum_{\mathclap{k=p+1}}^{\infty}k \alpha_k z^k\\
&\qquad +p(1-\beta\e^{\im\theta})(D-1)\sum_{\mathclap{k=p+1}}^{\infty} \alpha _k z^k \biggr]\\
&=\frac{1}{z^p}\Bigl[ zf'(z) (1-D) - \beta\e^{\im\theta}(1-D)\bigl(zf'(z)-pf(z)\bigr)\\
\end{align*}
\end{document}

• I would much more prefer the "tails" aligned to the very right, which can be done by \\ && \mathllap{ blabla \biggr]}
– yo'
Nov 11, 2014 at 21:56
• @tohecz - I considered performing alignment on the right-hand ends, but then the big summation signs start tangling with each other unless one increases the interline distance considerably. (But if one increases the interline space, "visual holes" start to appear on the left.) Maybe doubling the indent of the secondary lines, i.e., going from \qquad to \qquad\qquad ("quadruple \quad"?!) would be a reasonable compromise...
– Mico
Nov 11, 2014 at 22:02
• ah ok I see, that'd be really bad.
– yo'
Nov 11, 2014 at 22:27

1. I didn't insert any explanatory text, you will have to do that yourself.

2. If the star * doesn't denote convolution, but rather standard multiplication, simply remove it, it's redundant and it can be even confusing.

The code follows:

\documentclass{article}

\usepackage{mathtools}

\begin{document}

We have that
\begin{multline*}
\frac{z^p - D z^{p+1}}{(1-z)^{2}} + \frac{\beta e^{i\theta}(D-1)z^{p+1}}{(1-z)^{2}}
\\
= z^p + \:\sum_{\mathclap{k=p+1}}^{\infty} (k-p+1) z^k - D \:\sum_{\mathclap{k=p+1}}^{\infty} (k-p) z^k
+\beta e^{i\theta}(D-1)\:\sum_{\mathclap{k=p+1}}^{\infty} (k-p) z^k
\\
= z^p + \:\sum_{\mathclap{k=p+1}}^{\infty}  z^k + (1-\beta e^{i \theta })(1-D) \:\sum_{\mathclap{k=p+1}}^{\infty}k z^k
+p(1-\beta e^{i\theta})(D-1)\:\sum_{\mathclap{k=p+1}}^{\infty} z^k
\end{multline*}
and
\begin{multline*}
f(z)*\biggl(\! z^p + \:\sum_{\mathclap{k=p+1}}^{\infty}  z^k + (1-\beta e^{i \theta })(1-D) \:\sum_{\mathclap{k=p+1}}^{\infty}k z^k
+ p(1-\beta e^{i\theta})(D-1)\:\sum_{\mathclap{k=p+1}}^{\infty} z^k \biggr)
\\
= f(z) + (1- \beta e^{i \theta })(1-D) \:\sum_{\mathclap{k=p+1}}^{\infty}k \alpha _k z^k
+ p(1-\beta e^{i\theta})(D-1)\:\sum_{\mathclap{k=p+1}}^{\infty} \alpha _k z^k
\\
= zf'(z) (1-D) - \beta e^{i\theta }(1-D)\bigl(zf'(z)-pf(z)\bigr) + (1+pD-p)f(z)
,\end{multline*}
therefore
\begin{multline*}
\frac{1}{z^p}\biggl[ f(z)*\Bigl( \frac{z^p - D z^{p+1}}{(1-z)^{2}} + \frac{\beta e^{i\theta}(D-1)z^{p+1}}{(1-z)^{2}}\Bigr) \biggr]
\\
=\frac{1}{z^p}\Bigl[ zf'(z) (1-D) - \beta e^{i\theta }(1-D)\bigl(zf'(z)-pf(z)\bigr) + (1+pD-p)f(z) \Bigr]
.\end{multline*}

\end{document}


If you use the geometry package and employ that package's default (or even narrower) margin settings, the equations all fit between the margins without having to break lines. Alternatively, you can use the medsize environment (from nccmath, ~80 % of \displaystyle):

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[showframe,nomarginpar]{geometry}
\usepackage{mathtools}

\newcommand*{\e}{\mathrm{e}}

\begin{document}

\begin{align*}
\MoveEqLeft[4]\frac{1}{z^p}\biggl[ f(z)\biggl( \frac{z^p - D z^{p+1}}{(1-z)²} + \frac{β \e^{iθ}(D-1)z^{p+1}}{(1-z)²}\biggr) \biggr]\\
&=\frac{1}{z^p}\biggl[ f(z)\biggl( z^p + ∑ _{k=p+1}^{∞} (k-p+1) z^k - D ∑ _{k=p+1}^{∞} (k-p) z^k+β \e^{iθ}(D-1)∑ _{k=p+1}^{∞} (k-p) z^k\biggr) \biggr]\\
&=\frac{1}{z^p}\biggl[ f(z)\biggl( z^p + ∑ _{k=p+1}^{∞} z^k + (1- β \e^{i θ })(1-D) ∑ _{k=p+1}^{∞}k z^k+p(1-β \e^{iθ})(D-1)∑ _{k=p+1}^{∞} z^k\biggr) \biggr]\\
&=\frac{1}{z^p}\biggl[ f(z) + (1- β e^{i θ })(1-D) ∑ _{k=p+1}^{∞}k α_k z^k + p(1-β \e^{iθ})(D-1)∑ _{k=p+1}^{∞} α _k z^k \biggr]\\
&=\frac{1}{z^p}\Bigl[ zf'(z) (1-D) - β \e^{iθ}(1-D)(zf'(z)-pf(z))+(1+pD-p)f(z) \Bigr]
\end{align*}

\end{document}


• I've taken the liberty of editing your explanation a bit to draw a bit more attention to assumption that geometry package is in use. Hope that's OK. Feel free to revert to initial explanation if you prefer it.
– Mico
Nov 11, 2014 at 19:16
• Thanks Mico! I wrote my answer too hastily. I must say that without geometry, the margins are really huge. I thought that geometry without any margin option produced more or less the default. Nov 11, 2014 at 19:20

Other option would be put the pages with extreme long equations/matrices in landscape. So the required example would become

\documentclass[a4paper,12pt]{article}
\usepackage{pdflscape}
\begin{document}
\begin{landscape}
$\begin{array}{lcc} \frac{1}{z^p}\left[ f(z)*\left( \frac{z^p - D z^{p+1}}{(1-z)^{2}} + \frac{\beta e^{i\theta}(D-1)z^{p+1}}{(1-z)^{2}}\right) \right] & = & \frac{1}{z^p}\left[ f(z)*\left( z^p + \sum _{k=p+1}^{\infty} (k-p+1) z^k - D \sum _{k=p+1}^{\infty} (k-p) z^k +\beta e^{i\theta}(D-1)\sum _{k=p+1}^{\infty} (k-p) z^k\right) \right] \\ \\ &=&\frac{1}{z^p}\left[ f(z)*\left( z^p + \sum _{k=p+1}^{\infty} z^k + (1- \beta e^{i \theta })(1-D) \sum _{k=p+1}^{\infty}k z^k +p(1-\beta e^{i\theta})(D-1)\sum _{k=p+1}^{\infty} z^k\right) \right] \\ \\ &=&\frac{1}{z^p}\left[ f(z) + (1- \beta e^{i \theta })(1-D) \sum _{k=p+1}^{\infty}k \alpha _k z^k +p(1-\beta e^{i\theta})(D-1)\sum _{k=p+1}^{\infty} \alpha _k z^k \right] \\ \\ &=&\frac{1}{z^p}\left[ zf^{'}(z) (1-D) - \beta e^{i\theta }(1-D)(zf^{'}(z)-pf(z)) + (1+pD-p)f(z) \right] \end{array}$
\end{landscape}
\end{document}


• What would be the advantage of typesetting these equations in \textstyle (the default mode in an array environment) rather than in \displaystyle (the default mode in an align envirnment)?
– Mico
Nov 11, 2014 at 15:13
• I'm desparate to find my PLEASE DO NOT DO THIS sign. Rotating equations is a very bad idea. The equation is supposed to be a part of some text, how would this fit in? You would put it on a separate page? Or what? I can't imagine how this can ever look reasonable.
– yo'
Nov 11, 2014 at 19:43
• I know it is not a recommended for scientific or official publications but is still an option... The pdf continue printable. Sometimes I prefer to flip a monoghraph rather than see data split in multiple lines. Nov 13, 2014 at 17:57