Cost of parking with respect to time can be denoted as a function
. (t in hours)
When we park the car we automatically pay 5 dollars no matter how long we stay. So the first step to building our cost function is a simple constant,
But we also given that every hour we will pay 2 extra dollars. This means that after 1 hour we will pay the total of
dollars and after 3 hours we will pay a total of
dollars.
So our function of cost does depend on time, namely
.
Hope this helps.