The trapezoidal rule approximates the integral of some function *f*
over some interval. Recall that the formula for the trapezoidal rule is the
following:

(*h*/2)[*f*(*x*_{0}) + 2*f*(*x*_{1})
+ 2*f*(*x*_{2}) + ... +2*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.

To carry out the trapezoidal rule in Excel, do the following:

Pick the number of subintervals, and compute the width of each
subinterval. To approximate the integral of *f* from *a* to *b*
with *n* subintervals, your width is *h* = (*b*-*a*)/*n*.
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* = 5. Thus *h* = (8-2)/5
= 1.2 is our step size, and we will next set up an *x* column in increments
of 1.2.