To define the cost function \( G(t) \) based on the given parking garage rates, we can break it down as follows:
-
For \( t \) less than or equal to 1 hour: \[ G(t) = 5 \]
-
For \( t \) greater than 1 hour but less than or equal to 2 hours: \[ G(t) = 10 \]
-
For \( t \) greater than 2 hours (up to 24 hours): \[ G(t) = 12 \]
Thus, the complete piecewise cost function \( G(t) \) can be written as:
\[ G(t) = \begin{cases} 5 & \text{if } 0 < t \leq 1 \ 10 & \text{if } 1 < t \leq 2 \ 12 & \text{if } 2 < t \leq 24 \end{cases} \]
This function adequately represents the costs associated with parking as dictated by the garage's pricing policy. Note that \( G(t) \) does not cover \( t \) values that are 0 or negative, as they do not apply to the parking service.