4

How do I define a equation e.g. x +y that shall be true for e.g. <5 and >0 in one equation? I was thinking of using a large brace, but I can't find any example of how to achieve this.

  • 1
    \begin{cases} j & k \\ u & p \end{cases} ?? – Sigur Jan 28 '15 at 13:36
  • Thanks :-) I'm a beginner, didn't know about that command. – Franz Kafka Jan 28 '15 at 13:44
8
\documentclass{article}
\usepackage{amsmath}

\begin{document}

    \[ x+y = \begin{cases} \mbox{true,} & \mbox{if } 0 < x < 5 \\ \mbox{false,} & \mbox{otherwise} \end{cases} \]

\end{document}

would give you:

enter image description here

  • 1
    also I'm not sure if there should be commas after true or false (in English) but there should be comma after <5 and perhaps a dot after otherwise. – daleif Jan 28 '15 at 14:09
8

Another solution with \dcases* from mathtools

\documentclass{article}
\usepackage{mathtools}

\begin{document}

\[ 
  x+y = 
  \begin{dcases*} 
  \text{true,} & if  $0 < x < 5$ \\ 
  \text{false,} & otherwise 
  \end{dcases*} 
\]

\end{document} 

Output

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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