Riemann Sums: Area from Rectangles

Category: Calculus   Level: 301

∫04 (x2/4 + 1) dx ≈ ∑ f(xi) Δ x

Split the area under a curve into thin rectangles, add their areas, and let the rectangles get thinner. The sums close in on the exact area, which is the definite integral.

Step through it

Watch it

Animated walkthrough

Step by step

Step 1: Draw the curve and the region

Find the area under y = x²/4 + 1 between x = 0 and x = 4. No formula from geometry fits this curved shape.

area = ?

Step 1: Draw the curve and the region

Step 2: Approximate with 4 rectangles

Cut [0, 4] into 4 strips of width Δx = 1. Make each strip a rectangle whose height is the curve at the strip midpoint.

area ≈ 1·(f(0.5) + f(1.5) + f(2.5) + f(3.5)) = 9.250

Step 2: Approximate with 4 rectangles

Step 3: Use thinner rectangles

With 8 strips of width 0.5 the rectangles hug the curve more closely. The gaps and overlaps shrink.

Step 3: Use thinner rectangles

Step 4: Let the width go to zero

With 32 strips the sum is almost exactly the area. In the limit as Δx → 0 the sum becomes the definite integral.

∫04 (x2/4 + 1) dx = 28/3 ≈ 9.3333

Step 4: Let the width go to zero

All steps at once

Storyboard

Generate it yourself

cd svg-generator
python3 -m svgmath render riemann-sum --out /tmp/riemann-sum

Source: svgmath/diagrams/riemann_sum.py