Dr. K. G. TeBeest
- Do Problems 3–6 in this problem set.
- Modify the Maple code for Simpson's1/3 rule (see the previous assignment) to turn it into Simpson's3/8 rule.
Then use it to approximate the sample problem (integral of sin x on the interval [0, π]) using 9 subintervals.
(Also see the pseudocode for Simpson's3/8 rule.)
- Now re-run your Simpson's3/8 rule code using 18 subintervals.
- Use the Simpson's3/8 rule code to approximate the integral of e–x2 on the interval [0,3] using:
- 9 subintervals Answer: 0.88619 38607 33682 32028
- 18 subintervals Answer: 0.88620 71620 01857 85809
- Use Richardson extrapolation to obtain an improved estimate.
Answer: 0.88620 80487 53069 56062- Without knowing the actual errors, determine how much more accurate result (b) should be than result (a).
- Play around with the code to approximate integrals of other functions on different intervals.
- In class I derived the formula for the trapezoidal rule. Now you will derive the composite formula for Simpson's3/8 rule:
- First construct the Newton-Gregory interpolating polynomial P[03](x) containing points [0,1,2,3]. It approximates function f(x) on Section 1.
- Integrate the polynomial on Section 1: [x0, x3] and simplify the result.
You should obtain I1 = (3/8) · h · ( f0 + 3 f1 + 3 f2 + f3 ).
- Use the formula for I1 on Section 1 as the template to construct the formula for I2 on Section 2, I3 on Section 3, etc.
- Add I1 + I2 + I3 + · · · to obtain the composite Simpson's3/8 rule.
Newton-Cotes Methods: All the integration methods we've studied so far — the trapezoidal rule, Simpson's1/3 rule, and Simpson's3/8 rule — belong to a group of methods call NewtonCotes methods. NewtonCotes methods are based on NewtonGregory interpolating polynomials (so they require equally spaced abscissas).
See a summary of some of the NewtonCotes integration rules.