Example 3.  Consider the integration of the function    over  .  Use exactly five function evaluations and compare the results from the composite trapezoidal rule, composite Simpson rule, and Boole’s rule.  Use the uniform step size  .

Composite Trapezoidal Rule                                            Composite Simpson’s Rule

Boole’s Rule

Solution 3.

``````

```

```

Using the Composite Trapezoidal Rule:

Mathematica's Computation is:

``````
```

```

Using the Composite Simpson’s Rule:

Mathematica's Computation is:

``````
```

```

Using Boole’s Rule:

Mathematica's Computation is:

``````
```

```

The true value of the definite integral is

``````

```

```

We see that the approximation  1.30938  from Simpson’s rule is much better than the value  1.28358  obtained from the trapezoidal rule.  Again, the approximation  1.30859  from Boole’s rule is closest.  Graphs for the areas under the trapezoids and parabolas are shown in the figures for this example.

(c) John H. Mathews 2004