# A bug's journey

I encountered this question here (question 6) http://sections.maa.org/iowa/Activities/Contest/Problems/Probs98.htm

The Question: A bug is crawling on the coordinate plane from (7,11) to (-17, -3). The bug travels at constant speed one unit per second everywhere but quadrant II (negative x- and positive y- coordinates), where it travels at 1/2 units per second. What path should the bug take to complete its journey in minimal time?

I'm thinking that the way to solve would be to somehow dilate the quadrant II region by 2, or do some clever reflections. Then the answer would be given by a straight line path. If I try to compute an answer by calculus and Snell's law, it starts to look very very tedious.

I tried to simplify the question by placing the end point inside quadrant II, but I couldn't determine the exact path to take.

Is there an elegant way to do this problem? Thanks for the help!

The bug travels straight within each quadrant.

So if it gets into quadrant II at all, we can assume that it goes in a straight line from $(7,11)$ to a point $P$ on the positive $y$-axis, then straight to a point $Q$ on the negative $x$-axis, and then straight to $( -17 , -3 )$.

However, if it does that, it would actually be faster for the bug to go from $P$ to $Q$ by stepping a small distance to the right and go around the "slow quadrant" rather than through it. In a right triangle, the sum of the legs can never be as much as twice the hypotenuse (for the trivial reason that each leg is shorter than the hypotenuse).

So going through quadrant II can never be optimal at all, and the bug should actually go straight to the origin, and from there to its destination.

• Isn't this true as long as the bug travels slower than $1/\sqrt{2}$ in the slow quadrant? Jul 26, 2018 at 11:22
• @Kusma: Indeed it is. (But arguing for that is not quite as trivial). Jul 26, 2018 at 11:23
• I'm facepalming hard right now ... guess I got completely fooled. Thanks for the solution! If the destination point was inside the slow quadrant, would using calculus to compute be neccessary? Or would the optimal solution still be given by minimizing distance travelled inside the slow quadrant? Jul 26, 2018 at 12:12
• @eatfood In that case you would use the same math as for light traveling through mediums with different speeds of light (refraction). Jul 26, 2018 at 12:51
• @eatfood: Then you would need to do the usual calculus stuff -- but it's trickier than that, because if you're going from $(1,1)$ to $(−999,1)$ it is faster to go to the origin and then proceed fast just south of the x-axis and enter the slow medium at the critical angle when you get to $(−999+\sqrt3/2,−\varepsilon)$, rather than horizontally all the way (which is a local minimum, in accordance with Snell's law). Jul 26, 2018 at 14:02