Skip to content
Family Table Math

Function Modelling

A model is a function that describes a real situation well enough to answer questions about it: how low will the tire pressure be by tomorrow, when will the tea be cool enough to drink, how many people will live here in ten years? This lesson pulls together every function type in the course. You’ll choose a type that fits the data, build the equation from a few key points, check whether it’s reasonable, and use it to predict. Trig functions here use radians.

  1. Look at the data. Plot it, or study the table. Is it increasing, decreasing, or repeating? Does it level off?
  2. Choose a type. Use the fingerprints from comparing function types and what you know about the situation.
  3. Find the parameters from key points: the starting value, a maximum or minimum, a period, a ratio.
  4. Check the fit. Compare the model’s values with the data. The differences (data minus model) are called residuals; for a good model they’re small and don’t follow an obvious pattern.
  5. Use and interpret. Predict values, answer the question, and explain what each parameter means in context.
  6. Think about limits. Is the model reasonable for the inputs you’re using? Predictions far outside the data (extrapolation) are much riskier than predictions inside it (interpolation).
The situation or data shows…Try…
a constant rate of change; constant first differenceslinear: y=mx+by = mx + b
constant second differences; one maximum or minimum (like a projectile)quadratic: y=a(x−h)2+ky = a(x - h)^2 + k
constant ratios; growth or decay by a percentageexponential: y=a⋅bxy = a \cdot b^{x}
levelling off toward a value other than 00 (like cooling)shifted exponential: y=a⋅bx+cy = a \cdot b^{x} + c
a repeating cycle (tides, seasons, rotation)sinusoidal: y=acos⁡(k(x−d))+cy = a\cos\big(k(x - d)\big) + c with k=2πperiodk = \dfrac{2\pi}{\text{period}}
constant third (or higher) differences; volumes and other productspolynomial of higher degree

Context matters as much as the numbers. A slow leak loses a percentage of what’s left, so it’s exponential, not linear. A volume made by multiplying three lengths is a cubic.

Graphing technology can fit a curve of any chosen type to all the data at once (this is called regression), and it can graph residuals. That’s how scientists usually do it. But choosing the type and judging whether the result makes sense is still your job. In the examples below, the models are built by hand from key points, which is often accurate enough and shows exactly where each number comes from.

A car tire has a slow leak. Its pressure is measured every 22 hours.

Time tt (h)0022446688
Pressure PP (kPa)240240216216194194175175157157
  • (a) Decide whether a linear or an exponential model fits better, and build it.
  • (b) Predict the pressure after 1212 hours.
  • (c) The tire is unsafe below 140140 kPa. When does that happen?

Solution.

(a) The differences are −24,−22,−19,−18-24, -22, -19, -18: not constant, and shrinking. The ratios are

216240=0.9,194216≈0.898,175194≈0.902,157175≈0.897\frac{216}{240} = 0.9, \quad \frac{194}{216} \approx 0.898, \quad \frac{175}{194} \approx 0.902, \quad \frac{157}{175} \approx 0.897

all very close to 0.90.9. So the tire loses about 10%10\% of its pressure every 22 hours, and an exponential model fits. It makes physical sense too: the higher the pressure, the faster air is pushed out.

Start at 240240 and multiply by 0.90.9 for every 22 hours, which is t2\tfrac{t}{2} two-hour periods:

P(t)=240(0.9)t/2P(t) = 240(0.9)^{t/2}

Check the fit: the model gives 216216, 194.4194.4, 175.0175.0 and 157.5157.5 at t=2,4,6,8t = 2, 4, 6, 8. Every residual is less than 11 kPa. ✓

(b) P(12)=240(0.9)6≈127.5P(12) = 240(0.9)^6 \approx 127.5 kPa.

(c) Solve 240(0.9)t/2=140240(0.9)^{t/2} = 140 with logarithms:

(0.9)t/2=140240t2log⁡0.9=log⁡140240t=2log⁡(140/240)log⁡0.9≈10.23\begin{aligned} (0.9)^{t/2} &= \frac{140}{240} \\ \frac{t}{2}\log 0.9 &= \log\frac{140}{240} \\ t &= \frac{2\log(140/240)}{\log 0.9} \approx 10.23 \end{aligned}

The tire becomes unsafe after about 10.210.2 hours. (A linear model, losing about 10.410.4 kPa per hour on average, would predict the pressure reaching 00 after about a day, which isn’t how leaks behave.)

A cup of tea is left in a room at 20 ∘C20\,^\circ\text{C}.

Time tt (min)0055101015152020
Temperature TT (°C)9090696954.354.344.044.036.836.8
  • (a) Build a model for the temperature.
  • (b) Predict the temperature after 3030 minutes, and say when the tea reaches 30 ∘C30\,^\circ\text{C}.

Solution.

(a) The ratios of the temperatures aren’t constant (6990≈0.767\tfrac{69}{90} \approx 0.767 but 54.369≈0.787\tfrac{54.3}{69} \approx 0.787). But the tea can’t cool below room temperature, so look at how far it is above 20 ∘C20\,^\circ\text{C}:

tt (min)0055101015152020
T−20T - 207070494934.334.324.024.016.816.8

Now the ratios are constant: 4970=34.349=0.7\tfrac{49}{70} = \tfrac{34.3}{49} = 0.7, and 24.034.3≈16.824.0≈0.7\tfrac{24.0}{34.3} \approx \tfrac{16.8}{24.0} \approx 0.7. The temperature difference shrinks by 30%30\% every 55 minutes:

T(t)=20+70(0.7)t/5T(t) = 20 + 70(0.7)^{t/5}

The 2020 is the room temperature (the horizontal asymptote), and the 7070 is the starting difference.

Five measured tea temperatures from 90 degrees Celsius at time 0 down to 36.8 at 20 minutes, with the model curve T = 20 + 70(0.7)^(t/5) passing through them and levelling off toward the dashed line T = 20. 5 10 15 20 25 30 35 10 20 30 40 50 60 70 80 90 room temperature 20 °C T = 20 + 70(0.7)^(t/5) time t (min) temperature T (°C)
The model levels off at room temperature, as the real tea will.

(b) T(30)=20+70(0.7)6≈20+8.2=28.2 ∘CT(30) = 20 + 70(0.7)^6 \approx 20 + 8.2 = 28.2\,^\circ\text{C}.

For 30 ∘C30\,^\circ\text{C}, solve 20+70(0.7)t/5=3020 + 70(0.7)^{t/5} = 30:

(0.7)t/5=1070⇒t=5log⁡(1/7)log⁡0.7≈27.3(0.7)^{t/5} = \frac{10}{70} \quad\Rightarrow\quad t = \frac{5\log(1/7)}{\log 0.7} \approx 27.3

The tea reaches 30 ∘C30\,^\circ\text{C} after about 27.327.3 minutes. A plain exponential y=a⋅bty = a \cdot b^t would wrongly predict the tea cooling toward 0 ∘C0\,^\circ\text{C}, colder than the room.

A test driver measures a car’s fuel consumption at different speeds.

Speed vv (km/h)505070709090110110130130
Consumption cc (L/100 km)7.07.06.26.26.66.68.28.211.011.0

Build a model, and find the most economical speed.

Solution. The data falls and then rises, which suggests a quadratic. Check the differences (the speeds go up in equal steps of 2020):

  • First differences: −0.8, 0.4, 1.6, 2.8-0.8,\ 0.4,\ 1.6,\ 2.8
  • Second differences: 1.2, 1.2, 1.21.2,\ 1.2,\ 1.2

Constant second differences confirm a quadratic c(v)=av2+bv+kc(v) = av^2 + bv + k. For steps of size hh, the second difference is 2ah22ah^2, so 2a(20)2=1.22a(20)^2 = 1.2, giving 800a=1.2800a = 1.2 and a=0.0015a = 0.0015.

Now use two data points to find bb and kk:

c(50)=0.0015(2500)+50b+k=3.75+50b+k=7.0c(70)=0.0015(4900)+70b+k=7.35+70b+k=6.2\begin{aligned} c(50) &= 0.0015(2500) + 50b + k = 3.75 + 50b + k = 7.0 \\ c(70) &= 0.0015(4900) + 70b + k = 7.35 + 70b + k = 6.2 \end{aligned}

Subtracting the first equation from the second: 3.6+20b=−0.83.6 + 20b = -0.8, so b=−0.22b = -0.22. Then k=7.0−3.75+11=14.25k = 7.0 - 3.75 + 11 = 14.25.

c(v)=0.0015v2−0.22v+14.25c(v) = 0.0015v^2 - 0.22v + 14.25

Check: c(130)=25.35−28.6+14.25=11.0c(130) = 25.35 - 28.6 + 14.25 = 11.0. ✓

The minimum is at the vertex:

v=−b2a=0.220.003≈73.3 km/h,c(73.3)≈6.18 L/100 kmv = -\frac{b}{2a} = \frac{0.22}{0.003} \approx 73.3 \text{ km/h}, \qquad c(73.3) \approx 6.18 \text{ L/100 km}

The car is most economical at about 7373 km/h, using about 6.26.2 L per 100100 km. The model only makes sense for realistic speeds: it would predict 14.2514.25 L/100 km at 00 km/h, which is meaningless for a parked car.

Example 4: Monthly temperatures in radians

Section titled “Example 4: Monthly temperatures in radians”

The average monthly temperatures for a Canadian city are shown (month 11 is January).

Month mm112233445566778899101011111212
Temp. (°C)−15-15−13-13−7-7221010161618181616101022−6-6−12-12

Build a sinusoidal model, check its fit, and use it to estimate the temperature in mid-April (m=4.5m = 4.5).

Solution. Maximum 1818 (July), minimum −15-15 (January), and the cycle repeats every 1212 months.

  • Amplitude: a=18−(−15)2=16.5a = \dfrac{18 - (-15)}{2} = 16.5
  • Axis: c=18+(−15)2=1.5c = \dfrac{18 + (-15)}{2} = 1.5
  • k=2π12=π6k = \dfrac{2\pi}{12} = \dfrac{\pi}{6}
  • The maximum is at m=7m = 7, so use cosine with d=7d = 7.
T(m)=16.5cos⁡(π6(m−7))+1.5T(m) = 16.5\cos\left(\frac{\pi}{6}(m - 7)\right) + 1.5

Check the fit for a few months (model values to 1 decimal place):

Month1122446610101111
Data−15-15−13-1322161622−6-6
Model−15.0-15.0−12.8-12.81.51.515.815.81.51.5−6.8-6.8
Residual00−0.2-0.20.50.50.20.20.50.50.80.8

The residuals are all under 1 ∘C1\,^\circ\text{C}, so the model fits well.

Mid-April: T(4.5)=16.5cos⁡(π6(−2.5))+1.5=16.5cos⁡(−5π12)+1.5≈16.5(0.2588)+1.5≈5.8 ∘CT(4.5) = 16.5\cos\left(\dfrac{\pi}{6}(-2.5)\right) + 1.5 = 16.5\cos\left(-\dfrac{5\pi}{12}\right) + 1.5 \approx 16.5(0.2588) + 1.5 \approx 5.8\,^\circ\text{C}.

Choosing a type from one or two numbers. Check differences and ratios across the whole table, and think about the situation. A leak or a cooling drink is exponential even if the first few values look nearly linear.

Forgetting the shift in cooling and heating. Objects cool toward room temperature, not toward 00. Model the difference from room temperature exponentially, then add the room temperature back.

Using the wrong exponent for the time step. If the ratio 0.90.9 is per 22 hours, the exponent is t2\tfrac{t}{2}, not tt. Check: after 22 hours, (0.9)2/2=0.9(0.9)^{2/2} = 0.9. ✓

Trusting extrapolation. A model that fits data from 5050 to 130130 km/h says nothing reliable about 00 or 250250 km/h. State the inputs for which the model is reasonable.

Using degrees in a radian model. With k=2π12k = \tfrac{2\pi}{12}, your calculator must be in radian mode. (In degrees you’d use k=36012=30k = \tfrac{360}{12} = 30 instead, as in Grade 11.)

Not checking the fit. Always compare the model with at least a couple of data points you didn’t use to build it. Large or patterned residuals mean you should rethink the type.

1. (Warm-up) Which type of function would you choose to model each situation? Explain briefly.

  • (a) The height of the tide over two days.
  • (b) The number of bacteria in a culture that doubles every hour.
  • (c) A taxi fare with a fixed charge plus a fee per kilometre.
  • (d) The volume of a box whose length, width and height all depend on xx.
Solution

(a) Sinusoidal: tides repeat in a regular cycle.

(b) Exponential: doubling means a constant ratio.

(c) Linear: the fare increases at a constant rate per kilometre.

(d) Polynomial (cubic): volume is a product of three expressions in xx.

2. (Warm-up) Is each table best modelled by a linear, quadratic, or exponential function?

xx0011223344
A5588131320202929
B551010202040408080
C5599131317172121
Solution

A: first differences 3,5,7,93, 5, 7, 9; second differences 2,2,22, 2, 2. Quadratic.

B: ratios all 22. Exponential.

C: first differences all 44. Linear.

3. (Warm-up) A town’s population is modelled by P(t)=5000(1.025)tP(t) = 5000(1.025)^t, where tt is in years. Interpret 50005000 and 1.0251.025, and predict the population after 1010 years.

Solution

50005000 is the population at t=0t = 0. 1.0251.025 means the population grows by 2.5%2.5\% per year.

P(10)=5000(1.025)10≈6400P(10) = 5000(1.025)^{10} \approx 6400 people.

4. (Core) A town’s population is recorded every 55 years.

Year tt0055101015152020
Population12 00012\,00013 44013\,44015 05015\,05016 86016\,86018 88018\,880
  • (a) Show that an exponential model fits, and build it.
  • (b) A linear model through the first and last points is L(t)=12 000+344tL(t) = 12\,000 + 344t. Compare both models at t=10t = 10 with the data.
  • (c) Use both models to predict the population at t=30t = 30. Which prediction is more reasonable?
Solution

(a) Ratios: 13 44012 000=1.12\tfrac{13\,440}{12\,000} = 1.12, 15 05013 440≈1.120\tfrac{15\,050}{13\,440} \approx 1.120, 16 86015 050≈1.120\tfrac{16\,860}{15\,050} \approx 1.120, 18 88016 860≈1.120\tfrac{18\,880}{16\,860} \approx 1.120. The population grows by about 12%12\% every 55 years:

E(t)=12 000(1.12)t/5E(t) = 12\,000(1.12)^{t/5}

(b) At t=10t = 10, the data is 15 05015\,050. E(10)=12 000(1.12)2=15 052.8E(10) = 12\,000(1.12)^2 = 15\,052.8, off by about 33. L(10)=12 000+3440=15 440L(10) = 12\,000 + 3440 = 15\,440, off by about 390390. The exponential model fits much better.

(c) E(30)=12 000(1.12)6≈23 686E(30) = 12\,000(1.12)^6 \approx 23\,686 and L(30)=12 000+10 320=22 320L(30) = 12\,000 + 10\,320 = 22\,320. The exponential prediction is more reasonable, because the data shows a constant growth rate (percentage), not a constant number of people per year. Either way, a prediction 1010 years past the data is an extrapolation and should be treated with caution.

5. (Core) At a harbour, high tide is 99 m at 2:00 a.m., and the next low tide is 33 m at 8:15 a.m. Build a sinusoidal model for the depth tt hours after midnight (in radians), and predict the depth at noon to 2 decimal places.

Solution

a=9−32=3a = \tfrac{9 - 3}{2} = 3 and c=9+32=6c = \tfrac{9 + 3}{2} = 6. High to low takes 6.256.25 h, which is half a period, so the period is 12.512.5 h and k=2π12.5k = \tfrac{2\pi}{12.5}. The maximum is at t=2t = 2:

D(t)=3cos⁡(2π12.5(t−2))+6D(t) = 3\cos\left(\frac{2\pi}{12.5}(t - 2)\right) + 6

At noon, t=12t = 12:

D(12)=3cos⁡(2π12.5(10))+6=3cos⁡(1.6π)+6≈3(0.3090)+6≈6.93D(12) = 3\cos\left(\frac{2\pi}{12.5}(10)\right) + 6 = 3\cos(1.6\pi) + 6 \approx 3(0.3090) + 6 \approx 6.93

The depth at noon is about 6.936.93 m.

6. (Core) An open box is made from a 2020 cm by 3030 cm sheet of cardboard by cutting a square of side xx cm from each corner and folding up the sides.

  • (a) Write a model for the volume V(x)V(x), and state a reasonable domain.
  • (b) Make a table for x=1,2,3,4,5,6x = 1, 2, 3, 4, 5, 6, and confirm that the third differences are constant.
  • (c) Estimate the value of xx that gives the largest volume.
Solution

(a) The base is (30−2x)(30 - 2x) by (20−2x)(20 - 2x) and the height is xx:

V(x)=x(20−2x)(30−2x)V(x) = x(20 - 2x)(30 - 2x)

All lengths must be positive, so 0<x<100 \lt x \lt 10.

(b)

xx112233445566
VV (cm³)504504832832100810081056105610001000864864

First differences: 328,176,48,−56,−136328, 176, 48, -56, -136. Second: −152,−128,−104,−80-152, -128, -104, -80. Third: 24,24,2424, 24, 24. Constant third differences confirm a cubic (and 24=4⋅3!24 = 4 \cdot 3! matches the leading coefficient 44 of V(x)=4x3−100x2+600xV(x) = 4x^3 - 100x^2 + 600x).

(c) The volume is largest near x=4x = 4 cm (about 10561056 cm³). Graphing technology puts the maximum at x≈3.92x \approx 3.92 cm, with V≈1056.3V \approx 1056.3 cm³.

7. (Core) The concentration of a medication in a patient’s blood is modelled by C(t)=50(0.8)tC(t) = 50(0.8)^t mg/L, where tt is in hours. Interpret the model, and find when the concentration drops below 1010 mg/L.

Solution

The starting concentration is 5050 mg/L, and 20%20\% of the medication is removed each hour (since 1−0.8=0.21 - 0.8 = 0.2).

Solve 50(0.8)t=1050(0.8)^t = 10:

(0.8)t=0.2⇒t=log⁡0.2log⁡0.8≈7.21(0.8)^t = 0.2 \quad\Rightarrow\quad t = \frac{\log 0.2}{\log 0.8} \approx 7.21

The concentration drops below 1010 mg/L after about 7.27.2 hours.

8. (Challenge) A leaking tire has a pressure of 250250 kPa at t=0t = 0 and 200200 kPa after 55 hours.

  • (a) Build a linear model and an exponential model through these two points.
  • (b) Use both to predict the pressure after 2020 hours.
  • (c) Which model is more reasonable, and why?
Solution

(a) Linear: the slope is 200−2505=−10\tfrac{200 - 250}{5} = -10 kPa/h, so L(t)=250−10tL(t) = 250 - 10t.

Exponential: the ratio over 55 hours is 200250=0.8\tfrac{200}{250} = 0.8, so E(t)=250(0.8)t/5E(t) = 250(0.8)^{t/5}.

(b) L(20)=250−200=50L(20) = 250 - 200 = 50 kPa. E(20)=250(0.8)4=102.4E(20) = 250(0.8)^4 = 102.4 kPa.

(c) The exponential model. Air leaks faster when the pressure is higher and slower as it drops, so the tire loses a percentage of its pressure, not a fixed amount. The linear model also predicts a pressure of 00 at t=25t = 25 h and negative pressures after that, which is impossible.

9. (Challenge) A ball is thrown upward. Its height is 1.21.2 m at t=0t = 0, 15.315.3 m at t=1t = 1 s, and 19.619.6 m at t=2t = 2 s.

  • (a) Find a quadratic model h(t)=at2+bt+ch(t) = at^2 + bt + c.
  • (b) Find the maximum height and when the ball lands, to 2 decimal places.
Solution

(a) h(0)=c=1.2h(0) = c = 1.2. Then

h(1)=a+b+1.2=15.3⇒a+b=14.1h(2)=4a+2b+1.2=19.6⇒2a+b=9.2\begin{aligned} h(1) &= a + b + 1.2 = 15.3 &&\Rightarrow\quad a + b = 14.1 \\ h(2) &= 4a + 2b + 1.2 = 19.6 &&\Rightarrow\quad 2a + b = 9.2 \end{aligned}

Subtracting: a=9.2−14.1=−4.9a = 9.2 - 14.1 = -4.9, and then b=14.1+4.9=19b = 14.1 + 4.9 = 19.

h(t)=−4.9t2+19t+1.2h(t) = -4.9t^2 + 19t + 1.2

(The −4.9-4.9 matches half the acceleration due to gravity, 9.89.8 m/s², a good sign the model is reasonable.)

(b) The vertex is at t=199.8≈1.94t = \dfrac{19}{9.8} \approx 1.94 s, and

h(199.8)=1.2+1924(4.9)=1.2+36119.6≈19.62 mh\left(\frac{19}{9.8}\right) = 1.2 + \frac{19^2}{4(4.9)} = 1.2 + \frac{361}{19.6} \approx 19.62 \text{ m}

The ball lands when h(t)=0h(t) = 0. By the quadratic formula, taking the positive root:

t=−19−192−4(−4.9)(1.2)2(−4.9)=19+384.529.8≈3.94 st = \frac{-19 - \sqrt{19^2 - 4(-4.9)(1.2)}}{2(-4.9)} = \frac{19 + \sqrt{384.52}}{9.8} \approx 3.94 \text{ s}

The maximum height is about 19.6219.62 m, at about 1.941.94 s, and the ball lands after about 3.943.94 s.