2.2 Composite Trapezoidal and Simpson's Rule
2.2 Composite Trapezoidal and Simpson’s Rule
heorem 2.2 (Composite Trapezoidal Rule). Suppose that the inter- val la b is subdivided into M subintervals [ok, k+1 of width h=(b-a)/M by using the equally spaced nodes ck =a+hh, for k=0, 1,..., M. The composite trapezoidal rule for M subintervals can be expressed in any of three equivalent ways r(,b)=∑(f(xk-1)+f(x) k-1 (219) or T(f,h)=x(6+2f1+22+23+…+2fM-2+2fM-1+f or T(, h)=o(f(a)+f(b))+h2 f(ak) (2.21) k=1 This is an approximation to the integral of f(a)over [a, bJ, and we write f()d≈r(f,b (222)
Example2.5. Consider f(a)=2+sin(2v/). Use the composite trapezoidal rule with 11 sample points to compute an approximation to the integral of f(a) taken over[1,6
Theorem 2.3( Composite Simpson Rule). Suppose that [a, b is subdi vided into 2M subintervals [ak, Ck+1] of equal width h=(b-a)/(2M) by using k=a+hh for k=0, 1, .. 2M. The composite Simpson rule for 2M subintervals can be expressed in any of three equivalent ways S(,b)=3>(a22)+4f(x2-)+(a)(2 or S(,2310+4f1+22+4+…+212M-2+4f2M-1+f2)(2.25) 4h M S(,b)=(f(a)+f(b)+3∑f(x2)+3∑f(21).(20 This is an approximation to the integral of f(a)over a, bl, and we write f()d≈S(f,b) (227)
Example 2.6. Consider f(a)=2+sin(2v/r). Use the composite Simp son rule with 11 sample points to compute an approximation to the integral of f(a) taken over 1,6