MathorynMathematical Formula Database

Calculus

Simpson's Rule

Simpson's rule fits parabolas through consecutive triples of points, with an even number nn of subintervals of width h=b−anh=\frac{b-a}{n}. It is much more accurate than the trapezoidal rule and is exact for polynomials up to degree three. It is widely used for numerical integration of smooth functions.

∫abf(x) dx≈h3[f(x0)+4f(x1)+2f(x2)+⋯+4f(xn−1)+f(xn)]\int_a^b f(x)\,dx\approx\frac{h}{3}\left[f(x_0)+4f(x_1)+2f(x_2)+\cdots+4f(x_{n-1})+f(x_n)\right]
LaTeX\int_a^b f(x)\,dx\approx\frac{h}{3}\left[f(x_0)+4f(x_1)+2f(x_2)+\cdots+4f(x_{n-1})+f(x_n)\right]

Variables

a, ba,\ b
limits of integration
nn
even number of subintervals
hh
step width b−an\frac{b-a}{n}

Example

Approximate ∫02x2 dx\int_0^2x^2\,dx with n=4n=4.

  1. h=0.5h=0.5; values 0, 0.25, 1, 2.25, 40,\ 0.25,\ 1,\ 2.25,\ 4.
  2. 0.53[0+4(0.25)+2(1)+4(2.25)+4]=0.53⋅16\frac{0.5}{3}\left[0+4(0.25)+2(1)+4(2.25)+4\right]=\frac{0.5}{3}\cdot16.

Answer: ≈2.6667\approx2.6667, the exact value 83\frac83.

Related formulas