FREE LESSON · Mathematics & logic · 12 OF 12
Integrals, accumulation, and numerical approximation
Integrals, accumulation, and numerical approximation: Connect continuous change to finite sums and controlled error.
Prerequisites: Functions, sums, and derivatives.
Learning objectives
- Interpret a definite integral as accumulated signed quantity.
- Calculate a Riemann sum and a trapezoidal approximation.
- Check numerical error against an analytic reference.
Accumulation is the other side of change
A definite integral accumulates a function over an interval. One construction partitions [a,b] into small subintervals, evaluates the function at selected points, multiplies each value by its interval width, and takes the limit of the sums as the largest width approaches zero. For continuous functions this limit exists and is independent of the chosen sample points. The result is signed: negative function values subtract from the accumulation.
Units help interpretation. Integrating velocity in meters per second over seconds gives displacement in meters. Integrating the absolute value of velocity gives distance traveled. Those are different when motion changes direction. Integrating a probability density over an interval gives a probability, but the density at one point is not itself a point probability.
Work two approximations
For f(x)=x² on [0,1], four equal subintervals have width h=1/4. A left-endpoint sum is (1/4)(0²+(1/4)²+(1/2)²+(3/4)²)=7/32=0.21875. A right-endpoint sum is (1/4)((1/4)²+(1/2)²+(3/4)²+1²)=15/32=0.46875. Because x² is increasing on this interval, these bracket the exact integral.
The composite trapezoidal rule averages the left and right endpoint sums for a uniform partition, giving 11/32=0.34375. The exact answer is 1/3, obtained from the antiderivative x³/3. The error is 1/96, about 0.0104167. With eight equal intervals the trapezoidal result is 43/128=0.3359375, whose error is 1/384. Halving the step reduced this error by a factor of four.
State the theorem and its assumptions
The fundamental theorem of calculus connects accumulation with differentiation. If f is continuous and F is an antiderivative, the integral from a to b is F(b)-F(a). For sufficiently smooth functions on a fixed interval, the composite trapezoidal rule has second-order global error as the step size tends to zero. Discontinuities, singularities, and oscillations require more care; a few convenient samples can miss important behavior.
Adaptive methods refine intervals based on estimated error. That estimate must be appropriate to the function and method. A small difference between two approximations is evidence, not a universal proof that both are close to the true answer.
Numerical results need reference cases
Test constants and linear functions, for which trapezoids are exact in exact arithmetic, then a polynomial with a known integral. Compare errors at the same interval while increasing resolution. Keep truncation error, floating-point roundoff, and mistakes in the mathematical model separate. More samples cannot repair using the wrong units or integrating the wrong quantity.
Practice problem
Approximate the integral of f(x)=2x+1 on [0,2] using two equal-width trapezoids. Compare with the antiderivative. Then consider velocity v(t)=1 for the first second and -1 for the second second: calculate displacement and distance traveled, and explain the difference.
Worked solution
The grid is x=0,1,2 and values are 1,3,5. The two trapezoid areas are (1+3)/2=2 and (3+5)/2=4, totaling 6. The antiderivative x²+x gives 6-0=6. The rule is exact here because the function is linear on each interval, apart from possible floating-point representation effects in an implementation. For the velocity example, signed accumulation gives 1×1+(-1)×1=0 meters of displacement. Integrating speed |v| gives 2 meters of distance. A zero net change does not mean no movement occurred. The jump in velocity also means smooth-function error claims cannot be applied across it without checking their assumptions.
Check your understanding
What does integrating signed velocity over time give?
- Total distance regardless of direction.
- Displacement.
- Acceleration.
- A dimensionless count.
Explanation
Signed velocity accumulates net change in position; speed accumulates distance.
For x² on [0,1], the four-interval trapezoidal estimate is 11/32. How far is it above 1/3?
- 1/32
- 1/48
- 1/96
- 1/384
Explanation
11/32-1/3=(33-32)/96=1/96.
Primary reading
- Single Variable Calculus: MIT OpenCourseWare
- Multivariable Calculus: MIT OpenCourseWare