Simpson's 1/3 Rule for Integration

As the trapezoidal rule for integration finds the area under the line
connecting the endpoints of a panel, Simpson's rule finds the area under
the parabola which passes through 3 points (the endpoints and the midpoint)
on a curve. In essence, the rule approximates the curve by a series of
parabolic arcs and ** the area under the parabolas is approximately
the area under the curve.** There is a unique curve with the equation

y = ax^{2} + bx + c

passing through the points (-x,y_{0}), (0,y_{1}), and
(x,y_{2}). There is a unique solution for a, b, and c generated
by the three equations:

y_{0} = a(-x)^{2} + b(-x) + c

y_{1} = c

y_{2} = a(x)^{2} + b(x) + c

The area under the curve from -x to x is

but the part in the square brackets can be rewritten as y_{0}
+ 4y_{1} + y_{2} and so

For the adjoining parabola, y_{2} is a collocation point; it
is evaluated twice. The number of collocation points is one less than the
number of parabolas. The series of coefficients for the y_{i}'s
for N points then is

i | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | ... | N-3 | N-2 | N-1 |

coeff. | 1 | 4 | 2 | 4 | 2 | 4 | 2 | 4 | ... | 2 | 4 | 1 |