# piece-wise functions in Tex/HTML

Discussion in 'General Computer Support' started by lou, Oct 7, 2006.

1. ### lou

Joined:
Oct 7, 2006
Messages:
2
0
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?

lou, Oct 7, 2006