Velocity Reviews > piece-wise functions in Tex/HTML

# piece-wise functions in Tex/HTML

lou
Junior Member
Join Date: Oct 2006
Posts: 1

 10-07-2006
I am trying to display a piece-wise funciton using Tex in an html editor but cannot get it to display correctly. I tried the following:

$$f(n) = \begin{cases} n/2, & \mbox{if }n\mbox{ is even} \\ 3n+1, & \mbox{if }n\mbox{ is odd} \end{cases}$$

Is there any other way I can display a piece-wise function using an HTML editor?