0

This question already has an answer here:

I have a very long equation. The MWE is:

    \documentclass[12pt, A4paper]{article}
    \usepackage{lipsum}
    \usepackage{amsmath}
    \usepackage[left=2cm, right=2cm, top=2cm,bottom=2cm]{geometry}

    \begin{document}

\lipsum[1]

    \begin{align*}
    \sqrt{A^{2}+4B^{2}\times {PC^R}^{2}+4AB\times{PC^R}}&=\sqrt{\sigma_{11}+\sigma_{55}M_{1i,t}^2+\sigma_{77}M_{2i,t}^2+2\sigma_{15}M_{1i,t}+2\sigma_{17}M_{2i,t}+\sigma_{57}M_{1i,t}M_{2,it}} \\
    &+\sqrt{4 PC^2\left[{\sigma_{22}+\sigma_{66}M_{1,it}^2+\sigma_{88}M_{2,it}^2+\sigma_{26}M_{1,it}+\sigma_{28}M_{2,it}+\sigma_{68}M_{1,it}M_{2,it}}\right]} \\
    &+\sqrt{PC\left[\sigma_{12}+\sigma_{16}M_{1,it}+\sigma_{18}M_{2,it}+\sigma_{52}M_{1,it}+\sigma_{56}M_{1,it}^2+\sigma_{58}M_{1,it}M_{2,it}\right]}\\
    &+\sqrt{PC\left[\sigma_{72}M_{2,it}+\sigma_{76}M_{2,it}M_{1,it}+\sigma_{78}M_{2,it}\right]}
    \end{align*}

\lipsum[1]    

    \end{document}

As you can notice the equation reaches the end of the page. I know that I could try to make some simplifications or I could even split the RHS in more bits, but this are options that for some peculiar reasons are not useful to be followed.

Any suggestion on how I can shrink the equation and align it to the body text? Thanks in advance.

marked as duplicate by Andrew, Community Aug 9 '18 at 0:47

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • have you tried the solution from tex.stackexchange.com/a/98350/12332 . it seems to solve a very similar problem. – ArTourter Aug 9 '18 at 0:30
  • Thanks. I used the solution in the thread indicated by @ArTourter and it worked. – Dario Aug 9 '18 at 0:47
0

This is similar to the solution in here but it moves the first line all the way to the left and the rest all the way to the right.

\documentclass[12pt, A4paper]{article}
    \usepackage{lipsum}
    \usepackage{mathtools}
    \usepackage[left=2cm, right=2cm, top=2cm,bottom=2cm]{geometry}

    \begin{document}

\lipsum[1]

    \begin{flalign*}
    \mathrlap{\sqrt{A^{2}+4B^{2}\times {PC^R}^{2}+4AB\times{PC^R}}} && \\
    &&&=\sqrt{\sigma_{11}+\sigma_{55}M_{1i,t}^2+\sigma_{77}M_{2i,t}^2+2\sigma_{15}M_{1i,t}+2\sigma_{17}M_{2i,t}+\sigma_{57}M_{1i,t}M_{2,it}} \\
    &&&+\sqrt{4 PC^2\left[{\sigma_{22}+\sigma_{66}M_{1,it}^2+\sigma_{88}M_{2,it}^2+\sigma_{26}M_{1,it}+\sigma_{28}M_{2,it}+\sigma_{68}M_{1,it}M_{2,it}}\right]} \\
    &&&+\sqrt{PC\left[\sigma_{12}+\sigma_{16}M_{1,it}+\sigma_{18}M_{2,it}+\sigma_{52}M_{1,it}+\sigma_{56}M_{1,it}^2+\sigma_{58}M_{1,it}M_{2,it}\right]}\\
    &&&+\sqrt{PC\left[\sigma_{72}M_{2,it}+\sigma_{76}M_{2,it}M_{1,it}+\sigma_{78}M_{2,it}\right]}
    \end{flalign*}

\lipsum[1]    

    \end{document}

demo

Not the answer you're looking for? Browse other questions tagged or ask your own question.