Mathematics · also Computer engineering
Numerical integration and differentiation
Real sensors give values at separate moments in time rather than smooth formulas, so engineers work with rates and totals numerically. The trapezoid rule estimates an integral, such as distance travelled from sampled speeds, by adding up thin trapezoids under the data. A finite difference estimates a derivative, such as speed from sampled positions, by dividing a change in value by the time between samples. Smaller steps usually reduce the method's error, but differentiation amplifies measurement noise, so very small steps between noisy samples can make a derivative estimate worse.
Why it mattersA robot's odometry integrates wheel speed over time to estimate distance, and small errors in each step add up as it drives.