Baseball Multipart Function Example

Suppose a runner runs at 30 feet per second around a 90 foot square (i.e., a square that has side length equal to 90 feet). Assuming the runner starts at one corner of the square ("home plate"), can we give an expression for d(t), the straight-line distance from the runner to home plate at any time t (0 ≤ t ≤ 12 seconds)?

Until the runner reaches the first corner, the distance the runner is from home plate is exactly the distance that the runner has run. So, for 0 ≤ t ≤ 3 seconds, d(t) = 30t.

After 3 seconds, the runner has turned the first corner. For the next 3 seconds, we're in the situation as shown below:

What we need to know is y. Since the runner is running 30 feet per second, y (the distance from the first corner) is the distance that the runner has run after running the first 3 seconds. Hence, y = 30(t-3). By the pythagorean theorem, we have

Once the runner has passed the half-way point, we're in the situation below:

Using the fact that

we can write

For the final 3 seconds that it takes the runner to make it back to home plate, we have d(t) = 90-30(t-9).

Putting it all together, we have

Here's a plot of the function, with each piece plotted in a different color:

Note: 30 feet per second is an extremely fast running speed for a human. Feel free to rework the problem with a more realistic speed.