Matlab Continue Equation Output on Next Line

How continue an equation next line

Solution 1

I suggest using the multlined environment from mathtools to break the radicand . You also can choose not to break it, but to type in medsize (~80 % of \displaystyle) with the \mediummath command from nccmath. I took the opportunity to clean your code:

            \documentclass[11pt,a4paper,twocolumn]{article} \usepackage[utf8]{inputenc} \usepackage{mathtools, nccmath}  \begin{document}  \begin{equation*}     \bigl| \dot{r} \bigr| =     \sqrt{\begin{multlined}[b] -\!\bigl(e^{-t} ( \cos t + \sin t )\bigr)^2 + \\ \bigl(e^{-t} (\cos t + \sin t)\bigr)^2 + \bigl(-e^{-t}\bigr)^2 \end{multlined}} \end{equation*} \begin{align*}     \bigl| \dot{r} \bigr| & =     \sqrt{\medmath{ -\!\bigl(e^{-t} ( \cos t + \sin t )\bigr)^2 + \bigl(e^{-t} (\cos t + \sin t)\bigr)^2 + \bigl(-e^{-t}\bigr)^2}} \\          & = \sqrt{ -\!\bigl(e^{-t} ( \cos t + \sin t )\bigr)^2 + \bigl(e^{-t} (\cos t + \sin t)\bigr)^2 + \bigl(-e^{-t}\bigr)^2} \end{align*}  \end{document}                      

enter image description here

Solution 2

As the equation* environment doesn't permit line breaks, consider using a multline* environment. And, instead of creating a multi-line surd expression with a \sqrt instruction, I suggest you use (...)^{1/2} notation.

Two additional comments about your code: Do try to use \left and \right less frequently, and don't needlessly encase various terms in curly braces.

enter image description here

            \documentclass[11pt,a4paper,twocolumn]{article} \usepackage{amsmath} % for 'multline*' env. \begin{document} ... \hrule % just to illustrate column width \begin{multline*}     | \dot{r} | = \bigl\{     - e^{-t} ( \cos t + \sin t )^{2} \\     + e^{-t} ( \cos t + \sin t )^{2}     + (-e^{-t})^{2} \bigr\}^{1/2} \end{multline*} \end{document}                      

Solution 3

If you are interested in a square root expression and not a power notation that Mico's answer provides, have a look at the following code:

            \begin{equation*}     \left| \dot{r} \right| =     \sqrt{         \begin{aligned}         &{- \, {e}^{-t} \left( \cos t + \sin t \right)}^{2} \, + \, \\          &{{e}^{-t}  \left( \cos t + \sin t \right)}^{2} \, + \, {(- \, {e}^{-t})}^{2}         \end{aligned}            } \end{equation*}                      

Ouptut

enter image description here

Related videos on Youtube

Comments

  • How can continue the equation of the rectangle red in next line?

    \documentclass[11pt,a4paper,twocolumn]{article}  ...  \begin{equation*}     \left| \dot{r} \right| =     \sqrt{{- \, {e}^{-t} \left( \cos t + \sin t \right)}^{2} \, + \, {{e}^{-t} \left( \cos t + \sin t \right)}^{2} \, + \, {(- \, {e}^{-t})}^{2}} \end{equation*}                  

    enter image description here

    • I would suggest to break the equation manually to control the output using an aligned environment and, the symbol & and \\. Have a look here

    • @nikjohn hi, i already tried, problem is the root square.

    • why not using something like the alignat* from mathtools (or amsmath) package?

    • @Luis If breaking the two-column format just for this equation is not something you would like, you could have a look here as to how to break the square root into multiple lines and still look good

  • Perhaps you could enhance readability by adding a \quad at the beginning of the second line. Edit: Also note that the mathtools package provides a multlined environment (maybe you already knew… :-)

  • Exactly what I was suggesting (about the first part of your answer)!

  • Great minds think together!

  • Are you sure the entire term e^{-t}(\cos t + \sin t) should be squared? The OP's code seems to suggest that only (\cos t + \sin t) should be squared. (Of course, the OP's code might be in error...)

  • @Mico: Not sure at all. That's the way I interpreted all those spurious { … }. Anyway, it's only a demo.

  • @GustavoMezzetti - I was not aware of that option since I do not usually encounter problems like this. It was a very helpful comment indeed

  • Thanks for all your answers, apparently the root squared be cant to break.

  • @nikjohn Off-topic, but seems that the surd is not perfectly connected to the line in the "Ouptut." Is there a way to avoid this?

Recents

Related

johnsonbeting41.blogspot.com

Source: https://9to5science.com/how-continue-an-equation-next-line

0 Response to "Matlab Continue Equation Output on Next Line"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel