Math & ScienceNumbering Aligned Equations, and writing under Min

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
amegahed3
Posts: 15
Joined: Wed Feb 25, 2009 11:20 am

Numbering Aligned Equations, and writing under Min

Post by amegahed3 »

Hi All,

I'm a beginner in Latex, and I have the following 3 questions:

1. The following code writes my equations in the exact same way I want them to appear. The only thing left is that I need to have each equation numbered by a separate number instead of just one number for the three equations, as the case now. What shall I do? the code is:

Code: Select all

\begin{equation}
\begin{aligned}
\mbox{min}  ~~ ~~ &\sum \limits_{s \in S} C_s F_s  +  \sum \limits_{(i,j) \in A} \sum \limits_{t \in T} K_{ijt} (\omega)\\
\mbox{s.t.} ~~ ~~ &\sum \limits_{s \in S} a_{ijts} F_{s} + K_{ijt} (\omega) \geq l_{ijt}(\omega) ~~ \forall (i,j) \in A,~~ \forall t \in T\\
& F_{s}, K_{ijt} (\omega) \in \mathbb{Z}_{+}\\
\end{aligned}
\end{equation}
2. In the previous code as well, how can I align the equations to the left, instead of centered? So, I want their relative alignment the same as they appear now, but I want them all to begin from the left, not from the center. How can that be done?

3. I wanna write x \in X under Min. How can that be done, given that this is inside the equation? So, my code is:

Code: Select all

\begin{equation}
\begin{aligned}
Min_{x \in X} ~~     \{ g(x):=c^{T}x+E [ Q(x, \xi(\omega))]\}\\
Q(x,\xi):=inf_{y \in Y} \{q^{T}y:Wy \geq h-Tx\}\\
\end{aligned}
\end{equation}
Where that code writes x \in X as a subscript of Min, but I want it under Min. I tried \limits, but seems like it just works with math stuff (like \sum). Any ideas?

Any help will be really appreciated!

Thanks in advance!

Aly

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
User avatar
Stefan Kottwitz
Site Admin
Posts: 10290
Joined: Mon Mar 10, 2008 9:44 pm

Numbering Aligned Equations, and writing under Min

Post by Stefan Kottwitz »

Hi Aly,
  1. Use the align environment instead of equation and aligned:

    Code: Select all

        \begin{align}
        \mbox{min}  ~~ ~~ &\sum \limits_{s \in S} C_s F_s  +  \sum \limits_{(i,j) \in A} \sum \limits_{t \in T} K_{ijt} (\omega)\\
        \mbox{s.t.} ~~ ~~ &\sum \limits_{s \in S} a_{ijts} F_{s} + K_{ijt} (\omega) \geq l_{ijt}(\omega) ~~ \forall (i,j) \in A,~~ \forall t \in T\\
        & F_{s}, K_{ijt} (\omega) \in \mathbb{Z}_{+}
        \end{align}
    
  2. You could use the flalign environment:

    Code: Select all

        \begin{flalign}
        \mbox{min}  ~~ ~~ &\sum \limits_{s \in S} C_s F_s  +  \sum \limits_{(i,j) \in A} \sum \limits_{t \in T} K_{ijt} (\omega)&\\
        \mbox{s.t.} ~~ ~~ &\sum \limits_{s \in S} a_{ijts} F_{s} + K_{ijt} (\omega) \geq l_{ijt}(\omega) ~~ \forall (i,j) \in A,~~ \forall t \in T&\\
        & F_{s}, K_{ijt} (\omega) \in \mathbb{Z}_{+}&
        \end{flalign}
    
    or the fleqn option for the whole document.
  3. Declare Min as operator:

    Code: Select all

    \DeclareMathOperator*{\Min}{Min}
Stefan
LaTeX.org admin
amegahed3
Posts: 15
Joined: Wed Feb 25, 2009 11:20 am

Re: Numbering Aligned Equations, and writing under Min

Post by amegahed3 »

Thanks a lot, Stefan. All your tricks worked perfectly. Thanks.

Aly
Post Reply