[Tex/LaTex] Error using line break in ‘cases’ environment

casestexmaker

I'm trying to display quite a simple 'cases' type equation in Texmakerx, but it appears to be ignoring the \\ and & uses.

\documentclass[journal]{IEEEtran}
\usepackage{graphicx}
\usepackage{subfigure}
\usepackage[T1]{fontenc}
\usepackage{amsfonts}

\begin{document}

\begin{equation}
  f_i^* = 
  \begin{cases}
    \frac{4}{9}  &  i = 0 \\ 
    \frac{1}{9}  &  i = 1,2,3,4 \\ 
    \frac{1}{36} &  i = 5,6,7,8 
  \end{cases}
\end{equation}

\end{document}

When I display it in http://www.codecogs.com/latex/eqneditor.php it works just fine

But Texmakerx and pdflatex give me the whole thing on a single line and with no spaces between the terms. (Would post a picture to clarify, but it won't let me)

I'm using Texmakerx, MikTek, and pdflatex on windows 7. Any ideas?

Thanks in advance for your patience with a newbie!

Best Answer

You want \usepackage{amsmath} not \usepackage{amsfonts}