FUN012 · Functions & graphs · Classes 11–12
Piecewise function
A piecewise function uses different rules on different parts of its domain. An open circle marks an end point that is not included.
{ …Piecewise function
📐 Formula
f(x) = x + 2 if x < 0; x² if x ≥ 0
✏️ Worked example
f(−1) = −1 + 2 = 1 (first piece); f(2) = 4 (second piece).
🌍 Where it is used
Tax slabs, electricity tariffs, postage rates.
❓ Quick check
For the function shown, f(0) = ?
🏋️ Practice
Easyf(−3) = ?
Answer: −1
Mediumf(1.5) = ?
Answer: 2.25
ChallengeWrite |x| as a piecewise function.
Answer: x if x ≥ 0; −x if x < 0