Step Function Intuition Math Example 2

Follow the full solution, then compare it with the other examples linked below.

Example 2

medium
A parking garage charges \3forthefirsthour(orpartthereof)and for the first hour (or part thereof) and \22 for each additional hour (or part). Write and evaluate the cost function for t=0.5t = 0.5, 11, 1.21.2, and 3.93.9 hours.

Solution

  1. 1
    Model: first hour costs \3,eachadditionalstartedhourcosts, each additional started hour costs \22. For t>1t>1: C(t)=3+2โŒˆtโˆ’1โŒ‰C(t) = 3 + 2\lceil t-1\rceil where โŒˆโ‹…โŒ‰\lceil \cdot \rceil is the ceiling function.
  2. 2
    Evaluate: C(0.5) = \3(withinfirsthour); (within first hour); C(1) = \33; C(1.2) = 3+2\cdot 1 = \5(oneadditionalhourstarted); (one additional hour started); C(3.9) = 3 + 2\cdot 3 = \99 (three additional hours started).
  3. 3
    The cost function is a step function โ€” constant on intervals, jumping at integer boundaries.

Answer

C(0.5)=\3,, C(1)=\33, C(1.2)=\5,, C(3.9)=\99
Real-world billing often uses step (ceiling) functions: you pay for each started unit, not just completed ones. The ceiling function โŒˆxโŒ‰\lceil x \rceil rounds up to the nearest integer.

About Step Function Intuition

A step function is piecewise constant โ€” it takes a fixed value on each of several intervals, jumping abruptly at the interval boundaries.

Learn more about Step Function Intuition โ†’

More Step Function Intuition Examples