Skip to main content

Simpson’s Rule Integration Calculator

Quick answer

Numerical integration (h/3)[f₀+4f₁+2f₂+…+4fₙ]: ∫₀¹x²dx with 2 intervals returns exactly 1/3 — Simpson is exact for quadratics.

Figures are estimates from this calculator’s standard formula — adjust the inputs in the tool below for your exact number.

How Simpson’s Rule Calculator Works

∫ ≈ (h/3)[f₀ + 4f₁ + 2f₂ + 4f₃ + … + 4fₙ₋₁ + fₙ], n even

Simpson’s rule fits parabolas through successive triples of points and adds their areas. For ∫₀¹ x² dx with n = 2 intervals (h = 0.5, nodes 0, 0.5, 1): (0.5/3)[0 + 4(0.25) + 1] = (1/6)(2) = 0.33333 — exactly 1/3, because the integrand is itself a parabola and Simpson reproduces quadratics perfectly. Error behaves like h⁴: halving the interval count cuts error 16×. For ∫₀¹ x⁴ dx the same two intervals give 0.33333... precisely (1/6)[0 + 4(1/16) + 1] = (1/6)(1.25) = 0.20833 versus the true 0.2 — error 0.00833, which drops to 0.00052 with n = 4. The 1-4-2-4-…-4-1 weight pattern is the signature: interior odd nodes get 4, interior even nodes get 2. The calculator enforces even n, tabulates node values with their weights, and compares against closed forms when available.

  1. 1

    Enter f(x), bounds a, b

    The integrand and interval

  2. 2

    Choose an even n

    Number of subintervals; 2, 4, 8… are valid

  3. 3

    Apply the 1-4-2 pattern

    Node values multiply weights 1, 4, 2, 4, …, 1

  4. 4

    Sum and scale

    Multiply by h/3 for the integral estimate

Use Cases

Engineering Integrals

Integrate measured stress-strain curves without antiderivatives

Calculus Labs

Compare Simpson vs trapezoid error on x⁴

Probability Areas

Approximate normal-curve areas between z-scores

Tips

  • 1

    Exact for polynomials up to degree 3 — a bonus beyond parabolas

  • 2

    n must be even; the weights run 1, 4, 2, 4, …, 4, 1

  • 3

    Error shrinks 16× each time n doubles

Common Mistakes

  • Using an odd number of intervals

  • Assigning weight 4 to even-indexed interior nodes (they take 2)

  • Multiplying by h instead of h/3

  • Forgetting the endpoints carry weight 1, not 2 or 4

FAQs

What is ∫₀¹ x² dx by Simpson with n=2?

(0.5/3)[0 + 4(0.25) + 1] = 1/3 — exact, since the integrand is a parabola.

What about ∫₀¹ x⁴ dx with n=2?

(1/6)[0 + 4/16 + 1] = 0.20833 vs the true 0.2 — error 0.00833.

Why must n be even?

Each parabola spans two intervals, so points must pair up into complete triples.

How fast does the error improve?

It scales with h⁴: doubling n divides the error by about 16.

When is Simpson exact?

For cubics and below — the x³ term integrates perfectly despite the parabola fit.