Home

Simpson's Rule Online Calculator

Simpson's rule calculator. Enter f(x), interval and even n to compute Sₙ and compare with the exact value—for numerical integration.

Show more ▾
Sₙ = (h/3)[f₀+4f₁+2f₂+4f₃+…+fₙ]
Supports + - * / ^ ( ) and sin cos tan sec cot sqrt exp log abs asin atan pi e; write 2*x, not 2x
Lower limit of integration
Upper limit of integration
Must be even

📖 Tutorial | Simpson's Rule

1. Definition
Simpson's rule fits a parabola over every two subintervals: Sₙ=(h/3)[f₀+4f₁+2f₂+4f₃+…+fₙ] (n even). It is exact for polynomials of degree at most 3.
2. Symbols
SymbolsMeaning
nEven number of subintervals
hWidth
4/2 weightsOdd/even interior nodes
SₙSimpson approximation
3. How it works
  • Requires even n;
  • Weights 4-2-4-2-…-4;
  • Adaptive integration gives the exact value.
4. Steps
  1. Enter f(x) and limits;
  2. Enter an even n;
  3. Click Calculate for Sₙ and the exact value.
5. Example
Example: ∫₀² x³ dx=4. With n=2, h=1: S₂=(1/3)[0+4·1+8]=4 (exact for a cubic).
6. Pitfalls
n must be even;
It is exact up to cubics; higher degrees have error;
Do not misremember the 4/2 weights.

❓ FAQ | Simpson's Rule

Why must n be even?
Each parabola uses two subintervals; odd intervals cannot be paired.
Why is it better than trapezoid?
It approximates by parabolas, exact up to cubics.
Exact for x⁴?
No. Degree ≥4 has error; increase n.
How are 4 and 2 arranged?
Endpoints 1, odd interior 4, even interior 2.
Which functions?
+−*/^ and common elementary functions.