# How to find the quickest path?

• En Joy
In summary, the conversation discusses the problem of finding the quickest path from point A to point B, with the use of calculus and Snell's law being suggested as possible solutions. The problem involves finding the path of least time to reach point B, with all distances and angles being known. The conversation also touches upon the derivation of Snell's law and the value of θm, with a solution being presented using a 4th degree polynomial equation. A simpler equation is also mentioned, which involves setting the derivative of the total time function to zero.
En Joy
Moved from a technical forum, therefore no template.
How to find the quickest path?

#### Attachments

• Untitled.jpg
39.1 KB · Views: 461
What level of mathematics are we allowed to use in solving this problem? Calculus?

It seems simplest to begin by finding distance DO.

Stephen Tashi said:
What level of mathematics are we allowed to use in solving this problem? Calculus?

It seems simplest to begin by finding distance DO.
But how?

Stephen Tashi said:
What level of mathematics are we allowed to use in solving this problem? Calculus?
You didn't answer this question. It's important.
En Joy said:
But how?
I don't think your attempt to fit this problem into Snell's Law is correct. You need to write the equations for the time to the pavement as a function of angle, and the time to the final point on the pavement starting at that landing point. If you can use calculus, you just minimize the total time as a function of the angle you take to the pavement.

Last edited:
En Joy said:
But how?

Express DO as a function of AD and unknown angle ##\angle OAD = \theta_m##.

berkeman said:
I don't think your attempt to fit this problem into Snell's Law is correct
Come to think of it, it might end up looking like Snell's Law. I'll have to try deriving it...

berkeman said:
You didn't answer this question. It's important.

I don't think your attempt to fit this problem into Snell's Law is correct. You need to write the equations for the time to the pavement as a function of angle, and the time to the final point on the pavement starting at that landing point. If you can use calculus, you just minimize the total time as a function of the angle you take to the pavement.
I know calculus and the derivation of Shell's law because I have completed graduation (Physics honours) and I am a primary school teacher also. The problem came to my mind suddenly while studying calculus of variation, so this is not a school homework. Trust me.
Yes, calculus will need here to sove this problem but I tried my best and did already show my attempt in the picture.

En Joy said:
I know calculus and the derivation of Shell's law because I have completed graduation (Physics honours) and I am a primary school teacher also. The problem came to my mind suddenly while studying calculus of variation, so this is not a school homework. Trust me.
Yes, calculus will need here to sove this problem but I tried my best and did already show my attempt in the picture.
I think the analogy with Snell's Law is good. Did you look through the links? The minimum time condition seems very applicable to the problem you came up with...

berkeman said:
I think the analogy with Snell's Law is good. Did you look through the links? The minimum time condition seems very applicable to the problem you came up with...
Yes, I have read the link. It illustrates nothing but the derivation of Snell's law using calculus.

I actually want to know something like this. Suppose you are in position A(in mud) and your friend is at B(in pavement) as in picture. Now how can you find the path of least time to reach your friend? All the distances and the two angles are known(see the main image).

I think may be Snell's law and some calculus may help in this case but I could not try further.

Please solve this completely.

En Joy said:
find the path of least time to reach your friend?
But that's what the derivation of Snell's law is about -- the path with the least time...

berkeman said:
But that's what the derivation of Snell's law is about -- the path with the least time...
I want to know the value of θm

En Joy said:
I know calculus and the derivation of Shell's law because I have completed graduation (Physics honours) and I am a primary school teacher also. The problem came to my mind suddenly while studying calculus of variation, so this is not a school homework. Trust me.
Yes, calculus will need here to sove this problem but I tried my best and did already show my attempt in the picture.
En Joy said:
I want to know the value of θm

The solution is pretty horrible.

First, I will change the picture to put point A on the y-axis at ##(0,h)## and point B to the right at ##(a,-b)##. So, the path crosses the horizontal axis at ##x \in (0,a)##. (Basically, instead of putting the origin at the crossing point and the having variable endpoints, I prefer to fix the ends---but of course, it is equivalent.) We have two equations. Since ##x = h \tan(\theta_m)## and ##a-x = b \tan(\theta_p)## we have
$$h \tan(\theta_m) + b\tan(\theta_p) = a.$$
We also have ##\sin(\theta_p) = r \sin(\theta_m)##, where ##r = v_p/v_m##. Expressing everything in terms of ##z = \sin(\theta_m)## the problem reduces to the solution of the equation
$$(1)\;\;\frac{h z}{\sqrt{1-z^2}}+\frac{b r z}{\sqrt{1-r^2 z^2}} = a.$$
This can be re-written as a rather horrible 4th degree polynomial in ##u =z^2## that is too long and complicated to reproduce here. Using 4th degree solution formulas, the equation can be solved in principle, but the results are not pretty. Maple takes about 59 pages of nasty, and complicated formulas to write out all four solutions to the polynomial. I'm not sure what use that would be to anybody.

Note added in edit: a much easier equation results if we look at the crossing point ##x## as the variable, instead of the angles. Snell's law gives
$$(2) \;\;\frac{1}{v_m} \frac{x}{\sqrt{x^2+h^2}} = \frac{1}{v_p} \frac{a-x}{\sqrt{(a-x)^2+b^2}}.$$
Squaring both sides leads to a relatively tractable 4th degree polynomial. Exact solutions are still lengthy and un-enlightening. However, numerical solution of the ##x##-problem is simpler than for the ##\theta_m##-problem. Eq. (2) also follows directly by setting the ##x##-derivative to zero of the total time function ##T = \sqrt{x^2+h^2} / v_m + \sqrt{(a-x)^2 + b^2} / v_p.##

Last edited:
En Joy
En Joy said:
Yes, I have read the link. It illustrates nothing but the derivation of Snell's law using calculus.

I actually want to know something like this. Suppose you are in position A(in mud) and your friend is at B(in pavement) as in picture. Now how can you find the path of least time to reach your friend? All the distances and the two angles are known(see the main image).

I think may be Snell's law and some calculus may help in this case but I could not try further.

Please solve this completely.

If the locations of A and B are and the two velocities are known you do NOT know the angles; you know only a relationship between the angles. To find the actual angles and the crossing point on the mud-pavement boundary you need to solve a nonlinear equation (numerically). See post #13 for details.

BTW: PF rules forbid us from solving problems completely; we are allowed to help and to give hints.

En Joy
Ray Vickson said:
The solution is pretty horrible.

First, I will change the picture to put point A on the y-axis at ##(0,h)## and point B to the right at ##(a,-b)##. So, the path crosses the horizontal axis at ##x \in (0,a)##. (Basically, instead of putting the origin at the crossing point and the having variable endpoints, I prefer to fix the ends---but of course, it is equivalent.) We have two equations. Since ##x = h \tan(\theta_m)## and ##a-x = b \tan(\theta_p)## we have
$$h \tan(\theta_m) + b\tan(\theta_p) = a.$$
We also have ##\sin(\theta_p) = r \sin(\theta_m)##, where ##r = v_p/v_m##. Expressing everything in terms of ##z = \sin(\theta_m)## the problem reduces to the solution of the equation
$$(1)\;\;\frac{h z}{\sqrt{1-z^2}}+\frac{b r z}{\sqrt{1-r^2 z^2}} = a.$$
This can be re-written as a rather horrible 4th degree polynomial in ##u =z^2## that is too long and complicated to reproduce here. Using 4th degree solution formulas, the equation can be solved in principle, but the results are not pretty. Maple takes about 59 pages of nasty, and complicated formulas to write out all four solutions to the polynomial. I'm not sure what use that would be to anybody.

Note added in edit: a much easier equation results if we look at the crossing point ##x## as the variable, instead of the angles. Snell's law gives
$$(2) \;\;\frac{1}{v_m} \frac{x}{\sqrt{x^2+h^2}} = \frac{1}{v_p} \frac{a-x}{\sqrt{(a-x)^2+b^2}}.$$
Squaring both sides leads to a relatively tractable 4th degree polynomial. Exact solutions are still lengthy and un-enlightening. However, numerical solution of the ##x##-problem is simpler than for the ##\theta_m##-problem. Eq. (2) also follows directly by setting the ##x##-derivative to zero of the total time function ##T = \sqrt{x^2+h^2} / v_m + \sqrt{(a-x)^2 + b^2} / v_p.##
THANK YOU VERY MUCH @Ray Vickson

## 1. How do I determine the quickest path?

To determine the quickest path, you will need to consider the distance, time, and obstacles present in the path. You can use mathematical equations or algorithms to calculate the shortest route.

## 2. What factors should I consider when finding the quickest path?

Some factors to consider when finding the quickest path include the mode of transportation, traffic conditions, distance, and any potential obstacles or detours along the way.

## 3. Is there a specific method or algorithm to find the quickest path?

There are various methods and algorithms that can be used to find the quickest path, depending on the specific situation and needs. Some common ones include Dijkstra's algorithm, A* algorithm, and the Floyd-Warshall algorithm.

## 4. Can I use technology to help me find the quickest path?

Yes, there are many technological tools and applications available that can help you find the quickest path. These include GPS devices, map apps, and route planning software.

## 5. How do I know if the path I have chosen is the quickest one?

You can determine if the path you have chosen is the quickest one by comparing it to other potential paths and considering factors such as distance, time, and obstacles. It may also be helpful to use technology or consult with experts in the field.

### Similar threads

• Calculus and Beyond Homework Help
Replies
10
Views
956
• Calculus and Beyond Homework Help
Replies
3
Views
1K
• Calculus and Beyond Homework Help
Replies
6
Views
1K
• Introductory Physics Homework Help
Replies
9
Views
236
• Introductory Physics Homework Help
Replies
14
Views
2K
• Calculus and Beyond Homework Help
Replies
2
Views
1K
• Introductory Physics Homework Help
Replies
7
Views
438
• Optics
Replies
23
Views
3K
• Optics
Replies
1
Views
2K
• Calculus and Beyond Homework Help
Replies
3
Views
2K