\documentclass[12pt]{article}
\usepackage{graphicx}
\usepackage{amssymb}
\textwidth = 6.5 in
\textheight = 9 in
\oddsidemargin = 0.0 in
\evensidemargin = 0.0 in
\topmargin =0 in
\headheight = 0.0 in
\headsep = 0.0 in
\parskip = 0.2in
\parindent = 0.0in

\begin{document}



\large 
\underline
{MA2160 \hspace{5mm}Calculus II with Technology \hspace{50mm} Ch. 7-5}

When estimating definite integrals, we have used the right and left hand rules.  Today, we will learn two new methods.

\Large
Goal
\large
\begin{enumerate}
\item Define the midpoint and trapezoid rules for approximating definite integrals
\item Determine when these rules produce an under or over estimate
\item Approximate definite integrals using the midpoint and trapezoid rules.

\end{enumerate}
When we first estimated the area under the curve, we summed the area of rectangle whose height was determined by either the right or left value of $x$ in the interval.  We called this the right-hand and left-hand sums.  We added the fact that you can take the average of these two sums to get a closer estimate of the actual area under the curve.  Geometrically speaking, taking this average uses the shape of a trapezoid to estimate the area under the curve.  The formula for this is just what you would expect ($n$ represents the number of subdivisions):

$$TRAP(n)=\frac{LEFT(n)+RIGHT(n)}{2}=\frac{b-a}{n}\left(y_0+2y_1+2y_2+...+2y_{n-1}+y_n\right)$$

Visualizing this using a graph of $y=x^2+2$ and $n=4$.

\begin{center}
\includegraphics[scale=.9]{x^2+2.pdf} 
\end{center}
\newpage
Another method of estimating the area under the curve is called the midpoint rule.  Instead of using the left or right hand values of $x$ in the interval, we use the midpoint of the interval.  Visualizing this with the same function, we get:

\begin{center}
\includegraphics[scale=.9]{x^2+2.pdf} 
\end{center}

We can compare the accuracy of the right and left hand sums by whether the function is increasing and decreasing and how steep the slope of the function is.  But how can we compare the accuracy of each of the midpoint and trapezoid rules to each other and to the true area under the curve?  The first step to realize that if the function is linear, both the midpoint and trapezoid formulas give the exact area under the curve.  Furthermore, we can take the rectangle formed by the midpoint rule and construct a trapezoid equal to its area with the slanted side coinciding with the tangent line to the graph.  Consequently, we get the following two rules.

$$MID(n)<\int\,f(x)\,dx<TRAP(n)\,\,\mathtt{when}\,f''(x)>0$$
$$TRAP(n)<\int\,f(x)\,dx<MID(n)\,\,\mathtt{when}\,f''(x)<0$$

The following graphs illustrate this point:
\newpage
\begin{center}
\includegraphics[scale=1.6]{x^2+2.pdf} 
\includegraphics[scale=1.6]{2x^3+1.pdf} 
\end{center}
As you can see the greater the concavity (absolute value of $f''(x)$), the greater the error.  Also, the absolute value of the error of the Trapezoid rule is approximately twice that of the error of the Midpoint rule (in one case exactly the same).  This fact will come in handy in the next section.
\end{document}