Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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.

share|improve this question
    
    
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

1 Answer 1

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}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​

Substack as limits

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.

share|improve this answer
    
Thank you, very helpful!! –  Srikanth Oct 13 '11 at 23:40

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.