Simpson's rule approximates the integral of some function *f*
over an
interval. It is very similar to the trapezoidal rule. Recall that the
formula
for Simpson's rule is the following:

(*h*/3)[*f*(*x*_{0}) +
4*f*(*x*_{1})
+ 2*f*(*x*_{2}) + ...
+4*f*(*x*_{n-1})
+ * f*(*x _{n}*)]

where *h* is the width of the subinterval (that is,
the
width divided by the number of subintervals *n*), and the
*x*_{0},
*x*_{1}, etc., are the points at the beginning and end of
each
subinterval. The constant multiples on the function values follow the
pattern
1, 4, 2, 4, ..., 4, 2, 4, 1.

Pick an even number of subintervals, and compute the width
of
each subinterval. (Simpson's rule only works if you use an even number
of subintervals.)
To approximate the integral of *f* from *a* to *b*
with
*n* subintervals, your width is
*h* = (*b*-*a*)/*n*,
just like for other techniques. Then enter a column with *x*
values and
a column with *y* values for your function. The *x* values
should
be in increments of *h* (see Filling Down in the Excel Tutorial
for help
with filling these in.)

For our example, we will approximate the integral of
*f*(*x*) = *x*^{2}
on the interval from 2 to 8, with *n* = 8. Thus
*h* = (8-2)/8
= 0.75 is our step size, and we will next set up an *x* column in
increments
of 0.75.