Linear, Quadratic & Cubic Models (AI HL)
Straight lines, parabolas and cubics are the three workhorse models of the AI course, and each one carries its own set of features worth recognising - gradient and intercept, vertex and roots, turning points and inflexion. This topic covers writing a model from a real-world context, extracting its key features, and using it to make predictions, along with direct and inverse variation as a related family of power models.
What the syllabus says
This topic maps onto one broad point in the official IB Applications & Interpretation syllabus, which groups every polynomial-style model together with direct and inverse variation.
| Code | Syllabus content |
|---|---|
| SL2.5 | Modelling with linear models \(f(x)=mx+c\), including piecewise linear models. Quadratic models \(f(x)=ax^2+bx+c\), \(a\ne0\): axis of symmetry, vertex, zeros and roots, intercepts. Exponential growth/decay models \(f(x)=ka^x+c\) or \(ke^{rx}+c\), with horizontal asymptote. Direct/inverse variation \(f(x)=ax^n,\ n\in\mathbb{Z}\), including the y-axis as a vertical asymptote when \(n<0\). Cubic models \(f(x)=ax^3+bx^2+cx+d\). Sinusoidal models \(f(x)=a\sin(bx)+d\) or \(a\cos(bx)+d\): amplitude, period, principal axis. |
Linear models link to the equation of a straight line (SL2.1); quadratic and cubic models are often paired with optimisation using differentiation.
Key terms
Five words worth knowing cold before you touch the formulas below - each with a worked example showing exactly what it means.
What is a linear model?
A linear model \(f(x)=mx+c\) has a constant rate of change \(m\) and a fixed starting value \(c\). It's the right choice whenever a quantity increases or decreases by the same amount for every unit increase in \(x\).
e.g. A parking fee \(C(t)=5+3t\): \(C(4) = 5+3(4) = 17.\)
What is a quadratic model?
A quadratic model \(f(x)=ax^2+bx+c\) has one turning point (the vertex) and a parabolic shape. It's the natural choice for projectile motion, or anything with a single maximum or minimum.
e.g. \(h(t) = -5t^2+20t\): vertex at \(t=\dfrac{-20}{2(-5)}=2\), \(h(2) = -20+40 = 20.\)
What is a cubic model?
A cubic model \(f(x)=ax^3+bx^2+cx+d\) can have up to two turning points and an S-shaped or wave-like graph. It's common in volume problems, where a variable appears three times over (length, width and height).
e.g. \(V(x)=x(10-2x)^2\): \(V(1) = 1\times8^2 = 64.\)
What is direct/inverse variation?
Direct variation \(f(x)=ax^n\) with \(n>0\) means \(y\) grows as \(x\) grows; inverse variation with \(n<0\) means \(y\) shrinks as \(x\) grows, with the y-axis as a vertical asymptote.
e.g. \(y=\dfrac{6}{x}\) (inverse, \(n=-1\)): at \(x=3\), \(y=2.\)
What is the axis of symmetry?
The axis of symmetry of a parabola \(f(x)=ax^2+bx+c\) is the vertical line \(x=-\dfrac{b}{2a}\) through the vertex. Substituting this x-value back into \(f\) gives the maximum or minimum y-value.
e.g. \(f(x)=x^2-4x+1\): axis \(x=\dfrac{4}{2}=2\), vertex \(f(2) = 4-8+1 = -3.\)
Key formulas
Four model forms and one key coordinate cover almost every question on this topic. The tables below summarise all of them at a glance - the explanations underneath go into more depth on each one.
Formula reference
The AI formula booklet lists each model's general form directly, so you don't need to memorise them - what you do need is the technique for extracting features like the vertex or the roots.
| Formula | Used for | Booklet? |
|---|---|---|
| \(f(x)=mx+c\) | Linear model | ✓ Yes |
| \(f(x)=ax^2+bx+c,\ x=-\dfrac{b}{2a}\) | Quadratic model and axis of symmetry | ✓ Yes |
| \(f(x)=ax^3+bx^2+cx+d\) | Cubic model | ✓ Yes |
| \(f(x)=ax^n\) | Direct/inverse variation | ✓ Yes |
Quadratic vs cubic models
Both are polynomial models, but their shapes and typical uses differ enough to be worth contrasting directly.
| Feature | Quadratic | Cubic |
|---|---|---|
| Turning points | Exactly one (the vertex) | Up to two |
| Symmetry | Symmetric about the axis \(x=-b/2a\) | No simple axis of symmetry in general |
| End behaviour | Both ends go the same way (up or down) | Ends go in opposite directions |
| Typical use | Projectile height, single-peak cost or profit | Volume from a fixed sheet, packaging design |
Linear and quadratic models
These are the two models students meet earliest, and the two examined most often in context.
Setting up a linear model
Identify the fixed starting value (\(c\)) and the constant rate of change (\(m\)) from the context, then write \(f(x)=mx+c\).
Finding the vertex
\[x = -\frac{b}{2a}\]
Substitute this x-value back into \(f(x)\) to get the maximum or minimum value - stating only \(x\) is an incomplete answer if the question asks for the vertex or the maximum value.
✓ In the formula bookletFinding the roots
Use the quadratic formula, factorising, or your GDC's equation solver - technology is expected for anything that doesn't factorise cleanly.
Cubic and variation models
Cubics and power models both often carry a real-world domain restriction that has to be checked.
Turning points of a cubic
Differentiate, set \(f'(x)=0\), and solve. Each solution is a candidate maximum or minimum - check which by the sign of \(f'\) either side, or the second derivative.
Direct variation
\[f(x)=ax^n,\ n>0\]
Output grows as input grows - doubling \(x\) multiplies \(y\) by \(2^n\).
Inverse variation
\[f(x)=ax^n,\ n<0\]
Output shrinks as input grows, with a vertical asymptote at \(x=0\) - the y-axis itself.
Worked examples
Two full exam-style questions, marked exactly like the real thing. Try each one yourself before checking the worked solution.
A taxi charges a fixed \$3.50 plus \$1.20 per km.
(a) Write the cost \(C\) as a function of distance \(d\) km.
(b) Find the cost of a 12 km trip.
(c) Find the distance for a \$27.50 fare.
Worked solution
(a) \(C(d) = 3.50 + 1.20d.\) A1
(b) \(C(12) = 3.50 + 14.40 = $17.90.\) A1
(c) \(27.50 = 3.50 + 1.20d \Rightarrow d\) M1
\(= 20\) km. A1
An open box is made from a \(20\times20\) cm sheet by cutting squares of side \(x\) from each corner.
(a) Show the volume is \(V(x) = x(20-2x)^2\).
(b) Find the value of \(x\) that maximises the volume, to 3 significant figures.
(c) State the maximum volume.
Worked solution
(a) Base \((20-2x)\) square, height \(x\): \(V\) M1
\(= x(20-2x)^2.\) A1 AG
(b) \(V' = (20-2x)(20-6x) = 0\); reject \(x=10\), so \(x\) M1
\(\approx 3.33\) cm. A1
(c) \(V(3.33) \approx 592\) cm³. A1
Common mistakes
The four slip-ups that account for most of the marks lost on this topic - worth reading before you start practising, not just after you get one wrong.
- Ignoring the real-world domain. A model's algebraic domain is often wider than what makes physical sense - negative time, a negative side length, or a cut bigger than the sheet all need to be excluded.
- Stopping at \(x=-b/2a\). The vertex formula only gives the x-coordinate - if the question asks for the maximum or minimum value, you still need to substitute back into \(f(x)\) to get the y-value.
- Confusing direct and inverse variation. The sign of the exponent \(n\) in \(f(x)=ax^n\) determines the behaviour - positive \(n\) means \(y\) grows with \(x\); negative \(n\) means \(y\) shrinks, with an asymptote at \(x=0\).
- Forgetting to reject invalid solutions. Solving \(V'(x)=0\) for an optimisation problem often gives more than one root - roots outside the physical domain (like \(x=10\) making the volume zero) must be rejected, not just reported.
Using your GDC
Every step below is a real button sequence, not a vague "use your calculator" hint - covering the TI-84 Plus, TI-Nspire, and Casio fx-9860/fx-CG50. Pick your model to filter down to just the steps that apply to you.
The heart of AI modelling - find the best-fitting curve for a data set, not just a straight line.
- Enter the data in two lists (x and y).
- STAT → EDIT to enter L1/L2, then STAT → CALC → QuadReg / CubicReg / ExpReg / PwrReg / SinReg.TI-84
- In a Lists & Spreadsheet page enter the data, then menu → Statistics → Stat Calculations → choose the regression type.Nspire
- Main menu → Statistics, enter the data in lists, then CALC → REG and pick X² / X³ / Exp / Power / Sin.Casio
Tip: Turn DiagnosticOn (TI-84: 2nd → 0 → DiagnosticOn) to see R². Choose the model with the best R² that also makes sense for the context.
After fitting several models (linear, quadratic, exponential…), you need to decide which fits the data best - R² is the key tool.
- Fit each candidate model in turn and note the R² value each time.
- Turn DiagnosticOn first (2nd → 0, scroll to DiagnosticOn, ENTER) - then R² appears after every regression.TI-84
- R² is shown automatically after each regression calculation in the Statistics menu.Nspire
- R² (displayed as r²) appears in the regression output; run CALC → REG for each model type and compare.Casio
- The model with R² closest to 1 explains the most variation in y - but also consider whether the model makes sense for the context.
- An exponential model with R² = 0.98 is better than a linear model with R² = 0.91 for the same data.
Tip: R² alone doesn't tell you whether the model is appropriate - always look at the scatter plot too. A high R² on a model that shouldn't apply is meaningless.
See the full GDC guide for more calculator models and topics.
Ready to practise properly?
Linear, quadratic and cubic model questions, marked instantly like the real exam.
Quick answers
The questions students on this topic ask most often.
How do I know whether to use a linear, quadratic or cubic model?
Look at the pattern in the data or the context. Constant differences between successive y-values suggest linear; a symmetric curve with one turning point suggests quadratic; two turning points or an S-shaped curve suggests cubic. Increasing second differences (differences of the differences) that are roughly constant confirm a quadratic model.
What does R² tell me about a fitted model?
R² measures how much of the variation in the data your model explains, from 0 to 1. A value close to 1 means the model fits well, but a high R² doesn't guarantee the model is sensible for the context - always check the model type matches the shape of the data too.
Why do I need to check the domain of a model in context?
A model like \(V(x) = x(20-2x)^2\) is only meaningful for values of \(x\) that make physical sense - here, \(0 < x < 10\), since a negative or oversized cut is impossible. Roots or turning points outside that range have to be rejected even if they solve the equation.
Can my GDC fit these models directly from data?
Yes - enter the data into two lists and run the matching regression (linear, quadratic or cubic) to get the coefficients and, with diagnostics on, the R² value directly. See the GDC guide for model-specific instructions.
Sub-topics
Linear, Quadratic & Cubic Models broken down into its individual skills, each with its own focused page.
Related topics
More Functions & Modelling topics from the same AI HL syllabus unit, in case you want to keep going.