Quick answer: A piecewise function uses a different rule on different parts of the domain, such as one price per unit up to a limit and another price above it. To evaluate it, first decide which interval x is in, then use that rule. At a boundary, the inequality sign (≤ or <) tells you which rule applies.
Utility bills, postage rates, and tax bands — all piecewise functions. SL AI Paper 2 loves testing the value at a boundary.
Practise Piecewise functions and modelling with AI marking
Open the full SL AI engine — every question in this unit is worked through with instant AI-graded feedback on your handwritten workings.
Write each piece with its own interval, for example 0 ≤ x ≤ 100 and x > 100, so every x has exactly one rule.
A model is continuous at a boundary when both rules give the same value there; a bill or a fare usually is, and a postage band usually is not.
To solve f(x) = k, decide which piece k comes from (compare it with the value at each boundary) before solving.
On a graph, a filled dot means the boundary value is included and an open circle means it is not.
Tax and charging bands apply the higher rate only to the part above the boundary, not to the whole amount.
Worked example
An electricity bill is €12 a month plus €0.30 per kWh for the first 100 kWh, and €0.20 per kWh for every kWh above 100. Write the monthly cost C(x) for x kWh as a piecewise function, and find how much electricity was used if a bill is €70.
Up to 100 kWh: C(x) = 12 + 0.30x, for 0 ≤ x ≤ 100.
At 100 kWh the cost is 12 + 30 = €42, so above 100 kWh: C(x) = 42 + 0.20(x − 100), for x > 100.
€70 is more than €42, so use the second piece: 42 + 0.20(x − 100) = 70.
0.20(x − 100) = 28, so x − 100 = 140 and x = 240.
Answer: C(x) = 12 + 0.30x for 0 ≤ x ≤ 100 and C(x) = 42 + 0.20(x − 100) for x > 100; 240 kWh.
How do you evaluate a piecewise function at a boundary?
Look at the inequality signs. If one piece says x ≤ 100 and the other x > 100, then x = 100 belongs to the first piece, so use that rule. If both pieces give the same value there, the function is continuous and either rule gives the same answer.
Can I use my calculator for piecewise functions and modelling?
Yes: a GDC is allowed on every SL AI paper, so practise the calculator method as well as the working. The Graphs: intersections, zeros, max and min guide gives the keystrokes for the TI-84 Plus CE, TI-Nspire CX II and Casio fx-CG50.