What is a piecewise function, and how do I choose the right rule?
Quick answer
A piecewise function gives different formulas for different parts of its input domain. To evaluate it, first compare the input with the conditions and select the one that includes it; then substitute into that formula only. Pay close attention to < versus ≤ (and > versus ≥): at a boundary, those symbols determine which rule applies.
The question, the details, the next step.
A practical checklist
Write down the input you are evaluating.
Compare it with each condition before substituting.
Check whether equality is included at a boundary.
Substitute into only the matching formula and simplify.
Test the boundary and nearby inputs if checking the full definition.
A few more useful answers
Can two different formulas give the same value at the boundary?
Yes. The function’s condition still tells you which rule applies. The values may coincide, but you should not skip the condition check.
What if none of the listed conditions matches my input?
Then the piecewise definition, as written, supplies no value for that input. Check whether the problem restricts the domain or whether a condition may be missing; don’t invent a rule.
Do I need to graph a piecewise function to evaluate it?
No. For a numerical input, match it to a condition and substitute. A graph can help visualize which intervals and boundary points each rule covers.
Sources
References used for this guide.
- [S1] OpenStax Calculus Volume 1: Basic Classes of Functions openstax.org · Checked
