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

Last time we talked about the trapezoid and midpoint rules.  Today, we are going to analyze the error in both of these rules and come up with a means to further refine our approximation process.  This refinement we call Simpson's rule

\Large
Goal
\large
\begin{enumerate}
\item Define a third approximation called Simpson's rule.
\item Relate Simpson's rule to the Trapezoid and Midpoint rules.
\item Analyze the error on the approximations of Trapezoid, Midpoint, and Simpson's rule.

\end{enumerate}
From our example last time, we know that the trapezoid rule as well as the midpoint rule give us a close approximation to the area under the curve with the property when one is an over-estimate, the other is an under-estimate.  Today, we are going to define a third approximation Simpson's rule and then relate it to the previous two rules.

Both the trapezoid and midpoint rules approximate the area under the curve by use of lines (line connecting endpoints or tangent line).  However, if we use three points in an interval (right, left, and mid), we can approximate the area by use of a quadratic.  Using this technique is called Simpson's rule and deriving the formula yields the following equation:

$$\int_a^b\,f(x)\, dx=\frac{b-a}{6}\left( f(a)+4f \left( \frac{a+b}{2}\right)+f(b)\right)$$

This formula assumes a subdivision split in two equal halves between $a$ and $b$.  If we further divide the interval into any even $n$ subdivisions (yielding $\frac{n}{2}$ calculations), we get

$$Simp(n)=\frac{b-a}{3n}\left(y_0+4y_1+2y_2+4y_3+...+2y_{n-2}+4y_{n-1}+y_n \right)$$

Using a little algebraic manipulation, and the fact that Simpson's rule takes 2 subdivisions for one calculation, we get the equivalent formula:

\small
$$Simp(2n)=\frac{2Mid(n)+Trap(n)}{3}=\frac{b-a}{6n}\left(y_{_0}+4y_{_1}+2y_{_2}+4y_{_3}+...+2y_{_{2n-2}}+4y_{_{2n-1}}+y_{_{2n}} \right)$$

\large

where $n$ is the number of subdivisions used from the trapezoid and midpoint rules.

Next, let's turn our attention to finding and refining the error of these approximations.  One question to answer that helps determine accuracy is, "If you increase the number of subdivisions, by a factor of $n$, by what factor does the error decrease?"  Let's try to answer this question with the following example:. $y=\frac{1}{5}x^3+1$

\includegraphics[scale=.8]{2x^3+1.pdf}  \hspace{2mm}
\begin{tabular}{|c|c|c|c|}
\hline
Rule/Error($n$)& \hspace{2mm} 2 \hspace{2mm} &\hspace{2mm}  4 \hspace{2mm} & \hspace{2mm} 8 \hspace{2mm} \\
\hline
$Mid(n)$&&&\\
\hline
$Trap(n)$&&&\\
\hline
$Simp(n)$&&&\\
\hline

\end{tabular}


We see from this that for the trapezoid and midpoint rules that as the number of subdivisions increases by a factor of $n$, the error decreases by a factor of $\frac{1}{n^2}$.  The factor for decrease of the error for Simpson's rule is $\frac{1}{n^4}$.
\end{document}