Skip to content
Calcrivo

Simpson's Rule Calculator

Approximate a definite integral using composite Simpson's 1/3 rule with n subintervals.

Inputs

Integrand using x.

Approximate integral

2.0001095173

Step size h

0.31415927

Step by step

  1. Values used

    f(x) = sin(x); Lower bound (a) = 0; Upper bound (b) = 3.14; Subintervals (n, must be even) = 10

  2. Simpson's 1/3 rule

    ∫[a,b]f(x)dx ≈ (h/3)[f(x₀) + 4f(x₁) + 2f(x₂) + 4f(x₃) + ... + f(xₙ)]

  3. Approximate integral

    = 2.0001095173

  4. Step size h

    = 0.31415927

How it works

Simpson's 1/3 rule approximates ∫f(x)dx by fitting quadratic polynomials through consecutive triplets of points. The composite version splits [a,b] into n equal subintervals (n must be even) and applies the basic rule to each pair. Error is O(h⁴), making it much more accurate than the trapezoidal rule for the same n.

Formula

Simpson's 1/3 rule

∫[a,b]f(x)dx ≈ (h/3)[f(x₀) + 4f(x₁) + 2f(x₂) + 4f(x₃) + ... + f(xₙ)]

h
(b-a)/n
n
Number of subintervals (even)

Frequently Asked Questions

Why must n be even?

Simpson's rule uses pairs of subintervals (triplets of points) to fit parabolas. An odd n would leave an unpaired subinterval.

How accurate is Simpson's rule?

The error is proportional to h⁴·f''''(c) for some c in [a,b]. Doubling n reduces error by a factor of 16.

You might also need