Minimizing the Time for a Dog to Fetch a Ball in Water

Two people named Nick and Alina have a dog named Cooper. Cooper is a (smart) puggle. How smart is he?

If Cooper is on the beach and Nick throws a tennis ball into the water, Cooper goes to retrieve the ball, following the orange path. There is an ideal point on the bank at which he should jump in (given by checking "cheat?") that minimizes the time it takes to retrieve the ball. The ideal point depends on his running speed (how fast he moves on land), his swimming speed (how fast he moves in the water), and the location of the ball. You can manipulate all these parameters to explore this famous (at least in the math world) problem.