3

A man wants to walk from point $A$ to point $B$. It is given that Point $A$ will always be in Quadrant II, and point $B$ will always be in Quadrant I. When walking in Quadrant II, the man's speed is $v_1$ miles per hour, but when walking in Quadrant I, his speed is $v_2$ miles per hour. Given Point $A$ and Point $B$, and the speeds in both Quadrants, what is the shortest possible travel time to reach Point $B$?

What I have tried:

If we let Point $A$ be $(x_1, y_1)$ and Point $B$ be $(x_2, y_2)$, we can write a function in terms of the intercept when the path crosses the y-axis. Let the intercept be x.

The distance from Point $A$ to the intercept is the distance from $(x_1, y_1)$ to $(0, x)$, or $\sqrt{x_1^2+(y_1-x)^2}$.

Since the speed in Quadrant II is $v_1$, the time spent there will be $\dfrac{\sqrt{x_1^2+(y_1-x)^2}}{v_1}$.

The same approach can be used in the Quadrant I, yielding $\dfrac{\sqrt{x_2^2+(y_2-x)^2}}{v_2}$.

The total time then, in terms of the intercept, would be $f(x)=\dfrac{\sqrt{x_1^2+(y_1-x)^2}}{v_1}+\dfrac{\sqrt{x_2^2+(y_2-x)^2}}{v_2}$.

The optimal solution occurs at the minimum of this function, or when the derivative is $0$.

I am clueless on how to move forwards, so any guidance would be appreciated.

1 Answers1

1

Well, you are absolutely correct, the extreme values occur when $f'(x)=0$. We have $$f(x)=\dfrac{\sqrt{x_1^2+(y_1-x)^2}}{v_1}+\dfrac{\sqrt{x_2^2+(y_2-x)^2}}{v_2}.$$ We can take the derivative using the chain rule, and find $$f'(x)=\dfrac{x-y_1}{v_1\sqrt{x_1^2+(y_1-x)^2}}+\dfrac{x-y_2}{v_2\sqrt{x_2^2+(y_2-x)^2}}.$$ We set this equal to zero, and obtain $$\dfrac{x-y_1}{v_1\sqrt{x_1^2+(y_1-x)^2}}=-\dfrac{x-y_2}{v_2\sqrt{x_2^2+(y_2-x)^2}}.$$ After cross multiplying and squaring both sides, this becomes $$(x^2-2y_1x+y_1^2)(x^2-2y_2x+y_2^2+x_2^2)=(x^2-2y_2x+y_2^2)(x^2-2y_1x+y_1^2+x_1^2).$$ We will write $x_1^2+y_1^2=|A|^2$ and $x_2^2+y_2^2=|B|^2$ from here. We expand both sides, and get $$x^4-2(y_1+y_2)x^3+(|B|^2+y_1^2+4y_1y_2)x^2-2(y_1^2y_2+y_1|B|^2)x+y_1^2|B|^2=x^4-2(y_1+y_2)x^3+(|A|^2+y_2^2+4y_1y_2)x^2-2(y_1y_2^2+y_2|A|^2)x+y_2^2|A|^2.$$ After cancelling terms, we are left with the quadratic equation $$(x_2^2-x_1^2)x^2+2(y_2x_1^2-y_1x_2^2)x+y_1^2x_2^2-y_2^2x_1^2=0.$$ We find the roots of this with the quadratic formula, and get $$x=\dfrac{2(y_1x_2^2-y_2x_1^2)\pm\sqrt{4x_1^2x_2^2(y_1^2+y_2^2-2y_1y_2)}}{2(x_2^2-x_1^2)}.$$ We recognize the term inside the square root is a perfect square, and we simplify a bit to obtain $$x=\dfrac{y_1x_2^2-y_2x_1^2\pm x_1x_2(y_1-y_2)}{x_2^2-x_1^2}.$$ To get a slightly nicer form, we add and subtract $y_1x_1^2$ to the numerator so we can further simplify: $$x=\dfrac{y_1x_2^2-y_1x_1^2+y_1x_1^2-y_2x_1^2\pm x_1x_2(y_1-y_2)}{(x_2-x_1)(x_2+x_1)}=\dfrac{y_1(x_2^2-x_1^2)-x_1(x_2\pm x_1)(y_1-y_2)}{(x_2-x_1)(x_2+x_1)}.$$ With just a few more simplifications, we get $$x=y_1+\dfrac{x_1(y_2-y_1)}{x_2\mp x_1}.$$

So, we have found where $f'(x)=0$. Now, we need to check if these points are minima, maxima, or neither. We compute $$f''(x)=\dfrac{v_1(x_1^2+(y_1-x)^2)-v_1(x-y_1)^2}{v_1^2(x_1^2+(y_1-x)^2)^{3/2}}+\dfrac{v_2(x_2^2+(y_2-x)^2)-v_2(x-y_2)^2}{v_2^2(x_2^2+(y_2-x)^2)^{3/2}}.$$ After simplification, $$f''(x)=\dfrac{x_1^2}{v_1(x_1^2+(y_1-x)^2)^{3/2}}+\dfrac{x_2^2}{v_2(x_2^2+(y_2-x)^2)^{3/2}}\ge 0$$ if we assume $v_1,v_2>0$. We also implicitly assume $x_1,x_2\neq 0$, but this is reasonable as points in the quadrants shouldn't lie on an axis. Thus, both of our roots are local minima. It follows that the global minimum of $f(x)$ with $x\in[0,\infty)$ is given by $$\min\left\{f(0),f\left(y_1+\dfrac{x_1(y_2-y_1)}{x_2\mp x_1}\right)\right\}$$. We can check that $f(0)=\dfrac{|A|}{v_1}+\dfrac{|B|}{v_2}$ and $f\left(y_1+\dfrac{x_1(y_2-y_1)}{x_2\mp x_1}\right)$ does not have a particularly nice form that I found. In general, which of these three values is actually the minimum will depend on $A$ and $B$.