# Using \eqno in math mode

does anyone know, why do I keep getting this error message?

!You cant use '\eqno' in math mode.


..and it's pointing at this line in my code:

\left(\sqrt{x^4}\right)’ &=& \left(x^{[\frac{4}{5}\]}\right)’ &=& [\frac{4}{5}\]x^{[-\frac{1}{5}\]} &=& [\frac{4}{5\sqrt{x}\}] \label{rovnice3} \\


here's the whole array:

\begin{eqnarray}
\int_a^b f(x)\,\mathrm{d}x &=& -\int\limits_b^a f(x)\,\mathrm{d}x \label{rovnice2}\\
\left(\sqrt{x^4}\right)’ &=& \left(x^{[\frac{4}{5}\]}\right)’ &=& [\frac{4}{5}\]x^{[-\frac{1}{5}\]} &=& [\frac{4}{5\sqrt{x}\}] \label{rovnice3} \\    \overline{\overline{A \lor B}} &=& \overline{\overline{A} \land \overline{B}\label{rovnice4} \end{eqnarray}


• LatexGirl, please provide the community with minimal working example (MWE) that replicates your current problem. You problem may be solved using \mbox{\eqno..}, but without more detail it's difficult to say. Mar 26 '14 at 21:14
• I can't reproduce the error you mention. I can see problems with your code, though. 1. In the context you are using them, you don't need \  before ] or }. 2. You are missing a close brace in the last part of the equation. 3. You can only have two ampersands per line in an eqnarray. Mar 26 '14 at 21:24
• @IanThompson oh I just answered on four & but didn't spot the \] If you want to answer I'll delete mine, or I'll add that to mine, Mar 26 '14 at 21:27
• @DavidCarlisle --- I'm not sure my comment amounts to an answer, because I can't reproduce the original error. Let's wait and see what the OP says when she returns. Mar 26 '14 at 21:30

There are some issues:

• \] instead of ]. \] is the end of an unnumbered equation and interferes with the current environment.

• \} instead of }, also a missing }, both causing errors, because the group/argument braces are not properly nested.

•  instead of '. The short form of ^{\prime} is the ASCII apostrophe (decimal 37, hexadecimal 0x27).

• eqnarray only supports two &. Only the second equation line has more than one relational symbol, thus at most the first equal sign needs to be aligned.

The following example tries to fix the various issues. Also a variant with align of amsmath is added that also removes some unnecessary delimiters:

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{eqnarray}
\int_a^b f(x)\,\mathrm{d}x
&=&
-\int\limits_b^a f(x)\,\mathrm{d}x
\label{rovnice2}
\\
\left(\sqrt{x^4}\right)'
&=&
\left(x^{\left[\frac{4}{5}\right]}\right)'
=
\left[\frac{4}{5}\right]x^{\left[-\frac{1}{5}\right]}
=
\left[\frac{4}{5\sqrt{x}}\right]
\label{rovnice3}
\\
\overline{\overline{A \lor B}}
&=&
\overline{\overline{A} \land \overline{B}}
\label{rovnice4}
\end{eqnarray}

\begin{align}
\int_a^b f(x)\,\mathrm{d}x
&=
-\int\limits_b^a f(x)\,\mathrm{d}x
\label{rovnice2b}
\\
\left(\sqrt{x^4}\right)'
&=
\left(x^{\left[\frac{4}{5}\right]}\right)'
=
\frac{4}{5}x^{-\frac{1}{5}}
=
\frac{4}{5\sqrt{x}}
\label{rovnice3b}
\\
\overline{\overline{A \lor B}}
&=
\overline{\overline{A} \land \overline{B}}
\label{rovnice4b}
\end{align}
\end{document} • Thank you very much! I fixed the problems and now it's working as it should :) Mar 26 '14 at 22:10

Please always post complete documents but in an eqnarray you can only have two & per line you have

 &=& [\frac{4}{5}\]x^{[-\frac{1}{5}\]} &=& [\fr


so that is four &

But basically you should never use eqnarray always use align and similar environments from amsmath.

• There are other problems as well: Use of \] inside the environment; and no closing brace for the last \overline{` construction. Mar 26 '14 at 21:27