4.8
James drives to the airport and enters the short-term parking garage. He notices that the parking fee depends on how many hours he parks.
Because the pricing system changes its rules based on the total parking duration, it can be modeled by a piecewise-defined function.
A piecewise-defined function uses different expressions for different intervals of its domain. These expressions may be constant, linear, or other mathematical expressions.
The garage allows vehicles to remain parked for up to twenty-four hours, but the pricing rules are split into three distinct intervals.
For the first hour, the fee is four dollars flat. For a parking duration of more than one hour and up to eight hours, an additional two dollars is charged for each hour after the first.
For a parking duration of more than eight hours and up to twenty-four hours, a flat fee of eighteen dollars applies.
When James returns after twenty-two hours, which falls within the final interval, he pays eighteen dollars.
This scenario shows how piecewise-defined functions can model pricing systems that use different rules over different intervals.
A piecewise-defined function is a mathematical function that applies different expressions or rules across distinct intervals of its domain. Rather th…
Copyright © 2026 MyJoVE Corporation. All rights reserved.