TeX source:
f(x) = /begin{cases} 3x+1, & x /le 1 / x^2-2x+2, & x >1 /end{cases}