Use of Newton-Cotes Formulas and eventual shortcomings Matlab code to increase number of segments with trapezoid, 1/3 and 3/8 rule
Methods to achieve better accuracy at lower effort have been developed Romberg integration - uses Richardson extrapolation Idea behind Richardson extrapolation - improve the estimate at iteration j by using information from iteration j-1
True integral value can be written This is true for any iteration Using
So and which leads to
Plugging back into If
Combine two O(h2) estimates to get an O(h4) estimate Can also combine two O(h4) estimates to get an O(h6) estimate Can combine two O(h6) estimates to get an O(h8) estimate
General pattern is called Romberg Integration j - level of accuracy - j+1 is more accurate (more segments) k - level of integration - k=1 is original trapezoid estimate (O(h2)), k=2 is improved (O(h4)), etc.
Excel example
Gauss quadrature Idea is that if we evaluate the function at certain points, and sum with certain weights, we will get accurate integral Evaluation points and weights are tabulated
Development of Gauss-Legendre quadrature Assume a and b are limits of integration Trapezoid rule should give exact results for constant function or straight line
Trapezoid rule always works in these cases
Now instead of trapezoid, which has fixed end points (a,b), let them float 4 unknowns - x0,x1,c0,c1 4 equations - constant, linear (had before), quadratic, cubic From -1 to 1 to simplify math
Can solve these equations to get and two point Gauss-Legendre formula
Used cubic so this is third order accurate To go to -1 to 1 from other limits - use linear transformation If lower limit is a If upper limit is b
Solve and get So that
Example: Evaluate using two-point Gauss quadrature Exact value is
First transform Substituting
Evaluate that equation atand So the integral is Et is 23% - better than single application of Simpson’s 1/3
Can develop higher order Gauss-Legendre forms using Values for c’s and x’s are tabulated Use the same transformation
Example: do the same integral using 6-point Gauss Legendre quadrature Evaluate at these x and multiply by c
A final example: Determine mass of concrete slab Slab shape
Mass is density times volume Volume is thickness times area Say thickness is 1 ft Determine area
Take measurements at chosen points use symmetry 30 ft 27 ft
Symmetry of slab around x-axis Find area of one half and X 2
Use Simpson’s 1/3 rule Area for 1/2 is ft 2