The trapezoid rule in mathematics is a numerical integration method that we use to calculate the approximate value of the definite integral.
The rule is on the basis of an approximating value of the integral of f (x) by that of the linear function that passes through the points (a, f (a)) and (b, f (b)). The integral of this is always equal to the area of the trapezoid under the graph of the linear function. It follows that:
Composite Trapezoidal Rule:
- Assuming n+1 data points are evenly spaced, there will be n intervals over which to integrate
- The total integral can be calculated by integrating each subinterval and then adding them together:
Simpson’s 1/3 Rule:
- Simpson’s 1/3 rule assumes 3 equispaced data/interpolation/integration points
- The integration rule is based on approximating using Lagrange quadratic (second degree) interpolation.
- The sub-interval is defined as [xo ,x2] and the integration point to integration point spacing equals
Composite Simpson’s 1/3 Rule:
- Simpson’s 1/3 rule can be used on a set of subintervals in much the same way the trapezoidal rule was, except there must be an odd number of points
- Because of the heavy weighting of the internal points, the formula is a little more complicated than for the trapezoidal rule:
Simpson’s 3/8 Rule:
Simpson’s 3/8 rule is similar to Simpson’s 1/3 rule, the only difference being that, for the 3/8 rule, the interpolant is a cubic polynomial. Though the 3/8 rule uses one more function value, it is about twice as accurate as the 1/3 rule.