Areas under curves and the fundamental theorem¶
Change and motion · level 8, lesson 6 of 7
A question to start¶
Draw the curve \(y = x^2\) from \(x = 0\) to \(x = 1\) inside a 1 by 1 square. The curve cuts the square into two parts: the region under the curve, and the region above it.
What fraction of the square lies under the curve? It is clearly less than a half (the curve sags below the diagonal). The answer is exactly \(\frac13\). Under \(y = x^3\) it is exactly \(\frac14\), and under \(y = x^4\) exactly \(\frac15\).
Those neat fractions are a clue. In \(x^2 \to \frac13\), \(x^3 \to \frac14\), \(x^4 \to \frac15\) you might spot the power rule running backwards. That is no coincidence. It is the fundamental theorem of calculus, which says that finding areas and finding slopes are opposite processes. It is one of the great discoveries of all mathematics.
The idea¶
Distance is an area¶
In level 5 you saw that on a speed-time graph, distance travelled is the area under the graph. For a constant speed it is a rectangle (speed × time). For a steadily rising speed it is a triangle or a trapezoid. But what if the speed graph is a curve?
The idea: cut the time into thin strips. In each thin strip the speed hardly changes, so the distance in that strip is almost (speed) × (width): the area of a thin rectangle. Add them all up. The thinner the strips, the better the answer. Any area under any curve can be found the same way.
Riemann sums¶
To find the area under \(y = f(x)\) from \(x = a\) to \(x = b\):
- Cut \([a, b]\) into \(n\) strips of equal width \(\Delta x = \frac{b - a}{n}\).
- In each strip, build a rectangle whose height is the value of \(f\) at one point of the strip (the right edge, the left edge or the middle).
- Add up the areas: height × width, for every strip.
This total is called a Riemann sum, after Bernhard Riemann, who made the idea precise in the 1850s. With right edges at \(x_1, x_2, \ldots, x_n\), in sigma notation:
Here is \(y = x^2\) on \([0, 1]\) with 4 strips of width \(\frac14\), heights taken at the right edges:
The rectangles poke out above the curve, so this is too big. Using left edges instead, every rectangle sits under the curve, giving \(L_4 = \frac14\left(0 + \frac{1}{16} + \frac{4}{16} + \frac{9}{16}\right) = 0.21875\), too small. The true area is trapped between them. With more strips the trap closes:
| Strips \(n\) | 4 | 10 | 100 | 1000 |
|---|---|---|---|---|
| Right sum \(R_n\) (too big) | 0.46875 | 0.385 | 0.33835 | 0.3338335 |
| Left sum \(L_n\) (too small) | 0.21875 | 0.285 | 0.32835 | 0.3328335 |
Both close in on \(\frac13\).
Why exactly one third¶
With \(n\) strips the right edges are \(\frac1n, \frac2n, \ldots, \frac nn\), so
The sum of the first \(n\) squares is \(\frac{n(n + 1)(2n + 1)}{6}\) (proved in Patterns: sums of squares and cubes). So
As \(n \to \infty\) the last two terms vanish. In the same way \(L_n = \frac13 - \frac{1}{2n} + \frac{1}{6n^2}\). The area is always between \(L_n\) and \(R_n\), and both tend to \(\frac13\), so the area is exactly \(\frac13\).
The definite integral¶
The limit of the Riemann sums, when it exists, is the definite integral:
The tall \(\int\) is a stretched S, for "sum", chosen by Leibniz. The \(dx\) is what the thin width \(\Delta x\) becomes. The numbers \(a\) and \(b\) are the limits of integration. For a continuous function the limit always exists, whichever point of each strip you use.
One detail: where the graph is below the \(x\)-axis, \(f(x)\) is negative, so the rectangles count as negative. The integral measures signed area: area above the axis minus area below. For a velocity graph that is exactly right: time spent going backwards subtracts from the displacement.
Antiderivatives¶
A function \(F\) with \(F' = f\) is called an antiderivative of \(f\). Since adding a constant does not change a derivative, if \(F\) is one antiderivative then so is \(F + C\) for every constant \(C\), and these are all of them (two functions with the same derivative differ by a constant; this follows from the mean value theorem). Running the rules of this level backwards:
| \(f(x)\) | \(x^n\) (with \(n \ne -1\)) | \(\frac1x\) | \(e^x\) | \(\cos x\) | \(\sin x\) |
|---|---|---|---|---|---|
| antiderivative \(F(x)\) | \(\frac{x^{n+1}}{n + 1}\) | \(\ln \lvert x \rvert\) | \(e^x\) | \(\sin x\) | \(-\cos x\) |
Check any entry by differentiating it. For example, \(\left(\frac{x^{n+1}}{n + 1}\right)' = \frac{(n + 1)x^n}{n + 1} = x^n\).
The fundamental theorem, part 1: the area function¶
Fix a starting point \(a\) and let \(A(x)\) be the area under \(f\) from \(a\) up to \(x\). As \(x\) moves right, \(A(x)\) grows. How fast?
Move \(x\) on by a small \(h\). The area grows by a thin strip from \(x\) to \(x + h\). That strip is at least \(m \cdot h\) and at most \(M \cdot h\), where \(m\) and \(M\) are the smallest and largest heights of \(f\) on \([x, x + h]\). Divide by \(h\):
As \(h \to 0\), if \(f\) is continuous, both \(m\) and \(M\) are squeezed towards \(f(x)\). So
The rate at which the area grows is the height of the curve. The taller the curve at the moving edge, the faster area is swept up. So the area function is an antiderivative of \(f\).
The fundamental theorem, part 2: the shortcut¶
Now let \(F\) be any antiderivative of \(f\). Both \(A\) and \(F\) have derivative \(f\), so they differ by a constant: \(A(x) = F(x) + C\). At \(x = a\) there is no area yet, so \(0 = A(a) = F(a) + C\), giving \(C = -F(a)\). So \(A(x) = F(x) - F(a)\), and at \(x = b\):
This is often written \(\big[F(x)\big]_a^b\). For the opening question, \(F(x) = \frac{x^3}{3}\), so \(\int_0^1 x^2\,dx = \frac13 - 0 = \frac13\), with no rectangles and no sum of squares. The same works for \(x^3\) (\(\frac{x^4}{4}\), area \(\frac14\)) and \(x^4\) (\(\frac{x^5}{5}\), area \(\frac15\)): the pattern from the question.
Why integration undoes differentiation¶
Read part 2 with \(f = F'\):
Adding up a rate of change over an interval gives the total change. Add up velocity over time, and you get the change in position. Add up a flow rate, and you get the total amount that flowed. Differentiating turns an amount into its rate; integrating turns the rate back into the amount. Isaac Newton and Gottfried Leibniz, working separately in the second half of the 1600s, each saw this link, and it is why the two halves of calculus are one subject.
Worked examples¶
1. An area between two points. Find \(\int_1^2 x^2\,dx\).
\(F(x) = \frac{x^3}{3}\), so the area is \(\frac83 - \frac13 = \frac73 \approx 2.33\). Sense check: on \([1, 2]\) the height goes from 1 to 4 and the width is 1, so the area must be between 1 and 4. ✓
2. Distance from a changing speed. A cart's speed is \(v(t) = 3t^2\) m/s. How far does it go from \(t = 0\) to \(t = 2\)?
Distance \(= \int_0^2 3t^2\,dt = \big[t^3\big]_0^2 = 8 - 0 = 8\) m.
3. Falling on Mars. A stone dropped on Mars has speed about \(v(t) = 3.71t\) m/s. How far does it fall in the first 3 seconds?
\(\int_0^3 3.71t\,dt = \left[1.855t^2\right]_0^3 = 1.855 \times 9 \approx 16.7\) m. That is the formula \(d \approx 1.86t^2\) from level 5, now produced by integration. (The graph is a triangle with base 3 and height 11.13, area \(\frac12 \times 3 \times 11.13 \approx 16.7\) ✓.)
4. One arch of a sine wave. Find the area under \(y = \sin x\) from 0 to \(\pi\).
An antiderivative is \(-\cos x\). Area \(= -\cos\pi - (-\cos 0) = 1 + 1 = 2\). Exactly 2: a surprisingly tidy answer for a curved region with \(\pi\) in it.
5. Signed area. Find \(\int_0^2 (x^2 - 2x)\,dx\) and explain the sign.
\(\left[\frac{x^3}{3} - x^2\right]_0^2 = \frac83 - 4 = -\frac43\). Negative, because on \((0, 2)\) the curve \(x^2 - 2x = x(x - 2)\) is below the axis. The region between the curve and the axis has area \(\frac43\).
Try it¶
- A car drives at a steady 25 m/s for 40 seconds. Sketch the speed-time graph and find the distance.
- Find the left-edge sum \(L_4\) for \(x^2\) on \([0, 1]\) yourself, and average it with \(R_4 = 0.46875\). How close is the average to \(\frac13\)?
- Find \(\int_0^3 x^2\,dx\).
- Find \(\int_0^2 (3x^2 + 1)\,dx\).
- Find \(\int_1^e \frac1x\,dx\).
- Find \(\int_0^{\pi/2} \cos x\,dx\).
- Water flows into a tank at \(r(t) = 6t\) litres per minute. How much flows in during the first 4 minutes? Check with a triangle.
- Find \(\int_{-1}^{1} x^3\,dx\). Explain the answer with a sketch.
Answers
- A flat line at 25 from \(t = 0\) to 40: a rectangle, area \(25 \times 40 = 1000\) m.
- \(L_4 = \frac14\left(0 + \frac{1}{16} + \frac{4}{16} + \frac{9}{16}\right) = \frac{14}{64} = 0.21875\). Average \(\frac{0.21875 + 0.46875}{2} = 0.34375\), only about 0.01 more than \(\frac13 \approx 0.3333\).
- \(\left[\frac{x^3}{3}\right]_0^3 = 9 - 0 = 9\).
- \(\left[x^3 + x\right]_0^2 = (8 + 2) - 0 = 10\).
- \(\big[\ln x\big]_1^e = \ln e - \ln 1 = 1 - 0 = 1\). (This is one way to define \(e\): the number where the area under \(\frac1x\) from 1 reaches exactly 1.)
- \(\big[\sin x\big]_0^{\pi/2} = 1 - 0 = 1\).
- \(\left[3t^2\right]_0^4 = 48\) litres. The graph is a triangle with base 4 and height 24: \(\frac12 \times 4 \times 24 = 48\) ✓.
- \(\left[\frac{x^4}{4}\right]_{-1}^{1} = \frac14 - \frac14 = 0\). The curve \(x^3\) is below the axis on \([-1, 0]\) and above it on \([0, 1]\), and the two pieces are the same shape turned round (the graph has half-turn symmetry), so the negative area cancels the positive area exactly. The actual shaded area is \(\frac14 + \frac14 = \frac12\).
Common mistake¶
Forgetting to subtract \(F(a)\). \(\int_1^2 x^2\,dx\) is not \(F(2) = \frac83\). It is the area from 1 to 2, so the area from 0 to 1 must come off: \(F(2) - F(1) = \frac73\). Write both terms every time.
Treating every integral as an area. A definite integral is a signed area. If you want the actual area of a region that dips below the axis, split it where the graph crosses the axis and add the sizes of the pieces (question 8).
Where it leads¶
- Back: Related rates · Next: Differential equations: a first look
- Level 8 page · Change and motion topic page
- Sums that go on forever, and how a limit can capture them: Infinity.
- Areas of curved shapes without calculus: Measurement: curved areas.
- Continuous probability is area under a curve: Probability: continuous random variables.
- On the U of T shelf: MAT137 Unit 7: the definition of the integral and Unit 8: the fundamental theorem of calculus.