# Swimming Problem - How can I do this?

I have a problem with the following diagram. The triangle is just a possible path and may not be the shortest. If the boy has to get to the destination in the fastest way possible:

• What methods/models can I use to find out the shortest time? (Which includes swimming to each point of the point and continuing to walk to the destination)
• What assumptions can I make?
• What are reasonable speeds of swimming and walking as well as distances? • Suppose that you are given the sides of the triangle in the drawing and the speeds of swimming and walking. Now suppose the destination's coordinate is $0$ and you pick another arrival point (coordinate $x$) on the shore. Then using the Pythagorean theorem, you should be able to compute the swimming distance to this point. Call this distance $h$. Then, the time it takes is: $|x|$/(walking speed) + $h$/swimming speed. This is an optimization problem in $x$ that should be very doable. – Kim Jong Un Oct 30 '14 at 15:30
• @k170 Yes sorry, was looking for minimum time, rectified the question. aka if he were to try every single point on the shore swimming + walking, what methods can I use to model it? – LucasCK Oct 30 '14 at 15:31
• @KimJongUn yes I see what you're getting at, but do you think there would be a way to model it out, on a graph perhaps? – LucasCK Oct 30 '14 at 15:36
• For your last question, maybe you know how fast you walk. A little searching should turn up reasonable values. – Ross Millikan Oct 30 '14 at 16:14

My physics teacher asked similar question to me when I was introduced to kinematics. I hope it helps.

Dark line is Path Taken by Traveller. Let $v_w$ , $v_s$ be velocities of walking and swimming respectively. and Assuming $v_s\lt v_w$

Let $$\eta=\frac{v_s}{v_w}$$ $$t_s=\frac{D}{v_s}$$

$$t_w=\frac{l-x}{v_w}$$ Total time taken is $$t(x)=t_s+t_w=\frac{D}{v_s}+\frac{l-x}{v_w}=\frac{l-x}{v_w}+\frac{\sqrt{d^2+x^2}}{v_s}$$ We need to Minimize $t(x)$ $$\frac{dt}{dx}=\frac{-1}{v_w}+\frac{2x}{2v_s\sqrt{d^2+x^2}}=0$$

$$\Rightarrow xv_w=v_s\sqrt{d^2+x^2}$$

$$\Rightarrow x^2v_w^2=v_s^2(d^2+x^2)$$

$$\Rightarrow x^2v_w^2-x^2v_s^2=v_s^2d^2$$ $$\Rightarrow x=\frac{v_sd}{\sqrt{v_w^2-v_s^2}}=\frac{\eta d}{\sqrt{1-\eta^2}}$$

We can clearly see that $$\eta\lt1\Rightarrow v_s\lt v_w$$

Note : We can relate this to path of light when travelling through different mediums

where $\eta$ is ratio of velocities in different mediums ( Termed as Refractive Index ).

• this is fantastic!! Thanks so much! – LucasCK Oct 30 '14 at 16:35
• @LucasCK You're always welcome – user171358 Oct 30 '14 at 16:36

Presumably he walks on shore at some speed $w$ and swims at some speed $s$. The only paths to consider are walking some distance $d$ up the shore, then getting in the water and swimming a straight course to the destination. You need to set up an equation for the total time taken as a function of $d$ and minimize it by taking the derivative and setting to zero. So the time walking is $\frac dw$ Given $d$, how far does he swim? How long does it take? You need some dimensions from you problem that you didn't give. Now add the two times together and you have the total time as a function of $d$

• Thanks for that, yes I am getting what you're saying. Do you suppose it can be represented graphically or in any other model form? – LucasCK Oct 30 '14 at 15:38
• The other answer basically derives Snell's law of refraction, but is following the same approach. You could certainly derive the function I indicate, graph it, and find the minimum that way. – Ross Millikan Oct 30 '14 at 16:13