Simpson's Rule is a method of approximating integrals in which one approximates a curve by a parabola.
Suppose that we integrate a function f over an interval [a,b].
We would like to find the parabola that passes through the points:
(a,f(a))
(b,f(b))
(2a+b,f(2a+b))
Translate this function so that the points are:
(−k,f(−k))
(0,f(0))
(k,f(k))
In this case, k=2b−a.
Suppose that our parabolic approximation is p(x)=Ax2+Bx+C.
Calculating the area under the curve p(x),
∫−kkp(x)dx=∫−kk(Ax2+Bx+C)dx
∫−kkp(x)dx=2∫0k(Ax2+C)dx
∫−kkp(x)dx=3k(2Ak2+6C)
Now notice that f(k)=Ak2+Bk+C, f(0)=C, and f(−k)=Ak2−Bk+C.
Thus, we show the following:
f(−k)+4f(0)+f(k)=2Ak2+6C
∫−kkp(x)dx=3k[f(−k)+4f(0)+f(k)]
Translating this function back to the interval [a,b],
∫abp(x)dx=6b−a[f(a)+4f(2a+b)+f(b)]
If one divides the interval [a,b] into 2n parts, one may take n parabolas: the kth parabola passes through the x-values x2k−2, x2k−1, and x2k for k=1,2,...,n.
If we call this integral approximation S2n, one obtains:
S2n=6nb−a(y0+4y1+2y2+4y3+2y4+...+2y2n−2+4y2n−1+y2n)
One may also find this through the weighted average of the trapezoidal and midpoint approximations:
S2n=31Tn+32Mn
The error bound in the Simpson's approximation is:
ES≤180n4K(b−a)5
where ∣f(4)(x)∣≤K for a≤x≤b.