Functions
🎯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
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.
- 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.
- 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.
- Determine a reasonable domain. Say what values of the input the model is meant to cover, and why.
- 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.
- Use it. Read values off, make predictions, answer the question in context with units.
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.
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) 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 \):
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.
📝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.
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.
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.
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.
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.
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\).
🔗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