You're standing at point A on the border of a rectangular area of size 300x50m.
Within the rectangular area (red), you can move with speed 5 km/h. Outside of it, your speed is 10 km/h.
What's the fastest way you can reach point B?

pull down to refresh
You're standing at point A on the border of a rectangular area of size 300x50m.
Within the rectangular area (red), you can move with speed 5 km/h. Outside of it, your speed is 10 km/h.
What's the fastest way you can reach point B?

I think the answer is to walk horizontally along the edge of the rectangle for 71.13m, then walk in a straight line to point B.
Letting w=100m (the horizontal distance from A to B) and let h=50m (the vertical distance). Let x be the number of meters to walk horizontally before going in a straight line. The total time is:
You can use calculus to find the optimal value of x=w−h/3
I get 0.36×x+0.72×2500+(100−x)2 for x=100−350≈71.132487 is ≈67.1769s.
I wonder why our answers are off by 0.04