piece-wise functions in Tex/HTML

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

  1. lou


    Oct 7, 2006
    Likes Received:
    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
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.