Processing math: 100%
Skip to main content

Section 8.5 Simpson rule (n=2)

Take x0=a, x1=(a+b)/2 and x2=b. Then

w2=∫bax−a+b2b−a+b2x−ab−adx=b−a6=w0
and
w1=∫bax−aa+b2−ax−ba+b2−bdx=2b−a3.
Hence the method formula is
Q2(f,[a,b])=b−a6[f(a)+4f(a+b2)+f(b)].
Simpson rule error. From the Newton-Cotes error formula (recall that n is even and so we need to use the remainder for n=3), the error bound is given by
(b−a)524max[a,b]|f(4)(x)|∫20s(s−1)(s−2)(s−3)ds.
Hence,
|∫baf(x)dx−Q2(f,[a,b])|≤(b−a)590max[a,b]|f(4)(x)|.
After the usual decomposition procedure, we get finally that
|∫baf(x)dx−Q2,h(f,[a,b])|≤h4b−a90max[a,b]|f(4)(x)|.
Convergence Speed. The formula above shows that the truncation error of the Riemann sum is O(h4). Below we visualize this scaling law by evaluating the error in the computation of ∫20sin(x)dx with h=2−j,1≤j≤10. Due to the high convergence speed of this method, the round-off error shows already before h−3 but the error, before the round-off error kicks-off, goes down to about 10−15 (for a much larger h than it was possible with the previous methods).