Local Linear Models for Riemann-Sum Error
A worked explanation of local linear models for riemann-sum error, including the key limitation and a checkable example.
Local Linear Models for Riemann-Sum Error Explained
A left Riemann sum with four rectangles on f(x)=x² from 0 to 2 gives 1.75; the right sum gives 3.75; the true area is 8/3≈2.667. The local linear models for riemann-sum error built from the function's slope at each point explain why one sum undershoots and the other overshoots, and they show what happens when you refine the partition.
The key insight is that the slope f'(c) at a point c tells you whether the function is rising or falling there. For f(x)=x² on [0,2], f'(x)=2x, which is positive for every x>0. That means the function is strictly increasing across the whole interval. When you build a left Riemann sum, you use the height at the left edge of each subinterval. On an increasing function, that left-edge height is always lower than the function's value at the right edge of the same subinterval, and lower than the average height across that subinterval. So the left sum is an underestimate. A right sum uses the right-edge height, which is always higher, so the right sum is an overestimate.
This relationship holds because of the direction the function is moving, not because of its curvature. The local slope at any point within the interval tells you the instantaneous rate of change. Where that rate is positive, the function is gaining height as x increases, and the left rectangle misses that gain. Where the rate is negative, the function is losing height, and the left rectangle catches a height that is already too high. The linear approximation L(x)=f(c)+f'(c)(x−c) gives the best local estimate of where the function will be a short distance away, and that estimate determines whether the rectangle you build at that location will be too tall or too short.
A Worked Example
Work through f(x)=x² on [0,2] with n=4. The subinterval width Δx = (2−0)/4 = 0.5. The partition points are x₀=0, x₁=0.5, x₂=1.0, x₃=1.5, x₄=2.0.
The left Riemann sum uses heights at x₀, x₁, x₂, x₃: f(0)=0, f(0.5)=0.25, f(1)=1, f(1.5)=2.25. Sum: 0+0.25+1+2.25 = 3.5. Multiply by Δx=0.5: left sum = 1.75. The right Riemann sum uses heights at x₁, x₂, x₃, x₄: 0.25, 1, 2.25, 4. Sum = 7.5, times 0.5 = 3.75. The true integral ∫₀² x² dx = [x³/3]₀² = 8/3 ≈ 2.6667.
The left sum underestimates by about 0.9167; the right sum overestimates by about 1.0833. The local slope f'(x)=2x explains the direction of both errors. At x=0, f'(0)=0; the function is flat there, so the first left rectangle (height 0) is not far off, the function barely rises over the first 0.5 units. At x=1, f'(1)=2, meaning the function is climbing steeply; the left rectangle at x=1 uses height 1.0, but the function reaches 2.25 by x=1.5, so the left rectangle misses a lot of area. The right rectangle at x=1.5 uses height 2.25, which overcaptures because the function was lower at the left of that subinterval.
The overestimate and underestimate are not symmetric because the slope is not constant, it increases as x increases. The right sum's overestimate is larger because the function is climbing faster at the right end of the interval, so the over-height rectangles cover more area than the under-height rectangles lost.
- Approximation method: Left Riemann sum on f(x)=x², [0,2], n=4
- Left sum result: 1.75
- Right sum result: 3.75
- True integral value: 8/3 ≈ 2.6667
- Left sum error (underestimate): −0.9167
- Right sum error (overestimate): +1.0833
- Confirms increasing function rule: Left underestimates, right overestimates when f' > 0
Calculation Steps
To calculate the effect of local slope on the Riemann-sum error, you need to compare the rectangle height to the function's average height over that subinterval. The local linear model tells you what the function would do if it kept changing at the same rate. Over a small enough subinterval, that linear approximation is a good guide.
For each subinterval [xᵢ₋₁, xᵢ], the left sum uses f(xᵢ₋₁). The right sum uses f(xᵢ). The average height of the linear approximation L(x)=f(xᵢ₋₁)+f'(xᵢ₋₁)(x−xᵢ₋₁) over the subinterval is exactly the height at the midpoint of that subinterval, if the function were truly linear. For increasing f, the left height is below that midpoint height, and the right height is above it.
When the subinterval width gets smaller, the difference between f(xᵢ₋₁) and f(xᵢ) shrinks proportionally to Δx. The error in a left or right sum over one subinterval is roughly (1/2)f'(c)(Δx)² for some c in the subinterval. This is why doubling the number of subintervals (halving Δx) reduces the error by a factor of about four, the error depends on Δx squared. Refinement reduces error because each subinterval covers a region where the local linear model is more accurate. The left sum's underestimate on each piece is smaller, and the total underestimate shrinks.
For f(x)=x² with n=8 (Δx=0.25), the left sum becomes 1.09375? Recompute: left heights at 0, 0.25, 0.5, 0.75, 1.0, 1.25, 1.5, 1.75. f(0)=0, f(0.25)=0.0625, f(0.5)=0.25, f(0.75)=0.5625, f(1)=1, f(1.25)=1.5625, f(1.5)=2.25, f(1.75)=3.0625. Sum=0+0.0625+0.25+0.5625+1+1.5625+2.25+3.0625=8.6875. Times Δx=0.25: left sum=2.171875. Error: 2.171875−2.6667=−0.4948, which is about half the error from n=4. The error roughly halved, not quartered, because the error formula for a left sum on a quadratic has both a leading term and a lower-order term. The improvement is real but not perfectly quadratic, the local linear model explains why refinement works, but the exact error reduction depends on the function's shape.
Why the Method Works
The slope explains overestimates and underestimates because it tells you which direction the function is moving relative to the rectangle's height. When f'(x)>0 across the whole interval, every left rectangle uses a height that is behind the rising function, so every rectangle is too short. Every right rectangle uses a height that is ahead of the rising function, so every rectangle is too tall. The local linear model at any point c shows that the function is leaving the left endpoint height behind and climbing toward the right endpoint height.
When f'(x)<0 for a decreasing function, the situation reverses. A left rectangle catches a height that is already above where the function will be for most of the subinterval, so the left sum overestimates. The right rectangle catches a height that is below the earlier values, so the right sum underestimates. The local slope's sign determines which endpoint gives the higher rectangle and which gives the lower one.
Concavity does not enter this explanation. The local linear model for Riemann-sum error focuses on the first derivative, not the second. A function can be increasing and concave down, like √x, and the left sum still underestimates and the right sum still overestimates. The concavity affects the size of the error but not its direction. The midpoint and trapezoidal rules depend on concavity for their direction, but left and right sums depend only on monotonicity, which is exactly what the local slope measures.
Refinement makes the local linear model more relevant because each subinterval becomes narrower. Over a narrower interval, the actual function deviates less from its tangent line. The linear approximation L(x)=f(c)+f'(c)(x−c) is a better stand-in for f over a width of 0.1 than over a width of 1. So the error contributed by each subinterval shrinks, and the sum of those smaller errors is a smaller total error. This is why doubling n usually cuts the error in half or better, even though the exact factor depends on f and the rule.
| Slope Sign | Left Sum Direction | Right Sum Direction | Why |
|---|---|---|---|
| Positive (f'>0) | Underestimate | Overestimate | Left height is lowest point, right height is highest point in subinterval |
| Negative (f'<0) | Overestimate | Underestimate | Left height is highest point, right height is lowest point in subinterval |
| Zero (f'=0) on interval | Exact | Exact | Function is constant, so all heights equal; both sums match the integral |
| Mixed sign within interval | Unpredictable | Unpredictable | Some subintervals over- and some underestimate; net error depends on function shape |
One Failure Case and Its Limit
The local linear model for Riemann-sum error breaks down when the function is not monotonic across the whole interval. Take f(x)=sin(x) on [0,π] with n=2. Δx = π/2 ≈ 1.5708. The left sum uses heights at x=0 and x=π/2: sin(0)=0, sin(π/2)=1. Sum = 1, times π/2 ≈ 1.5708. The true integral ∫₀^π sin(x) dx = 2. The left sum underestimates by about 0.4292. The right sum uses heights at π/2 and π: 1 and 0, sum=1, same approximation 1.5708, also an underestimate. But the function is increasing on [0, π/2] (f'>0) and decreasing on [π/2, π] (f'<0).
For the first subinterval [0, π/2], the left sum should underestimate (f'>0), which it does: the true area of the first lobe is 1, and the left rectangle gives 0. For the second subinterval [π/2, π], the left sum should overestimate because the function is decreasing (f'<0). The left height at π/2 is 1; the true area under the decreasing curve from π/2 to π is 1. The left rectangle gives about 1.57, which is an overestimate of roughly 0.57. The two errors, an underestimate of 1 on the first subinterval and an overestimate of 0.57 on the second, partially cancel, leaving a net underestimate of 0.43. The local linear model's prediction (left sum underestimates when f'>0) works per subinterval but cannot give a single direction for the whole sum.
If you try to use the linear approximation calculator at this point, you get a tangent line at, say, x=π/4 where f'(π/4)=0.707. That slope tells you the function is rising there, so the left rectangle at that subinterval underestimates. But it does not tell you what happens in the second subinterval where the slope is negative. The local linear model offers a local explanation without replacing formal error bounds, and it fails globally when the slope changes sign.
The single thing that most often goes wrong here is assuming that one rule always overestimates or always underestimates for any function. The direction is determined by the local slope on each subinterval, not by the rule itself. A left sum is not always an underestimate; it is only an underestimate when the function is increasing across that subinterval. Check the slope on every subinterval, not just the overall trend.
Common Questions
Why does the left sum underestimate an increasing function?
Because the height at the left endpoint is lower than the function's height at every other point in that subinterval. The local slope f'(c)>0 means the function is rising, so the left edge is the lowest point in that subinterval. Using that low height for the whole rectangle misses the area gained as x increases.
Can the local linear model predict the exact error size?
No. It predicts the direction of the error, over or under, but not the magnitude. The error size depends on f'' (concavity) and the subinterval width. For a quadratic like x², the error per subinterval is (1/6)f''(c)(Δx)³ for the midpoint rule, but for left/right sums it is (1/2)f'(c)(Δx)² plus higher-order terms. The slope gives the leading term but not the full value.
What happens when the function is not monotonic?
The local linear model fails to give a single direction for the total error. If f changes from increasing to decreasing within the interval, some subintervals produce overestimates and others produce underestimates. The net error can be small even though each individual rectangle is wrong. This is the failure case for the slope-based explanation.
Does the trapezoidal rule also depend on local slope?
Indirectly. The trapezoidal rule averages the left and right heights, so it cancels some of the slope-driven error. For a linear function (constant slope), the trapezoidal rule is exact. For nonlinear functions, the error depends on the second derivative, not the first. The local linear model for Riemann-sum error is specific to left and right sums.
How do I justify an overestimate or underestimate on an AP exam?
State that the function is increasing or decreasing on the interval, then state that a left or right sum is an underestimate or overestimate accordingly. Do not mention concavity. The scoring guidelines for AP Calculus AB and BC require monotonicity as the justification, not curvature.