help in writing equation

i would like to compile the below equation...whenever i compile, i get an error saying missing \$ inserted and missing } inserted. Where do i rectify it. I am using double column ieee conference and the equation number goes out of the column. Please help


\lefteqn{P_{n_i}(e,(t+1)) = p_{n_i}(e,t)+\eta_{n_i}[\bar{U}_{n_i}(e)-\bar{U}_{n_i}]p_{n_i}(e,t)} \label{eq:overall_pd}

• Do you have an , not shown in your example? Also, what is \lefteqn? I don't recognize the syntax. In general, it helps to provide a full minimum working example, starting with \documentclass to avoid guesswork. – Steven B. Segletes Apr 19 '16 at 11:02
• yes i have – roshni Apr 19 '16 at 11:03
• @campa: And eqnarray is horrible too (and outdated) ;-) – user31729 Apr 19 '16 at 11:15
• Additionally I would change the brackets [...] to \left[...\right] – JMP Apr 19 '16 at 11:15

It is not really clear, what you want to do as you have not given us an MWE. But here is how I would typeset this:

% arara: pdflatex

\documentclass{IEEEtran}
\usepackage{blindtext}
\usepackage{microtype}

\begin{document}
\blindtext
$$\label{eq:overall_pd} P_{n_i}\bigl(e,(t+1)\bigr) = p_{n_i}(e,t) +\eta_{n_i}\bigl[\bar{U}_{n_i}(e) -\bar{U}_{n_i}\bigr]p_{n_i}(e,t)$$
\Blindtext
\end{document}