Sign in to save

Bookmark this page so you can find it later.

Sign in to save

Bookmark this page so you can find it later.

Numerical integration estimates the area under a curve when an exact antiderivative is hard to find or when data points come from measurements. The trapezoidal rule and Simpson's rule are two common ways to approximate a definite integral on an interval [a, b]. Both methods divide the interval into smaller subintervals and add up simpler shapes.

Comparing them helps students choose an efficient method for accuracy in physics, engineering, and data analysis.

The trapezoidal rule connects neighboring points with straight line segments, so each slice is a trapezoid. Simpson's rule fits parabolas through groups of three points, so it captures curvature more accurately when the function is smooth. For the same number of subintervals, Simpson's rule is usually more accurate, but it requires an even number of subintervals.

Error decreases as the step size h gets smaller, with Simpson's rule improving faster for sufficiently smooth functions.

Key Facts

  • Step size: h = (b - a)/n, where n is the number of equal subintervals.
  • Trapezoidal rule: integral from a to b of f(x) dx is approximately (h/2)[f(x0) + 2f(x1) + 2f(x2) + ... + 2f(x(n-1)) + f(xn)].
  • Simpson's rule: integral from a to b of f(x) dx is approximately (h/3)[f(x0) + 4f(x1) + 2f(x2) + 4f(x3) + ... + 2f(x(n-2)) + 4f(x(n-1)) + f(xn)], with n even.
  • Trapezoidal rule error has order O(h^2), meaning halving h usually reduces error by about a factor of 4 for smooth functions.
  • Simpson's rule error has order O(h^4), meaning halving h usually reduces error by about a factor of 16 for smooth functions.
  • Example for f(x) = x^2 from 0 to 2 with n = 2: trapezoidal gives 5, Simpson gives 8/3, and the exact integral is 8/3.

Vocabulary

Definite integral
A definite integral gives the signed area under a function curve over a specified interval.
Subinterval
A subinterval is one smaller equal part of the full interval used in a numerical approximation.
Step size
Step size h is the width of each subinterval, calculated by h = (b - a)/n.
Trapezoidal rule
The trapezoidal rule estimates area by replacing the curve on each subinterval with a straight line segment.
Simpson's rule
Simpson's rule estimates area by fitting parabolas through pairs of subintervals and summing those curved approximations.

Common Mistakes to Avoid

  • Using Simpson's rule with an odd number of subintervals is wrong because the method groups subintervals in pairs and requires n to be even.
  • Forgetting the endpoint weights is wrong because f(x0) and f(xn) are counted once, while interior points receive different weights depending on the rule.
  • Mixing trapezoidal and Simpson coefficients is wrong because trapezoidal uses 1, 2, 2, ..., 2, 1 while Simpson uses 1, 4, 2, 4, ..., 2, 4, 1.
  • Assuming Simpson's rule is always exact is wrong because it is exact for polynomials up to degree 3, but general functions still have approximation error.

Practice Questions

  1. 1 Use the trapezoidal rule with n = 4 to approximate the integral from 0 to 2 of x^2 dx.
  2. 2 Use Simpson's rule with n = 4 to approximate the integral from 0 to 2 of x^2 dx, then compare with the exact value.
  3. 3 For a smooth function with noticeable curvature, explain why Simpson's rule usually gives a better approximation than the trapezoidal rule using the same even value of n.