HomeLearning HubIB Maths AITopic 2: Functions
Topic 2

Functions

Mathematics: Applications and Interpretation · 31 hours SL / 42 hours HL

🎯What you need to be able to do

  • Move between the three forms of the equation of a straight line, and use the parallel and perpendicular conditions.
  • Use the language of functions precisely: domain, range, graph, and function notation in context.
  • Sketch a graph from information or a context, and read off its key features with technology.
  • Recognise which of the standard models fits a described situation, and know what each parameter does.
  • Find the parameters of a model from given conditions, points or simultaneous equations.
  • Determine a reasonable domain for a model, and comment on whether the model is appropriate.
  • Use a model to predict, and explain why extrapolation is risky.
  • AHL Use composite functions and inverse functions, including domain restriction.
  • AHL Apply transformations to graphs, including composite transformations.
  • AHL Model with natural logarithmic, sinusoidal, logistic and piecewise functions.
  • AHL Linearise data with logarithms to decide between an exponential and a power relationship.

📚The mathematics

2.1 Straight lines

\( y = mx + c \)
\( ax + by + d = 0 \)
\( y - y_1 = m(x - x_1) \)

Parallel lines have \( m_1 = m_2 \); perpendicular lines have \( m_1 \times m_2 = -1 \), so the perpendicular gradient is the negative reciprocal — flip and change sign.

In AI the gradient almost always means something. On a conversion graph it is an exchange rate; on a cost graph it is the cost per unit; on a distance–time graph it is a speed. When a question asks you to interpret \(m\) or \(c\), answer in the units of the context: “each additional kilometre costs $1.40”, not “the gradient is 1.4”.

2.2 & 2.3 The language of functions and their graphs

A function assigns exactly one output to each input. The domain is the set of allowed inputs and the range is the set of outputs produced. In a modelling context the domain is usually restricted by common sense rather than algebra: time cannot be negative, you cannot sell 3.5 cars, and a model of a population fitted to ten years of data has no business being asked about year 200.

Function notation carries meaning too: if \( C(n) \) is the cost of producing \(n\) items, then \( C(50) = 380 \) says “producing 50 items costs $380”, and that sentence is what an “interpret” question wants.

Know the difference between the command terms: sketch wants the general shape with key features labelled; draw wants an accurate, scaled plot with a ruler for straight lines. Label your axes, including units, every time.

2.4 Key features of graphs

The features to identify are maxima and minima, intercepts, symmetry, the vertex, the zeros of a function (the roots of \( f(x)=0 \)), and vertical and horizontal asymptotes. Use your calculator to find them — the syllabus expects graphing technology, and the intersection of two curves is found the same way.

An asymptote is worth interpreting, not just stating. A horizontal asymptote at \( y = 40 \) on a cooling curve means the object settles at room temperature; on a logistic model it is the carrying capacity. That interpretation is where the marks are.

2.5 The library of models

This is the heart of AI SL. Recognise the shape, then match the model.

  • Linear, \( f(x) = mx + c \) — constant rate of change. Includes piecewise linear models such as tiered phone tariffs, taxi fares and the depth of a swimming pool along its length.
  • Quadratic, \( f(x) = ax^{2} + bx + c \) — one turning point. Projectiles, bridge cables, profit functions where revenue eventually loses to cost. Know the axis of symmetry \( x = -\dfrac{b}{2a} \), the vertex, and the intercepts.
  • Exponential, \( f(x) = ka^{x} + c \), \( f(x) = ka^{-x} + c \) or \( f(x) = k\mathrm{e}^{rx} + c \) — constant percentage change, with a horizontal asymptote at \( y = c \). Population growth, radioactive decay, the cooling of a liquid, the spread of a virus. The \( +c \) is what makes the asymptote something other than zero, and it is the parameter most often forgotten.
  • Direct and inverse variation, \( f(x) = ax^{n} \) for integer \(n\). When \( n < 0 \) the \(y\)-axis is a vertical asymptote — think Boyle’s law, or the inverse square law.
  • Cubic, \( f(x) = ax^{3} + bx^{2} + cx + d \) — up to two turning points. Volume problems, wind turbine power against wind speed.
  • Sinusoidal, \( f(x) = a\sin(bx) + d \) or \( a\cos(bx) + d \) — anything periodic. Tides, temperature through the year, a Ferris wheel, daylight hours. Here \( |a| \) is the amplitude, \( y = d \) is the principal axis, and the period is \( \dfrac{360^{\circ}}{b} \).

At SL you are not asked to convert between \( \sin \) and \( \cos \), and there is no phase shift in the SL sinusoidal model — that arrives at HL.

2.6 The modelling cycle

This sub-topic is a process, and Paper 2 and Paper 3 questions are built around it.

  1. Choose a model. Look at the shape of the data or the behaviour described. Does it level off? Exponential or logistic. Does it repeat? Sinusoidal. Does it turn once? Quadratic. Justify the choice from the shape or the context — that justification is a mark.
  2. Find the parameters. Substitute known points, use initial conditions, or set up and solve simultaneous equations with technology. At SL you will not be asked for a non-linear regression, but you are expected to solve up to three linear equations in three unknowns.
  3. Determine a reasonable domain. Say what values of the input the model is meant to cover, and why.
  4. Test and reflect. Does the model return sensible values? Compare a prediction with a data point you did not use to build it. Comment on how well it fits and where it does not.
  5. Use it. Read values off, make predictions, answer the question in context with units.
Extrapolation is the trap the examiners set most often. A model fitted to data from 2010 to 2024 says nothing reliable about 2050, and an exponential growth model applied far beyond its data always produces an absurd number — that is your cue that the question wants you to say so. When you are asked to comment on the reliability of a prediction, name the specific problem: the value lies outside the range of the data, or the model’s assumptions have stopped holding.

AHL 2.7 & 2.8 Composites, inverses and transformations

\( (f \circ g)(x) = f(g(x)) \): the inner function acts first. An inverse function undoes the original, with \( (f \circ f^{-1})(x) = (f^{-1} \circ f)(x) = x \), and it exists only for one-to-one functions — restricting the domain can force one to exist, as with \( f(x) = (x-3)^{2} - 2 \) restricted to \( x \ge 3 \). The graph of \( f^{-1} \) is \( f \) reflected in \( y = x \), so the domain and range swap.

\( y = f(x) + b \) — up \(b\)
\( y = f(x-a) \) — right \(a\)
\( y = -f(x) \) — reflect in \(x\)-axis
\( y = f(-x) \) — reflect in \(y\)-axis
\( y = p\,f(x) \) — vertical stretch \(p\)
\( y = f(qx) \) — horizontal stretch \( \tfrac{1}{q} \)

Outside the function means vertical and does what it says; inside means horizontal and does the opposite. Order matters for composite transformations.

AHL 2.9 Further models

  • Exponential with half-life. Half-life \(T\) means the multiplier is \( \tfrac{1}{2} \) every \(T\) units, so \( f(t) = k\left(\tfrac{1}{2}\right)^{t/T} \).
  • Natural logarithmic, \( f(x) = a + b\ln x \) — rapid early growth that keeps rising but ever more slowly, with no upper bound.
  • Sinusoidal with phase shift, \( f(x) = a\sin\!\left(b(x-c)\right) + d \). At HL work in radians unless a degree symbol appears, so the period is \( \dfrac{2\pi}{b} \), and \(c\) is the horizontal translation, referred to as the phase shift.
  • Logistic, \( f(x) = \dfrac{L}{1 + C\mathrm{e}^{-kx}} \) with \( L, C, k > 0 \). Growth that starts roughly exponential and then levels off against a ceiling. The horizontal asymptote \( f(x) = L \) is the carrying capacity — the population an island can support, the maximum height of a seedling, the point at which everyone susceptible has caught the virus.
  • Piecewise models, where the rule changes at a boundary. You may need to find a parameter that makes the pieces join up — set the two expressions equal at the boundary value and solve. Income tax bands, postage rates, parachuting before and after the chute opens.

AHL 2.10 Linearising data with logarithms

This is the most practically useful idea in AHL Topic 2. If you suspect a relationship but do not know which, take logarithms and see which one straightens the data.

  • Exponential, \( y = ka^{x} \). Take logs of both sides: \( \ln y = \ln k + x\ln a \). So plotting \( \ln y \) against \( x \) — a semi-log graph — gives a straight line, with gradient \( \ln a \) and intercept \( \ln k \).
  • Power, \( y = kx^{n} \). Taking logs gives \( \ln y = \ln k + n\ln x \). So plotting \( \ln y \) against \( \ln x \) — a log–log graph — gives a straight line of gradient \(n\).

Whichever plot is straighter identifies the relationship, and then the gradient and intercept of that straight line hand you the parameters. You will not be asked to draw these graphs in an examination, but you must be able to interpret them, and to recover \(k\) by exponentiating the intercept.

✏️Worked example

A cup of coffee is left to cool in a room at 21°C. Its temperature \(T\) °C after \(t\) minutes is modelled by \( T(t) = A\mathrm{e}^{-kt} + 21 \). Initially the coffee is at 85°C, and after 10 minutes it has cooled to 58°C. (a) Explain why the model has \( +21 \). (b) Find \(A\) and \(k\). (c) Find the temperature after 25 minutes, and comment on using this model to predict the temperature after 3 hours.

(a) As \( t \to \infty \), \( \mathrm{e}^{-kt} \to 0 \), so \( T \to 21 \). The constant is the horizontal asymptote, and it represents the room temperature — the coffee cools towards its surroundings and cannot go below them.

(b) At \( t = 0 \): \( 85 = A\mathrm{e}^{0} + 21 = A + 21 \), so \( A = 64 \). This is the initial excess over room temperature, not the initial temperature — a distinction worth noticing. Then at \( t = 10 \):

\[ 58 = 64\mathrm{e}^{-10k} + 21 \;\Longrightarrow\; \mathrm{e}^{-10k} = \frac{37}{64} = 0.5781 \]

Taking natural logarithms, \( -10k = \ln 0.5781 = -0.5480 \), so \( k = 0.0548 \).

(c) \( T(25) = 64\mathrm{e}^{-0.0548 \times 25} + 21 = 64(0.2540) + 21 = 37.3 \)°C.

For 3 hours, \( t = 180 \): \( T(180) = 64\mathrm{e}^{-9.864} + 21 = 21.003 \)°C. The model predicts the coffee is at room temperature, which is physically sensible — but it is far outside the range of the two data points used to build it, and it assumes the room stays at exactly 21°C for three hours and that nothing else disturbs the cup. The prediction is plausible in direction but should not be trusted to three decimal places.

Check it. The excess over room temperature was 64°C initially and 37°C after 10 minutes — a factor of about 0.58 per 10 minutes. After 25 minutes you would expect roughly \( 64 \times 0.58^{2.5} \approx 16 \), giving about 37°C. That matches, and it took ten seconds.
Model the excess, not the temperature. Substituting \( T = 58 \) and forgetting to subtract the 21 before taking logarithms is the single most common error on cooling questions — it produces \( \mathrm{e}^{-10k} = \tfrac{58}{64} \) and a value of \(k\) that is far too small. The exponential term always describes the gap between the object and its surroundings.

📝Practise

Work through these, then reveal the answer. Each question targets a different objective from the list above.

1. A taxi charges a fixed $3.50 plus $1.85 per kilometre. Write a model for the cost \(C\) of a journey of \(d\) km, interpret both parameters, and find the distance for a $30 fare.
\( C(d) = 3.50 + 1.85d \). The 3.50 is the fixed charge before you travel anywhere (the \(y\)-intercept), and 1.85 is the cost per additional kilometre (the gradient). For a $30 fare: \( 30 = 3.50 + 1.85d \), so \( 1.85d = 26.50 \) and \( d = 14.3 \) km. A reasonable domain is \( d \ge 0 \) — negative distances are meaningless.
2. A ball is thrown and its height is \( h(t) = -4.9t^{2} + 12t + 1.5 \) metres after \(t\) seconds. Find the maximum height, when it occurs, and when the ball hits the ground.
The maximum is at the vertex, \( t = -\dfrac{b}{2a} = -\dfrac{12}{2(-4.9)} = 1.22 \) s. Then \( h(1.22) = -4.9(1.4938) + 12(1.2245) + 1.5 = 8.85 \) m. The ball lands when \( h = 0 \): solving with technology gives \( t = -0.12 \) or \( t = 2.57 \). Reject the negative root as outside the domain \( t \ge 0 \), so the ball lands after 2.57 s. The 1.5 is the release height, which is why the landing time is not symmetric about the vertex.
3. A population of bacteria is 400 at 09:00 and 2500 at 13:00, and grows exponentially. Find a model \( P(t) = P_0 a^{t} \) with \(t\) in hours after 09:00, and predict the population at 15:00.
\( P_0 = 400 \). At \( t = 4 \): \( 2500 = 400a^{4} \), so \( a^{4} = 6.25 \) and \( a = 6.25^{0.25} = 1.581 \). So \( P(t) = 400(1.581)^{t} \) — growth of about 58% per hour. At 15:00, \( t = 6 \): \( P(6) = 400(1.581)^{6} = 6250 \) bacteria. Rounding to a whole number matters here: a population is a count.
4. The depth of water in a harbour is modelled by \( d(t) = 5.2 + 3.1\sin(30t)^{\circ} \) metres, \(t\) hours after midnight. State the maximum and minimum depths and the period, and find the depth at 05:00.
Amplitude 3.1 about a principal axis of 5.2, so the maximum depth is \( 8.3 \) m and the minimum is \( 2.1 \) m. The period is \( \dfrac{360}{30} = 12 \) hours, so there are two high tides a day — which is what makes this model credible. At \( t = 5 \): \( d(5) = 5.2 + 3.1\sin(150^{\circ}) = 5.2 + 3.1(0.5) = 6.75 \) m. Make sure the calculator is in degree mode for this one, since the model is written in degrees.
5. AHL A rumour spreads through a school of 1200 students according to \( N(t) = \dfrac{1200}{1 + 80\mathrm{e}^{-0.9t}} \), where \(t\) is in days. Find \(N(0)\), the carrying capacity, and the day on which 600 students know the rumour.
\( N(0) = \dfrac{1200}{1+80} = \dfrac{1200}{81} = 14.8 \), so about 15 students start with it. The carrying capacity is \( L = 1200 \) — eventually the whole school, which is exactly what \(L\) should equal in a well-posed model. For \( N = 600 \) (half the school): \( 600 = \dfrac{1200}{1 + 80\mathrm{e}^{-0.9t}} \) gives \( 1 + 80\mathrm{e}^{-0.9t} = 2 \), so \( \mathrm{e}^{-0.9t} = \dfrac{1}{80} \) and \( -0.9t = -4.382 \), giving \( t = 4.87 \) days. Note the halfway point is where the growth is fastest — the point of inflexion of the logistic curve.
6. AHL For a set of data, plotting \( \ln y \) against \( \ln x \) gives a straight line with gradient 1.5 and \(y\)-intercept 0.7. Find the relationship between \(y\) and \(x\).
A straight line on a log–log plot means a power relationship \( y = kx^{n} \), since \( \ln y = \ln k + n\ln x \). Comparing with the line: the gradient is \( n = 1.5 \) and the intercept is \( \ln k = 0.7 \), so \( k = \mathrm{e}^{0.7} = 2.01 \). Hence \( y = 2.01x^{1.5} \). Had the straight line come from plotting \( \ln y \) against \(x\) instead, it would have indicated an exponential relationship — which axis you took the logarithm of is the whole distinction.

🔗Go deeper — other people’s work

These are external resources, not mine. If one stops working, tell me and everything above it on this page still stands.

  • Desmos — add sliders for each parameter of a model and watch what each one controls
  • Gapminder — real global data, much of it displayed on log scales
  • Khan Academy — exponential and logistic models