Create a piecewise function of the following scenario where D(t) is the total distance walked (in miles) as a function of time t (in minutes): “You begin a walk from your home at a fast pace of 4 miles per hour for 30 minutes. You rest for 10 minutes, and then you continue walking at a leisurely pace of 1 mile per hour for 25 minutes."

I've completed the first part with D(t)= 1/15t if 0</t</30 but it's the next two that I'm confused on

for 30 < t <= 40,

D(t) = D(30) = 2

for 40 < t <= 65
D(t) = 2 + (1/60)(t-40)

To create a piecewise function for the next two parts of the scenario, we need to determine the time intervals and the corresponding formulas for each part.

Let's break down the scenario:

1. You begin a walk from your home at a fast pace of 4 miles per hour for 30 minutes.
This part will be defined for t values within the range 30 ≤ t ≤ 40 (30 minutes of walking + 10 minutes of resting).

During this interval, the rate of walking will be 4 miles per hour. Since t represents time in minutes, we need to convert this rate to miles per minute. Since there are 60 minutes in an hour, the rate can be expressed as 4/60 = 1/15 miles per minute.

Therefore, we can define this part of the function as follows:
D(t) = 1/15t for 30 ≤ t ≤ 40

2. You rest for 10 minutes.
During this interval, you are not moving, so the distance does not change. As a result, the formula for this part will be constant at the last value of the previous interval, which was D(40).

Therefore, we can define this part of the function as follows:
D(t) = D(40) = 1/15(40) = 8/3 for 40 ≤ t ≤ 50

3. You continue walking at a leisurely pace of 1 mile per hour for 25 minutes.
This part will be defined for t values within the range 50 ≤ t ≤ 75 (10 minutes of resting + 25 minutes of walking).

During this interval, the rate of walking will be 1 mile per hour. Similar to the previous part, we need to convert this rate to miles per minute. 1 mile per hour is equivalent to 1/60 miles per minute.

Therefore, we can define this part of the function as follows:
D(t) = D(50) + 1/60(t - 50) for 50 ≤ t ≤ 75

Combining all the parts, the piecewise function for the entire scenario will be:
D(t) = 1/15t for 0 ≤ t ≤ 30
D(t) = 8/3 for 30 ≤ t ≤ 40
D(t) = D(50) + 1/60(t - 50) for 40 ≤ t ≤ 75