[Tex/LaTex] Writing equation in LaTeX: some part are thesterious to me :)

equationsmath-mode

I would like to write in LaTeX two equations:

equation1

and

enter image description here

I do not know how to do that…Particularly, how to write stuff underneath the max function. And also how to have this line over Wi or Wj.

PS: I do not ask for the whole equations, I am asking for the part that I do not know how to write in LaTeX :))

Best Answer

In the case of \max, the text below automatically. For other operators (like \int) or for inline formulas, you can use \limits. Longer text has to be in curly brackets:

\max\limits_{n_j \in succ(n_i)}

To get a line over your text, you can use \overline:

\overline{w_i}

Your formulas would be:

rank_u(n_i) = \overline{w_i} + \max\limits_{n_j \in succ(n_i)} (\overline{c_{ij}} + rank_u(n_j))
rank_d(n_i) = \max\limits_{n_j \in pred(n_i)} \{rank_d(n_j) + \overline{w_j} + \overline{c_{i,j}}\}

If you want to typeset rank and succ as an operator like max, you can either use \text{rank} from amsmath, or declare rank as a math operator (in your preamble):

\DeclareMathOperator{\rank}{rank}
\DeclareMathOperator{\successor}{succ}

Please note that I chose \successor over \succ, as this is already used for a math symbol.