Integration — The Area Under the Curve

Discover how infinitely thin rectangles sum up to reveal area — and why it is the inverse of a derivative.

Mathematics Calculus intermediate 8 min

This concept builds on Derivative — The Slope at a Point. Consider exploring it first for the best experience.

Step 1 of 6

The area problem: two rectangles

The page opens on the curve x² between 0 and 3 with just two green rectangles under it. Their tops form a coarse staircase that misses most of the region, so the 'approx area' readout says 3.375 while 'true area' says 9.000. A curve has no simple width × height formula — rectangles are where we start.

Approximate with rectangles

Move the 'Rectangles n' slider to the right, one notch at a time. Each rectangle has a known area, its width × its height, and the 'approx area' readout adds them all up. Watch the staircase hug the curve more closely and the 'error' readout fall as n climbs.

Worked Example: ∫₀³ x² dx = 9

With the curve set to 'x² (worked example)', stop the slider at n = 10, so each rectangle is 0.3 wide. The antiderivative x³/3 gives 27/3 = 9, the 'true area' readout. With the 'Left' rule the 'approx area' reads 7.695 (about 7.7), an error of 14.50%. Choose 'Midpoint' in the rule menu: the readout jumps to 8.977 (about 8.98) and the error drops to 0.25%.

Left, right, midpoint rules

Each rule picks a different height for every rectangle: the left edge, the right edge or the middle. Flip the rule menu between 'Left', 'Right' and 'Midpoint' and compare the readouts. On the rising x² curve Left undershoots and Right overshoots; choose '(3−x)² + 1 (decreasing)' in the function menu and the two biases swap, while Midpoint stays closest.

Shrink the rectangles

Drag the 'Rectangles n' slider past 30. The rectangles become thin slivers and the gap between the staircase and the curve nearly vanishes: at n = 50 the Left rule’s error is 2.98% and Midpoint’s is 0.01%. Press 'Play sweep' to let n climb on its own to 100 while you watch the readouts settle.

The integral symbol

At n = 100 the 'approx area' readout sits within 1.5% of the true area even for the crude Left rule. Let n grow without limit and the sum becomes exact — that limit is written ∫₀³ x² dx. The ∫ sign is an elongated S, for Sum: adding infinitely many infinitely thin rectangles of width dx.

How It Works — Step by Step

Step 1 of 6
  1. 1

    The area problem: two rectangles

    The page opens on the curve x² between 0 and 3 with just two green rectangles under it. Their tops form a coarse staircase that misses most of the region, so the 'approx area' readout says 3.375 while 'true area' says 9.000. A curve has no simple width × height formula — rectangles are where we start.

  2. 2

    Approximate with rectangles

    Move the 'Rectangles n' slider to the right, one notch at a time. Each rectangle has a known area, its width × its height, and the 'approx area' readout adds them all up. Watch the staircase hug the curve more closely and the 'error' readout fall as n climbs.

  3. 3

    Worked Example: ∫₀³ x² dx = 9

    With the curve set to 'x² (worked example)', stop the slider at n = 10, so each rectangle is 0.3 wide. The antiderivative x³/3 gives 27/3 = 9, the 'true area' readout. With the 'Left' rule the 'approx area' reads 7.695 (about 7.7), an error of 14.50%. Choose 'Midpoint' in the rule menu: the readout jumps to 8.977 (about 8.98) and the error drops to 0.25%.

  4. 4

    Left, right, midpoint rules

    Each rule picks a different height for every rectangle: the left edge, the right edge or the middle. Flip the rule menu between 'Left', 'Right' and 'Midpoint' and compare the readouts. On the rising x² curve Left undershoots and Right overshoots; choose '(3−x)² + 1 (decreasing)' in the function menu and the two biases swap, while Midpoint stays closest.

  5. 5

    Shrink the rectangles

    Drag the 'Rectangles n' slider past 30. The rectangles become thin slivers and the gap between the staircase and the curve nearly vanishes: at n = 50 the Left rule’s error is 2.98% and Midpoint’s is 0.01%. Press 'Play sweep' to let n climb on its own to 100 while you watch the readouts settle.

  6. 6

    The integral symbol

    At n = 100 the 'approx area' readout sits within 1.5% of the true area even for the crude Left rule. Let n grow without limit and the sum becomes exact — that limit is written ∫₀³ x² dx. The ∫ sign is an elongated S, for Sum: adding infinitely many infinitely thin rectangles of width dx.

Key Takeaways

Area = infinite sum

An integral is the limit of a Riemann sum as the rectangle width approaches zero.

Inverse of the derivative

If F is the antiderivative of f, then ∫f(x)dx from a to b = F(b) − F(a). This is the Fundamental Theorem of Calculus.

n controls precision

More rectangles → better approximation. You set n with the slider, and the error readout shows how quickly each rule closes in on the true area.

Bias depends on the curve

The direction of a Riemann sum’s error depends on whether the function is increasing or decreasing over the interval — try the function selector to see the over/under-estimate flip.

Added
Updated
  • — Steps now follow the rectangle count you set; new worked example: the area under x² from 0 to 3.