Example 2.  Consider the integration of the function    over the fixed interval  .  Apply the various formulas (4) through (7).

Trapezoidal Rule                                                Simpson’s Rule

Simpson’s 3/8 Rule                                                Boole’s Rule

Solution 2.

``````

```

```

For the trapezoidal rule using   we compute:

Using (8) the Trapezoidal Rule:

Mathematica's Computation is:

``````
```

```

For Simpson’s rule using   we compute:

Using (9) Simpson’s Rule:

Mathematica's Computation is:

``````
```

```

For Simpson’s rule using   we compute:

Using (10) Simpson’s Rule:

Mathematica's Computation is:

``````
```

```

For Boole’s rule using   we compute:

Using (11) Boole’s Rule:

Mathematica's Computation is:

``````
```

```

The true value of the definite integral is

``````

```

```

We see that the approximation  1.30859  from Boole’s rule is best. The area under each of the Lagrange polynomials  , , , and   are shown in the figures for this example.

(c) John H. Mathews 2004