Simpson's Rule Calculator

O(h⁴) integration

CalculatorsFreeNo Signup
4.2(859 reviews)
All Tools

Loading tool...

About Simpson's Rule Calculator

A Simpson's rule calculator for numerical integration. Uses Simpson's 1/3 rule: ∫f dx ≈ (Δx/3)[f₀+4f₁+2f₂+4f₃+...+fₙ]. Converges at O(h⁴), much faster than trapezoidal. Shows step-by-step weights and contributions. Select from preset functions. All calculations are client-side.

Simpson's Rule Calculator Features

  • Simpson's 1/3
  • Step weights
  • Error bound
  • Preset funcs
  • Comparison
Simpson's rule: ∫ₐᵇf(x)dx ≈ (h/3)[f(a)+4f(a+h)+2f(a+2h)+4f(a+3h)+...+f(b)]. h=(b−a)/n, n must be even. Error: O(h⁴) — much faster convergence than trapezoidal O(h²). Exact for polynomials up to degree 3.

How to Use

Set up the integral:

  • f(x): Choose function
  • [a,b]: Integration bounds
  • n: Subdivisions (even)

Weight Pattern

1, 4, 2, 4, 2, 4, ..., 2, 4, 1. Multiply each f(xᵢ) by its weight, sum, and multiply by h/3. The alternating 4-2 pattern comes from fitting parabolas through consecutive triplets.

Error Analysis

Error ≤ (b−a)⁵|f⁴(c)|/(180n⁴). Fourth-order convergence: doubling n reduces error by factor 16. Exact for cubic polynomials since f⁴=0.

Step-by-Step Instructions

  1. 1Select a function.
  2. 2Set bounds [a,b].
  3. 3Choose n (even).
  4. 4View weighted sum.
  5. 5Compare with exact.

Simpson's Rule Calculator — Frequently Asked Questions

Why must n be even?+

Simpson's rule fits parabolas through groups of 3 points (pairs of subintervals). Each parabola needs 3 points, consuming 2 subintervals. So n must be even to have complete pairs.

How does Simpson's compare to trapezoidal?+

Simpson's has O(h⁴) error vs trapezoidal's O(h²). With n=10, Simpson's might give 8 correct digits where trapezoidal gives 4. Simpson's is almost always preferred for smooth functions.

What is Simpson's 3/8 rule?+

Uses cubic interpolation over groups of 4 points: (3h/8)[f₀+3f₁+3f₂+f₃]. Same O(h⁴) order but slightly larger error constant. Used when n is divisible by 3 but not 2.

Share this tool: