5

I want to break this equation in multi-line but unable to get it!

\documentclass{article}
\usepackage{amsmath}
\DeclareMathOperator{\E}{E}
\begin{document}
\begin{multline*}
\P_t=
\frac{1}{2}\Bigl(m_t+v_t-u_t
+(\frac{1-\zeta }{2})(\frac{E_{t-1}m_t+\frac{1-\zeta }{2\zeta }E_{t- 
2}m_t+\frac{\zeta (1-\zeta )}{2(1+\zeta )}E_{t-2}P_{t-1}+\frac{\zeta } 
{2}P_{t-1}+\frac{\zeta }{1+\zeta }P_{t-2}}{(1+\zeta )}))\bigr\\
+\frac{(1-\zeta )}{4}\Bigl(\frac{E_{t-2}m_t+(\frac{\zeta }{2})(E_{t-2}P_{t- 
1}+P_{t-2})}{(1+\zeta )})\Bigr) \\
+\frac{\zeta }{4}(\Bigl((P_{t-1}+P_{t-2})\Bigr)
\end{multline*}
\end{document}

It's getting out of the mage, so I tired to break it but still it's not showing the correct showing. Can anyone help to identify the problem in coding? How to use breqn?

2
  • 1
    )\bigr\\ is applying bigr to \\ presumably you intended \bigr)\\ May 27 '19 at 7:34
  • I suggest you use the chktex program, which should be included in your distribution, to find unbalanced pairs of parentheses. May 27 '19 at 8:18
1

You overuse parentheses. If I've well understood your formula, here is a layout which fits on two lines, with the geometry package, to have more decent margins. Also, I prefer to use the medium-size fractions from nccmath for fractionary coefficients:

\documentclass{article}
\usepackage[showframe]{geometry}
\usepackage{amsmath, nccmath}
\DeclareMathOperator{\E}{E}

\begin{document}
\vspace*{2ex}
\begin{multline*}
\P_t=
\mfrac{1}{2}\biggl(m_t+v_t-u_t
+\frac{1-\zeta }{2}\,\frac{E_{t-1}m_t+\frac{1-\zeta }{2\zeta }E_{t-2}m_t+\frac{\zeta (1-\zeta )}{2(1+\zeta )}E_{t-2}P_{t-1}+\frac{\zeta }{2}P_{t-1} +\frac{\zeta }{1+\zeta }P_{t-2}}{1+\zeta}\biggr) \\
+\frac{1-\zeta }{4}\,\frac{E_{t-2}m_t+\frac{\zeta }{2}(E_{t-2}P_{t-1}+P_{t-2})}{1+\zeta} +\frac{\zeta }{4}(P_{t-1}+P_{t-2})
\end{multline*}

\end{document} 

enter image description here

4
  • Thanks, I got my mistake.
    – Henam
    May 27 '19 at 9:48
  • 1
    I think you should replace \P_t with P_t... And, since the preamble features the instruction \DeclareMathOperator{\E}{E}, you may also want to replace all intstances of E in the mathy material with \E.
    – Mico
    May 27 '19 at 10:57
  • Before suggesting making "more decent margins", please consider the final destination of the document. If it's submitted for publication in a journal, and the page size of the journal is too narrow to accommodate the display, you run the risk of having changes made in the editorial process possibly leading to a change in meaning or actual errors. Such formatting adjustments are much better made by the author. May 27 '19 at 11:53
  • @barbarabeeton: You're right, I should have added 'if wide margins are not required'. I'm not sure most people really need these very wide margins, unless they use marginal notes.
    – Bernard
    May 27 '19 at 13:05
4

I would simplify the formula first and then typeset it across three rows using an align* environment.

enter image description here

\documentclass{article}
\usepackage{amsmath}
\DeclareMathOperator{\E}{E}  % expectations operator

\begin{document}
\begin{align*}
P_t
&=\frac{1}{2}(m_t+v_t-u_t)
 +\frac{1}{4}\frac{1-\zeta}{1+\zeta}
  \biggl[\E_{t-1}m_t +\frac{1-\zeta}{2\zeta }\E_{t-2}m_t\\
&\quad +\frac{\zeta (1-\zeta)}{2(1+\zeta)}\E_{t-2}P_{t-1}
 +\frac{\zeta}{2}P_{t-1}+\frac{\zeta}{1+\zeta }P_{t-2}
 +\E_{t-2}m_t\\
&\quad +\frac{\zeta}{2} (\E_{t-2}P_{t-1}+P_{t-2})\biggr]
 +\frac{1}{4}\zeta (P_{t-1}+P_{t-2})
\end{align*}
\end{document}
1
  • 1
    That's a really cool way to represent it. Didn't think of it, thanks a lot!
    – Henam
    May 27 '19 at 11:25
4

After removing all unnecessary brackets, correcting size of used ones, with use nccmath for medium size fractions and changed lines of equation:

\documentclass{article}
\usepackage{nccmath}
%---------------- show page layout. don't use in a real document!
\usepackage{showframe}
\renewcommand\ShowFrameLinethickness{0.15pt}
\renewcommand*\ShowFrameColor{\color{red}}

\begin{document}
\begin{multline*}
P_t=
 \frac{1}{2}\Biggl(m_t+v_t-u_t           \\
    + \frac{1-\zeta }{2}\frac{E_{t-1}m_t 
    + \mfrac{1-\zeta}{2\zeta}E_{t-2}m_t
    + \mfrac{\zeta(1-\zeta)}{2(1+\zeta)}E_{t-2}P_{t-1}
    + \mfrac{\zeta}{2}P_{t-1} 
    + \mfrac{\zeta}{1+\zeta}P_{t-2}}
           {1+\zeta}\Biggr)                \\
+ \frac{1-\zeta}{4}
  \frac{E_{t-2}m_t + \frac{\zeta}{2}(E_{t-2}P_{t-1} 
    + P_{t-2})}{1+\zeta}  
    + \frac{\zeta }{4}\Bigl(P_{t-1}+P_{t-2}\Bigr)
\end{multline*}
\end{document}

enter image description here

(red lines indicate text borders)

3
  • Thanks a lot, it clearly answers my question.
    – Henam
    May 27 '19 at 9:47
  • I would replace \Pi_t with P_t...
    – Mico
    May 27 '19 at 11:19
  • @Mico, done! Thank you very much!
    – Zarko
    May 27 '19 at 11:33

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.