For the integration of piecewise continuous functions, the results of "rectangular approximation" and "trapezoidal approximation" are the same, with the difference lying only in the speed of approximation. The essence of this problem lies in "error estimation".
We only need to analyze the "error reduction process" associated with the "approximation process".
To better understand the error, I will specifically calculate and analyze the integrations using rectangular and trapezoidal approximations for continuous functions on closed intervals.
Given f∈C[a,b], let's start with the expression for rectangular approximation integration:
We denote this expression as Δ(n). Notice, it only involves one variable n. And it's easy to see:
I. If f(a)=f(b), then Δ(n)≡0.
II. If f(a)=f(b), then Δ(n)=O(n1).
The first case might give you a feeling of reading an O. Henry novel. Surprisingly, only if f(a)=f(b), no matter how the graph of f fluctuates within the interval, rectangular and trapezoidal approximations are completely consistent, resulting in equal errors. As expected, when you write out the two expressions and observe each term of the summation, you'll find that the terms in both expressions are roughly the same.
The second case leads to a deeper conclusion. Let's denote the error of equation (1) as δ1(n) and the error of equation (3) as δ2(n), we have:
δ1(n)−δ2(n)=Δ(n)=O(n1)
What does this mean? It means that δ1(n) and δ2(n) are at most one of them has an error term smaller than o(n1)! From your intuition, you might have guessed that the error of the trapezoidal approximation is smaller. Correct, the conclusion was proved.