# Is the optimal solution to this problem to row straight to the store?

For my homework, I was given this brainteaser:

You’re sunbathing on the island shown on the map below. The island is six miles from shore at the closest point, and the nearest store is a convenience store seven miles down the beach. If you can row at 4 miles an hour, and you can walk at 5 miles an hour, where should you land to get a bag of tortilla chips in the least possible time? (Ignore tides, currents, and sharks. No fair renting a helicopter.)

I found the equation for the time it takes to get to the store to be:

$\frac{x}{4} + \frac{7-\sqrt{x^2 - 36}}{5}$

I then found the derivative:

$\frac{1}{4} - \frac{2x}{10 \sqrt{x^2-36}}$

I didn't find any zeroes for the derivative inside the domain of the function [6, $\sqrt{85}]$, so I answered that the shortest time would be achieved by rowing straight to the store.

The teacher said the answer was eight. Where did I make a mistake?

edit: Given image:

edit: Some closure:

My email to him:

On the brainteaser, the store is only 7 miles away, how can the answer be 8 :P

For my formula, 10 gave the same answer as 8 in the formula the answer uses. i.e., rowing 10 miles lands you 8 miles from the point across from the island. Of course, sqrt(85) is less than 10, so it's only faster if you can then walk 7 - 8 = -1 miles to the store and turn back time a little.

His response:

It assumes you can go back in time.

-
Perhaps you could provide the map or at least describe the geometry of the problem? – espen180 Dec 3 '12 at 19:46
@espen180, Sure, there you go – Walkerneo Dec 3 '12 at 19:48
8 is the answer to a related question: if the store is very far down the beach (or 10 miles down the beach, for instance), how far down the beach should you aim for? If you have the question right, your teacher is simply wrong. – TonyK Dec 3 '12 at 21:00

1
There is an error in your derivative calculation. Also if it were me I would not set x to be the distance rowed, but rather the horizontal distance from the landing site to the store. That said your method should work (once you correct the derivative), it is just tougher to interpret – Morgan Sherman Dec 3 '12 at 22:56

1
@Wolkerneo You are missing an $x$ in the numerator. – Morgan Sherman Dec 3 '12 at 23:35
show 4 more comments

## 3 Answers

Putting the origin on the left, your travel time is

$d(x)=\cfrac{1}{4} \sqrt{6^2+x^2} +\cfrac{1}{5}(7 - x)$

The derivative is

$d'(x) = \cfrac{1}{4} \cfrac{x}{\sqrt{6^2+x^2}} -\cfrac{1}{5}$

$d'$ is negative on $(-\infty,8)$ so $d$ is strictly decreasing on $[0,7]\subset(-\infty,8)$. Since we want the minimal value of $d$ on $[0,7]$, we'll get it at $x=7$, $f(7)=\cfrac{\sqrt{85}}{4}$.

I'm not sure about your second term but your $x/4$ means your $x$ is on the vertical axe... So it'd be like doing it this way:

-
Hmm, I see how that works, but I don't understand why mine doesn't work – Walkerneo Dec 3 '12 at 19:56
@Walkerno: I updated. – xavierm02 Dec 3 '12 at 20:06

2
Wait, 8 isn't even in your domain. If x is the distance between the point straight across the island and the store, then your domain is [0,7]. – Walkerneo Dec 3 '12 at 20:10
True. I'll doublecheck. I just asked maple to solve for $0$. Stupid lazy me. – xavierm02 Dec 3 '12 at 20:19
Walkerneo: I edited. You were right, the fastest way is to go straight to the store. – xavierm02 Dec 3 '12 at 20:51
show 2 more comments

For fun, we do the problem the hard way. Forget about the location of the store for now, say it is far away.

We can row to the nearest point on the shore, then walk. Imagine setting out instead at an angle $\theta$ to the shortest line to the shore. Then we row an extra distance of $6\sec\theta -6$, but we walk less by $6\tan\theta$, so the amount of time "saved" over the direct to shore way is $$\frac{6\tan\theta}{5} -\frac{6\sec\theta-6}{4}.$$ Now we could use calculus, the differentiation is in some ways more pleasant than if we use $x$'s.

But let's see what can be done without calculus. Change to sines and cosines. After a little manipulation we arrive at $$\frac{6}{\cos\theta} \left(\frac{\sin \theta}{5} -\frac{1-\cos\theta}{4}\right).$$ Using half-angle identities, and letting $\phi=\theta/2$, we find that the time saved is $$\frac{12\sin\phi}{\cos\theta}\left(\frac{\cos\phi}{5}-\frac{\sin\phi}{4}\right).$$ We save time if the above expression is positive, that is if $\tan \phi\lt \frac{4}{5}$. Thus increasing $\phi$ is always a good idea until $\tan\phi=\frac{4}{5}$. This corresponds to $\tan\theta=\frac{40}{9}$.

But $\tan\theta=\frac{40}{9}$ is $\frac{240}{9}$ miles down the beach, a lot more than $7$ miles. So the best strategy is to row directly to the store. (The whole calculation is probably unnecessary. The speeds $4$ and $5$ are close to each other, as are the distances $6$ and $7$. So the diagonal is the best way.)

-
This is at odds with xaviermo2's answer, so one of you must be wrong! I checked xaviermo2's answer, and it seemed right to me... – TonyK Dec 3 '12 at 23:05
Where did those numbers come from? 6 sec theta and 6 tan theta? – Walkerneo Dec 3 '12 at 23:14

1
@Walkerneo: Draw a right triangle $DNX$, with $D$ point of departure, $N$ nearest point on shore, and $X$ a variable point on the shore somewhere in the direction of the store. The right angle is at $N$. The angle $\theta$ is $\angle NDX$. Then $DN=6$. So by trigonometry $NX=6\tan\theta$ and $DX=6\sec\theta$. – André Nicolas Dec 3 '12 at 23:24
@TonyK: The same go directly to the store conclusion is in xaviermo2's answer, as the answer currently stands. – André Nicolas Dec 3 '12 at 23:29
Yes, but you differ in how far away the store can be for this solution to remain optimal. – TonyK Dec 4 '12 at 0:19
show 2 more comments

Let $y$ be the landing position relative to the island (so the store is at $y=7$). Then the distance from the island to the landing position is $\sqrt{36+y^2}$, and the walking distance to the store from there is $|y-7|$. The total time is $$T(y)=\frac{1}{4}\sqrt{36+y^2}+\frac{1}{5}|y-7|,$$ and the derivative with respect to $y$ is $$T'(y)=\frac{y}{4\sqrt{36+y^2}}+\frac{1}{5}\text{sgn}({y-7})$$ for $y\neq 7$; the function $T(y)$ is not differentiable at $y=7$, but has the value $\frac{1}{4}\sqrt{85}$ there. It remains to check for any other local extrema. There are two cases: $y>7$ and $y<7$. Clearly $T'(y)$ is positive for all $y>7$, since both terms are positive in that case. For $y<7$, we need to check for solutions to $$\frac{y}{4\sqrt{36+y^2}}-\frac{1}{5}=0.$$ The only solution, $y=8$, is not in the range where this form of $T(y)$ applies. We conclude that there is no local minimum of $T(y)$ except the one at $y=7$, and so you are correct that the fastest way to reach the store is by rowing straight to it.

-
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 61, "mathjax_display_tex": 6, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.9418702721595764, "perplexity_flag": "middle"}