Functions · AI SL & HL
Modelling, variation and numerical technology
Turn a contextual problem into a model, fit or construct its parameters, and evaluate whether the numerical answer deserves trust.
Course focus: AI SL & HL · First-assessment-2021 course. The sections distinguish the mathematical idea, the calculation and its interpretation.
Before you start: Function notation, graphs, substitution, units and basic regression.
Build it from the beginning
A model is a simplified mathematical description of a situation. Define the input, output and units before fitting parameters. A good numerical fit does not make every prediction sensible: the domain and assumptions still need checking.
A first walkthrough
A taxi model is C=4+2d, where C is pounds and d is kilometres. Interpret its terms.
- At distance zero, the charge is £4, the starting fee.
- Each additional kilometre adds £2.
- For 3 km, the predicted cost is £10; the physical domain has \(d\ge0\).
The foundations behind the method
Understand what the symbols mean
A model is a rule chosen to represent a specific aspect of a situation. It needs variables, units, assumptions and a domain before its formula becomes useful. Technology performs calculations inside that model; it does not decide which quantities matter, whether the assumptions are defensible, or whether a root belongs to the physical problem.
How the ideas connect
Good model selection combines a graph with contextual reasoning. Residuals inspect local prediction errors, while domain and long-term behaviour test consequences outside the observed points. An excellent numerical fit can still produce impossible future values. This is why interpretation and validation are mathematical steps rather than optional prose after a calculation.
Start with the idea
Build your understanding
A formula needs a job
The same algebraic rule can be useful over a short interval and unreasonable elsewhere. The question determines the useful domain.
Exact conditions or noisy data
A system of equations can enforce exact landmarks; regression distributes discrepancies across measurements. These are different fitting problems.
Compare the approaches
Choose by the information in the question, rather than the formula you recognise first.
Graphical solution
When it helpsUse intersections and a suitable window to locate solutions.
Check before using itA single solver result does not establish that no other feasible root exists.
Regression
When it helpsUse measured data to estimate a relationship.
Check before using itA large correlation or small fitting error does not establish causation or reliable extrapolation.
Your method plan
- Define variables, domain and assumptions.
- Choose and fit a plausible rule, documenting the numerical setup.
- Check the result against data and context, then state a qualified conclusion.
Learn the methods
Learn step by step
1. Specify what the model should answer
Begin with a question that can be answered mathematically: a prediction, a comparison, a threshold or an optimum. Define every variable with units and distinguish inputs from outputs. State the time origin and what is held constant. A model simplifies reality, so write its assumptions explicitly. An exact tariff rule and a best-fit population curve are both models, but their uncertainties are very different.
2. Choose a shape using structure
Equal absolute changes suggest a linear rule; equal proportional changes suggest an exponential rule. A constant product suggests inverse variation, and similarity can suggest a power relationship. Periodic behaviour may motivate a sinusoid. Do not select a high-degree polynomial merely because it passes through every recorded point. The best model balances simplicity, fit, interpretable parameters and sensible behaviour in the domain of interest.
3. Construct parameters from conditions
Translate each supplied fact into an equation. Passing through a point gives an output condition; a maximum can supply both a point and zero slope; a known period restricts a trigonometric coefficient. Use a simultaneous-equation solver when appropriate, but display the equations that justify its use. Fitting noisy data by regression is different from exactly solving a set of model conditions; label which operation you performed.
Worked example: Build a cubic from information
Let \(f(x)=ax^3+bx^2+cx+d\), with \(f(0)=2,f(1)=4,f(2)=12,f\,\!\prime(0)=1\). Find the rule.
- The first and derivative conditions give \(d=2,c=1\).
- The point at 1 gives \(a+b=1\); the point at 2 gives \(8a+4b=8\).
- Solve to obtain \(a=1,b=0\), hence \(f(x)=x^3+x+2\).
- Check all four original conditions. A solution for coefficients is not evidence that this model fits any additional observations.
4. Handle variation and piecewise rules
For \(y=kx^p\), determine k from one nonzero data point if p is given. Direct proportionality is \(p=1\), not any straight line. Inverse proportionality is \(p=-1\). A piecewise rule uses different expressions in different intervals; assign boundary points explicitly. A payment can jump at a time boundary, whereas a physical height generally cannot. Continuity is a contextual assumption, not a universal requirement for every model.
Power variation
Why this formula works
A proportionality statement says the ratio of y to the specified power of x stays constant. Solving one data condition identifies that constant, but additional observations are needed to judge whether an approximate model is reasonable. The input domain depends on the power and the context.
\(y=kx^p\), so \(k=y/x^p\) when the denominator is defined and nonzero.
Quick example
If \(y\) varies inversely with \(x^2\) and \(y=12\) at \(x=2\), then \(k=12(4)=48\), so \(y=48/x^2\).
Worked example: An exact piecewise charge
A service charges £3 for the first hour and £2 for each additional hour or part-hour. What does 1.2 hours cost?
- Time belongs to the interval above 1 and up to 2 hours.
- A part of a second hour counts as a full additional charged hour.
- The cost is £5, not £3.40 from assuming a linear per-minute charge.
- Describe the boundary at 1 hour carefully: exactly one hour costs £3; any positive extra time enters the next band.
5. Solve numerically without losing cases
Graph both sides of an equation or graph their difference. Select a window that contains the meaningful domain and use a table or sign scan to identify plausible intersections. A numerical solver may return only one root near its starting value. Check whether others exist and whether each is physically admissible. Read graph labels and calculator modes before trusting a displayed intersection; an inappropriate scale can hide important behaviour.
6. Validate and communicate
Compare predictions to observations using residuals. A pattern in residuals suggests a shape mismatch; an isolated large residual may be an outlier or data error, but it must not be deleted solely to improve the fit. Prefer interpolation to long-range extrapolation when possible. Discuss whether assumptions could change outside the observed interval. State the conclusion in the original context, with units and a limitation specific to that model rather than a generic statement that models are imperfect.
Residual
Why this formula works
A fitted output is the model’s prediction at the observed input. Subtracting it from the measured output produces a signed vertical discrepancy. Keeping the sign lets a residual plot reveal systematic underprediction or overprediction; squaring residuals is useful for fitting but removes this direction information.
\(e_i=y_i-\widehat y_i\).
Quick example
If a model predicts 18.4 and the observed value is 20, the residual is +1.6 in the output’s units.
Quick formula reference
For revision once you understand the methods above. Check the conditions before using a formula.
Power variation
\(y=kx^p\), so \(k=y/x^p\) when the denominator is defined and nonzero.
Return to the explanation →Learn to diagnose an error
Spot the mistake
The statement below is incorrect. Identify the missing condition or reasoning before opening the explanation.
A regression curve passes through all measured points, so its prediction ten years later must be accurate.
Explain and repair the mistake
Passing through a finite data set measures fit at those points, not validity beyond them. A high-degree polynomial can oscillate or predict negative quantities outside the observed interval. Evaluate the mechanism, domain and residuals, and identify extrapolation explicitly.
Connect and apply
Put the ideas together
A more demanding application of this guide’s methods. This is a learning stage; any additional HL content is labelled separately.
Two equations can reveal two feasible roots
Find the intersections of \(y=x^2\) and \(y=2x+3\).
- Solve the difference \(x^2-2x-3=0\).
- Factoring or a numerical solver gives \(x=-1\) and \(x=3\).
- The corresponding outputs are 1 and 9. A window restricted to positive inputs would hide one intersection.
- If x represents elapsed time constrained to nonnegative values, retain only x=3 for that context; do not confuse the contextual answer with the unrestricted equation.
What must be reported if a numerical solver gives only x=3?
Check your reasoning
Check the full requested domain or justify a contextual restriction. The other unrestricted intersection is x=-1; a starting guess or window is not a mathematical reason to discard it.
Common mistakes and how to avoid them
- Passing through a finite data set measures fit at those points, not validity beyond them. A high-degree polynomial can oscillate or predict negative quantities outside the observed interval. Evaluate the mechanism, domain and residuals, and identify extrapolation explicitly.
- A single solver result does not establish that no other feasible root exists.
- A large correlation or small fitting error does not establish causation or reliable extrapolation.
Practise independently
Build confidence, then apply it
Try each question before opening its hint or solution. If a method is new, return to the walkthrough, then try again. These learning stages describe the practice sequence; additional HL content is labelled separately.
- 1
Build confidence
Use this model for a journey of 6 km.
Need a starting point?
Substitute distance into the input variable.
Show the worked solution
- \(C=4+2(6)=16\).
- The predicted charge is £16.
- 2
Apply and explain
The model predicts a negative charge for a negative distance. Is that a useful prediction?
Need a starting point?
Distinguish algebraic inputs from contextual inputs.
Show the worked solution
- No: negative travel distance lies outside this model domain.
- State \(d\ge0\) rather than treating every real input as physically meaningful.
- 3
Check your understanding
If area varies directly with the square of a scale length, what happens when that length triples?
Show the worked solution
The output is multiplied by 3²=9. A proportionality to a square does not give the same multiplier as the input. This conclusion assumes the same proportionality constant and domain.
- 4
Use the method
For \(y=48/x^2\), find y at x=4 and explain why doubling x does not halve y.
Show the worked solution
\(y=48/16=3\). Doubling x multiplies its square by 4, so the output is divided by 4. The model assumes x is nonzero and lies in its contextual domain.
Finished? Use the linked question bank below to practise selecting the method without a guide telling you which rule to use.
Using these methods in exam questions
AI Paper 1
GDC requiredShort-response questions still need mathematical setup and interpretation. Choose the correct tool, enter the model or data carefully, and check units and rounding.
AI Paper 2
GDC requiredExtended-response questions connect several steps. Keep intermediate values at full precision and explain how each result answers the context.
For this topic: Label axes, intercepts and relevant asymptotes. For a numerical root, state the equation and search interval; a graph window that misses an intersection is not evidence that no solution exists.
Paper 3: build a connected argument
Both AA HL and AI HL Paper 3 contain two extended problem-solving questions. A question develops a theme, so keep useful earlier results, test small cases and explain any proposed general rule. A calculator pattern can suggest a result; your mathematical reasoning must support it.
- Identify what the first part establishes and record the conditions under which it holds.
- When a later part introduces a new definition or model, connect it to methods you already know rather than assuming a new formula must have been memorised.
- Check the conclusion against an earlier numerical case and explain its meaning or limitation.
For the first-assessment-2021 courses. IB assessment reference ↗
Find a specific method or formula
Now practise the method
If you opened this guide from a question, return to that tab and try the method without looking at the example. Your answer stays in the question tab.
Practise this subtopic →Want a broader practice session? Explore IB Maths AI SL practice questions →Explore IB Maths AI HL practice questions →Try free IB Maths exam-style questions and worked solutions →
Original Arc Practice teaching notes for Maths AI. Core and HL sections are distinguished above. These notes follow the first-assessment-2021 course and are not an official IB publication or a complete syllabus checklist. IB course reference. Report a correction.