Numerical Integration

Compare Riemann, trapezoid, Simpson's, and Gaussian quadrature — watch error converge

Simpson's rule achieves O(n⁻⁴) error by fitting parabolas; Gaussian quadrature with n points is exact for polynomials up to degree 2n−1. The Runge phenomenon explains why equally-spaced nodes can misbehave for interpolation.

Simpson's rule achieves O(n⁻⁴) error by fitting parabolas to triplets of points. Gaussian quadrature with k nodes is exact for polynomials up to degree 2k−1, making it superpolynomially more efficient for smooth functions.