9.5 Numerical methods in context — Learn
Prerequisites: the change-of-sign test from Section 9.1; simple iteration from Section 9.2; Newton–Raphson from Section 9.3; the trapezium rule from Section 9.4.
By the end of this section you can: choose a numerical method for a problem in context; decide what accuracy the problem needs; carry the method through to an answer with units; and explain the limits of a model.
1. A method for a problem in context
A problem in context rarely says which method to use. You decide. These four questions cover most situations.
- Is the unknown a root of an equation? Write the equation as .
- Can you write down the derivative? If so, Newton–Raphson is fast. If not, a simple rearrangement may be better.
- Is the unknown an area under a curve or under a set of readings? Use the trapezium rule.
- What accuracy does the problem need? A landing time may need three decimal places. A river flow rate may only need two significant figures.
The same four questions work whether the context is a drone, a drug or a river. Decide first, calculate second, and interpret the answer third.
Bracket the root first. A change of sign proves that a root exists in an interval, and it needs only the function values. Use it first to bracket the root whenever you can. It also guards against a method that converges to the wrong root, because the bracket tells you which root you are aiming for.
2. Worked example: the landing drone
The chapter problem asks when the drone lands. Its height is
and it lands when .
Step 1. Bracket the root. Substitute and :
The signs differ and is continuous, so the landing time lies in .
Step 2. Choose the method. The function is smooth and its derivative is straightforward to write down, so Newton–Raphson is the quickest choice. Differentiate:
Step 3. Iterate. Use with :
Step 4. Interpret. The landing time is seconds to three decimal places. In context, the answer is about seconds. The third decimal place is not what the operator needs, but the method reaches it in three steps.
Step 5. State the limits. The model assumes the drone descends smoothly and that the height formula stays valid. Real air movement makes the landing time uncertain by more than seconds, so the extra decimal places do not describe the real landing.
3. Worked example: the concentration of a drug
A drug's concentration in the blood, hours after a dose, is modelled by
Find the time when the concentration is milligrams per litre.
Step 1. Form an equation. Set :
Divide both sides by :
Multiply both sides by :
So the unknown time is a root of .
Step 2. Bracket the root. Substitute and :
The root lies in .
Step 3. Iterate. Differentiate to get . Use Newton–Raphson with :
Step 4. Interpret. The concentration reaches milligrams per litre after hours, which is about minutes. The model ignores how the drug is absorbed, so the answer guides a dose plan but does not fix it.
4. Worked example: distance from a speed trace
A car's speed is recorded every two seconds for ten seconds.
| Time (s) | ||||||
|---|---|---|---|---|---|---|
| Speed (m/s) |
The distance travelled is the area under the speed–time graph. The readings do not follow a formula, so use the trapezium rule with :
The car travels about metres.
The speed increases throughout, so the smaller height on each strip is on the left. The lower sum is , and the upper sum is . The distance lies between and metres, and the trapezium estimate is the midpoint of that range.
5. Accuracy, and what the answer means
A numerical answer is only as good as the accuracy the problem needs. Two ideas keep the answer honest.
Report the accuracy the context justifies. A time in seconds may need three decimal places. A flow rate in cubic metres per second often needs two significant figures. Extra digits cost work and suggest a precision the model does not have.
Use the bracket as a check. If your iteration settles outside the bracket you found by change of sign, something is wrong. Either the iteration has found a different root, or the arithmetic has slipped. Re-check against the bracket.
Watch out. Three mistakes are common.
Choosing a method with no bracket. An iteration can settle on a root you did not want. Re-check: bracket the root by change of sign first, so you know which root you are aiming for.
Reporting every digit the calculator shows. A model answer of seconds is not more useful than seconds. Re-check: decide the accuracy from the context before you round.
Treating an estimate as exact. The trapezium rule with six readings, or a model fitted to a few measurements, gives an estimate. Re-check: state whether the answer is exact, and give a limit or a tolerance when you can.
Progress check
Return to the chapter problem. The drone lands at seconds, and the river has cross-sectional area about square metres.
- The river flows at metres per second. Estimate the flow rate, and give the units.
- A second drone has height . Show that it lands between and seconds.
- For the second drone, choose a method to find the landing time to two decimal places, and say why you chose it.
You should now be able to
- decide whether a context needs a root-finding method or the trapezium rule;
- bracket a root by change of sign before you iterate;
- choose between Newton–Raphson and a simple rearrangement;
- carry a numerical method through to an answer with units;
- decide the accuracy the context needs and round to it;
- explain how the limitations of a model affect the answer.