Piecewise Functions
Different rules on different intervals, and where the dots go.
The explanation
A piecewise function uses different formulas on different parts of the domain.
To evaluate, first find which interval your input falls in, then use that rule. For a function that is 2x + 1 when x < 3 and x² when x ≥ 3, evaluating at x = 5 uses x², giving 25.
To graph, draw each piece only over its own interval.
At the boundaries, use a closed dot where the endpoint is included (≤ or ≥) and an open dot where it is not (< or >). Each x-value gets exactly one closed dot, or it would not be a function.
Absolute value is secretly piecewise: |x| is x when x ≥ 0 and −x when x < 0.
A piecewise function is defined by cases whose domains partition the intended domain — they must not overlap, or the definition would assign two outputs to one input.
Evaluation requires checking the condition first; substituting into the wrong branch is the dominant error and is invisible in the arithmetic.
Continuity at a boundary c requires the one-sided values to agree: lim_{x→c⁻} f(x) = lim_{x→c⁺} f(x) = f(c). In Algebra 2 this is checked by substituting c into both surrounding rules and comparing. A mismatch produces a jump discontinuity, which is a legitimate function, not an error — step functions and tax brackets are modelled exactly this way.
Absolute value functions convert to piecewise form by splitting at the zero of the inner expression, which is what makes |2x − 6| graphable as a V with vertex at x = 3 and is the standard technique for solving equations that mix absolute values with other terms.
Worked example
For f(x) = { x + 4 if x < 2 ; x² − 1 if x ≥ 2 }, find f(0), f(2), and say whether it is continuous at x = 2.
- 0 < 2, so use x + 4: f(0) = 4.
- 2 ≥ 2, so use x² − 1: f(2) = 3.
- Left-hand approach: 2 + 4 = 6. Right-hand value: 3.
- 6 ≠ 3, so the graph jumps.
Answer: f(0) = 4, f(2) = 3; not continuous at x = 2 (open dot at (2,6), closed at (2,3)).
Common mistakes
- Evaluating with the wrong branch at a boundary value.
- Drawing two closed dots at the same x, which breaks the function definition.