A riddle from
FiveThirtyEight.
I assume that this problem means the drowning person is 100 meters offshore from a point 100 meters to the lifeguard's right. This is a fairly common (but not especially easy) problem in calculus; see the "Minimizing Travel Time" island problem in the
OpenStax calculus text or
Do Dog's Know Calculus?
This can be solved using differential calculus. The answer is to run approximately 79.588 meters to the right and then dive in, swimming approximately 102.062 meters, taking 11.938 seconds along the beach and 76.547 seconds in the water, about 88.485 seconds in all, instead of the 90 seconds required if one were to run to the point opposite the swimmer.
The problem can be represented by right triangle with the lifeguard's position at one corner and the right angle at the point directly opposite the swimmer. Let x be the number of yards that the lifeguard runs along the beach. Then the time running is
T_r = x(15/100) seconds
and the time swimming is, by the Pythagorean theorem,
T_s = sqrt(100^2 + (100-x)^2)(75/100) seconds.
The total time is
T_r + T_s = T_r = x(15/100) + sqrt(100^2 + (100-x)^2)(75/100) secs.
I will factor out (15/100) and rewrite this as
T_r + T_s = (15/100)[x + 5 sqrt(100^2 + (100-x)^2)] secs.
Our goal is to minimize this value by taking the derivative with respect to x and then setting our derivative equal to zero.
The derivative of the total time, with respect to x, is
(15/100)[1 + (5/2)(100^2 + (100-x)^2)^(-1/2)(-2(100-x))].
We may rewrite this expression as a constant (15/100) multiplied by a fraction whose numerator is
sqrt(100^2 + (100-x)^2) – 500 + 5x.
The denominator is sqrt(100^2 + (100-x)^2).
We do not care about the constant term (15/100) or the denominator so we focus on setting the numerator sqrt(100^2 + (100-x)^2) -500+5x equal to zero. This means
sqrt(20000 -200x +x^2) = 500-5x
and so, squaring both sides,
20000-200x+x^2 = 250000-5000x+25x^2
And so
24x^2-4800x+230000 = 0
Solving this quadratic formula gives solutions
x = 100 +/- 25 sqrt(2/3)
Only the minus sign makes sense so
x =100 – 25 sqrt(2/3)
which is about 79.588 meters. Thus the lifeguard runs almost 80 meters (not 100!) and then swims about 102 meters.
The solution given by 538 is in this blog post.