The Path of the Shortest Time

The principal of least action is one of the fundamental ideas in physics. The path of the shortest time of a particle in the presence of gravity is an example of this principal. In this paper some methods are introduced to teach the optimal path in introductory physics courses. The optimal path (path of the shortest time) is calculated for a few families of paths. Finally a numerical method according to Snell’s law in a discrete medium is used to find the general optimal path and is compared with the brachistochrone path.


Introduction
The principle of least action is one of the fundamental ideas in physics.The calculus of variations is a powerful mathematical tool used to understand and identify the path for the shortest time (Boas, 2006;Taylor, 2005;Thornton & Marion, 2003).This is an advanced mathematical method that is taught usually at the junior level.Some knowledge about the optimal problems such as brachistochrone, tautochrone and catenary problems are useful for broad range of students (Erlichson, 1999;Babb & Currie, 2008;Aravind, 1981;Gomez-Aiza, Gomez, & Marquina, 2006;McKinley, 1979).Here we will introduce several ways to teach this fundamental concept to those students at any level who are not familiar with calculus of variations.This is not only a fundamental idea in physics but also since optimization is a very important concept in any field this knowledge would be useful even for non-science majors.In this paper we will study several families of curves.For each family a variable parameter is used and the optimal value of the parameter corresponding to the shortest time is calculated.In two cases a combination of inclined surfaces is used.For those cases the students can calculate time analytically as function of the height of the inclined surface.This is the parameter that should be found for the optimal path.In order to find the minimum time we need to calculate the derivative of time with respect to the variable parameter.This derivative even for the simple case is complicated and we calculate it numerically.The next example that is considered in this paper is a parabolic family of curves.We will find the corresponding time as a function of a parameter that will be defined for this case.Then the shortest time and the corresponding parabolic path will be found.At the end a numerical technique according to Snell's law for a series of discrete media is used to find the general optimal path.In the numerical method the shooting method is used in order to find the path that passes through the end points.This path numerically starts from the initial position and by adjusting the initial angle we can calculate a path that passes through the end point.The brachistochrone path is also introduced in this paper and all optimal paths, including the numerical Snell's path are compared to the brachistochrone curve.The numerical Snell's path in the limit as the numerical intervals goes to zero approaches the brachistochrone curve.These are basically the same curve but there is a numerical error for the second method.All students have access to computers and they are familiar with some software packages such as Excel, Python, or MATLAB.In general we strongly believe students should be exposed to challenging problems by using the advantage of computational techniques.We use numerical methods to explore a variety of challenging problems for the students (Asadi-Zeydabadi, 2014;Asadi-Zeydabadi & Sadun, 2013;Asadi-Zeydabadi & Sadun, 2014).
We have introduced this problem to a broad range of audiences, high school teachers, and students at different levels.We found out that the majority of them miss the main idea that there is an optimal path.We think that it needs to be discussed with more detail in in different ways.This is one reason for writing this paper.

Simple Linear (Polygon) Paths
In this section two simple models are introduced.These models can be introduced to any student who has an algebra background at the high school or college level.The students do not need to have calculus background and they do not need to take derivatives to find the optimal values.There are plenty of linear paths similar to these that can be used.These are common examples that are used for a variety of purposes in any introductory physics course as sample problems in a lecture, homework problems, and demonstrations in a class or as part of an experiment in a lab.Because these are familiar examples and students know their relevant kinematic equations, we will use them to introduce the idea of the optimal path (the path for the shortest time).
Figure (1) shows two different paths from A to B: AB and AMB.In this paper we call the AMB track a triangular path.Suppose that a point mass starts from rest at point A. In this example the second path is a combination of two inclined surfaces.Point M is at the middle of the horizontal distance between A and B, = /2.The height of the surfaces changes by and is the variable parameter for this case.This is one of the common demonstrations that we use in class.One question that we ask students is to guess (or determine) the path corresponding to the shortest time.An interesting question is how time changes as increases.In all examples in this paper we use positive downward.
Figure 1.Two frictionless paths between the same points.A simple inclined surface, AB and a combination of two inclined surfaces, triangular AMB path It is obvious that (according to the triangular inequality theorem) path AB is shorter than path AMB.A common mistake is that most students think the path of the shortest length is the same as the path of shortest time.This is true if the motion was uniform (speed was constant and the same for both paths).
The time for AB and AMB paths can be found by using the simple kinematic equations.We assume both paths are frictionless.The final velocities for both paths are the same and one can use conservation of mechanical energy to find the final speed at point B.
= 2 (1) Where is the gravitational acceleration and is the vertical position of point B relative to A as shown in Fig 1 .The corresponding time for path AB is given by In a similar way we can find the time for AM: where = tan = tan and = .
The time for path MB is given in terms of the speed at points M and B, = 2 and = 2 : The time for path AMB is the sum of and : Time depends on but it is not a monotonic function.Now two questions can be asked of the students.First how does change as a function of and secondly how does its value change compare with the time for path AB, .One of the interesting questions is does ( ) have an optimal (minimum) value as changes.In order to find the minimum ( ), we need to find = 0. Time is minimized if > 0 at the optimal point.Even for this simple problem finding the optimal value of corresponding to the minimum value of needs a numerical solution.Student can either solve = 0 numerically and test > 0 at the optimal value or plot ( ) directly and observe the minimum value.The plan is not to use any sophisticated mathematical proofs.We want to demonstrate existence of the path of the shortest time to the students, for example, at high school level.
We can demonstrate with two paths similar to Figure 1 that the time for path AMB was shorter than for AB.After the students find out for this particular case that the time for AMB is shorter than for AB, then we can ask what does happen if increases (or show them some additional paths with different ).Most of them think that as increases time decreases.Without using the above equations we can ask if goes to infinity can time go to zero?At this point they will find it is impossible for a particle to travel on a finite path with zero elapsed time and therefore there must be an optimal path.They can use the above kinematic equations or a numerical method to find the optimal path.5) and it shows the minimum value for time.We used = 0.1 , = 10°, = 9.8 m/s, for this case.If a different value for gravitational acceleration (e.g. the value for the moon) is used we will get the same results as in Figure 2. The value of time for path AB is = 0.82 s and the minimum time for path AMB is = 0.52 s that occurs at = 0.26 m and with time ratio of = 0.63.We can also find out from Figure 2 that if = 1.1 m the elapsed time of both paths are equal = = 0.83 .Another useful question that can be asked of the students is the effect of the magnitude of gravity on ( ). Figure 3 shows ( ) for earth and moon gravities, = 1.6 / and = 9.8 / , the minimum time path AMB on earth and moon are 0.52 s and 1.28 s respectively and occurs at = 0.26 m.It is obvious that the ratio the minimum time for moon relative to of earth is . .= 2.46 which is equal to = √6.1.Notice that if there is no gravity then an object with zero initial velocity stays at rest.If it starts with some initial velocity then because the net force on the object is zero its velocity remains constant and then the path of the shortest length is the same as the path of the shortest time.Figure 4 shows another common example.The ABCD path is combination of two inclined surfaces AB and CD in addition to a horizontal path between them.We call this a trapezoidal-like path.We assume again that all surfaces are frictionless and that there is a point mass object that starts from rest at point A. Point D is at position relative to point A and we again choose the vertical downward direction as the positive direction.We want to study the dependence of time on and find the value of the minimum time and the corresponding .
The derivative of with respect to for this case is also complicated and to find the value of the minimum time and corresponding we need to use a numerical method to solve = 0.In these two examples we find the time analytically.To find the minimum time or optimal path we use a numerical method.In next section we will use a parabolic example and use numerical techniques to find time as a function of a parameter, the minimum time, and the corresponding optimal path.

Parabolic Paths
We will consider a family of parabolic paths that pass through two fixed points and we will compare them with a straight-line path between those points.As in the previous section the plan is to find the optimal path for the family of the parabolic paths.Figure 6 shows a linear and parabolic path between point A and B. Let point A be at origin (0, 0), then the coordinate of point B is , = , , and the equation of the parabola is given by , and is a parameter that changes the depth of the parabolic equation and we will optimize the path by changing this parameter.

Figure 6. The parabolic and linear path between two points
The length of the probolic path is given by and the corresponding time is We evaluated this integral numerically.Figure 7 shows the results for time as function of , which is the variable parameter.The minimum time occurs where the slope is zero, = 0.The minimum time is = 0.47 s corresponding to = −2.2 .The examples in previous sections provide the optimal case for a given family of curves.In general there is an infinite family of the curves that can be defined between two points.We know that we need to use the calculus of variations to find the optimal path (path of shortest time) between two points.This path is known as the brachistochrone or cycloid.The equation of brachistochrone that passes through the origin i.e. point A (0, 0), and point B , , is given by the following parametric equations = ( − sin ) (15) and = (1 − cos ) (16) where is a parameter that can be determined by the coordinates of the point B and is a parameter that gives the relationship between and .The value of for point B , , is given by The value of R can be found from ( 15) or ( 16) The time corresponding for the brachistochrone path is found numerically to be = 0.47 s.Table 1 compares the results of the previous examples with the brachistochrone problem and Figure 8 shows all of these paths together.
Table 1.The main purpose of this paper is to come up with a reasonable method to teach least action to students in introductory physics courses without directly using the calculus of variations.We can introduce it in the same manner as Snell's law.We believe that Snell's law also needs to be introduced in the light of both Huygens's and Fermat's principle.We should mention that even in the introductory physics courses Snell's law can be described as based on Fermat's principal.This important idea states that light follows the path of shortest time.
In geometrical optics the laws of refraction and reflection are fundamental laws for ray tracing.Both refraction and reflection laws can be described by Fermat's principle.We know that the reason for the refraction of light is due to the change of the refractive index which causes the speed of light to change as it goes from one medium to another.Since the speed is changing, the direction of the light path corresponding to shortest time also changes.When light travels in a uniform medium then the index of refraction and speed of light are constant and the path of the shortest time and shortest length are the same.In this case light travels in straight line.
The same argument can be used to calculate the path of a particle that takes the least time where its speed depends on the particle position.In the presence of gravity the speed of a particle depends on its vertical coordinate, .With the aid of numerical techniques we can apply this fundamental idea when speed varies with position.Numerical techniques allow students to study this topic, which is not easy to teach without a higher level of math than is expected for an introductory course.We believe that in the twenty first century students should know basic numerical techniques both in high school and in introductory college physics courses.
In analogy with Snell's Law the velocity of the particle depends on the spatial coordinate of the particle.The speed of the particle depends on the vertical coordinates, , as = 2 .Figure 9-a shows layers of different media.As light (or in our example the particle) travels through this medium the particle experiences a change in the path as a result of change in the speed in order to follow the path of shortest time.Suppose an object has different speeds in two media as shown in Figure 9.In each medium the speed of the object is constant therefore the path corresponding for the shortest time in each medium is straight line.As the object is moving from the top medium to the second medium the speed changes and in order to minimize the time the direction of the motion of the object changes similar to the light ray going from one medium to another.This is similar to Snell's law in optics.We are looking for the path for the shortest time between points ( , ) and ( , ).
The only variable in the above equation is .By taking derivative of time with respect to x and equating it to zero, = 0, one will find where as we see from Figure 8, sin = ( ) , sin = ( ) , + = and + = .But in the case of the motion of an object under the influence of gravity, speed changes continuously with .With numerical methods either (20) or ( 21) can be used and a interval that is very small is used so we can assume the change in the speed in that interval is negligible.The speed in th interval is = 2 , where is the distance of th interval from the point at which we assume the object starts from rest.By substituting the speed in either ( 20) or (21) we will get: As we seen in ( 21) or ( 22) the path does not depend on the value of as we have seen in ( 15) and ( 16), but the time depends on .As we have shown earlier the times ratio between two points on the surface of the moon with two points with the same vertical distance on the surface of earth is given by: Figure 10 compares the results of using Snell's law with that of the brachistochrone path.We use a shooting method in the numerical Snell's law.The shooting method basically starts the ray with an initial angle at the initial point, A, and if the ray doesn't reach the target (final) point, B, then we aim it at a different angle until it reaches the neighborhood of the end point with an acceptable error.
Another advantage of using this method is that students can see a connection between a fundamental idea that works in different fields of physics, for example, optics and mechanics.Since calculus of variations is a mathematical foundation of Lagrangians and Hamiltonians (Boas, 2006;Taylor, 2005;Thornton & Marion, 2003), this concept is a reasonable bridge to that level of physics.This idea also provides students the basis of the path integral formulation in quantum mechanics that was introduced by Feynman (Feynman, Hibbs, & Styer, 2005;Sakurai, 2014).The technical advantage of this method is to expose students to basic numerical methods.This is an example of speed as function of position.We could provide many examples with the same application.One of the interesting examples is the relativistic brachistochrone path that can be discussed analytically and numerically (Goldstein & Bender, 1986).This is not only a useful physics example but also it can be used in modeling a lot of optimization problems.A simple conceptual problem is road traffic, where we usually follow the path of shortest time rather than shortest length.These can be different because of traffic conditions.

Conclusion
In this paper we discuss several methods to teach the principal of the least action which is an important idea to be taught to students at different levels of math preparation.In these examples students also learn some basic computational techniques.We have discussed this topic with students at different levels and with high school teachers to understand how we can deliver this topic.We first approach this idea intuitively by showing some demonstrations without using any equations.Most of the audiences think the path of the shortest time and shortest length are the same.When they find out they are not the same, most of them think the path is a monotonic function of the corresponding changed path.If the time were a monotonic function then it would go to zero.For example, the audience thinks that as goes to infinity for case 1 and 2, time would approach zero.In fact we know that it is impossible for time to go to zero and therefore the path is not a monotonic function and thus there is an optimal path.After the students understand the main idea then we analyze the problem with more mathematical detail by using the physics equations and numerical methods as discussed in the paper.
The main conclusion is that this is an important idea but it is a challenging problem for students.However we can teach this problem to a broad range of audiences intuitively, mathematically and numerically including physics formula and setting some simple experiments without using calculus of variations.

Figure 4 .
Figure 4.A path of two inclined and a horizontal surfaces ABCD track, a trapezoidal-like path Figure 5 shows the time as function of for this case.The minimum time is = 0.5 and occurs at = 0.22 m.

Figure 9 .
Figure 9. (a) Light traveling in discreet multimedia and the direction of light (or the motion of the particle) is changing as it travels from one layer to another.(b) Two media, with two different particle speeds

Figure 10 .
Figure 10.The brachistochrone path (solid line (b)) and the result of the numerical solution of Snell's law for a set of multilayers of media (dashed line (a))