Fiveable

๐Ÿ”ขNumerical Analysis I Unit 11 Review

QR code for Numerical Analysis I practice questions

11.2 Trapezoidal and Simpson's Rules

๐Ÿ”ขNumerical Analysis I
Unit 11 Review

11.2 Trapezoidal and Simpson's Rules

Written by the Fiveable Content Team โ€ข Last updated September 2025
Written by the Fiveable Content Team โ€ข Last updated September 2025
๐Ÿ”ขNumerical Analysis I
Unit & Topic Study Guides

Trapezoidal and Simpson's Rules are key techniques for approximating integrals. These methods use different approaches to estimate the area under a curve, with Trapezoidal Rule using linear interpolation and Simpson's Rule using quadratic interpolation.

Both rules have unique strengths and applications. The Trapezoidal Rule is simpler and more flexible, while Simpson's Rule often provides greater accuracy. Understanding their formulas, error bounds, and best use cases is crucial for effective numerical integration.

Trapezoidal Rule for Integration

Fundamentals and Formula

  • Trapezoidal Rule approximates definite integral using linear interpolation between data points
  • Basic formula โˆซabf(x)dxโ‰ˆbโˆ’a2[f(a)+f(b)]\int_{a}^{b} f(x)dx \approx \frac{b-a}{2} [f(a) + f(b)] for interval [a,b]
  • Composite Trapezoidal Rule for n subintervals โˆซabf(x)dxโ‰ˆh2[f(x0)+2f(x1)+2f(x2)+...+2f(xnโˆ’1)+f(xn)]\int_{a}^{b} f(x)dx \approx \frac{h}{2} [f(x_0) + 2f(x_1) + 2f(x_2) + ... + 2f(x_{n-1}) + f(x_n)] where h = (b-a)/n
  • Effective for smooth, continuous functions (sine waves, exponential growth)
  • Accuracy improves with increased number of subintervals

Geometric Interpretation and Implementation

  • Approximates area under curve with series of trapezoids
  • Each trapezoid's area calculated using average of function values at endpoints
  • Requires function evaluation, summation techniques, and basic calculus concepts
  • Applicable to analytically defined functions and discrete data sets
  • Versatile for various applications (calculating fluid flow rates, estimating population growth)

Simpson's Rule for Integration

Formula and Methodology

  • Simpson's Rule uses quadratic interpolation between data points for integration
  • Basic formula for single interval โˆซabf(x)dxโ‰ˆbโˆ’a6[f(a)+4f(a+b2)+f(b)]\int_{a}^{b} f(x)dx \approx \frac{b-a}{6} [f(a) + 4f(\frac{a+b}{2}) + f(b)]
  • Composite Simpson's Rule for n subintervals (n even) โˆซabf(x)dxโ‰ˆh3[f(x0)+4f(x1)+2f(x2)+4f(x3)+...+2f(xnโˆ’2)+4f(xnโˆ’1)+f(xn)]\int_{a}^{b} f(x)dx \approx \frac{h}{3} [f(x_0) + 4f(x_1) + 2f(x_2) + 4f(x_3) + ... + 2f(x_{n-2}) + 4f(x_{n-1}) + f(x_n)] where h = (b-a)/n
  • Requires even number of subintervals for proper implementation
  • Forms parabolic approximations using groups of three points

Application and Effectiveness

  • Particularly effective for functions well-approximated by quadratic polynomials over small intervals (parabolic motion, simple harmonic motion)
  • Implementation involves careful handling of alternating coefficients (1, 4, 2, 4, ...)
  • Generally provides more accurate results than Trapezoidal Rule for same number of function evaluations
  • Excels in integrating functions with significant curvature (bell curves, wave functions)

Error Bounds for Numerical Integration

Trapezoidal Rule Error Estimation

  • Error bound proportional to second derivative of integrated function โˆฃE1โˆฃโ‰ค(bโˆ’a)312n2maxโกโˆฃfโ€ฒโ€ฒ(x)โˆฃ|E_1| \leq \frac{(b-a)^3}{12n^2} \max|f''(x)| for interval [a,b] with n subintervals
  • Assumes second derivative exists and continuous on interval [a,b]
  • Error decreases as number of subintervals increases
  • Practical estimation compares results with different subinterval numbers
  • Adaptive techniques refine integration in high curvature areas

Simpson's Rule Error Estimation

  • Error bound proportional to fourth derivative of function โˆฃE2โˆฃโ‰ค(bโˆ’a)5180n4maxโกโˆฃf(4)(x)โˆฃ|E_2| \leq \frac{(b-a)^5}{180n^4} \max|f^{(4)}(x)|
  • Assumes fourth derivative exists and continuous on interval [a,b]
  • Converges more rapidly than Trapezoidal Rule due to higher-order error term
  • Richardson extrapolation improves accuracy by combining results from different step sizes
  • Error bounds crucial for determining subintervals needed for desired accuracy

Accuracy and Efficiency: Trapezoidal vs Simpson's

Comparative Performance

  • Simpson's Rule generally more accurate for same number of function evaluations
  • Trapezoidal Rule error term O(hยฒ), Simpson's Rule error term O(hโด) where h step size
  • Simpson's Rule converges faster for smooth functions (polynomial curves, trigonometric functions)
  • Trapezoidal Rule more robust for functions with discontinuities or sharp peaks (step functions, absolute value functions)
  • Trapezoidal Rule simpler to implement, potentially more efficient for large datasets or real-time applications

Considerations for Method Selection

  • Simpson's Rule requires even number of subintervals, Trapezoidal Rule more flexible
  • Specialized methods (Filon's method, Clenshaw-Curtis quadrature) may outperform both for highly oscillatory functions
  • Choice depends on specific problem, required accuracy, computational resources, and function characteristics
  • Trapezoidal Rule preferred for quick estimates or when function has discontinuities
  • Simpson's Rule excels for smooth functions requiring high accuracy (physics simulations, financial modeling)