Seeking insights on the trade-offs between accuracy and computational efficiency when choosing between the trapezoidal rule and Simpson's rule for numerical integration in various applications.
Beware... If you carefully select the test case, you can prove almost anything. Papers abound extolling the advantages of one method over another that often fail to explain that the conclusion of the paper is not universal in its application. This is by no means limited to numerical integration. I typically use Gauss Quadrature. Here is a link to one paper. I have lots of information and free code if you're interested. Conference Paper Comparison of Methods for Computing Cooling Tower Demand Curves
Simpson's rule is more accurate especially with more irregularly shaped regions due to the fact it fits the curve being integrated with quadradic functions as opposed to linear functions with the trapezoidal rule. However, Simpson's rule generally requires more integration intervals than the trapezoidal rule making it less efficient. All of this does depend on the specific function being integrated.
There is a significant difference in terms of the smoothness of the integrating function. Indeed the Simpson's rule has a convergence order of 4 for any function having 4 or more than 4 continuous derivatives on the integration interval. On the contrary the trapezoidal rule has as maximum order of convergence equal to 2 (for functions having at least 2 continuous derivatives). Therefore for vey smooth functions Simpson's rule allows to catch machine precision with a reasonable number of nodes.