Integrated Math 2 / Unit 5: Modeling with Functions
5.4 Piecewise Functions
Notes
A piecewise function uses different rules on different parts of the domain.
- Example: $f(x) = \begin{cases} x + 2 & x < 1 \\ 3x - 1 & x \geq 1 \end{cases}$.
- To evaluate, first decide which condition the input meets. $f(-2) = -2 + 2 = 0$ and $f(4) = 3(4) - 1 = 11$.
- Watch the endpoint: $f(1)$ uses the second rule because $x \geq 1$, so $f(1) = 2$.
- Real examples: tax brackets, parking fees, shipping costs.
Practice
Let $f(x) = x + 2$ for $x < 1$ and $f(x) = 3x - 1$ for $x \geq 1$. Find $f(1)$.
$x = 1$ meets $x \geq 1$, so $f(1) = 3(1) - 1 = 2$.
For the piecewise function ($f(x) = x + 2$ for $x < 1$, $f(x) = 3x - 1$ for $x \geq 1$), find $f(4)$.
$4 \geq 1$, so use $3x - 1 = 11$.
A garage charges $5 for up to 2 hours, then $3 for each additional hour. What does 5 hours of parking cost?
$5 for the first 2 hours plus $3 \times 3 = $9$ for the other 3 hours gives $14.
Ready for more? Take the Unit 5 test.