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 is the process of estimating a definite integral when an exact antiderivative is hard to find or when the function is only known from data. In calculus, the integral of f(x) from a to b represents signed area under a curve. Numerical methods replace the curved region with simpler shapes whose areas are easy to compute.

This matters in physics, engineering, biology, economics, and data science, where measurements often come as tables rather than formulas.

The main idea is to split the interval [a, b] into smaller subintervals and approximate the area on each one. The trapezoidal rule uses straight line segments to form trapezoids, while Simpson's rule uses parabolas to better match curved behavior. Smaller step sizes usually improve accuracy, but different methods improve at different rates.

Error estimates help decide how many subintervals are needed and whether a method is appropriate for a given function.

Key Facts

  • A definite integral gives signed area: integral from a to b of f(x) dx.
  • Step size for n equal subintervals: h = (b - a)/n.
  • Trapezoidal rule: integral from a to b f(x) dx ≈ h/2 [f(x0) + 2f(x1) + 2f(x2) + ... + 2f(x(n-1)) + f(xn)].
  • Simpson's rule: integral from a to b f(x) dx ≈ h/3 [f(x0) + 4f(x1) + 2f(x2) + 4f(x3) + ... + 2f(x(n-2)) + 4f(x(n-1)) + f(xn)], where n is even.
  • Trapezoidal rule error generally decreases like h^2 for smooth functions.
  • Simpson's rule error generally decreases like h^4 for smooth functions, so it often reaches high accuracy with fewer subintervals.

Vocabulary

Numerical integration
A method for estimating a definite integral using arithmetic approximations instead of an exact antiderivative.
Definite integral
The accumulated signed area under a function over a specified interval.
Step size
The width h of each subinterval used to divide the integration interval.
Trapezoidal rule
A numerical integration method that approximates the curve with straight line segments and adds the areas of trapezoids.
Simpson's rule
A numerical integration method that approximates the curve with parabolic arcs over pairs of subintervals.

Common Mistakes to Avoid

  • Using Simpson's rule with an odd number of subintervals is wrong because standard Simpson's rule requires n to be even.
  • Forgetting the endpoint weights in the trapezoidal rule gives an incorrect total because the first and last function values are counted only once, not twice.
  • Confusing h with n leads to wrong scaling because h is the subinterval width, while n is the number of subintervals.
  • Assuming more subintervals always fixes every problem is incomplete because discontinuities, sharp corners, or noisy data can limit accuracy and may require a different method or smaller local spacing.

Practice Questions

  1. 1 Use the trapezoidal rule with n = 4 to approximate integral from 0 to 2 of x^2 dx. Use equally spaced points.
  2. 2 Use Simpson's rule with n = 4 to approximate integral from 0 to 2 of x^3 dx. Compare your result with the exact value.
  3. 3 A sensor records velocity at equally spaced times, but no formula for velocity is known. Explain why numerical integration is useful for estimating displacement, and state which method might work better if the velocity changes smoothly.