11

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

5
  • 1
    I would suggest to break the equation manually to control the output using an aligned environment and, the symbol & and \\. Have a look here
    – gnikit
    Apr 10, 2017 at 17:45
  • @nikjohn hi, i already tried, problem is the root square.
    – LuisPac
    Apr 10, 2017 at 17:52
  • 1
    why not using something like the alignat* from mathtools (or amsmath) package?
    – user31729
    Apr 10, 2017 at 17:56
  • @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
    – gnikit
    Apr 10, 2017 at 17:58
  • Do you know breqn? Jun 12, 2022 at 14:45

4 Answers 4

7

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

4
  • 1
    Exactly what I was suggesting (about the first part of your answer)!
    – GuM
    Apr 10, 2017 at 18:39
  • 1
    Great minds think together!
    – Bernard
    Apr 10, 2017 at 18:44
  • 1
    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
    Apr 10, 2017 at 18:52
  • 3
    @Mico: Not sure at all. That's the way I interpreted all those spurious { … }. Anyway, it's only a demo.
    – Bernard
    Apr 10, 2017 at 19:13
6

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}
5

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

5
  • 3
    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… :-)
    – GuM
    Apr 10, 2017 at 18:23
  • 1
    @GustavoMezzetti - I was not aware of that option since I do not usually encounter problems like this. It was a very helpful comment indeed
    – gnikit
    Apr 10, 2017 at 19:19
  • Thanks for all your answers, apparently the root squared be cant to break.
    – LuisPac
    Apr 11, 2017 at 1:51
  • @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?
    – L. F.
    Mar 4, 2019 at 10:39
  • good solution, align is creating (at least for me) new equation number per line Apr 9 at 12:04
0

I faced this situation today and the simplest solution is to use {align*} within the equation environment and double back slash \\ command at the location you want to start the next line. Although not automatic, it looks neat.

\begin{equation}
\begin{align*}
            \Pi( \phi,\eta)= \int_0^L \left[ N \cdot \Lambda^T \left( \frac{d \eta_0}{ds} - \theta \times \frac{d \phi_0}{ds} \right)+M \cdot \Lambda^T \frac{d \theta}{ds} \right]ds \\
        -\int_0^L \left( \bar{n} \cdot \eta_0 + \bar{m} \cdot \theta \right) ds = 0
\end{align*}
\end{equation}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .