Derivation: composite trapezoid
From summing simple trapezoids on n subintervals to the weights 1,2,...,2,1 and the global error.
Summing simple trapezoids
Formula for n subintervals
Split into n equal subintervals:
On , apply the simple trapezoid rule:
The total approximation is the sum of the n trapezoids:
When the full sum is written out, and appear once. Every interior value appears twice:
The global error is obtained by summing the local errors of the simple trapezoid rule: