2. The fee to park in the parking lot of a shopping mall costs P40.00 for the first two hours and an extra P10.00 for each hour (or a fraction of it) after that. If you park for more than twelve hours, you instead pay a flat rate of P200.00. Represent your parking fee [tex]$F$[/tex] as a function of the number of hours [tex]$t$[/tex].

[tex]\[
F(t) =
\begin{cases}
40 & \text{if } t \leq 2 \\
40 + 10(t - 2) & \text{if } 2 \ \textless \ t \leq 12 \\
200 & \text{if } t \ \textgreater \ 12
\end{cases}
\][/tex]



Answer :

To represent the parking fee [tex]\( F \)[/tex] as a function of the number of hours [tex]\( t \)[/tex], we can define it piecewise based on the different conditions given:

1. If [tex]\( t \leq 2 \)[/tex] hours:
The parking fee [tex]\( F \)[/tex] is a flat P40.00 for up to and including the first two hours.

2. If [tex]\( 2 < t \leq 12 \)[/tex] hours:
For parking hours greater than 2 but less than or equal to 12, the fee is P40.00 for the first two hours plus an additional P10.00 for each extra hour or fraction thereof. This can be represented using the function:
[tex]\[ F = 40 + 10 \cdot \lceil t - 2 \rceil \][/tex]
Where [tex]\( \lceil x \rceil \)[/tex] denotes the ceiling function, which rounds up to the nearest integer.

3. If [tex]\( t > 12 \)[/tex] hours:
The parking fee is a flat rate of P200.00.

Combining all these conditions, the piecewise function can be written as:

[tex]\[ F(t) = \begin{cases} 40 & \text{if } t \leq 2 \\ 40 + 10 \cdot \lceil t - 2 \rceil & \text{if } 2 < t \leq 12 \\ 200 & \text{if } t > 12 \end{cases} \][/tex]

where
- [tex]\( \lceil t - 2 \rceil \)[/tex] ensures that you are charged P10.00 for each hour or fraction of an hour beyond the first 2 hours.

Let's break it down further with examples for better clarity:

- Example 1:
If [tex]\( t = 1.5 \)[/tex] hours, since [tex]\( t \leq 2 \)[/tex]:
[tex]\[ F(1.5) = 40 \][/tex]

- Example 2:
If [tex]\( t = 4 \)[/tex] hours, since [tex]\( 2 < t \leq 12 \)[/tex]:
[tex]\[ F(4) = 40 + 10 \cdot \lceil 4 - 2 \rceil = 40 + 10 \cdot 2 = 60 \][/tex]

- Example 3:
If [tex]\( t = 10.5 \)[/tex] hours, since [tex]\( 2 < t \leq 12 \)[/tex]:
[tex]\[ F(10.5) = 40 + 10 \cdot \lceil 10.5 - 2 \rceil = 40 + 10 \cdot 9 = 130 \][/tex]

- Example 4:
If [tex]\( t = 13 \)[/tex] hours, since [tex]\( t > 12 \)[/tex]:
[tex]\[ F(13) = 200 \][/tex]

This piecewise function covers all possible values for [tex]\( t \)[/tex] based on the given pricing structure, ensuring that the parking fees are calculated correctly for any duration.