# how to write maximize over multiple conditions

All,

I know how to write an equation if I am maximizing over one condition. For example,

$\max_{0 \leq x \leq 1} f(x)$


But I an not sure how to write it if I have to maximize the function over two conditions and I would like the second condition to appear below the first condition. Any help is appreciated.

-
Welcome to TeX.sx! You don't have to sign with your name since it automatically appears in the lower right corner of your post. A tip: If you indent lines by 4 spaces, they'll be marked as a code sample. You can also highlight the code and click the "code" button (with "{}" on it). –  egreg Oct 13 '11 at 23:16
are you referring to "\substack" ?? It worked, thanks. –  Srikanth Oct 13 '11 at 23:23
@egreg: Thanks for the suggestions. –  Srikanth Oct 13 '11 at 23:25

You can use \substack, provided by the amsmath package:

\documentclass{article}
\usepackage{amsmath}% http://ctan.org/pkg/amsmath
\begin{document}
$\max_{0 \leq x \leq 1} f(x)$

$\max_{\substack{0 \leq x \leq 1 \\ a \geq y \geq b}} f(x)$
\end{document}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​


It works similar to an array where multiple lines are separated using \\. Another alternative would be to use the \mathop - it produces the same result as above:

\documentclass{article}
\usepackage{amsmath}% http://ctan.org/pkg/amsmath
\begin{document}
$\mathop{\max_{0 \leq x \leq 1}}_{a \geq y \geq b} f(x)$
\end{document}​


\mathop makes it's argument an operator, which allows for the traditional limit placement using _ and/or ^ which adds it below/above the operator.

-
Thank you, very helpful!! –  Srikanth Oct 13 '11 at 23:40