Accuracy of Simpson's Rule and Gaussian Quadrature

Numerical integration is essential for approximating definite integrals that cannot be solved analytically. While the trapezoidal rule offers a foundational approach by approximating the area under a curve using straight lines, both Simpson's rule and Gaussian quadrature achieve significantly higher accuracy with fewer calculations. This article provides an overview of how the trapezoidal rule is limited by linear approximations, how Simpson's rule improves precision using parabolic arcs, and how Gaussian quadrature achieves optimal accuracy by strategically selecting both evaluation points and weights.

The Limitations of the Trapezoidal Rule

To understand why other methods are superior, it is necessary to look at the mechanics of the trapezoidal rule. This method approximates the area under a curve by dividing it into trapezoids. It connects two points on the function with a straight line—a linear polynomial.

Because it uses straight lines, the trapezoidal rule struggles to accurately measure functions that have significant curvature. If a curve bends upward (concave up), the straight line cuts across the top, overestimating the area. If the curve bends downward (concave down), the line sits below the curve, underestimating the area. Mathematically, the trapezoidal rule is only completely exact for linear functions (polynomials of degree 1). Its error decreases at a rate proportional to the square of the step size, making it relatively slow to converge to the true answer.

How Simpson's Rule Captures Curvature

Simpson's rule achieves much higher accuracy than the trapezoidal rule by replacing straight lines with curves. Instead of connecting two points with a straight line, Simpson's rule takes three equally spaced points and fits a parabola (a quadratic polynomial of degree 2) through them.

Because parabolas can bend, they closely mimic the actual shape of most smooth functions, drastically reducing the gap between the approximation and the true curve. Furthermore, Simpson's rule benefits from a mathematical bonus due to symmetry. Although it is built using degree 2 polynomials, the symmetrical spacing of the points causes the errors for cubic terms to cancel each other out completely. As a result, Simpson's rule is exact for polynomials up to degree 3. Its error decreases proportionally to the fourth power of the step size, meaning that halving the step size reduces the error by a factor of sixteen, compared to a factor of just four for the trapezoidal rule.

The Optimal Efficiency of Gaussian Quadrature

While Simpson's rule is a major improvement, both it and the trapezoidal rule share a fundamental restriction: they require the evaluation points (nodes) to be equally spaced. This restriction wastes potential accuracy. Gaussian quadrature removes this limitation entirely.

Instead of fixing the evaluation points in advance, Gaussian quadrature chooses the most optimal points inside the interval and pairs them with specific weights. By allowing both the locations of the points and the weights to be variables, the method doubles the number of available parameters to fine-tune the approximation.

If you use \(n\) evaluation points, you have \(n\) locations and \(n\) weights, giving you \(2n\) parameters to work with. This allows an \(n\)-point Gaussian quadrature rule to be completely exact for polynomials of degree up to \(2n - 1\).

To put this efficiency into perspective, consider a two-point approximation:

  • Trapezoidal Rule (2 points): Uses fixed endpoints. It is exact only for polynomials up to degree 1.
  • Gaussian Quadrature (2 points): Uses two strategically placed interior points. It is exact for polynomials up to degree 3.

With just two points, Gaussian quadrature matches the polynomial accuracy of the three-point Simpson's rule. If you increase Gaussian quadrature to three points, it becomes exact for polynomials up to degree 5, vastly outperforming Simpson's rule for the same number of function evaluations.

Summary of Precision

The superiority of Simpson's rule and Gaussian quadrature ultimately comes down to their "degree of precision"—the highest degree of polynomial a method can integrate with zero error—and how they handle curvature:

  • Trapezoidal Rule: Uses linear segments. It ignores curvature and has a degree of precision of 1.
  • Simpson's Rule: Uses parabolic arcs. It accounts for curvature and utilizes symmetry to achieve a degree of precision of 3.
  • Gaussian Quadrature: Optimizes both node placement and weights. It maximizes mathematical efficiency to achieve a degree of precision of \(2n - 1\) for \(n\) points, making it the most accurate method of the three for smooth functions.