Math & ScienceFormatting of multi equation assigned to one number

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
bazman
Posts: 78
Joined: Mon Jan 26, 2009 3:24 am

Formatting of multi equation assigned to one number

Post by bazman »

Hi there,

In the following I want all three equations to be assigned one number and that number should appear after the middle number.

Further the i > k appears as i "upside down ?" k? why is this

+ the sum in the first equation hus the subscript and superscript directly below and above the \sum, while in the last equaion which is formatted the same way they appear at the top and bottom corners?

Thanks

Baz

Code: Select all


\begin{equation}
i<k, t \leq T_i: \qquad df_k(t) = \sigma_k(t)f_k(t) \sum_{j=i+1}^k \frac{\rho_{k,j}\tau_j \sigma_j(t)f_j(t)}{1+\tau_jf_j(t)}dt +\sigma_k(t)f_k(f)dZ_k(t)  

i=k, t \leq T_i : \qquad df_k(t) = \sigma_k(t)f_k(f)dZ_k(t) 

i > k, t \leq T_i : \qquad df_k(t) = -\sigma_k(t)f_k(t) \sum_{j=k+1}^i \frac{\rho_{k,j}\tau_j \sigma_j(t)f_j(t)}{1+\tau_jf_j(t)}dt +\sigma_k(t)f_k(f)dZ_k(t) 
\end{equation} 

Recommended reading 2024:

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

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

gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Formatting of multi equation assigned to one number

Post by gmedina »

Hi,

you should do some basic reading about typesetting mathematical expressions. The amsmath user guide and the Mathmode document are "mandatory".

Yor code has several problems:

1) The equation environment used by itself is designed to typeset one-line equations. Of course, you can use it with a split or with a cases environment to write multiple line equations.
2) You shouldn't leave blank lines inside one of the environments designed to typeset mathematical formulae.

Now, you are obviously trying to do a definition by cases, so, you can use the cases environment provided by the amsmath package.

Take a look at the following variation of your code (I changed the margins of the document to achieve the right placement of the number):

Code: Select all

\documentclass{article}
\usepackage[margin=2.5cm]{geometry}
\usepackage{amsmath}

\begin{document}

\begin{equation}
  df_k(t) =
  \begin{cases}
    \sigma_k(t)f_k(t) \displaystyle\sum_{j=i+1}^k \frac{\rho_{k,j}\tau_j \sigma_j(t)f_j(t)}
      {1+\tau_jf_j(t)}dt +\sigma_k(t)f_k(f)dZ_k(t) &\text{if }i<k, t \leq T_i.\\
    \sigma_k(t)f_k(f)dZ_k(t) &\text{if }i=k, t \leq T_i .\\
    -\sigma_k(t)f_k(t) \displaystyle\sum_{j=k+1}^i \frac{\rho_{k,j}\tau_j \sigma_j(t)f_j(t)}
      {1+\tau_jf_j(t)}dt +\sigma_k(t)f_k(f)dZ_k(t) &\text{if }i > k, t \leq T_i.
  \end{cases}
\end{equation}

\end{document}
1,1,2,3,5,8,13,21,34,55,89,144,233,...
bazman
Posts: 78
Joined: Mon Jan 26, 2009 3:24 am

Re: Formatting of multi equation assigned to one number

Post by bazman »

Thank you so much, that is even prettier than the format I had in my head!
Post Reply