Piecewise functions

Piecewise functions

by Domingo Litong -
Number of replies: 1

I am using Moodle and it has the pi button to do math.  Unfortunately, it doesn't have the template for piecewise functions.  How do I resolve this case?

Average of ratings: -
In reply to Domingo Litong

Re: Piecewise functions

by Mauno Korpelainen -

Which renderer is it?

For example in latex you can use something like

f(x) = \left\{ \begin{array}{lr} 1 & : x \in \mathbb{Q}\\ 0 & : x \notin \mathbb{Q} \end{array} \right.

to render

  $$ f(x) = \left\{ \begin{array}{lr} 1 & : x \in \mathbb{Q}\\ 0 & : x \notin \mathbb{Q} \end{array} \right. $$