Undefined control sequence in equation caption

captionserrorsundefined

  \begin{equation}

 \centering \Large \textbf{$\lambda_{c} = \frac{18.64}{B \times E^{2} }$ }

 \label{eq1:Critical wavelength}
 \end{equation}
\begin{center}
\captionof
{equation}{where B is the bending magnet magnetic  field ( B = 1T ) , E is the energy of the booster}
\end{center}

Best Answer

Making a test document from your fragment

\documentclass{article}

\begin{document}

\begin{equation}

 \centering \Large \textbf{$\lambda_{c} = \frac{18.64}{B \times E^{2} }$ }

 \label{eq1:Critical wavelength}
 \end{equation}
\begin{center}
\captionof
{equation}{where B is the bending magnet magnetic  field ( B = 1T ) , E is the energy of the booster}
\end{center}

\end{document}

Produces the error

! Missing $ inserted.
<inserted text> 
                $
l.6 
    
? 

as blank lines are not allowed in math mode.

Deleting the blank lines you get

LaTeX Font Warning: Command \Large invalid in math mode on input line 6.   

so deletimg \Large

you get

! Undefined control sequence.
l.10 \captionof

as \captionof is defined by the caption or capt-of packages, but adding

\usepackage{capt-of}

defines \captionof command but as equations captioning is not set up you get

! Undefined control sequence.
<write> \@writefile{\ext@equation 
                                  }{\protect \contentsline {equation}{\prote...
l.14 \end{document}
                   
? 

as the equation already has an equation number it is hard to guess what formatting you would want for a separately numbered caption, so I suggest deleting this. Also \centering and \textbf are doing nothing in this context, so I think you want:

enter image description here

\documentclass{article}

\begin{document}

Some text
\begin{equation}
 \lambda_{c} = \frac{18.64}{B \times E^{2} }
 \label{eq1:Critical wavelength}
 \end{equation}
where $B$ is the bending magnet magnetic  field ($B = 1T$),
$E$ is the energy of the booster.


\end{document}