2. 3 Error Analysis
2.3 Error Analysis
Corollary 2.2 (Trapezoidal Rule: Error Analysis). Suppose that [a, b] s subdivided into M subintervals [ak, k+1] of width h (b-a)/M.The composite trapezoidal rule h M-1 T(f, h)= (f(a)+f(b)+h ∑f(xk) (2.29) k=1 is an approximation to the integral b (x)dx T(f, h)+ Er(f, h). (2.30) Furthermore,iff∈c2la,b, there exists value with<c< so that the ,, error term Er(f, h) has the form b-a)f(2)(ch2-o(h2 12 (2.31)
Corollary 2.3(Simpson's Rule: Error Analysis ) Suppose that a, b is subdivided into 2M subintervals [ ak, k+1 of equal width h=(b-a)/(2M The composite Simpson rule S(f,b)=f()+)+∑fa2)+a∑f(a-1)(236) k=1 k=1 is an approximation to the integral A f(aydr=S(f, h)+Es(f, h) (2.37) Furthermore, if f e C a, b], there exists a value c with a c< b so that the error term Es (f, h)has the form b-af(4)(c)h O(h 2.38
Example 2.7. Consider f(a)=2+sin(2v). Investigate the error then the composite trapezoidal rule is used over[1,6 and the number of subintervals is10.20.40.80.and160
Table 2.2. The Composite Trapezoidal rule for f(a)=2+sin(2va)over [1, 6 I h T(, h) Er(f, h)=O(h2) 10 0.58.19385457 0.01037540 200.258.18604926 0.00257006 400.1258.18412019 0.00064098 800.0625818363936 0.00016015 1600.031258.18351924 0.00004003