logo

Simpson's Rule 📂Numerical Analysis

Simpson's Rule

Definition

20190611_151154.png

Let f:[a,b]Rf : [a,b] \to \mathbb{R} be integrable on [a,b][a,b] and divide [a,b][a,b] into nodes with equal intervals of h:=ban\displaystyle h:= {{b-a} \over {n}} like a=x0<<xn=ba = x_{0} < \cdots < x_{n} = b. Then, the numerical integration operator In2I_{n}^{2} defined as follows is called the Simpson’s Rule. In2(f):=k=1n/2h3[f(x2k2)+4f(x2k1)+f(x2k)] I_{n}^{2} (f) := \sum_{k=1}^{n/2} {{h} \over {3}} \left[ f(x_{2k-2}) + 4 f( x_{2k-1} ) + f(x_{2k} ) \right]

Theorem

Let us denote fC4[a,b]f \in C^4 [a,b]. The error E12E_{1}^{2} and the asymptotic error E~n2\tilde{E}_{n}^{2} of Simpson’s Rule are as follows:

  • [1]: E12(f)=h590f(4)(ξ)E_{1}^{2} (f) = - {{h^5} \over {90}} f^{(4)} ( \xi )
  • [2]: E~n2(f)=h4180[f(3)(b)f(3)(a)]\tilde{E}_{n}^{2} (f) = - {{ h^4 } \over {180}} [ f^{(3)} (b) - f^{(3)} (a) ]

Explanation

Expanding In2(f)I_{n}^{2} (f) gives the following. In2(f)=h3[f(x0)+4f(x1)+2f(x2)+4f(x3)+2f(x4)++2f(xn2)+4f(xn1)+f(xn)] \begin{align*} I_{n}^{2} (f) =& {{h} \over {3}} [ f(x_{0}) + 4 f ( x_{1} ) + 2 f( x_{2} ) + 4 f ( x_{3} ) + 2 f ( x_{4} ) + \cdots \\ & + 2 f (x_{n-2} ) + 4 f ( x_{n-1} ) + f(x_{n} ) ] \end{align*} Unlike the Trapezoidal Rule which uses linear interpolation to compute the numerical integration of the definite integral I(f)=abf(x)dx\displaystyle I (f) = \int_{a}^{b} f(x) dx, this method employs quadratic interpolation.

A point to note is that the error is computed as E12(f)=h590f(4)(ξ)\displaystyle E_{1}^{2} (f) = - {{h^5} \over {90}} f^{(4)} ( \xi ), indicating that even if an 22th order interpolation is performed for integration, if ff is a polynomial of degree 33 or less, the error exactly becomes 00.

Proof 1

[1]

Strategy: Since the quadratic function is the quadratic interpolation of the given function, properties of polynomial interpolation can be utilized.


For convenience, let’s denote c:=(a+b2)\displaystyle c:= \left( {{a+b} \over {2}} \right). I12(f):=(ba6)[f(a)+4f(c)+f(b)] I_{1}^{2} (f) := \left( {{ b - a } \over { 6 }} \right) \left[ f(a) + 4 f \left( c \right) + f(b) \right] This approximates I(f)I(f) as the integral of the function obtained by performing quadratic interpolation over the interval [a,b][a,b].

Newton’s Divided Differences Formula: pn(x)=i=0nf[x0,,xi]j=0i1(xxj)p_{n} (x) =\sum_{i=0}^{n} f [ x_{0} , \cdots , x_{i} ] \prod_{j=0}^{i-1} (x - x_{j} )

Given three points a,c,b\displaystyle a , c , b and for all x[a,b]x \in [a,b], E12(f):=I(f)I12(f)=ab[f(x)p2(x)]dx=ab[p2+1(x)p2(x)]dx=ab(xa)(xc)(xb)f[a,c,b,x]dx \begin{align*} \displaystyle E_{1}^{2} (f) :=& I(f) - I_{1}^{2} (f) \\ =& \int_{a}^{b} \left[ f(x) - p_{2} (x) \right] dx \\ =& \int_{a}^{b} \left[ p_{2+1} (x) - p_{2} (x) \right] dx \\ =& \int_{a}^{b} (x-a)(x-c)(x-b) f [a,c,b,x] dx \end{align*} Let’s define ww as follows. w(x):=ab(ta)(tc)(tb)dt w(x) := \int_{a}^{b} (t-a)(t-c)(t-b) dt Since (ta)(tc)(tb)(t-a)(t-c)(t-b) is an odd function centered at t=ct = c, w(b)=0w(b)=0, and the integral turns out to be 00 if both ends are equal, w(a)=0w(a) = 0. Then, according to the partial integration and the differentiation formulas for divided differences, E12(f)=abw(x)f[a,c,b,c]dx=[w(x)f[a,c,b,x]]ababw(x)ddxf[a,c,b,x]dx=abw(x)f[a,c,b,x,x]dx \begin{align*} \displaystyle E_{1}^{2} (f) =& \int_{a}^{b} w’(x) f [a,c,b,c] dx \\ =& \left[ w(x) f [ a,c,b, x] \right]_{a}^{b} - \int_{a}^{b} w(x) {{d} \over {dx}} f [a,c,b,x] dx \\ =& - \int_{a}^{b} w(x) f [a,c,b,x,x] dx \end{align*} By the Fundamental Theorem of Calculus, since w(x)0w(x) \ge 0, we can use the Mean Value Theorem for Integrals.

Mean Value Theorem for Integrals: If a function ff is continuous on the closed interval [a,b][a,b] and w(x)0w(x) \ge 0 is integrable, then there exists at least one η\eta in [a,b][a,b] satisfying abf(x)w(x)dx=f(η)abw(x)dx\displaystyle \int_{a}^{b} f(x) w(x) dx = f( \eta ) \int_{a}^{b} w(x) dx.

Furthermore, according to the properties of divided differences, E12(f)=f[a,c,b,η,η]abw(x)dx=f(4)(ξ)24[415h5]=h590f(4)(ξ) \begin{align*} \displaystyle E_{1}^{2} (f) =& - f [a,c,b,\eta,\eta] \int_{a}^{b} w(x) dx \\ =& - {{ f^{(4)} ( \xi ) } \over {24}} \left[ {{4} \over {15}} h^5 \right] \\ =& - {{h^5} \over {90}} f^{(4)} ( \xi ) \end{align*} some η,ξ[a,b] \eta , \xi \in [a,b] exists that satisfies the above.

Proof[2]

Strategy: Once the Riemann sums are derived, the rest naturally follows from the Fundamental Theorem of Calculus. However, since the Simpson’s rule involves addition like k=1n/2\displaystyle \sum_{k=1}^{n/2}, a trick of multiplying by 22\displaystyle {{2} \over {2}} is used in deriving the Riemann sums.


According to Theorem [1], the error between the actual I(f)I(f) and In2(f)I_{n}^{2} (f) is computed as follows for some ξk[x2(k1),x2k]\xi_{k} \in [x_{2(k-1)}, x_{2k} ]. En2(f)=I(f)In2(f)=k=1n/2(h590f(4)(ξk)) \begin{align*} \displaystyle E_{n}^{2} (f) =& I (f) - I_{n}^{2} (f) \\ =& \sum_{k=1}^{n/2} \left( - {{ h^5 } \over { 90 }} f^{(4)} ( \xi_{k} ) \right) \end{align*} Regarding this, limnEn2(f)h4=limn1h4k=1n/2(h590f(4)(ξk))=limn1h422k=1n/2(h590f(4)(ξk))=1180limnk=1n/22hf(4)(ξk)=1180limnk=1n/2ban/2f(4)(ξk)=1180abf(4)(x)dx=1180[f(3)(b)f(3)(a)] \begin{align*} \lim_{n \to \infty} {{ E_{n}^{2} (f) } \over { h^4 }} =& \lim_{n \to \infty} {{1} \over {h^4}} \sum_{k=1}^{n/2} \left( - {{ h^5 } \over { 90 }} f^{(4)} ( \xi_{k} ) \right) \\ =& \lim_{n \to \infty} {{1} \over {h^4}} {{2} \over {2}} \sum_{k=1}^{n/2} \left( - {{ h^5 } \over { 90 }} f^{(4)} ( \xi_{k} ) \right) \\ =& - {{ 1 } \over { 180 }} \lim_{ n \to \infty} \sum_{k=1}^{n/2} 2 h f^{(4)} ( \xi_{k} ) \\ =& - {{ 1 } \over { 180 }} \lim_{ n \to \infty} \sum_{k=1}^{n/2} {{b-a} \over {n/2}} f^{(4)} ( \xi_{k} ) \\ =& - {{ 1 } \over { 180 }} \int_{a}^{b} f^{(4)} (x) dx \\ =& - {{ 1 } \over { 180 }} [ f^{(3)} (b) - f^{(3)} (a) ] \end{align*} Therefore, limnE~n(f)En(f)=1 \lim_{n \to \infty} {{\tilde{E}_{n} (f) } \over { E_{n} (f) }} = 1

En2(f)E~n2(f)=h4180[f(3)(b)f(3)(a)] E_{n}^{2} (f) \approx \tilde{E}_{n}^{2} (f) = - {{ h^4 } \over { 180 }} [ f^{(3)}(b) - f^{(3)}(a) ]


  1. Atkinson. (1989). An Introduction to Numerical Analysis(2nd Edition): p257~258. ↩︎