Math & ScienceSplit a Formula

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
elisamars
Posts: 3
Joined: Mon Oct 31, 2011 12:21 pm

Split a Formula

Post by elisamars »

Hy..I have some problem in splitting this formula..does anybody know how it should be done?

Code: Select all

\begin{equation*}
P(t,s,r)= \exp\left[\frac{1}{\alpha} (1- \exp \left(- \alpha (s-t)\right) (R(\infty)- r) -(s-t) R(\infty)- 
\frac{\rho ^2}{4 \alpha^3}(1- \exp \left(- \alpha (s-t)\right ))^2 \right]
\end{equation*}
Searching on the web I've found some good example, but I don't know why they work on my LaTeX in general, but not applied to this equation. Can someone try to split my formula?

Thanks a lot.

Elisa
Last edited by localghost on Tue Nov 01, 2011 5:45 pm, edited 3 times in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

Split a Formula

Post by Stefan Kottwitz »

Hi Elisa,

use a multi-line equation environment of amsmath, such as align, split or multline. For example:

Code: Select all

\begin{multline*}
  P(t,s,r)= \exp\bigg[\frac{1}{\alpha} (1- \exp
      \left(- \alpha (s-t)\right) (R(\infty)- r) -(s-t) R(\infty)\\
  -\frac{\rho ^2}{4 \alpha^3}(1- \exp \left(-
      \alpha (s-t)\right ))^2 \bigg]
\end{multline*}
or

Code: Select all

\begin{equation*}
  \begin{split}
    P(t,s,r)&= \exp\bigg[\frac{1}{\alpha} (1- \exp
        \left(- \alpha (s-t)\right) (R(\infty)- r) -(s-t) R(\infty)\\
    &\quad- \frac{\rho ^2}{4 \alpha^3}(1- \exp \left(-
        \alpha (s-t)\right ))^2 \bigg]
  \end{split}
\end{equation*}
Note, matching \left and \right delimiters need to be on the same line, that's why I used \bigg[ and \bigg] instead, as the expressions spans over two lines.

Stefan
LaTeX.org admin
elisamars
Posts: 3
Joined: Mon Oct 31, 2011 12:21 pm

Re: Split a Formula

Post by elisamars »

Great! Thanks a lot!!
Post Reply