Graphs, Modelling, and Numerical Methods
Mathematics is often used to turn measurements into a useful prediction, rather than to find a perfectly exact rule. This lesson combines function knowledge, graphs, and algebra with numerical methods: repeatable calculations that give controlled approximations. Review functions, linear equations, powers, and graph scales first; the Statistics lesson is also useful for interpreting data and regression.
From a Situation to a Model
A model is a deliberately simplified relationship between quantities. Start by naming an input (the independent variable) and an output (the dependent variable), recording units, and deciding which features of the situation matter. A model is judged by whether it is useful in its stated range, not by whether it is literally true in every detail.
| Pattern in a graph or table | Possible model | Meaning of the parameters |
|---|---|---|
| Approximately constant change in y for equal changes in x | y = mx + b | m is rate of change; b is output at input 0 |
| Parabolic rise then fall, or a single turning point | y = ax2 + bx + c | a controls curvature; c is output at 0 |
| Equal percentage or equal factor changes | y = abx | a is initial amount; b is multiplier per input unit |
Do not choose a line merely because it is easy to draw. For example, a tank emptying at a steady 4 L/min may be linear only until it reaches 0 L; after that, a negative-volume prediction is meaningless.
Worked example: determine a linear model and interpret it
A delivery charge is $5 plus $1.80 per kilometre. Let d be distance in kilometres and C be cost in dollars.
C = 1.80d + 5
At d = 12:
C = 1.80(12) + 5 = 26.60
The coefficient 1.80 has units dollars per kilometre.
The intercept 5 has units dollars: it is the charge at 0 km.
The model should be used only if the stated pricing rule applies. It may exclude taxes, a distance cap, or different zones.
Parameters and Fitting from Data
Parameters are fixed numbers in a model that must be chosen from context or data. In y = mx + b, changing m tilts the line and changing b shifts it vertically. With two reliable points, solve two equations for the two unknown parameters. With many noisy points, choose a line that follows the overall trend; a calculator or spreadsheet regression tool can do this.
Worked example: fit through two calibration points
A temperature sensor gives readings r of 2.1 and 9.8 when the actual temperatures T are 0°C and 10°C. Suppose T = ar + b.
0 = 2.1a + b
10 = 9.8a + b
Subtract: 10 = 7.7a, so a = 10/7.7 ≈ 1.299
b = −2.1a ≈ −2.727
T ≈ 1.299r − 2.727
For r = 6.0, T ≈ 1.299(6.0) − 2.727 = 5.07°C
Two points force an exact line through those points. That is calibration, not evidence that every future reading will be exact.
Residuals: Look at What the Model Misses
For one observation, the residual is
residual = observed value − predicted value.
A positive residual means the point lies above the model; a negative residual means it lies below. Residuals should be measured in the same units as the output. A good model usually has small residuals scattered around zero, without an obvious curve, run, or widening spread.
Worked example: calculate and interpret residuals
A linear model predicts plant height h = 3.2w + 4, where w is weeks and height is centimetres. At week 5, the observed height is 21 cm.
Predicted height = 3.2(5) + 4 = 20 cm
Residual = observed − predicted = 21 − 20 = +1 cm
The plant is 1 cm taller than this model predicts.
A residual is not automatically a mistake. Measurement variation, omitted variables, and a model with the wrong shape can all produce residuals. A systematic pattern, such as negative residuals early and late but positive ones in the middle, suggests a curved model may be better than a line.
Interpolation, Extrapolation, and Linearization
Interpolation estimates within the range of known data. Extrapolation estimates beyond it and is riskier because the pattern may change. Between two nearby values, a straight-line estimate is often reasonable even when the full relationship is curved. This local straight-line approximation is called linearization.
Worked example: interpolate with a local line
A table shows that a chemical concentration is 18 mg/L at 4 minutes and 26 mg/L at 6 minutes. Estimate it at 4.5 minutes, assuming it changes linearly over this short interval.
Rate over the interval = (26 − 18)/(6 − 4) = 4 mg/L per minute
4.5 minutes is 0.5 minute after 4 minutes:
estimate = 18 + 4(0.5) = 20 mg/L
This is interpolation. Estimating at 40 minutes from the same two readings would be extrapolation and needs scientific justification.
Worked example: linearize a curved rule near one input
Estimate √10 without a square-root key. Near 9, the rule y = √x passes through (9, 3). If x increases by a small amount h, then
(3 + k)² = 9 + h
9 + 6k + k² = 9 + h
For small k, k² is much smaller than 6k, so 6k ≈ h.
Thus k ≈ h/6.
For x = 10, h = 1:
√10 ≈ 3 + 1/6 = 3.1667
The calculator value is about 3.1623, so this nearby linear estimate is high by about 0.0044. The approximation gets better as x gets closer to 9.
Tables on a Calculator or Spreadsheet
A table makes a function visible numerically. On a graphing calculator, enter the rule, set a sensible table start and step, and inspect values near the feature of interest. In a spreadsheet, place inputs in one column and use a formula referring to the input cell; fill it down. Keep extra digits during calculations and round only the displayed final answer.
Worked example: bracket a zero with a table
To solve x3 − x − 2 = 0, define f(x) = x3 − x − 2.
| x | 1.5 | 1.6 | 1.7 |
|---|---|---|---|
| f(x) | −0.125 | 0.496 | 1.213 |
The sign changes between 1.5 and 1.6, so a zero lies in that interval if the graph is continuous there. A table alone can miss a zero if its step is too large, so use graph knowledge and narrower intervals when needed.
Bisection: A Reliable Bracketing Method
For a continuous function, if f(a) and f(b) have opposite signs, at least one zero lies between a and b. Bisection repeatedly tests the midpoint and keeps the half-interval with the sign change. It is slower than some methods but dependable when the initial bracket is valid.
Worked example: three bisection steps
Solve x2 − 10 = 0 on [3, 4]. Let f(x) = x2 − 10.
f(3) = −1 and f(4) = 6, so a zero is bracketed.
midpoint 3.5: f(3.5) = 2.25 → keep [3, 3.5]
midpoint 3.25: f(3.25) = 0.5625 → keep [3, 3.25]
midpoint 3.125: f(3.125) = −0.234375 → keep [3.125, 3.25]
After three steps, the positive root is between 3.125 and 3.25.
The midpoint 3.1875 is an estimate; its maximum interval-based error is 0.0625.
Newton Iteration: A Fast Local Method
Newton iteration starts from a guess and uses the local straight-line behaviour of the graph to make a better guess. No formal derivative theory is required to use it when the local slope rule is supplied or estimated from nearby table values. If the current point is (x, f(x)) and the local slope is m, the line reaches the x-axis at
next estimate = x − f(x)/m.
Stop when the function value is sufficiently close to zero or successive estimates agree to the required precision. Newton iteration can fail with a poor starting value, a nearly horizontal local slope, or a function with complicated shape; bisection is safer when a bracket is available.
Worked example: Newton iteration for √10
To solve x2 − 10 = 0, use f(x) = x2 − 10. Near a positive value x, the local slope of this parabola is 2x, which can also be checked from a small table. Therefore
x(next) = x − (x² − 10)/(2x)
= (x + 10/x)/2
Start x₀ = 3:
x₁ = (3 + 10/3)/2 = 3.1666667
x₂ = (3.1666667 + 10/3.1666667)/2 ≈ 3.1622807
x₃ ≈ 3.1622777
So √10 ≈ 3.16228.
Common Mistakes
- Confusing correlation with a usable causal rule: a fitted line describes an association in the data; it does not prove one quantity causes the other.
- Using the residual backwards: calculate observed minus predicted, and include its sign.
- Extrapolating without a domain: a convincing trend over 1 to 10 days may not continue for 100 days.
- Bisection without opposite signs: check the endpoint values before beginning.
- Rounding every iteration: early rounding can stall or distort a numerical answer.
- Treating an approximation as exact: report suitable precision and, when possible, an error bound or interval.
Practice Set
- A parking garage charges $3.50 plus $2.25 per hour. Write a model for cost C after h hours and find C(4).
- For y = 7(1.12)t, identify the initial value and the multiplier per time unit. Is this growth or decay?
- A line model predicts 48.6 kg, while the observed value is 46.9 kg. Find and interpret the residual.
- At 8 m, a table gives 31 N; at 12 m, it gives 43 N. Use interpolation to estimate the value at 9.5 m.
- Why is estimating a population in year 2050 from data for 2018–2024 an extrapolation? State one reason it could be unreliable.
- For f(x) = x2 − 5, show a sign-changing interval of width 1 that contains the positive zero.
- Perform two bisection steps for the positive zero of x2 − 5 on [2, 3]. Give the remaining interval.
- Using xnext = (x + 5/x)/2 with x0 = 2, calculate x1 and x2. What number is being approximated?
- A residual plot is mostly negative for small x, positive in the middle, and negative for large x. What does this suggest about a linear model?
- A spreadsheet has time in cell A2 and distance in metres in cell B2. Write a formula for speed in m/s in C2, and state a necessary caution.
- Use the linearization from √9 = 3 to estimate √9.12. Give the estimate to four decimal places.
- A Newton step has f(x) = 0.8 and estimated local slope m = −0.2. Find the change made to x. Why might this step require caution?
Answer Checks
- C = 2.25h + 3.50. Thus C(4) = 2.25(4) + 3.50 = $12.50.
- The initial value is 7. The multiplier is 1.12, meaning a 12% increase per time unit; it is growth.
- 46.9 − 48.6 = −1.7 kg. The observation is 1.7 kg below the prediction.
- The local rate is (43 − 31)/(12 − 8) = 3 N/m. The estimate is 31 + 3(9.5 − 8) = 35.5 N.
- 2050 is outside the observed years. Changes in policy, births, migration, or the growth rate could invalidate the earlier pattern.
- f(2) = −1 and f(3) = 4, so [2, 3] contains a zero.
- Midpoint 2.5 gives 1.25, so keep [2, 2.5]. Midpoint 2.25 gives 0.0625, so keep [2, 2.25].
- x1 = (2 + 5/2)/2 = 2.25. x2 = (2.25 + 5/2.25)/2 ≈ 2.2361. It approximates √5.
- The curved residual pattern suggests that a line misses systematic structure; try a justified curved model or transformation.
=B2/A2. Ensure A2 is not zero and that both cells use the stated units.- Here h = 0.12, so √9.12 ≈ 3 + 0.12/6 = 3.0200.
- xnext = x − 0.8/(−0.2) = x + 4, a change of +4. The small slope produces a large step, which may move away from the desired zero.
dispelled