(Summary of comments.)
You can add the limits after the bracket using [...]_{lower}^{upper}
. Having both brackets and bar is at best unusual, so stick to one or the other.
Also as mentioned, eqnarray
should not be used, environments defined by amsmath
is preferred (see eqnarray vs align). Which environment to use depends on what type of numbering you prefer. align
gives you a number for each line, aligned
(or split
) inside an equation
gives you a single number for the whole group of equations, and align*
gives you no numbers at all.
I also used \text{...}
for Area
, and I added a thin space (\,
) before dx
.
\documentclass{article}
\usepackage{amsmath}
\begin{document}
Each step numbered:
\begin{align}
\text{Area} &= \int_{-1}^{2}(7-x^2)\,dx \\
&= \left[\left(7x-\frac{1}{3}x^3\right) \right]_{-1}^{2} \\
&= \left[7\cdot2-\frac{1}{3}(8)\right]- \left[7(-1)-\frac{1}{3}(-1)\right] \\
&= 18
\end{align}
One number for all:
\begin{equation}
\begin{aligned}
\text{Area} &= \int_{-1}^{2}(7-x^2)\,dx \\
&= \left[\left(7x-\frac{1}{3}x^3\right) \right]_{-1}^{2} \\
&= \left[7\cdot2-\frac{1}{3}(8)\right]- \left[7(-1)-\frac{1}{3}(-1)\right] \\
&= 18
\end{aligned}
\end{equation}
No numbers:
\begin{align*}
\text{Area} &= \int_{-1}^{2}(7-x^2)\,dx \\
&= \left[\left(7x-\frac{1}{3}x^3\right) \right]_{-1}^{2} \\
&= \left[7\cdot2-\frac{1}{3}(8)\right]- \left[7(-1)-\frac{1}{3}(-1)\right] \\
&= 18
\end{align*}
\end{document}
\middle
? I've never seen that syntax before. Here users write it as limits to the]
, i.e.]_1^2
. And BTW please don't useeqnarray
.[...]
and limits attached to the right bracket or...|
and limits attached to the bar; never brackets and bar.[...]_{lower}^{upper}
eqnarray
, look atsplit
oralign
fromamsmath
. see eqnarray vs align.