Finding a fisherman’s fastest path from shore to boat

10 minute read

When tutoring high-school students in maths and physics, I sometimes stumble across interesting problems. In this scenario, a fisherman seeks to determine the fastest route from his location on the shore to his boat out in the water. What I find interesting here is the change of perspective that makes solving the problem easier.

Problem

Consider the figure below. A fisherman stands on the shore of a lake some distance from his boat out in the water. The distance from the fisherman to the boat is 10 m; the distance from the edge of the shore to the boat is 6 m. Using Fermat’s principle, determine the shortest time it will take the fisherman to reach the boat if the speed of the fisherman’s movement along the shore is 3 m/s, and in the water is three times less.

A fisherman stands on a lake shore.  A boat sits in the water some
       distance from him.  The diagonal distance is 10m; the distance
       from the boat to the shore is 6m.
A fisherman finds the shortest path to his boat.

Solution

There are several ways that the fisherman could reach the boat. He could go directly to the boat through the water, travelling the shortest distance: 10 m. Or he could move along the shore until the distance in the water is shortest (6 m), going through the water the rest of the way. Neither of these options is optimal. In one case, he doesn’t make any use of the speed advantage along the shore. In the other case, he moves too far along the shore and ends up travelling a much longer distance than necessary. The best path lies between these two extremes, and that’s what we have to find.

At the start, collect what we know

Let’s collect some information from the question and deduce what we can to solve the problem. We’re told that the fisherman’s speed along the shore is 3 m/s. Let’s denote this speed by \(v_s\). The speed in the water we denote by \(v_w\). We’re told that the speed in the water is three times less than the speed along the shore, hence \(v_w\) is 1 m/s. From the geometry of the situation, we can see that the paths in the water and the path along the shore make a scaled 3-4-5 right-angled triangle. Doubling the side lengths of a 3-4-5 right-angled triangle gives a 6-8-10 right-angled triangle.1 In other words, the path along the shore is 8 m, which is the only side length that we didn’t yet know.

Having deduced most of the information we can from the diagram and the question, the task is to find the best path from the fisherman’s position on the shore to the boat. Note that this is not the shortest path. It is, however, the path that takes the least time, which is where Fermat’s principle comes in.

Look at the problem from the beginning and from the end

The problem involves movement at a given velocity in one medium (along the shore) and then movement at a different velocity in a different medium (the water). Changing our perspective, we can see that we’re really looking at Snell’s law in ray optics.

Turning the problem on its head will hopefully make this clearer. Consider the path a light ray would take from the boat to the fisherman’s initial position. Why look at the problem from this perspective? It turns out that the time to travel along a given path is independent of direction: i.e. the path from the boat is the same as the path to the boat. Changing our perspective to be from the boat, we can see that a path from the boat to the shore at some angle, then continuing along the shore to the fisherman, is the same situation as a light ray sent from the boat and then refracted at the water-shore boundary at the critical angle.2 In other words, a calculation using Snell’s law at the critical angle is equivalent to the fisherman moving along the shore and then travelling to the boat through the water. This is the problem we’re trying to solve, and now we have a way to do that.

Construct a solution using Snell’s law

Let’s examine Snell’s law from the perspective of a light ray travelling from the boat. Consider the following diagram:

The blue region represents the water; the white region represents the lake shore. We have a light ray travelling from the left-hand red point in the blue region towards the white region. Its path makes an angle \(\theta_w\) to the normal at the boundary between the two regions (i.e. a line perpendicular to the boundary between the two regions). It is refracted at this boundary and travels along the boundary interface to the second red point on the right. The ray travels at an angle \(\theta_s\) to the normal.

Using Snell’s law, we have the following relationship:

\[\frac{\sin \theta_s}{\sin \theta_w} = \frac{v_s}{v_w}.\]

We know that \(v_s\) is 3 m/s, \(v_w\) is 1 m/s, and that \(\theta_s\) is \(90^\circ\) (equivalently: \(\pi/2\) radians). Since \(\sin(\pi/2) = 1\), we can simplify the expression above to:

\[\frac{1}{\sin \theta_w} = \frac{3}{1}.\]

Rearranging this equation to be in terms of \(\sin \theta_w\), we have:

\[\sin \theta_w = \frac{1}{3}.\]

Taking the inverse sine, we have an expression for \(\theta_w\):

\[\theta_w = \sin^{-1}\left( \frac{1}{3} \right).\]

This is the angle to the normal at the boundary that a light ray would take along the path of least time between the two red points.

We can now work out the distance travelled both in the water and along the shore. Once we have that information, we can use the velocities in each medium to work out the time taken along this path. Hence, we can calculate the time along the fisherman’s fastest path from his position on the shore to the boat.

From geometry, we see that the angle between the vertical solid line and the ray in the blue region is equal to \(\theta_w\). Thus, we can calculate the length \(d_w\), which is the hypotenuse of the right-angled triangle with sides 6 m and \(d_{s'}\):3

\[d_w = \frac{6}{\cos \theta_w}.\]

From the diagram, we know that the length along the shore (i.e. along the boundary between the blue and white regions) is 8 m. Thus, the distance the ray travels along the shore, \(d_s\), plus the remaining distance along the shore, \(d_{s'}\), is equal to 8 m. This gives us the following relation:

\[d_s + d_{s'} = 8.\]

We thus have an expression for \(d_s\) in terms of \(d_{s'}\):

\[d_s = 8 - d_{s'}.\]

Again, from geometry, we can work out what \(d_{s'}\) is in terms of \(\theta_w\) by using the tangent and the adjacent side (\(d_{s'}\) is the opposite side of the triangle):

\[d_{s'} = 6 \tan \theta_w.\]

Now we know how far the distance along the shore is in terms of the angle \(\theta_w\):

\[d_s = 8 - 6 \tan \theta_w.\]

We’re now left with the task of finding out how long it takes to travel each of the two components of the path, \(d_w\) and \(d_s\). Since the speed in each medium is constant, we can write the distances in terms of their velocities and times, i.e.:

\[\begin{align*} d_w &= v_w t_w,\\ d_s &= v_s t_s, \end{align*}\]

where \(t_w\) and \(t_s\) are the times in the water and along the shore, respectively. We can write these times in terms of distance and velocity like so:

\[\begin{align*} t_w &= \frac{d_w}{v_w},\\ t_s &= \frac{d_s}{v_s}. \end{align*}\]

The total time for the fastest path, \(t\), is the sum of these two quantities:

\[\begin{align*} t &= t_s + t_w,\\ &= \frac{8 - 6 \tan \theta_w}{v_s} + \frac{6}{v_w \cos \theta_w},\\ &= \frac{8 - 6 \tan \theta_w}{3} + \frac{6}{\cos \theta_w}, \end{align*}\]

where I’ve substituted the values of the speed along the shore and the speed through the water into the final expression.

We know that:

\[\theta_w = \sin^{-1} \left( \frac{1}{3} \right) \approx 0.3398.\]

Substituting this value into the equation for \(t\) above, we get:

\[t = t_s + t_w \approx 1.9595\ \text{s} + 6.3640\ \text{s} \approx 8.3235\ \text{s}.\]

In other words, the fastest time for the fisherman to travel from his initial position to the boat is 8.3235 s.

Numerical calculations

Below is the SageMath code I used to calculate the numerical values of \(t_s\), \(t_w\), and hence \(t\) in the section above.

theta_w = asin(1/3.)
ts = (8 - 6*tan(theta_w))/3.
tw = 6/cos(theta_w)
t = ts + tw
print(f"ts = {ts.n():0.5}; tw = {tw.n():0.5}; t = {t.n():0.5}")

The first line defines a variable called theta_w containing the value of \(\theta_w\) we calculated using Snell’s law from earlier. The next two lines define the variables ts and tw, which calculate the times along the shore and through the water, respectively. The fourth line calculates the total time for the fastest path. The final line of code prints the results nicely.

Running this code gives the following output:

ts = 1.9596; tw = 6.3640; t = 8.3235

Note that the value for ts shown here is rounded up to four decimal places, and is hence different from the value I mentioned in the text. If you add the rounded ts and tw values together, you’ll get a slightly different result from using the unrounded values. This is why the value for t looks like it should be 8.3236 when the correct value is really 8.3235.

Extension

Now, because I’m me, I can’t simply solve something in one way and be done with it. Thus, I decided to plot the total time for paths corresponding to different \(\theta_w\) angles, ranging from 0 (the fisherman goes 8 m along the shore and then 6 m in the water) to \(\theta_{\mathrm{max}} = \cos^{-1}(3/5)\) (the fisherman follows the most direct path: 10 m through the water). I wanted to see this plot because it gives an intuitive feel for how the time is a minimum between the two extremes.

I used SageMath, an open source mathematics software system, to set up the variables and plot the graph. SageMath uses a Python-based language, hence it’s fairly easy to use.

In the code below, I define a symbolic variable theta_w, corresponding to \(\theta_w\) from above. I then define the time along the shore, ts, and the time in the water, tw, in terms of theta_w. This allows me to write the total time, t, which is then a function of theta_w. I also calculate the maximum value theta_w can have given the problem’s geometry, which I’ve called theta_max. This way, I know the maximum value of theta_w to plot. The theta_max value corresponds to the direct path from the fisherman through the water to the boat. The minimum value for theta_w is zero, corresponding to a path perpendicular to the shore. Lastly, I plot t as a function of theta_w running from 0 up to theta_max.

theta_w = var('theta_w')
ts = (8 - 6*tan(theta_w))/3
tw = 6/cos(theta_w)
t = ts + tw
theta_max = acos(3/5)

plot(t, (theta_w, 0, theta_max), axes_labels=['$\\theta_w$','$t$'])

Here’s what the plot looks like:

The graph shows the total path time for values of theta_w ranging from zero up to theta_max.

When theta_w is equal to zero, this is the same as travelling 8 m at 3 m/s and then 6 m at 1 m/s. In other words:

\[\frac{8}{3}\ \text{s} + 6\ \text{s} \approx 8.667\ \text{s}.\]

This is the value where the curve intersects the \(y\)-axis, which we can see matches the plot above.

At the largest angle, theta_max, the time taken is 10 s because this is the time taken to move a distance of 10 m travelling at 1 m/s, i.e. the direct path from the fisherman to the boat.

Reading the graph, we can approximate the shortest time to be at a theta_w value of roughly 0.35, which is approximately 8.3 s. These values correspond to those we got for \(\theta_w\) and \(t\) in the solution section above.

We’ve effectively verified the result we got in the previous section. Yay!

Wrapping up

And that’s it. Hopefully, the explanation helped you understand the problem and its solution!

It intrigues me how sometimes a maths or physics problem becomes more tractable just by looking at it from a different point of view. If at first you find a problem difficult, try changing your perspective. :slightly_smiling_face:

  1. You can verify that this is still a right-angled triangle because \(6^2 + 8^2 = 10^2\). 

  2. This angle is the smallest angle that would keep a light ray within the given medium. 

  3. The length \(d_{s'}\) is the remaining distance along the shore after the fisherman has travelled the distance \(d_s\). 

Support

If you liked this post, please buy me a coffee!

buy me a coffee logo

Categories:

Updated: