TeX source:
f(x) = \left\{ \begin{array}{lll}  2 & \text { if } x < 0\\ 2x & \text  { if } 0 ≤ x < 2\\ 1 & \text { if } 2 < x \end{array} \right.