I want to define a function so that even numbers will go somewhere and odd numbers will go somewhere else. How would I get LaTeX to do the curly bracket needed, one that has two rows?

Printable View

- October 9th 2009, 01:59 AMSwlabrBig curly bracket
I want to define a function so that even numbers will go somewhere and odd numbers will go somewhere else. How would I get LaTeX to do the curly bracket needed, one that has two rows?

- October 9th 2009, 04:23 AMTaluivren
Hi,

**f(n) = \begin{cases} n, & \mbox{if } n\mbox{ is even} \\ n+1, & \mbox{if } n\mbox{ is odd} \end{cases}**produces