Piecewise function
First taught in Algebra 1
Definition
A piecewise function uses different formulas on different parts of its domain.
Advertisement
Example:
Evaluating: first decide which piece the input belongs to, then use that formula.
- : since , use : .
- : since , use : .
Graphing: graph each piece only on its own interval. Use a closed dot where an endpoint is included (, ) and an open dot where it is not (, ).
Common piecewise functions:
- The absolute value function: for and for .
- Step functions, like the price of postage by weight.
Real-life example: a parking garage charges $5 for up to 2 hours, then $3 per extra hour:
Parking 4 hours costs .
A piecewise function can be continuous, or it can have a jump discontinuity where the pieces do not meet.