# Amsmath error occurs

I have error

! Missing } inserted. } l.9 { -1+2/[1+3\exp(-2|J|/k_BT)],& $T MWE \documentclass{article} \usepackage{amsmath} \begin{document} \begin{eqnarray} \label{eq:Cd} \tilde C(T)= \begin{cases} { -1+2/[1+3\exp(-2|J|/k_BT)],&$T<T_e$;\cr\cr 0,&$T\ge T_e$.\cr} \end{cases} \end{eqnarray} \end{document}  When i comment \usepackage{amsmath} there is no error. I can't understand how to fix it, without \usepackage{amsmath} commenting. - When I remove the brackets and the dollar signs, the document compiles with amsmath. – Andrew Uzzell Nov 28 '12 at 12:00 ## 1 Answer The problem is you are trying to use math inside math: $T<T_e$. Take off those$$: \documentclass{article} \usepackage{amsmath} \begin{document} \begin{eqnarray} \label{eq:Cd} \tilde C(T)= \begin{cases} -1+2/[1+3\exp (-2|J|/k_BT)], & T<T_e \\ 0,& T\ge T_e. \end{cases} \end{eqnarray} \end{document}  - correct, the $ signs are definitely not needed. a couple more suggestions: this would work as well (and perhaps better) with equation instead of eqnarray, and the final \ isn't needed at the end of cases (it would leave a probably-unwanted blank line). –  barbara beeton Nov 28 '12 at 13:55
Of course you are right, thank you for pointing it out, I just focused on the main issue with code compilation. –  fmonegaglia Dec 1 '12 at 9:24