From Sampled Curves to an Area Estimate
A graph or table often gives only a limited number of points on two curves. Even without a formula for either curve, those samples can help estimate the area enclosed between them. The central task is to measure the gap between the curves at selected locations, then combine those gaps with the widths of the intervals between samples.
For curves described as functions of \(x\), the gap is vertical: at a given \(x\), subtract the lower \(y\)-value from the upper \(y\)-value. For curves described as functions of \(y\), the gap is horizontal: subtract the left \(x\)-value from the right \(x\)-value. Each gap serves as the height of a thin rectangle, or as one of the endpoint heights of a trapezoid.
These methods give estimates, not automatically exact areas. A finite table does not specify what the curves do between its entries. The calculation therefore depends on an approximation: for example, treating the gap as constant on an interval, or as changing linearly between its endpoint samples.
Vertical Gaps and Rectangle Estimates
Suppose the region is considered from \(x=a\) to \(x=b\), and the upper and lower curves are \(y=f(x)\) and \(y=g(x)\). Assume the upper curve remains above the lower curve on the interval, so that the vertical gap is \(d(x)=f(x)-g(x)\). Choose partition points \(x_0<x_1<\cdots<x_n\). For each subinterval, write \(\Delta x_i=x_{i+1}-x_i\), where \(i=0,\ldots,n-1\), and let \(d_i=f(x_i)-g(x_i)\).
In a left estimate, the gap at the left endpoint of each subinterval is used for that subinterval’s width. In a right estimate, the gap at its right endpoint is used. The same interval width \(\Delta x_i\) must pair with both endpoint gaps for the \(i\)-th subinterval. This matters especially when the partition is not evenly spaced.
A midpoint estimate uses the gap at the midpoint of each subinterval, if those samples are available. With \(m_i=(x_i+x_{i+1})/2\), it is
A graph may not provide a value exactly at a midpoint. Do not silently treat an endpoint value as a midpoint value. If a midpoint gap is estimated by reading between plotted points, record that it is itself an estimate.
Worked Example: Comparing Estimates on a Nonuniform Partition
Worked Example: Comparing Estimates on a Nonuniform Partition
Suppose a table gives the vertical gap between an upper and a lower curve at the following \(x\)-values. Estimate the area using left-endpoint, right-endpoint, and trapezoidal methods.
| \(i\) | \(x_i\) | Gap \(d_i\) |
|---|---|---|
| 0 | 0 | 2 |
| 1 | 1 | 3 |
| 2 | 3 | 1 |
| 3 | 4 | 2 |
First compute the widths. They are \(\Delta x_0=1-0=1\), \(\Delta x_1=3-1=2\), and \(\Delta x_2=4-3=1\).
For the left estimate, use the gap at the left endpoint of each interval: \(2(1)+3(2)+1(1)=2+6+1=9\).
For the right estimate, pair each right-endpoint gap with the width of the interval ending at that point: \(3(1)+1(2)+2(1)=3+2+2=7\).
For the trapezoidal estimate, average the endpoint gaps on each interval, then multiply by its width:
The three estimates are \(9\), \(7\), and \(8\) square units. Check the trapezoidal calculation interval by interval: its contributions are \(2.5\), \(4\), and \(1.5\), which sum to \(8\). The widths used are \(1,2,1\), matching the successive intervals from \(0\) to \(1\), \(1\) to \(3\), and \(3\) to \(4\).
Trapezoidal Estimates and Why They Work
A trapezoidal estimate replaces the changing gap on each subinterval by a straight line joining the two sampled endpoint gaps. The region under that straight-line gap is a trapezoid: its parallel sides have lengths \(d_i\) and \(d_{i+1}\), and its width is \(\Delta x_i\). The area of a trapezoid is the average of its parallel-side lengths multiplied by the distance between them.
The formula can also be justified by writing the linearly interpolated gap explicitly. On the interval from \(x_i\) to \(x_{i+1}\), let \(t=x-x_i\), so \(0\leq t\leq\Delta x_i\). The straight-line gap is \(d_i+(d_{i+1}-d_i)t/\Delta x_i\). Its area is the integral of this expression over the interval:
Thus the trapezoidal formula is exact for the straight-line model on each interval. It need not be exact for the original curves: if their gap bends between samples, the straight-line model may differ from it.
Worked Example: Estimating with Horizontal Gaps
Worked Example: Estimating with Horizontal Gaps
Suppose the region is described using horizontal slices. At heights \(y=0\), \(y=2\), and \(y=5\), a table gives horizontal gaps of \(1\), \(3\), and \(2\) units, respectively. Estimate the area with left, right, and trapezoidal methods.
The height intervals are \(2-0=2\) and \(5-2=3\). For the left estimate, use the gap at the lower endpoint of each interval: \(1(2)+3(3)=2+9=11\) square units.
For the right estimate, use the gap at the upper endpoint of each interval: \(3(2)+2(3)=6+6=12\) square units.
For the trapezoidal estimate, average the gaps at the two heights bounding each interval:
The trapezoidal estimate is \(11.5\) square units. Its two contributions, \(4\) and \(7.5\), add to \(11.5\). Here the widths are changes in \(y\), not changes in \(x\): the first is \(2\), and the second is \(3\). The horizontal gaps supply the other dimension of each approximate strip.
Using Graphs and Midpoint Samples
When reading from a graph, first identify the direction of the slices. For vertical slices, read the two \(y\)-coordinates at the same \(x\) and subtract lower from upper. For horizontal slices, read the two \(x\)-coordinates at the same \(y\) and subtract left from right. Use the graph’s scale rather than the apparent pixel distance: a plotted gap of two grid squares is not necessarily two units if each square represents a different scale.
If the relevant samples are listed in a table, record the gaps and interval widths separately before multiplying. If a graph supplies midpoint values, midpoint rectangles use those values directly. They are useful when the midpoint gap is known or can be read with reasonable accuracy, but the method does not create missing data.
Worked Example: Midpoint Rectangles from a Graph
Worked Example: Midpoint Rectangles from a Graph
Suppose a graph gives midpoint samples on the intervals \([0,2]\) and \([2,5]\). At \(x=1\), the upper curve has value \(7\) and the lower curve has value \(3\). At \(x=3.5\), their values are \(6\) and \(4\). Estimate the area using midpoint rectangles.
The first interval has width \(2-0=2\). Its midpoint gap is \(7-3=4\), so its rectangle contributes \(4(2)=8\) square units.
The second interval has width \(5-2=3\). Its midpoint gap is \(6-4=2\), so its rectangle contributes \(2(3)=6\) square units.
The estimate is \(14\) square units. Checking the midpoint locations gives \((0+2)/2=1\) and \((2+5)/2=3.5\), exactly the locations used for the supplied gaps. The total also matches the sum of the two rectangle areas, \(8+6=14\).
Common Pitfall: Pairing a Gap with the Wrong Width
For a nonuniform partition, the right-endpoint gap belongs with the width of the interval immediately to its left. In the first example, the intervals have widths \(\Delta x_0=1\), \(\Delta x_1=2\), and \(\Delta x_2=1\). The right-endpoint gaps are \(d_1=3\), \(d_2=1\), and \(d_3=2\). The correct pairing is therefore \(d_1\Delta x_0+d_2\Delta x_1+d_3\Delta x_2=3(1)+1(2)+2(1)=7\).
A common indexing error is to write \(\sum_{i=1}^{3}d_i\Delta x_i\). This asks for \(\Delta x_3\), which is undefined: widths were defined only for \(i=0,1,2\). It also fails to pair the first right gap with the first interval’s width. Use instead \(\sum_{i=0}^{n-1}d_{i+1}\Delta x_i\), or equivalently \(\sum_{i=1}^{n}d_i\Delta x_{i-1}\).
Another error is to subtract the curves in the wrong order and use a negative gap as a rectangle height. For an area estimate, identify which curve is upper or right on the interval and calculate the nonnegative distance between them. If their order changes, the interval must be split at the change before applying these formulas to each part.
How to Interpret the Estimates
Rectangle estimates and trapezoidal estimates are models for the unobserved gaps between sample points. A left or right estimate assumes a constant gap equal to one endpoint’s sample across each interval. A midpoint estimate uses the sampled midpoint gap as the constant height. A trapezoidal estimate assumes the gap changes linearly between endpoint samples.
Without further information about the curves between samples, none of these numbers is guaranteed to equal the exact area or to lie consistently above or below it. The estimates can differ because they use different models, not necessarily because one calculation is wrong. A practical check is to confirm that every width is positive, every gap is measured in the intended direction, and each product uses the width of its own interval. If the estimates are close, that is useful information about the calculations, but it does not by itself prove the exact area.
Check Your Understanding
Use the sampled gaps and widths carefully, and identify the assumption behind each estimate.
- A vertical gap is \(4\) units at the left endpoint of an interval of width \(2\). What area contribution does the left rectangle use?
- A partition has widths \(\Delta x_0=1\) and \(\Delta x_1=3\), with gaps \(d_0=2\), \(d_1=5\), and \(d_2=1\). What is the right-endpoint estimate?
- For a horizontal-slice estimate, what dimensions are represented by the gap and by the interval width?
- What model for the gap between endpoint samples leads to the trapezoidal formula?
- Why can a finite table of curve values fail to determine the exact area?