You're walking along a beach when you hear someone cry for help. You look and see there's someone drowning offshore, farther up the beach from where you are.
(*)<-- you (0, 3)
B E A C H
W A T E R (*)<-- her (5, -2)
Let's say the waterline is along the x-axis at y=0 and you start at x=0, y=3 . She is at x=5, y=-2 .
You can move one third as fast in water as you can running along the beach.
--> Should you make a beeline for her?
--> If not, what exactly is the optimal path; i.e., at what point x should you enter the water?
The method is surprisingly simple, but you may need to go through some rather ugly algebra to implement it. I'd say if you can come up with the proper relation, that's a wrap. Life's too short, and the rest is just crunch, crunch, crunch.
-There’s no current or anything like that.
-She won’t mind waiting, hypothermic, in the crashing surf while you find the optimal path.