Skip to content
Infinitesimal Dynamics home
Notebook: 0 XP

Calculus II / Techniques of integration

Numerical Integration & Error

Estimate accumulated quantities when an antiderivative is inconvenient or your information comes as sampled data.

3 min read · 4 sections · 0 checks

Contents 4 sections
  1. §1Replace a curve with manageable pieces
  2. §2Use parabolas with Simpson’s rule
  3. §3Compare estimates for ∫₀¹ x² dx
  4. §4What a numerical result can promise

By the end you can

  • Construct trapezoidal and Simpson estimates
  • Interpret the step size and signed area
  • Recognize when error formulas do not apply

Helps to know: Definite Integrals, Riemann Sums

§1Replace a curve with manageable pieces

A Riemann sum uses rectangles. The trapezoidal rule instead joins neighboring sample heights with straight lines, integrating each small trapezoid exactly. This often improves the estimate, but a better picture is not automatically a proof of accuracy.

Divide [a,b] into n equal pieces, with h=(b−a)/n and xᵢ=a+ih. The endpoints receive half the weight of interior samples because an interior sample belongs to two neighboring trapezoids.

Tn=h[f(a)/2+f(x1)+⋯+f(xn−1)+f(b)/2]T_{n} = h [f(a)/2 + f(x_{1}) + \cdots + f(x_{n-1}) + f(b)/2]

§2Use parabolas with Simpson’s rule

Simpson’s rule fits a quadratic across each pair of subintervals. It requires an even n when the steps have equal width. Starting at the left endpoint, the weights are 1,4,2,4,2,…,4,1.

Sn=(h/3)[f(x0)+4f(x1)+2f(x2)+⋯+4f(xn−1)+f(xn)]S_{n} = (h/3)[f(x_{0}) + 4f(x_{1}) + 2f(x_{2}) + \cdots + 4f(x_{n-1}) + f(x_{n})]

§3Compare estimates for ∫₀¹ x² dx

Example 1Take n=2, so h=1/2

  1. The sample heights are 0, 1/4, and 1.

§4What a numerical result can promise

If |f″|≤M₂ on [a,b], the composite trapezoidal error is at most M₂(b−a)³/(12n²). If the fourth derivative is continuous and bounded by M₄, Simpson’s error is at most M₄(b−a)⁵/(180n⁴). These hypotheses matter: a pole inside the interval invalidates both formulas.

Doubling n is a useful check, but close successive estimates do not prove convergence. Oscillations can fall between sample points. For improper integrals, handle the singularity or infinite endpoint as a limit before trusting quadrature.