Root finding and numerical integration
Introduit| English | Sens |
|---|---|
| numerical methods | step-by-step procedures that give approximate answers when exact ones are hard to find |
| trapezoidal rule/ˈtræpɪzɔɪdl ruːl/ | A numerical method approximating a definite integral by adding areas of trapezoids under straight-line segments. |
√2 on a clay tablet, c. 1800 BCE
- A small Babylonian clay tablet now at Yale, known as YBC 7289, shows a square with its diagonals. Along a diagonal is written, in base 60, the value $1.41421296\ldots$ for $\sqrt2$ — correct to about six decimal places, nearly 4,000 years ago.
- Many equations have no exact solution you can write down. Numerical methods 数值方法 approximate them: root finding locates where $f(x) = 0$, and the trapezoidal rule 梯形法则 approximates an integral.
The Babylonian tablet YBC 7289 gives √2 to about six decimal places.
Difficulté 1/5 · 100 pièces + un petit bonus lors de la première réussite aujourd'hui
Written in base 60.
Locating a root
- If $f$ is continuous and $f(a)$, $f(b)$ have opposite signs, there is a root between $a$ and $b$.
- Narrow the interval: bisection halves it each step; the GDC's solver or graph intersection finds roots quickly.
f(1) = −1 and f(2) = 5 for a continuous f. What can you conclude?
Difficulté 1/5 · 100 pièces + un petit bonus lors de la première réussite aujourd'hui
A sign change.
For f(x) = x³ − x − 1, find f(1.5).
Difficulté 2/5 · 140 pièces + un petit bonus lors de la première réussite aujourd'hui
3.375 − 1.5 − 1.
The trapezoidal rule
- Split $[a, b]$ into $n$ strips of width $h = \dfrac{b - a}{n}$: $\displaystyle\int_a^b f(x)\,dx \approx \frac{h}{2}\big[y_0 + 2(y_1 + \cdots + y_{n-1}) + y_n\big]$.
- For a curve that bends upward, the trapezia lie above it: an overestimate.
Root finding and numerical integration
A continuous function with opposite signs at two endpoints has a root between them
Compare the model with the worked case and explain one change.
Use the trapezoidal rule with 2 strips to estimate ∫ from 0 to 2 of x² dx.
Difficulté 2/5 · 140 pièces + un petit bonus lors de la première réussite aujourd'hui
½[0 + 2 + 4].
For a curve that bends upward, the trapezoidal rule overestimates.
Difficulté 1/5 · 100 pièces + un petit bonus lors de la première réussite aujourd'hui
Trapezia lie above the curve.
Improving accuracy
- More strips give a better approximation. Compare with the exact integral when one exists to measure the error.
Worked example: a root and an area
- Root: $f(x) = x^3 - x - 1$: $f(1) = -1$, $f(2) = 5$, so a root lies in $(1, 2)$. $f(1.5) = 0.875 > 0$ → root in $(1, 1.5)$; $f(1.25) = -0.297$ → root in $(1.25, 1.5)$. The GDC gives $x \approx 1.3247$.
- Area: $\int_0^2 x^2\,dx$ with two strips ($h = 1$): $\tfrac12[0 + 2(1) + 4] = 3$. Exact value $\tfrac83 \approx 2.667$: an overestimate by 0.333, as expected for a curve bending upward.
- Four strips ($h = 0.5$): $\tfrac14[0 + 2(0.25 + 1 + 2.25) + 4] = 2.75$, closer.
With 4 strips, what is the estimate of ∫ from 0 to 2 of x² dx?
Difficulté 2/5 · 140 pièces + un petit bonus lors de la première réussite aujourd'hui
¼[0 + 2(3.5) + 4].
In context
- From a table of flow rates measured every 10 minutes, the trapezoidal rule estimates the total volume — no formula needed.
A sign change needs continuity. $f(x) = \tfrac1x$ changes sign between $-1$ and $1$ but has no root there — it jumps across an asymptote. Check the graph.
f(x) = 1/x has a root between −1 and 1 because it changes sign.
Difficulté 1/5 · 100 pièces + un petit bonus lors de la première réussite aujourd'hui
It is not continuous there.
A sign change of a continuous function locates a root; narrow it by bisection or use the GDC. The trapezoidal rule $\tfrac h2[y_0 + 2(\text{middle}) + y_n]$ approximates integrals; more strips improve accuracy, and an upward-bending curve gives an overestimate.
Flow rates (L/min) every 10 minutes are 0, 12, 18, 20, 15. Estimate the total volume over 40 minutes.
Strips, formula, units.