You model a real-world situation with a piecewise function by dividing its domain into intervals where different rules apply, then defining one formula for each interval. The intervals and formulas must accurately represent how the situation changes at each breakpoint.
Building the Model
First, define the variables and units. Next, identify where the rule changes, write a formula for each section, and specify the corresponding interval using inequalities.
For example, suppose a taxi charges a fixed fee of 4 dollars, plus 2 dollars per kilometre for the first 10 kilometres. After 10 kilometres, each additional kilometre costs 1.50 dollars.
| Distance interval | Cost rule | Reason |
|---|---|---|
| The fixed fee is 4 dollars and the first 10 kilometres cost 2 dollars each. | ||
| The first 10 kilometres already cost dollars. |
Therefore,
For a 14-kilometre journey, use the second branch:
The model has a contextual domain of . It is also continuous at , because both rules meet at a cost of 24 dollars. Continuity is appropriate here because the total fare should not suddenly jump, although some real contexts, such as fixed postal charges, may require a discontinuous model.
A common misconception is to write the second rule as . This ignores the higher rate already charged for the first 10 kilometres.
Exam Technique
This is HL-only content from AHL 2.9: Further modelling functions, relevant to GDC-active Paper 1 and Paper 2 tasks. In an IB response, define variables, state every interval precisely, check the boundary values, give a realistic domain, and interpret the model in context. For command terms such as formulate or determine, a formula without its interval conditions is incomplete.
