2.2 Composite Trapezoidal and Simpson's Rule
2.2 Composite Trapezoidal and Simpson’s Rule
Theorem 2.2(Composite Trapezoidal Rule). Suppose that the inter val a, b is subdivided into M subintervals [ak, 3k+1 of width h=(b-a)/M by using the equally spaced nodes k =a+kh, for k=0, 1,..., M. The composite trapezoidal rule for M subintervals can be expressed in any of three equivalent ways T(, h)=2((k-1)+f(Ek ) (2.19) or T(f,b)==(f0+2f1+2f2+23+…+2fM-2+2fM-1+fM)(2.20 or (f, h)=o(f(a)+f(b))+h2f(ak) (221) This is an approximation to the integral of f(a) over [a, bl, and we write f(x)dx≈T(f,h) (222)
Example2. 5. Consider f(a)=2+sin(2va). Use the composite trapezoidal rule with 11 sample points to compute an approximation to the integral f()taken over [1, 6
Theorem 2.3( Composite Simpson Rule). Suppose that a, b is subdi- vided into 2M subintervals ak, k+1] of equal width h=(b-a)/(2M) by using k=a+kh for k=0, 1, ., 2M. The composite Simpson rule for 2M subintervals can be expressed in any of three equivalent ways ,b)=∑((2-2)+4(2-1)+f(x2) (2.24) S(f,b)=(f0+41+22+4/8+…+2f2M-2+4f2M-1+f2M)(225) or M-1 M S(f,b)=3()+f()+3>a2)+3∑(a2-1.(20) This is an approximation to the integral of f(a)over a, b], and we write f(x)dx≈S(f,h) 2.27
Example 2.6. Consider f(a)=2+sin(2v a. Use the composite Simp- son rule with 11 sample points to compute an approximation to the integral of f(a)taken over [1, 6