Introduction
Simpson’s rule is an integral approximate method. Instead of using the
original function
f
(
x
)
f(x)
f(x) to compute the integration, it uses a
polynomial function. If we have three points
a
,
m
,
b
a,m,b
a,m,b and their values
f
(
a
)
,
f
(
m
)
,
f
(
b
)
f(a), f(m), f(b)
f(a),f(m),f(b) where
m
=
(
a
+
b
)
/
2
m=(a+b)/2
m=(a+b)/2, then the approximation is
f ( x ) ≈ P ( x ) = f ( a ) ( x − m ) ( x − b ) ( a − m ) ( a − b ) + f ( m ) ( x − a ) ( x − b ) ( m − a ) ( m − b ) + f ( b ) ( x − a ) ( x − m ) ( b − a ) ( b − m ) f(x)\approx P(x)=f(a) \frac{(x-m)(x-b)}{(a-m)(a-b)}+f(m) \frac{(x-a)(x-b)}{(m-a)(m-b)}+f(b) \frac{(x-a)(x-m)}{(b-a)(b-m)} f(x)≈P(x)=f(a)(a−m)(a−b)(x−m)(x−b)+f(m)(m−a)(m−b)(x−a)(x−b)+f(b)(b−a)(b−m)(x−a)(x−m)
and
∫ a b f ( x ) d x ≈ ∫ a b P ( x ) d x \int_a^bf(x)dx\approx \int_{a}^{b}{P(x)dx} ∫abf(x)dx≈∫abP(x)dx
[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-KK6W0djP-1644459971010)(Simpsons.png)]{width=“0.4\linewidth”}
Next, we will analysis the error of this kind of simpson’s rule.
Error Analysis
E ( f ) = ∫ a b [ f ( x ) − P ( x ) ] d x E(f)=\int_{a}^{b}{[f(x)-P(x)]dx} E(f)=∫ab[f(x)−P(x)]dx
Note that the residual of lagrange interpolation is
R ( x ) = f ( x ) − P ( x ) = f ( 3 ) ( ξ ( x ) ) 3 ! ( x − a ) ( x − m ) ( x − b ) . R(x)=f(x)-P(x)=\frac{f^{(3)}(\xi(x))}{3!}(x-a)(x-m)(x-b). R(x)=f(x)−P(x)=3!f(3)(ξ(x))(x−a)(x−m)(x−b).
Hence, we have
E ( f ) = ∫ a b ( x − a ) ( x − m ) ( x − b ) f ( 3 ) ( ξ ( x ) ) 3 ! d x E(f)=\int_{a}^{b}{(x-a)(x-m)(x-b) \frac{f^{(3)}(\xi(x))}{3!}dx} E(f)=∫ab(x−a)(x−m)(x−b)3!f(3)(ξ(x))dx
Let w ( x ) w(x) w(x) be
w ( x ) = ∫ a x ( t − a ) ( t − m ) ( t − b ) d t . w(x)=\int_{a}^{x}{(t-a)(t-m)(t-b)dt}. w(x)=∫ax(t−a)(t−m)(t−b)dt.
Then we have
-
w ( a ) = w ( b ) = 0 w(a)=w(b)=0 w(a)=w(b)=0.
-
w ( x ) > 0 w(x)>0 w(x)>0 for a < x < b a<x<b a<x<b.
Then we have
E ( f ) = ∫ a b w ′ ( x ) f ( 3 ) ( ξ ( x ) ) 3 ! d x = [ w ( x ) f ( 3 ) ( ξ ( x ) ) 3 ! ] x = a x = b − ∫ a b w ( x ) d d x f ( 3 ) ( ξ ( x ) ) 3 ! d x = − ∫ a b w ( x ) d d x f ( 3 ) ( ξ ( x ) ) 3 ! d x . \left. \begin{aligned} E(f)&= \int_{a}^{b}{w^{'}(x) \frac{f^{(3)}(\xi(x))}{3!}dx}\\ &= \left[ w(x) \frac{f^{(3)}(\xi(x))}{3!} \right]_{x=a}^{x=b}-\int_{a}^{b}{w(x)\frac{d}{dx}\frac{f^{(3)}(\xi(x))}{3!}dx}\\ &= -\int_{a}^{b}{w(x)\frac{d}{dx}\frac{f^{(3)}(\xi(x))}{3!}dx}. \end{aligned} \right. E(f)=∫abw′(x)3!f(3)(ξ(x))dx=[w(x)3!f(3)(ξ(x))]x=ax=b−∫abw(x)dxd3!f(3)(ξ(x))dx=−∫abw(x)dxd3!f(3)(ξ(x))dx.
Using the divided difference, we have
f [ a , m , b , x ] = f ( 3 ) ( ξ ( x ) ) 3 ! . f[a,m,b,x]= \frac{f^{(3)}(\xi(x))}{3!}. f[a,m,b,x]=3!f(3)(ξ(x)).
Hence,
d d x ( f ( x ) ( ξ ( x ) ) 3 ! ) = lim h → 0 f [ a , m , b , x + h ] − f [ a , m , b , x ] h = lim h → 0 f [ x , a , m , b , x + h ] = f [ x , a , m , b , x ] = f [ a , m , b , x , x ] = f ( 4 ) ( ξ ( x ) ) 4 ! \left. \begin{aligned} \frac{d}{dx} \left( \frac{f^{(x)}(\xi(x))}{3!} \right) &= \lim_{h\rightarrow 0} \frac{f[a,m,b,x+h]-f[a,m,b,x]}{h}\\ &=\lim_{h\rightarrow 0} f[x,a,m,b,x+h]\\ &=f[x,a,m,b,x]\\ &=f[a,m,b,x,x]\\ &=\frac{f^{(4)}(\xi(x))}{4!} \end{aligned} \right. dxd(3!f(x)(ξ(x)))=h→0limhf[a,m,b,x+h]−f[a,m,b,x]=h→0limf[x,a,m,b,x+h]=f[x,a,m,b,x]=f[a,m,b,x,x]=4!f(4)(ξ(x))
Substituting the above formula into E ( f ) E(f) E(f), we have
E ( f ) = − ∫ a b f ( 4 ) ( ξ ( x ) ) 4 ! ∫ a x ( t − a ) ( t − m ) ( t − b ) d t d x \left. \begin{aligned} E(f) &= - \int_{a}^{b}{\frac{f^{(4)}(\xi(x))}{4!} \int_{a}^{x}{(t-a)(t-m)(t-b)dt} dx} \end{aligned} \right. E(f)=−∫ab4!f(4)(ξ(x))∫ax(t−a)(t−m)(t−b)dtdx
Applying the weighted mean value theorem, we have
E ( f ) = − f ( 4 ) ( η ) 4 ! ∫ a b ∫ a x ( t − a ) ( t − m ) ( t − b ) d t d x = − f ( 4 ) ( η ) 4 ! 1 120 ( b − a ) 5 = − f ( 4 ) ( η ) 24 [ 4 15 h 5 ] . h = b − a 2 \left. \begin{aligned} E(f) &= - \frac{f^{(4)}(\eta)}{4!} \int_{a}^{b}{\int_{a}^{x}{(t-a)(t-m)(t-b)dt}dx}\\ &=-\frac{f^{(4)}(\eta)}{4!} \frac{1}{120}(b-a)^5\\ &=-\frac{f^{(4)}(\eta)}{24}\left[\frac{4}{15} h^{5}\right] . \quad h=\frac{b-a}{2} \end{aligned} \right. E(f)=−4!f(4)(η)∫ab∫ax(t−a)(t−m)(t−b)dtdx=−4!f(4)(η)1201(b−a)5=−24f(4)(η)[154h5].h=2b−a
where η ∈ [ a , b ] \eta\in [a,b] η∈[a,b].
Thus, we have
E [ f ] = − h 5 90 f ( 4 ) ( η ) , η ∈ [ a , b ] . E[f]=-\frac{h^5}{90}f^{(4)}(\eta), \eta\in [a,b]. E[f]=−90h5f(4)(η),η∈[a,b].