Why Use Trapezoids?
A definite integral represents accumulated signed change. When a function is known only at selected points, or when an exact calculation is inconvenient, a numerical sum can approximate that accumulation. A trapezoidal sum uses the function values at the ends of each subinterval and treats the graph between them as if it were a straight segment.
Each pair of consecutive endpoint values forms the two parallel sides of a trapezoid. Its area is the subinterval width multiplied by the average of those two values. Add these contributions across the partition to obtain the approximation.
The Formula on One Subinterval
Let a subinterval have width \(\Delta x=x_i-x_{i-1}\). The trapezoid’s parallel sides have lengths \(f(x_{i-1})\) and \(f(x_i)\), when the endpoint values are nonnegative. The area formula for a trapezoid is the average of the parallel-side lengths multiplied by the distance between them. Therefore its area is \(\Delta x\) times the average endpoint value.
For signed accumulation, the same expression is used even if an endpoint value is negative. In that case, the contribution is algebraic: portions below the horizontal axis count negatively. If the endpoint values have opposite signs, the formula gives the signed contribution of the straight segment joining them.
Equal-Width Partitions
Suppose the interval from \(a\) to \(b\) is divided into \(n\) equal subintervals. The common width is \(\Delta x=(b-a)/n\), and the partition points are \(x_0,x_1,\ldots,x_n\). Add the contribution from each adjacent pair to get the composite trapezoidal sum.
The two boundary values appear once each because each is used in just one trapezoid. Every interior value appears twice: it is the right endpoint of one trapezoid and the left endpoint of the next.
Worked Example: An Equal-Width Trapezoidal Sum
Approximate the accumulated value represented by \(f(x)=x^2\) on \([0,2]\) using \(n=4\) equal subintervals.
First find the width: \[ \Delta x=\frac{2-0}{4}=\frac12. \] The partition points are \(x_0=0\), \(x_1=\frac12\), \(x_2=1\), \(x_3=\frac32\), and \(x_4=2\). Their function values are \[ f(0)=0,\quad f\left(\frac12\right)=\frac14,\quad f(1)=1,\quad f\left(\frac32\right)=\frac94,\quad f(2)=4. \]
Substitute these values into the equal-width formula: \[ \begin{aligned} T_4 &=\frac{1/2}{2} \left[0+2\left(\frac14\right)+2(1)+2\left(\frac94\right)+4\right]\\ &=\frac14\left[\frac12+2+\frac92+4\right]\\ &=\frac14(11)=\frac{11}{4}. \end{aligned} \] Thus the trapezoidal approximation is \(\frac{11}{4}\), or \(2.75\).
Check by adding each trapezoid separately: \[ \begin{aligned} A_1&=\frac{1/2}{2}\left(0+\frac14\right)=\frac1{16},\\ A_2&=\frac{1/2}{2}\left(\frac14+1\right)=\frac5{16},\\ A_3&=\frac{1/2}{2}\left(1+\frac94\right)=\frac{13}{16},\\ A_4&=\frac{1/2}{2}\left(\frac94+4\right)=\frac{25}{16}. \end{aligned} \] Their sum is \(\frac{1+5+13+25}{16}=\frac{44}{16}=\frac{11}{4}\), agreeing with the composite formula.
Why Interior Values Are Doubled
The equal-width formula is a compact way to add the trapezoids one at a time. The reason for the doubled interior terms follows directly from regrouping that sum.
For the \(i\)th interval, the contribution is \(\frac{\Delta x}{2}\bigl(f(x_{i-1})+f(x_i)\bigr)\).
Factor out the common \(\frac{\Delta x}{2}\). The remaining terms are \((f(x_0)+f(x_1))+(f(x_1)+f(x_2))+\cdots+(f(x_{n-1})+f(x_n))\).
The first and last values occur once. Each \(f(x_i)\) for \(1\leq i\leq n-1\) occurs in two adjacent pairs, so its coefficient is 2.
Consequently, for equal widths the expanded sum is exactly the composite formula above. This is a regrouping of the individual trapezoid contributions, not a different approximation method.
Unequal Subinterval Widths
The trapezoidal method also works when subinterval widths are not equal. Use the width of each particular interval in that interval’s contribution; there is no single common \(\Delta x\) to factor out. For partition points \(x_0<x_1<\cdots<x_n\), the sum is
This formula is still based only on neighboring endpoint values and the width of their interval. It is important not to replace the individual widths by an average width: each trapezoid has its own horizontal distance between parallel sides.
Worked Example: Unequal Subinterval Widths
Use the endpoint values \(f(0)=2\), \(f(1)=4\), \(f(3)=1\), and \(f(4)=3\) to calculate the trapezoidal sum on the partition \(0,1,3,4\).
The widths are \[ 1-0=1,\qquad 3-1=2,\qquad 4-3=1. \] Calculate each contribution using its own width: \[ \begin{aligned} A_1&=\frac{1}{2}(2+4)=3,\\ A_2&=\frac{2}{2}(4+1)=5,\\ A_3&=\frac{1}{2}(1+3)=2. \end{aligned} \] Therefore, \[ T=3+5+2=10. \] The trapezoidal sum is \(10\) square units if the horizontal and vertical quantities are measured in the same units; more generally, its units are the product of the units of \(x\) and \(f(x)\).
Check the middle interval carefully: its width is \(2\), so its contribution is \(2\cdot(4+1)/2=5\). Adding the three individual contributions gives \(3+5+2=10\), confirming the total.
Signed Contributions and Units
A trapezoidal sum approximates signed accumulation, not necessarily ordinary geometric area. A function value below the horizontal axis is negative, so it contributes negatively to the sum. For example, if an interval has width \(2\) and endpoint values \(3\) and \(-1\), its trapezoidal contribution is \[ \frac{2}{2}(3+(-1))=2. \] The result is a net signed contribution. The formula does not require taking absolute values of the endpoint values.
Units also provide a useful check. If \(x\) is measured in hours and \(f(x)\) is a rate in liters per hour, then a trapezoid contribution has units \[ \text{hours}\times\frac{\text{liters}}{\text{hour}}=\text{liters}. \] The accumulated quantity is in liters, not liters per hour. If \(x\) and \(f(x)\) are both lengths, the contribution has square units.
Worked Example: A Trapezoidal Sum with Rate Units
A rate \(r(t)\), measured in liters per minute, has values \(r(0)=2\), \(r(2)=5\), and \(r(5)=3\). Approximate the accumulated amount over the partition \(0,2,5\).
The first interval has width \(2-0=2\) minutes: \[ A_1=\frac{2}{2}(2+5)=7\text{ liters}. \] The second interval has width \(5-2=3\) minutes: \[ A_2=\frac{3}{2}(5+3)=\frac{3}{2}(8)=12\text{ liters}. \] Add the contributions: \[ T=7+12=19\text{ liters}. \]
Check the units in each calculation: minutes multiplied by liters per minute gives liters. The two intervals together cover \(0\) to \(5\) minutes, and their accumulated estimates add to \(19\) liters.
A Common Formula Error
A frequent mistake is to forget that interior values occur in two trapezoids. For the equal-width data \(0,\frac14,1,\frac94,4\) in the first example, an incorrect calculation might be \[ \frac{1/2}{2}\left(0+\frac14+1+\frac94+4\right) =\frac14\left(\frac{15}{2}\right) =\frac{15}{8}. \] This adds each endpoint value only once, so it does not add the areas of the four trapezoids.
The correction is to double the interior values: \[ \frac{1/2}{2}\left[0+2\left(\frac14\right)+2(1)+2\left(\frac94\right)+4\right] =\frac{11}{4}. \] A reliable alternative is to calculate each interval’s trapezoid separately and add the results. That method makes it harder to lose an endpoint or use an incorrect width.
Check Your Understanding
Use the endpoint-value and width formulas to answer these questions.
- A subinterval has width \(3\) and endpoint values \(2\) and \(6\). What is its trapezoidal contribution?
- For an equal-width partition with \(n\) subintervals, why does each interior function value have coefficient 2 in the composite formula?
- Using the partition \(0,2,5\) and endpoint values \(f(0)=1\), \(f(2)=3\), and \(f(5)=2\), calculate the trapezoidal sum.
- If one endpoint value is negative, should its absolute value be used in the trapezoidal formula? Explain briefly.
- A rate is measured in gallons per hour, and the input variable is in hours. What units does the trapezoidal sum have?