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 = ax2 + bx + c

passing through the points (-x,y0), (0,y1), and (x,y2). There is a unique solution for a, b, and c generated by the three equations:

y0 = a(-x)2 + b(-x) + c

y1 = c

y2 = 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 y0 + 4y1 + y2 and so

For the adjoining parabola, y2 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 yi'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