Riemann sum: A method for approximating definite integrals by dividing the area under a curve into rectangles. The sum of the areas of these rectangles approximates the integral.
1. Divide the interval [a,b] into n subintervals of width Δx = (b-a)/n
2. Choose sample points in each subinterval (left, right, midpoint)
3. Calculate f(sample point) for each subinterval
4. Multiply by width: f(xi)·Δx for each rectangle
5. Sum all rectangle areas: Σ f(xi)·Δx
Δx = (b - a)/n = (2 - 0)/4 = 2/4 = 0.5
For left Riemann sum, we use the left endpoints of each subinterval:
x₀ = 0, x₁ = 0.5, x₂ = 1.0, x₃ = 1.5
f(0) = 0² = 0
f(0.5) = (0.5)² = 0.25
f(1.0) = (1.0)² = 1.0
f(1.5) = (1.5)² = 2.25
Left Riemann sum = Δx[f(x₀) + f(x₁) + f(x₂) + f(x₃)]
= 0.5[0 + 0.25 + 1.0 + 2.25]
= 0.5[3.5]
= 1.75
Actual integral: 8/3 ≈ 2.67
The left Riemann sum approximation of ∫[0,2] x² dx with n = 4 subintervals is 1.75.
• Left Riemann sum: Use left endpoints: Lₙ = Δx Σᵢ₌₀ⁿ⁻¹ f(xᵢ)
• Subinterval width: Δx = (b-a)/n
• Left endpoints: xᵢ = a + i·Δx for i = 0, 1, ..., n-1
Right Riemann sum: A Riemann sum where the height of each rectangle is determined by the function value at the right endpoint of each subinterval. This often gives an overestimate for increasing functions.
Δx = (b - a)/n = (2 - 0)/4 = 2/4 = 0.5
For right Riemann sum, we use the right endpoints of each subinterval:
x₁ = 0.5, x₂ = 1.0, x₃ = 1.5, x₄ = 2.0
f(0.5) = (0.5)² = 0.25
f(1.0) = (1.0)² = 1.0
f(1.5) = (1.5)² = 2.25
f(2.0) = (2.0)² = 4.0
Right Riemann sum = Δx[f(x₁) + f(x₂) + f(x₃) + f(x₄)]
= 0.5[0.25 + 1.0 + 2.25 + 4.0]
= 0.5[7.5]
= 3.75
Actual value: ∫[0,2] x² dx = [x³/3]₀² = (2³/3) - (0³/3) = 8/3 ≈ 2.67
The left Riemann sum (1.75) underestimates, while the right Riemann sum (3.75) overestimates.
Actual integral: 8/3 ≈ 2.67
The right Riemann sum approximation of ∫[0,2] x² dx with n = 4 subintervals is 3.75.
• Right Riemann sum: Use right endpoints: Rₙ = Δx Σᵢ₌₁ⁿ f(xᵢ)
• Subinterval width: Δx = (b-a)/n
• Right endpoints: xᵢ = a + i·Δx for i = 1, 2, ..., n
Midpoint Riemann sum: A Riemann sum where the height of each rectangle is determined by the function value at the midpoint of each subinterval. This often provides the most accurate approximation among the three basic methods.
Δx = (b - a)/n = (2 - 0)/4 = 2/4 = 0.5
For midpoint Riemann sum, we use the midpoints of each subinterval:
Subintervals: [0, 0.5], [0.5, 1.0], [1.0, 1.5], [1.5, 2.0]
Midpoints: x̄₁ = 0.25, x̄₂ = 0.75, x̄₃ = 1.25, x̄₄ = 1.75
f(0.25) = (0.25)² = 0.0625
f(0.75) = (0.75)² = 0.5625
f(1.25) = (1.25)² = 1.5625
f(1.75) = (1.75)² = 3.0625
Midpoint Riemann sum = Δx[f(x̄₁) + f(x̄₂) + f(x̄₃) + f(x̄₄)]
= 0.5[0.0625 + 0.5625 + 1.5625 + 3.0625]
= 0.5[5.25]
= 2.625
Actual value: ∫[0,2] x² dx = 8/3 ≈ 2.667
Left sum: 1.75 (underestimate)
Right sum: 3.75 (overestimate)
Midpoint sum: 2.625 (most accurate)
Actual integral: 8/3 ≈ 2.667
The midpoint Riemann sum approximation of ∫[0,2] x² dx with n = 4 subintervals is 2.625.
• Midpoint Riemann sum: Use midpoints: Mₙ = Δx Σᵢ₌₁ⁿ f(x̄ᵢ)
• Subinterval width: Δx = (b-a)/n
• Midpoints: x̄ᵢ = a + (i-0.5)·Δx for i = 1, 2, ..., n
Riemann sum: An approximation of a definite integral using rectangles under the curve.
Partition: Division of the interval [a,b] into n subintervals.
Sample point: The x-value in each subinterval where we evaluate the function.
Norm of partition: The width of the largest subinterval, denoted ||P||.
Refinement: Making subintervals smaller to improve accuracy.
- Divide the interval: Split [a,b] into n subintervals of equal width Δx = (b-a)/n
- Choose sample points: Select xᵢ* in each subinterval [xᵢ₋₁, xᵢ]
- Calculate rectangle areas: For each subinterval, area = f(xᵢ*)·Δx
- Sum the areas: Rₙ = Σ f(xᵢ*)·Δx for all subintervals
- Take the limit: As n → ∞ (or Δx → 0), Rₙ approaches the definite integral
- Verify: Check that the approximation makes sense given the function's behavior
• General Riemann sum: Sₙ = Σ f(xᵢ*)·Δx
• Subinterval width: Δx = (b-a)/n
• Left endpoints: xᵢ = a + i·Δx (i = 0, 1, ..., n-1)
• Right endpoints: xᵢ = a + i·Δx (i = 1, 2, ..., n)
• Midpoints: x̄ᵢ = a + (i-0.5)·Δx (i = 1, 2, ..., n)
• Uses left endpoints
• Underestimates for increasing
• Overestimates for decreasing
• Uses right endpoints
• Overestimates for increasing
• Underestimates for decreasing
• Uses midpoints
• Generally most accurate
• Balanced approximation
Trapezoidal rule: A numerical integration method that approximates the area under a curve using trapezoids instead of rectangles. It averages the left and right Riemann sums.
Δx = (b - a)/n = (2 - 0)/4 = 0.5
All endpoints: x₀ = 0, x₁ = 0.5, x₂ = 1.0, x₃ = 1.5, x₄ = 2.0
Evaluate f(x) = x² at each point:
f(0) = 0, f(0.5) = 0.25, f(1.0) = 1.0, f(1.5) = 2.25, f(2.0) = 4.0
Trapezoidal rule: Tₙ = (Δx/2)[f(x₀) + 2f(x₁) + 2f(x₂) + ... + 2f(xₙ₋₁) + f(xₙ)]
T₄ = (0.5/2)[f(0) + 2f(0.5) + 2f(1.0) + 2f(1.5) + f(2.0)]
= (0.25)[0 + 2(0.25) + 2(1.0) + 2(2.25) + 4.0]
= (0.25)[0 + 0.5 + 2.0 + 4.5 + 4.0]
= (0.25)[11.0] = 2.75
Left sum (n=4): 1.75
Right sum (n=4): 3.75
Midpoint sum (n=4): 2.625
Trapezoidal sum (n=4): 2.75
Actual value: 8/3 ≈ 2.667
Actual integral: 8/3 ≈ 2.667
The trapezoidal rule approximation of ∫[0,2] x² dx with n = 4 subintervals is 2.75.
• Trapezoidal rule: Tₙ = (Δx/2)[f(x₀) + 2Σf(xᵢ) + f(xₙ)]
• Relationship: Tₙ = (Lₙ + Rₙ)/2
• Accuracy: Often more accurate than basic Riemann sums
Accuracy improvement: As the number of subintervals increases, the Riemann sum approximation typically becomes more accurate, approaching the exact value of the definite integral.
Δx = 0.5
Midpoints: 0.25, 0.75, 1.25, 1.75
Function values: 0.0625, 0.5625, 1.5625, 3.0625
M₄ = 0.5(5.25) = 2.625
Δx = (2-0)/8 = 0.25
Subintervals: [0,0.25], [0.25,0.5], [0.5,0.75], [0.75,1], [1,1.25], [1.25,1.5], [1.5,1.75], [1.75,2]
Midpoints: 0.125, 0.375, 0.625, 0.875, 1.125, 1.375, 1.625, 1.875
Function values: 0.015625, 0.140625, 0.390625, 0.765625, 1.265625, 1.890625, 2.640625, 3.515625
Sum = 10.625
M₈ = 0.25(10.625) = 2.65625
Actual value: ∫[0,2] x² dx = 8/3 ≈ 2.6667
Error with n=4: |2.6667 - 2.625| = 0.0417
Error with n=8: |2.6667 - 2.65625| = 0.0104
The error decreased by approximately a factor of 4 when n doubled, demonstrating the quadratic convergence of midpoint rule.
M₈ = 2.65625 (error ≈ 0.0104)
With n=4, M₄ = 2.625; with n=8, M₈ = 2.65625. The approximation improves as n increases, with the error roughly quartered when n doubles.
• Accuracy improvement: More subintervals → better approximation
• Convergence rate: Midpoint rule has O(h²) error (where h = Δx)
• Error analysis: Compare with known exact value
Comprehensive Summary: Riemann Sums Approximation
Riemann Sum: An approximation of a definite integral by dividing the area under a curve into rectangles and summing their areas.
Partition: A division of the interval [a,b] into n subintervals [xᵢ₋₁, xᵢ].
Sample Point: The point xᵢ* in each subinterval where we evaluate f(x) to determine rectangle height.
Norm of Partition: The width of the largest subinterval, ||P|| = max Δxᵢ.
Refinement: A partition with smaller subintervals than another partition.
General Riemann Sum: Sₙ = Σ f(xᵢ*)·Δx
Left Riemann Sum: Lₙ = Δx Σᵢ₌₀ⁿ⁻¹ f(xᵢ) where xᵢ = a + i·Δx
Right Riemann Sum: Rₙ = Δx Σᵢ₌₁ⁿ f(xᵢ) where xᵢ = a + i·Δx
Midpoint Riemann Sum: Mₙ = Δx Σᵢ₌₁ⁿ f(x̄ᵢ) where x̄ᵢ = a + (i-0.5)·Δx
Trapezoidal Rule: Tₙ = (Δx/2)[f(x₀) + 2Σf(xᵢ) + f(xₙ)]
1. Determine parameters: Calculate Δx = (b-a)/n and identify subintervals.
2. Choose sample points: Select left endpoints, right endpoints, or midpoints.
3. Evaluate function: Calculate f(xᵢ*) at each sample point.
4. Calculate areas: Multiply each function value by Δx.
5. Sum results: Add all rectangle/trapezoid areas.
6. Analyze accuracy: Compare with exact value if known.
Left Sum: Underestimates for increasing functions, overestimates for decreasing.
Right Sum: Overestimates for increasing functions, underestimates for decreasing.
Midpoint Sum: Generally most accurate among basic methods.
Trapezoidal: Average of left and right sums, often quite accurate.
Error Rates: Midpoint and trapezoidal have O(h²) error; left/right have O(h).
Tips: Use midpoint for best basic accuracy; increase n for better approximations; consider function behavior to predict over/underestimation.
Pitfalls: Forgetting to multiply by Δx; confusing sample point locations; not accounting for subinterval boundaries.
Verification: Check that approximation makes sense given function behavior.
Convergence: Remember that as n → ∞, Riemann sums approach the definite integral.
"LRM": Left (0 to n-1), Right (1 to n), Midpoint (1 to n with adjusted points).
"Width × Height": Each rectangle has area Δx × f(sample point)."More n, Better Approx": Increasing subintervals improves accuracy.
"Midpoint Magic": Midpoint rule typically most accurate for basic methods.
Questions & Answers
Question: How do I decide whether to use left, right, or midpoint Riemann sums? Does one method always give better results than others?
Answer: The choice depends on the situation:
- Midpoint rule: Generally most accurate for basic Riemann sums (O(h²) error vs O(h) for left/right)
- Left/Right sums: Useful for understanding the concept and predicting over/underestimation
- Function behavior: For increasing functions, left sums underestimate, right sums overestimate
For computational efficiency, midpoint and trapezoidal rules are preferred. For learning, all three help understand the concept. The accuracy also depends on the function's properties - for linear functions, all three give exact results.
Question: How do I know if my Riemann sum approximation is too high or too low compared to the actual integral value?
Answer: The relationship depends on both the function's behavior and the type of Riemann sum:
For increasing functions:
- Left Riemann sum: Underestimates (too low)
- Right Riemann sum: Overestimates (too high)
For decreasing functions:
- Left Riemann sum: Overestimates (too high)
- Right Riemann sum: Underestimates (too low)
For concave up functions, midpoint sums tend to underestimate and trapezoidal sums overestimate. For concave down, the opposite occurs.
Question: How many subintervals should I use for a good approximation? Is there a rule for choosing n?
Answer: There's no universal rule, but here are some guidelines:
- Class exercises: n = 4-10 is typical for manual calculations
- Computational applications: n can be in the hundreds or thousands
- Error tolerance: For specific accuracy requirements, use error bound formulas
As a practical approach, start with a small n and double it until the results stabilize. The error typically decreases by a factor related to the method: for midpoint rule, doubling n roughly quarters the error (O(h²) convergence).