0

i need to include limits (lower and upper ) in the ``\middle|` to solution to an integration.

\begin{eqnarray}
 Area &=& \int_{-1}^{2}(7-x^2)dx \\
&=& \left[\left(7x-\frac{1}{3}x^3\right) \middle| \right] \\ % here is where i wish it to occur
&=& \left[7.2-\frac{1}{3}(8)\right]- \left[7(-1)-\frac{1}{3}(-1)\right] \\
&=& 18 
\end{eqnarray}
5
  • To the \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 use eqnarray.
    – daleif
    Oct 10, 2013 at 14:20
  • I've seen [...] and limits attached to the right bracket or ...| and limits attached to the bar; never brackets and bar.
    – egreg
    Oct 10, 2013 at 14:22
  • i am still new at this, so apart from eqnarray what do you recommend?
    – user38064
    Oct 10, 2013 at 14:37
  • [...]_{lower}^{upper}
    – daleif
    Oct 10, 2013 at 14:47
  • instead of eqnarray, look at split or align from amsmath. see eqnarray vs align. Oct 10, 2013 at 15:02

1 Answer 1

1

(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.

enter image description here

\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}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .