Area Under a Curve

Thinner and thinner rectangles, taken to a limit.

Rectangles under the curve

Take the region under the curve y = x², above the x-axis, from x = 0 to x = 3. It has a curved top, so no area formula fits it. Cut it into three strips, each 1 wide, and replace each strip by a rectangle as tall as the curve at the middle of the strip.

The middles are at x = 0.5, 1.5 and 2.5, so the heights are 0.25, 2.25 and 6.25. Each width is 1, so the rectangles add up to 0.25 + 2.25 + 6.25 = 8.75. That is close to the area, but each rectangle's flat top misses a little of the curve.

xy

Three rectangles under y = x² from x = 0 to x = 3, each 1 wide and as tall as the curve at its middle. Their areas add to 8.75.

Thinner rectangles

Cut the same region into 8 strips instead, each 3/8 = 0.375 wide. The rectangles now add up to 8.96484375. With 3 strips the sum fell short of 9 by 0.25; with 8 strips it falls short by only about 0.035.

Each time the strips get thinner, the gap between the flat tops and the curve shrinks. The sums close in on one number, and that number is the area.

xy

Eight rectangles under y = x² from x = 0 to x = 3, each 0.375 wide. Their areas add to 8.96484375, closer to 9.

Left and right rectangles

The height can also be taken at the left or the right edge of each strip. On a rising curve like y = x², a left rectangle sits under the curve and a right rectangle pokes above it. From x = 0 to x = 3 with three strips, the left rectangles give 0 + 1 + 4 = 5 and the right rectangles give 1 + 4 + 9 = 14, so the area lies between 5 and 14. As the strips get thinner, both sums close in on the same area.

12xyn = 5leftrightmidpoint

n = 5, so the error is 0.853

Increase n until the Riemann sum converges on the exact area

Five right rectangles under y = x² from x = 0 to x = 2. Their areas add to 3.52, more than the area under the curve, 8/3 ≈ 2.667. Drag the number of rectangles up and watch the error shrink, then switch to left or midpoint heights.

Why integrating gives the area

Let A(x) be the area under the curve from 0 up to x. Move the right edge a little further, from x to x + h. The area grows by a thin strip h wide and about f(x) tall, so A grows by about f(x) × h.

Divide by h: the rate at which A grows is about f(x), and the thinner the strip, the better that holds. So the derivative of the area function is the curve's height, A'(x) = f(x), and the area function is an integral of f(x).

For y = x², every integral has the form x³/3 + c. The area from 0 up to 0 is nothing, so A(0) = 0, which gives c = 0. The area from 0 to 3 is then A(3) = 3³/3 = 27/3 = 9, the number the rectangle sums were closing in on.

xyf(x) = 1.44Δx = 0.4x = 1.2f(x)·Δx = 1.44 × 0.4 = 0.576∫₀² x² dx = 8/3

the sign ∫ is an S for sum: each sliver is height f(x) × width Δx = 0.576, and the integral adds them across the interval

Narrow the sliver to dx = 0.01

A strip under y = x² at x = 1.2. Its area is about f(1.2) × Δx = 1.44 × Δx. Drag the width down: the strip becomes a thinner and thinner rectangle of height 1.44, so the area grows at the rate 1.44 there.

xy

The region under y = x² from x = 0 to x = 3, shaded. Its area is exactly 9.

The definite integral

The area under y = f(x) from x = a to x = b is the definite integral of f(x) from a to b. Find an integral F(x), then work out F(b) − F(a). The + c is not needed, because it would be added to both values and then subtracted away.

For y = x² from 0 to 3, it is written ∫₀³ x² dx = [x³/3]₀³ = 27/3 − 0/3 = 9. The square brackets hold the integral, with the two limits beside them.

The lower limit need not be 0. The area under y = x² from 1 to 2 is [x³/3]₁² = 8/3 − 1/3 = 7/3, which is about 2.33. A rough check with one rectangle 1 wide, as tall as the curve at x = 1.5, gives 2.25.

Check the method where the area is already known. Under the line y = x from 0 to 4 the region is a triangle with base 4 and height 4, so its area is ½ × 4 × 4 = 8. Integrating x gives x²/2, and 4²/2 − 0 = 8 as well.

The usual mistakes

Forgetting to divide by the new power. The area under y = x² from 0 to 3 is not 3³ = 27: integrating x² gives x³/3, so the area is 27/3 = 9.

Integrating x instead of x². x²/2 at 3 gives 9/2, the area under the straight line y = x, not under the curve.

Using only the upper limit when the lower one is not 0. The area from 1 to 2 is 8/3 − 1/3 = 7/3, not 8/3.

Taking a rectangle sum for the exact area. Three midpoint rectangles give 8.75, close to 9 but not equal to it; only the limit, or the integral, gives 9.

A car overtaking

In the application below, a car's speed is a curve against time. The distance it travels is the area under that curve, found by a definite integral, and compared with the rectangle for a steady speed.

Worked example: A Car Overtaking a Lorry: The Distance Traveled as the Area Under Its Speed-Time Curve

Question A car traveling at 12 m/s pulls out to overtake a lorry. For the next 6 seconds its speed is v = 12 + 6x − x2 m/s, where x is the time in seconds, and at x = 6 it is back at 12 m/s. (a) Find the greatest speed of the car while it overtakes. (b) Find the distance the car travels in the 6 seconds, and how much further that is than if it had stayed at 12 m/s.

  1. 1.The speed is greatest where dvdx = 6 − 2x = 0, which is at x = 3. (a) The greatest speed is v = 12 + 18 − 9 = 21 m/s.

    061218240123456seconds after pulling out, xspeed (m/s), v21 m/sdv/dx = 6 − 2x = 0 at x = 3greatest speed 12 + 18 − 9 = 21 m/s
    061218240123456seconds after pulling out, xspeed (m/s), v21 m/sdv/dx = 6 − 2x = 0 at x = 3greatest speed 12 + 18 − 9 = 21 m/s
    (a) The speed is greatest where dvdx = 6 − 2x = 0, at x = 3, and it is 21 m/s.
  2. 2.The distance is the area under the speed-time curve from x = 0 to x = 6, which is ∫06 (12 + 6x − x2) dx.

    061218240123456seconds after pulling out, xspeed (m/s), v21 m/sdistance = area under the curvefrom x = 0 to x = 6
    061218240123456seconds after pulling out, xspeed (m/s), v21 m/sdistance = area under the curvefrom x = 0 to x = 6
    The distance is the shaded area under the speed-time curve, ∫06 (12 + 6x − x2) dx.
  3. 3.Integrate term by term, raising each power by one and dividing by the new power: [12x + 3x2 − x33]06.

    061218240123456seconds after pulling out, xspeed (m/s), v21 m/s12x + 3x2− x3/3each power up by one, over the new power
    061218240123456seconds after pulling out, xspeed (m/s), v21 m/s12x + 3x2− x3/3each power up by one, over the new power
    Integrate term by term: [12x + 3x2 − x33]06.
  4. 4.Put in the limits: (72 + 108 − 72) − 0 = 108. The car travels 108 m in the 6 seconds.

    061218240123456seconds after pulling out, xspeed (m/s), v21 m/s108 mx = 6: 72 + 108 − 72 = 108, and x = 0 gives 0distance = 108 m
    061218240123456seconds after pulling out, xspeed (m/s), v21 m/s108 mx = 6: 72 + 108 − 72 = 108, and x = 0 gives 0distance = 108 m
    Put in the limits: (72 + 108 − 72) − 0 = 108. The car travels 108 m.
  5. 5.At a steady 12 m/s it would have traveled 12 × 6 = 72 m, the area of the rectangle under the line v = 12. (b) The car travels 108 m, which is 108 − 72 = 36 m further. Check: ∫06 (6x − x2) dx = 108 − 72 = 36.

    061218240123456seconds after pulling out, xspeed (m/s), v21 m/s72 m36 ma steady 12 m/s: 12 × 6 = 72 m108 − 72 = 36 m further
    061218240123456seconds after pulling out, xspeed (m/s), v21 m/s72 m36 ma steady 12 m/s: 12 × 6 = 72 m108 − 72 = 36 m further
    (b) At a steady 12 m/s the car would cover the rectangle, 72 m. It travels 108 − 72 = 36 m further.

Answer: (a) 21 m/s; (b) 108 m, which is 36 m further than at a steady 12 m/s

Common mistakes

  • Multiplying the greatest speed by the time, 21 × 6 = 126 m. The car is at 21 m/s for only one instant; the area under the curve adds up the speed at every moment.
  • Differentiating the speed to find the distance. Differentiating the speed gives the acceleration; the distance comes from integrating, which reverses differentiation.

More introduction to calculus problems, worked step by step →

Practice Area Under a Curve in the app