In the trapezoidal rule, the function is approximated by a simple straight line between each intervals. If higher order polynomials are used, the more accurate result can be achieved. For example, in Simpson’s The function
where Now, the area under where Extending this method, the Simpson’s 1/3 rule can be written by using multiple points. (Source Code in C++) |