The lecture finishes the dartboard problem: with hits spread like e^(−r²), the chance of a ring of the board is e^(−r₁²) − e^(−r₂²), and a little brother standing next to the board is hit by about 1% of the darts. Then numerical integration, for integrals without a formula: Riemann sums, the trapezoidal rule (the average of left and right sums), and Simpson's rule, which fits parabolas and weights the values 1, 4, 2, 4, …, 4, 1. Simpson's rule is far more accurate.
The lecture starts with a correction: the energy in the boiling-cauldron example isheat. Energy, heat and work are the same physical quantity, measured in different units: calories, kilowatt-hours, foot-pounds (transcript, p. 1). Then it finishes the dartboard problem announced last time, and turns to integrals that have no formula.
Someone throws darts at a target; your little brother stands next to it. How likely is he to be hit (transcript, pp. 1–8; notes for Lecture 23, pp. 4–6)? The model: the number of hits per unit area at distance r from the centre is proportional to ce−r2. The probability of any region is the part over the whole, so the unknown c cancels (pp. 1–3).
Hits per area mean that a ring between r1 and r2 is weighted by a volume of revolution: shells of circumference 2πr, height e−r2 and thickness dr (p. 2). The antiderivative is easy, −πe−r2 (p. 5). For the whole, let r run from 0 to infinity: unrealistic for a basement wall, but the tail is negligible and the numbers come out cleaner (p. 6). So
P( r one less than r less than r two ) equals the integral from r one to r two of e to the power minus r squared 2 pi r d r over the quantity the integral from 0 to infinity of e to the power minus r squared 2 pi r d r, equals pi the quantity e to the power minus r one squared minus e to the power minus r two squared, over pi equals e to the power minus r one squared minus e to the power minus r two squared
Two realistic assumptions finish it (pp. 7–8). A seven-year-old hits the target, radius a, about half the time: 1−e−a2=21, so e−a2=21. The brother stands between 2a and 3a, covering two hours of the clock, from 3 to 5 o'clock, a sixth of the ring. Then
P is approximately one sixth the quantity e to the power minus 4 a squared minus e to the power minus 9 a squared, equals one sixth the quantity ( one half ) to the power 4 minus ( one half ) to the power 9, is approximately one sixth times 1 over 16 is approximately 1 over 100
about 1% per dart: stand there for a hundred throws and a hit is likely (p. 8). The lecturer adds that this kind of model was used to analyse where the V-2 rockets fell on London (p. 4). Notice the weight in r is 2πcre−r2, which is zero at the centre: although e−r2 is largest there, the centre has so little area that a dart rarely lands near it (pp. 4, 8–9).
Many integrals cannot be done in closed form, such as ∫0xcos(t2)dt or ∫03e−x2dx, and others are just a mess; then you compute the number directly (transcript, p. 9; notes, p. 1). Sample the function at x0=a,x1,…,xn=b, equally spaced by Δx, with yi=f(xi), and combine the y's (pp. 9–10).
Riemann sums use rectangles: (y0+y1+⋯+yn−1)Δx with left ends, or (y1+⋯+yn)Δx with right ends. They are "incredibly inefficient" (pp. 9–10; notes, p. 1).
Join neighbouring points by straight lines instead (transcript, pp. 10–11; notes, p. 2). Each strip is a trapezoid of area Δx2yi+yi+1, base times average height. Adding them, every inner value appears twice with a half:
Trapezoidal rule
∫abf(x)dx≈Δx(2y0+y1+y2+⋯+yn−1+2yn)
In words
the integral from a to b of f(x) d x is approximately capital delta x the quantity y nought over 2 plus y one plus y two plus and so on plus y sub n minus 1 plus y sub n over 2
It is exactly the average of the left and right Riemann sums, treating the two ends symmetrically. Better, but still not very efficient (p. 11; notes, p. 3).
Loading graph…
The curve y=1/(1+x2) on [0, 1] and the two straight-line tops of the trapezoidal rule with n=2, through (0, 1), (0.5, 0.8) and (1, 0.5), all computed from the formulas. On the left half the curve bulges above its chord; on the right half it dips slightly below. The shortfall on the left is larger, so the rule gives 0.775, a little under the true π/4≈0.785.
Now fit a parabola through each three neighbouring points, which needs an even number of intervals (transcript, pp. 11–12; notes, pp. 3–4). For one pair of intervals the area under the parabola is the base 2Δx times a weighted average height, which emphasizes the middle (the computation is on the problem set):
Area under a parabola
2Δx⋅6y0+4y1+y2
In words
2 capital delta x times the quantity y nought plus 4 y one plus y two, all over 6
the integral from a to b of f(x) d x is approximately capital delta x over 3, times the quantity y nought plus 4 y one plus 2 y two plus 4 y three plus and so on plus 2 y sub n minus 2 plus 4 y sub n minus 1 plus y sub n
As a check, for f=1 the weights add up to 3n, so the rule gives nΔx=b−a, as it should (notes, p. 4). On a small enough piece a typical function has no inflection point, so parabolas fit it extremely well (transcript, p. 11). The notes compare on ∫011+x2dx=4π≈0.785 with n=2: the trapezoidal rule gives 0.775 and Simpson's rule 0.7833, with an error roughly of order(Δx)4 (notes, p. 5). The lecture promises to show how much better Simpson's rule is next time (p. 12).
Worked example
Simpson against the trapezoids
Estimate ∫01e−x2dx (no elementary antiderivative) with n=4 by both rules, and compare with the true value 0.746824.
A quantity, measured in joules, that a body or field has because of its motion, position or state; a closed system keeps its total. Explained in Conservation of energy.
Energy that passes between bodies because their temperatures differ, rather than by one doing mechanical work on the other. Explained in Temperature and thermal energy.
A sum of very many very small pieces, such as the area under a graph; it undoes taking a derivative. Explained in Rates of change and area under a graph.
An estimate of an integral: cut the interval into strips, multiply each strip's width by a value of the function in it, and add. Explained in Definite integrals and Riemann sums.
Unchanged by some swap, reflection or turn; for an expression in two quantities, unchanged when they are exchanged. Explained in Introduction to Fourier series.
An average in which some values count more: each is multiplied by its weight, and the total divided by the sum of the weights. Explained in Centre of mass and its motion.
A universe with exactly the critical density, whose space has no curvature and which expands forever, ever more slowly. Explained in Open, closed and flat universes.
Closeness to the true value: an accurate measurement or calculation gives a result near the right answer.
Tap or click a word, here or in the text, for its meaning in this lesson. All words: the glossary. How many words are marked in the text: Reading options (the “Aa” button).