Piecewise Functions
Priya's phone plan costs $10 a month for up to 5 gigabytes, then $4 for each extra gigabyte. One rule cannot describe both parts of the bill. How do you write a rule that changes partway?
A rule in pieces
A piecewise function uses a different rule on each interval of inputs. Here when , and when .
To find , first ask which interval holds 3. It is , so use the second rule: . For , the input is below 1, so use the first rule: .
Graphing the pieces
Graph each rule only over its own interval. The input 1 is a boundary value: it belongs to exactly one piece. Here owns it, so the right piece has a closed dot at and the left piece ends in an open dot at .
There is one output for each input, so , never 3.
Writing one from a story
For Priya's plan, let be the gigabytes and the cost in dollars. Up to 5 gigabytes the cost is flat: when . Beyond 5, add $4 for each extra one: when .
Check 7 gigabytes: . Your turn: what is ? Answer: 5 is in the first interval, so .
Careful
Do not use both rules at a boundary. Look at which piece has the equal sign, and use only that one.
Try it at home
- Invent a taxi fare: a flat fee, then a rate.
- Write it as a rule in two pieces, with an interval for each.
- Find the fare for 1 mile exactly and for 3 miles, naming the piece you used.
Words in this lesson
- piecewise function - a function that uses a different rule on different intervals of input.
- interval - all the numbers between two ends, such as every number from 1 up.
- boundary value - an input where one piece ends and the next begins.
Big idea
A piecewise function is a rule in pieces. Find the piece the input belongs to, then use its rule, and give the boundary value to exactly one piece.