6

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.

2 Answers2

12
\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
9

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

karlkoeller
  • 124,410