Lab 20 · Lecture 20 · Numerical Integration
Numerical Integration Lab
See what each rule integrates, measure how fast the error falls, and integrate your own data tables.
Type f(x), a and b. Choose the rule and the number of panels; give the exact value if you know it (otherwise a reference value is computed).
Trapezoidal, Simpson, Romberg
Try this
Integrating a table
Try this
Q1 Derive the trapezoidal rule from the general quadrature formula.
With : . Adding over all intervals gives .
Q2 Why is Simpson's 1/3 rule exact for cubics, though it uses parabolas?
In the general formula with , the coefficient is zero. Equivalently, its error term involves , which is zero for cubics.
Q3 Evaluate by Simpson's rule with .
(true ).
Q4 What is Romberg integration?
Repeated Richardson extrapolation of trapezoidal values : , removing the error terms in turn.
Q5 State one advantage and one disadvantage of Gauss quadrature.
Advantage: points integrate polynomials of degree exactly, so very few function values are needed. Disadvantage: the points are irrational, so it cannot be used on equally spaced tabulated data.