Simpson's Rule calculation for the integral, A_{n}, where h is the sampling interval, is given by the recurrence relation: A_{n}=A_{n-2}+h(y_{n-2}+4y_{n-1}+y_{n})/3 for n>2 with A_{0}=0. For an even number of points, Simpson's 4/3 rule is used for the final three slices i.e. A_{n}=A_{n-3}+3h/8(y_{n-3}+3y_{n-2}+3y_{n-1} +y_{n})