# Simpson's Rule and Other Fourth-Order Quadrature Formulas

## September 11, 2014

Reading time ~4 minutes

## 1. Closed formulas

By dividing the closed interval $[a, b]$ into $N-1$ uniform subintervals with length of $h=(b-a)/(N-1)$, the extended Simpson’s rule is given by (1)

where $f_i = f(x_i)$ for $x_i = ih$, and $\xi$ is in $(a, b)$. The number of points, $N$, must be odd, meaning that there are even number of subintervals. This requirement is a consequence of the fact that the coefficients alternate in a specific pattern, namely there are $n$ pairs of $(4, 2)$ coefficient terms plus an extra $4$-coefficient term and two end-point terms. Therefore, there are $2n+3$ terms in total, while $2n+3$ is always odd.

To relax the constraint of odd number of points, which is important for situations when it is not convenient to freely choose the number of points such as in experiments or numerical simultaions, we can use

Note that the coefficients are no longer alternate except the first and last three terms. See Arif Zaman’s Note (2) for a derivation of the exact form of the error. Other non-alternate forms of fourth-order quadrature formulas are possible. An example from Wolfram Mathworld (3)

## 2. Open and semi-open formulas

Sometimes open and semi-open formulas are required. Below is a fourth-order open formula for $(0, N-1)$

And here is a fourth-order semi-open formula for $(0, N-1]$

Note that above formulas share the same discrete scheme as the closed formulas.

## Reference

1. Press, W. H.; Teukolsky, S. A.; Vetterling, W. T.; Flannery, B. P. Numercial Recipes: The Art of Scientific Computing; 3rd ed.; Cambridge University Press: Cambridge, 2007.
2. Arif Zaman’s Note
3. An example from Wolfram Mathworld
Updated on

### Weak Inhomogeneity Expansion in Polymer Field Theory

This report give a detail derivation of the weak inhomogeneity expansion for the continuous Gaussian chain model of a homopolymer in an external field. Continue reading

#### Test PolyFTS with Polyorder

Published on April 10, 2015

#### Polyorder Configuration File

Published on April 06, 2015