Numerical Integration Methods

Compare Riemann, Trapezoidal, Simpson's, and Gaussian Quadrature — error convergence analysis

Configuration

4
Exact value
Convergence rates:
Riemann (left/right): O(h) — 1st order
Midpoint/Trapezoidal: O(h²) — 2nd order
Simpson's: O(h⁴) — 4th order
Gauss-Legendre (n pts): O(h²ⁿ) — exponential for smooth functions

Integration Visualization

Error vs. Number of Subintervals (log-log)