Sunday, June 8, 2008

Boating Calculus

Today's question is dedicated to all boating lovers and calculus fans. It is not very hard, it has no use in real life, and yet it is a very beautiful question (like the ones on super math tips).

A boat leaves the dock at 12:00pm and heads west at 40km/h. Another boat travels north at 20km/h and enters the dock at 1:00pm. When is the distance between the boats the shortest and what is that distance?

Nice, isn't it? We have an optimization question here, so we need to create a function to find a variable to optimize. We're dealing here with given speeds, variable times and varying distances, so let's call the time variable t (in hours, to match the speeds) and the distance variable d (in km).

Now, the distance from the first boat to the dock is 40t (it starts at the dock). The distance from the second boat to the dock is 20 when it starts, and 20 - 20t total (since it travels towards the dock).

The boats are heading in perpendicular directions, so they form a right triangle. Using the Pythagorean theorem, we can find the distance between the boats, d:
d2 = (40t)2 + (20 - 20t)2
d2 = 1600t2 + 400 - 800t + 400t2
d2 = 2000t2 - 800t + 400

Since we want to find the minimum value for d and d must be positive, we can also find the minimum value of d2 (also must be positive). Let y = d2:
y = 2000t2 - 800t + 400

Now differentiate this function:
y' = 4000t - 800

To find an extremety, we need to set y' to zero:
0 = 4000t - 800
4000t = 800
t = 1/5

To see that it is indeed a minimum, let's find the second derivative of y:
y'' = 4000
Since it is positive, y is minimal when t = 1/5

Now calculate y when t = 1/5:
y = 2000 * (1/5)2 - 800 * (1/5) + 400
y = 2000 * (1/25) - 160 + 400
y = 80 + 240 = 320

However, y is the distance squared, so let's take the square root of this number:
d = sqrt(y) = sqrt(320) = 8sqrt(5) = 17.888... km.

This means that after 1/5 of an hour, which is 60 / 5 = 12 minutes, the boats will be the closest to each other at 8sqrt(5) (or 17.888) km apart.

Hope you enjoyed.
Nadav

nadavs

No comments: