aa r X i v : . [ phy s i c s . g e n - ph ] J un Generalization of the least uncomfortable journey problem
Nivaldo A. Lemos
Instituto de Física - Universidade Federal FluminenseAv. Litorânea, S/N, Boa Viagem, 24210-340, Niterói - Rio de Janeiro, [email protected]ff.br
August 4, 2020
Abstract
The variational problem of the least uncomfortable journey between two locations on astraight line is simplified by a choice of the dependent variable. It is shown that taking theposition, instead of the velocity, as the optimal function of time to be determined does awaywith the isoperimetric constraint. The same results as those found with the velocity as thedependent variable are obtained in a simpler and more concise way. Next the problem is gen-eralized for motion on an arbitrary curve. In the case of acceleration-induced discomfort, it isshown that, as expected, motion on a curved path is always more uncomfortable than motionon a straight line. It is not clear that this is necessarily the case for jerk-induced discomfort,which appears to indicate that the acceleration provides a more reasonable measure of thediscomfort than the jerk. The example of motion on a circular path is studied. Althoughwe have been unable to solve the problem analytically, approximate solutions have been con-structed by means of trial functions and the exact solution has been found numerically forsome choices of the relevant parameters.
The calculus of variations is a powerful mathematical tool that finds application in virtually everybranch of theoretical physics. A variational problem of recent invention is that of finding the leastuncomfortable way to travel from point A to point B on a straight line, with both the travel timeand the distance between the two points fixed [1].Since frequent acceleration and deceleration make a trip uncomfortable, the discomfort can bequantified by the integral of the square of the acceleration taken over the duration of the journey.Abrupt changes of a constant acceleration are also a source of distress. Therefore, another possiblequantification of the discomfort is in terms of the time rate of change of the acceleration, usuallyknown as jerk. In this case the discomfort is defined by the square of the jerk integrated over theduration of the journey.The choice of independent variable impacts a variational problem. Sometimes an unfortunatechoice makes the problem seem much more difficult than it actually is. In [2] it is shown that withthe time as independent variable the least uncomfortable journey problem becomes much simpler1han with the position as independent variable, which was the original choice of Anderson, Desaixand Nyqvist [1].In both [1] and [2] the problem of the least uncomfortable journey was understood as a searchfor the optimal velocity, which minimizes the discomfort. Either with position [1] or time [2] asindependent variable, this approach is characterized by the existence of an isoperimetric constraint,which is taken into account by the method of Lagrange multipliers. It turns out that the choiceof dependent variable, namely the unknown function to be determined, also impacts a variationalproblem. We show that with time as independent variable and position as dependent variable,the isoperimetric constraint is automatically satisfied and, both for acceleration-induced and jerk-induced discomfort, one has to deal with an ordinary unconstrained variational problem. In thecase in which the discomfort is measured by the jerk, natural boundary conditions arise becausethe acceleration cannot be prescribed either at the beginning or the end of the journey. For bothchoices of the discomfort functional the same results as those found in [2] are obtained in a morestraighforward way, without having to bother about constraints.Next we generalize the problem by considering motion on an arbitrary curve with the arc length s as the dependent variable. Both for discomfort measured by the acceleration and by the jerk, it sohappens that if the curvature is not constant the velocity v = ˙ s cannot be taken as the dependentvariable. In the case of acceleration-induced discomfort, it is found that, as expected, motionon a curved path gives rise to more discomfort than motion on a straight line. It is somewhatsurprising that this is not necessarily the case for jerk-induced discomfort. This leads us to believethat it is the acceleration, rather than the jerk, that provides the more trustworthy measure ofthe discomfort. As a case study, we consider motion on a circular path. In spite of some advancestowards the exact solution, we have been unable to express it in an explicit and manageable form.Therefore, approximate solutions have been constructed by means of trial functions and comparedwith the exact solutions obtained numerically.The paper is organized as follows. In Section 2 we recall the statement of the problem formotion on a straight line as the search for the optimal velocity function v ( t ) that minimizes thediscomfort. In Section 3 we rephrase the problem as the search for the optimal position function x ( t ) that leads to the least discomfort, and it is pointed out that the isoperimetric constraint isautomatically taken care of. The exact solution is found both for the acceleration-induced andjerk-induced discomfort, in the latter case taking into account the natural boundary conditions,which are derived. In Section 4 the least uncomfortable journey problem is generalized for motionon an arbitrary curve. With the arc length s as the dependent variable and time as the independentvariable, it is shown that the acceleration-induced discomfort depends only on the curvature and isalways larger for a curved trajectory than for a straight line. The jerk-induced discomfort dependsboth on the curvature and the torsion, but it is not always necessarily larger for a curved path thanfor a straight line. In Section 5 the case of motion on a circular path is studied and approximatetrial-function solutions are given for the optimal function s ( t ) which are compared with the exactnumerical solutions. Section 6 is dedicated to a few final remarks.2 Original statement of the least uncomfortable journeyproblem
The problem of finding the least uncomfortable way to travel between two points on a straight linewas posed by Anderson, Desaix, and Nyqvist [1]. On a straight road, a vehicle departs from point A at t = 0 and arrives at point B when t = T . Let the coordinate system be so chosen that thedeparture point A corresponds to x = 0 and the arrival point B corresponds to x = D . The traveltime T is fixed. The problem consists in finding the velocity v ( t ) that minimizes the discomfortfunctional defined by A [ v ] = Z T ˙ v dt (1)with the boundary conditions v (0) = 0 , v ( T ) = 0 , (2)and under the isoperimetric constraint Z T vdt = D. (3)If the discomfort is measured by the integral of the square of the jerk, the problem is the sameas above except that now the discomfort functional to be minimized is J [ v ] = Z T ¨ v dt (4)under the same isoperimetric constraint (3) and, as argued in [2], the boundary conditions v (0) = 0 , v ( T ) = 0 , ¨ v (0) = 0 , ¨ v ( T ) = 0 . (5)In both cases the unknown function is the velocity v . With this choice of dependent variable,an essential feature of the problem is the isoperimetric constraint (3).The treatment of the problem in [1] was based on choosing the position x as the independentvariable and searching for the optimal velocity v ( x ) that minimizes the discomfort. It is a fact thatsometimes a judicious choice of independent variable makes a variational problem more tractable.In [2] it is shown that choosing the time as the independent variable and searching for the optimalvelocity v ( t ) leads to a drastic simplification of the problem, especially in the case in which thediscomfort is measured by the jerk. Similarly, the choice of dependent variable, that is, the functionto be determined, may simplify a variational problem. As we proceed to show, if one looks for theposition as a function of time the isoperimetric constraint disappears and one is led to a simplerunconstrained higher-derivative variational problem. Let us take the time t as the independent variable, the position x as the dependent variable andsearch for the function x ( t ) that yields the minimum discomfort.3 .1 Discomfort measured by the acceleration The functional to be minimized is A [ x ] = Z T a ( t ) dt = Z T ¨ x ( t ) dt (6)with the boundary conditions x (0) = 0 , x ( T ) = D. (7)Since the journey starts from rest and ends at rest, we have the additional boundary conditions˙ x (0) = 0 , ˙ x ( T ) = 0 . (8)Note that by taking x as the dependent variable the isoperimetric constraint (3) is automaticallyincorporated in the boundary conditions (7). This means that now we are dealing with a commonunconstrained higher-derivative variational problem, since the functional to be minimized dependson the second derivative of the unknown function.For a functional of the form A [ x ] = Z T L ( x, ˙ x, ¨ x, t ) dt (9)under the standard boundary conditions of fixed values for x ( t ) and ˙ x ( t ) at t = 0 and t = T , it iswell known [3, Section 4.1] that a necessary condition for a function x ( t ) to minimize the functional(9) is that it obey the generalized Euler-Lagrange equation d dt ∂L∂ ¨ x ! − ddt ∂L∂ ˙ x ! + ∂L∂x = 0 . (10)For the discomfort functional (6) we have L = ¨ x , (11)and equation (10) becomes simply d xdt = 0 . (12)The general solution to this equation is x ( t ) = a + a t + a t + a t , (13)where a , a , a , a are arbitrary constants. Application of the boundary conditions (7) and (8)leads easily to x ( t ) = D t T − t T ! , (14)which is the same result found in [2], in which the original treatment with v as the dependentvariable was adopted. The minimum value of the discomfort is obtained by inserting the above x ( t ) into the right-hand side of equation (6). An easy calculation yields A min = 12 D T . (15)4 .2 Discomfort measured by the jerk Now the functional to be minimized is J [ x ] = Z T ˙ a ( t ) dt = Z T ... x ( t ) dt (16)with the boundary conditions (7) and (8).For a functional of the form J [ x ] = Z T L ( x, ˙ x, ¨ x, ... x , t ) dt, (17)the minimizer function x ( t ) has to satisfy the generalized Euler-Lagrange equation − d dt ∂L∂ ... x ! + d dt ∂L∂ ¨ x ! − ddt ∂L∂ ˙ x ! + ∂L∂x = 0 . (18)This is a sixth-order ordinary differential equation, and the boundary conditions (7) and (8) areinsufficient to determine a unique solution for x ( t ). The additional boundary conditions wouldseem to be [1] ¨ x (0) = 0 , ¨ x ( T ) = 0 . (19)These, together with (7) and (8), would comprise the standard boundary conditions for a variationalproblem involving the third derivative of the unknown function. However, as argued in [2], thespecification of the initial acceleration is at odds with the basic principles of Newtonian mechanics,and its enforcement might require pathological, unphysical forces.The right thing to do [2] is leave ¨ x (0) and ¨ x ( T ) free, which leads to a variational problem withvariable endpoints as concerns the values of ¨ x ( t ) at t = 0 and t = T . Variable endpoints give riseto what are commonly called natural boundary conditions [3, Section 9.1].Let us present a short derivation of the natural boundary conditions for the functional (17) with¨ x (0) and ¨ x ( T ) free. Because of the boundary conditions (7) and (8) the variation δx is required tosatisfy δx (0) = 0 , δx ( T ) = 0 , δ ˙ x (0) = 0 , δ ˙ x ( T ) = 0 . (20)The variation of the functional (17) is δJ = Z T ∂L∂x δx + ∂L∂ ˙ x δ ˙ x + + ∂L∂ ¨ x δ ¨ x + ∂L∂ ... x δ ... x ! dt. (21)Successive integrations by parts lead to δJ = ∂L∂ ... x δ ¨ x (cid:12)(cid:12)(cid:12)(cid:12)(cid:12) T + ∂L∂ ¨ x − ddt ∂L∂ ... x ! δ ˙ x (cid:12)(cid:12)(cid:12)(cid:12)(cid:12) T + ∂L∂ ˙ x − ddt ∂L∂ ¨ x + d dt ∂L∂ ... x ! δx (cid:12)(cid:12)(cid:12)(cid:12)(cid:12) T + Z T " − d dt ∂L∂ ... x ! + d dt ∂L∂ ¨ x ! − ddt ∂L∂ ˙ x ! + ∂L∂x δxdt. (22)With the use of (20) this reduces to δJ = ∂L∂ ... x δ ¨ x (cid:12)(cid:12)(cid:12)(cid:12)(cid:12) T + Z T " − d dt ∂L∂ ... x ! + d dt ∂L∂ ¨ x ! − ddt ∂L∂ ˙ x ! + ∂L∂x δxdt. (23)5f x ( t ) is to minimize J one must have δJ = 0 for arbitrary δx with arbitrary values of δ ¨ x ( t ) at t = 0 and t = T . This means that we are free to choose the variation δx such that δ ¨ x = 0 atboth t = 0 and t = T . In this case the boundary term on the right-hand side of (23) vanishes.Apart from the conditions at t = 0 and t = T , the variation δx is an otherwise arbitrary function.Then the fundamental lemma of the calculus of variations [3, p. 39] establishes that the condition δJ = 0, which is necessary for a minimum, implies that the coefficient of δx in the integral onthe right-hand side of (23) vanishes. Consequently, the minimizer x ( t ) must satisfy the previouslyannounced generalized Euler-Lagrange equation (18). This, in turn, further reduces δJ to δJ = ∂L∂ ... x δ ¨ x (cid:12)(cid:12)(cid:12)(cid:12)(cid:12) T . (24)Since the values of δ ¨ x ( t ) are arbitrary at t = 0 and t = T , we can choose the variation δx ( t ) insuch a way that δ ¨ x (0) = 0 , δ ¨ x ( T ) = 0 and vice versa. Therefore, the condition δJ = 0 requiresthat the following boundary conditions be obeyed: ∂L∂ ... x (cid:12)(cid:12)(cid:12)(cid:12)(cid:12) t =0 = 0 , ∂L∂ ... x (cid:12)(cid:12)(cid:12)(cid:12)(cid:12) t = T = 0 . (25)These are natural boundary conditions [3, p. 194] for the problem with variable endpoints asregards ¨ x ( t ).For the discomfort functional (16) we have L = ... x (26)and the natural boundary conditions (25) become... x (0) = 0 , ... x ( T ) = 0 . (27)These are exactly the same natural boundary conditions as those expressed by equation (24) in[2], where they were derived on the basis of taking the velocity v as the dependent variable.With L given by (26) it follows that the generalized Euler-Lagrange equation (18) yields d xdt = 0 . (28)The general solution to this equation is x ( t ) = a + a t + a t + a t + a t + a t . (29)The six initially arbitrary constants are readily found by imposing the boundary conditions (7),(8) and (27). After a little algebra the result is x = D t T − t T + 2 t T ! , (30)which coincides with equation (41) in [2]. 6 .3 Comments We have just shown that by taking as dependent variable — that is, the unknown function to bedetermined — the position x instead of the velocity v , the isoperimetric constraint is eliminatedand, in the case of the discomfort measured by the acceleration, one is left with an ordinaryhigher-derivative variational problem. Just as the choice of independent variable, a proper choiceof dependent variable may simplify a variational problem and eliminate constraints by havingthem automatically satisfied. If the discomfort is measured by the jerk, taking x as the dependentvariable also eliminates the isoperimetric constraint and leads to a higher-derivative variationalproblem with variable endpoints as concerns ¨ x . The natural boundary conditions in this case areexactly the same as those found by treating v as the dependent variable.For our treatment of the problem with the position as dependent variable, it is also straight-forward to prove, as in [4], that the optimal positions (14) and (30) actually yield, in each case,the minimum discomfort. Let us suppose the motion takes place along a prescribe curve. It will be convenient to parameterizethe curve by the arc length s : r ( s ) = x ( s )ˆ x + y ( s )ˆ y + z ( s )ˆ z . (31)The motion is completely characterized once the function s ( t ) is given. For the velocity we have v = d r dt = d r ds dsdt = r ′ ( s ) ˙ s. (32)The acceleration is given by a = d v dt = r ′ ( s )¨ s + d r ′ ( s ) dt ˙ s = r ′ ( s )¨ s + r ′′ ( s ) ˙ s . (33)We shall first consider the case in which the discomfort is measured by the acceleration, whichmeans that the discomfort functional to be minimized is A [ s ] = Z T | a | dt. (34)From (33) it follows that | a | = a · a = r ′ ( s ) · r ′ ( s )¨ s + 2 r ′ ( s ) · r ′′ ( s ) ˙ s ¨ s + r ′′ ( s ) · r ′′ ( s ) ˙ s (35)Since r ′ ( s ) · r ′ ( s ) = d r ds · d r ds = d r · d r ds = ds ds = 1 , (36)7pon differentiation with respect to s this equation yields r ′ ( s ) · r ′′ ( s ) = 0 . (37)Therefore, | a | = ¨ s + r ′′ ( s ) · r ′′ ( s ) ˙ s . (38)By definition r ′′ ( s ) · r ′′ ( s ) = κ ( s ) , (39)where κ ( s ) is the curvature of the curve. Therefore, the discomfort functional (34) becomes A [ s ] = Z T [¨ s + κ ( s ) ˙ s ] dt. (40)The boundary conditions are s (0) = 0 , s ( T ) = D (41)as well as ˙ s (0) = 0 , ˙ s ( T ) = 0 (42)inasmuch as the velocity is zero both at the beginning and at the end of the journey.Equation (40) shows that, as expected, curvature adds to the discomfort: if κ = 0 the discomfortgiven by (40) is larger than the discomfort for motion on a straight line, which is given by (6) with x = s .It is to be noted that, unless κ ( s ) is a constant, as for a circle or a helix, the discomfort (40)cannot be regarded as a functional of the speed v = ˙ s alone, that is, the approach followed in [1]and [2] is impossible.It is a straightforward exercise to show that with L = ¨ s + κ ( s ) ˙ s (43)the generalized Euler-Lagrange equation d dt ∂L∂ ¨ s ! − ddt ∂L∂ ˙ s ! + ∂L∂s = 0 (44)yields d sdt − κ ( s ) dsdt ! d sdt − κ ( s ) κ ′ ( s ) dsdt ! = 0 . (45)Since the function L defined by (43) does not depend explicitly on time, we have the constantof the motion [3, Problem 4.10.3]¨ s ∂L∂ ¨ s − ˙ s " ddt ∂L∂ ¨ s ! − ∂L∂ ˙ s − L = c = constant , (46)which is a generalization of the Jacobi integral of mechanics [6]. By inserting (43) into the aboveequation we find ¨ s − s ... s + 3 κ ( s ) ˙ s = c. (47)Since ˙ s (0) = 0, letting t = 0 in this equation shows that c is positive.8 .2 Discomfort induced by the jerk We have ˙ r = r ′ ( s ) ˙ s = ˙ s t ( s ) , (48)where t = d r /ds is the unit tangent vector to the curve. By definition d t ds = r ′′ ( s ) = κ ( s ) n ( s ) , (49)where κ ( s ) ≥ n is the principal normal vector. Therefore, from equation(48) it follows that the acceleration is given by¨ r = ¨ s t ( s ) + κ ( s ) ˙ s n ( s ) . (50)Thus the jerk is... r = ... s t ( s ) + ¨ sκ ( s ) n ( s ) ˙ s + κ ′ ( s ) ˙ s n ( s ) + 2 κ ( s ) ˙ s ¨ s n ( s ) + κ ( s ) ˙ s d n ds ˙ s. (51)With the use of the Frenet (or Frenet-Serret) formula [5] d n ds = − κ ( s ) t ( s ) + τ ( s ) b ( s ) , (52)where b = t × n is the binormal vector and τ is the torsion, we finally obtain... r = (cid:16) ... s − κ ( s ) ˙ s (cid:17) t ( s ) + (cid:16) κ ( s ) ˙ s ¨ s + κ ′ ( s ) ˙ s (cid:17) n ( s ) + κ ( s ) τ ( s ) ˙ s b ( s ) . (53)Since { t ( s ) , n ( s ) , b ( s ) } is an orthonormal set of vectors, we have | ... r | = (cid:16) ... s − κ ( s ) ˙ s (cid:17) + (cid:16) κ ( s ) ˙ s ¨ s + κ ′ ( s ) ˙ s (cid:17) + κ ( s ) τ ( s ) ˙ s . (54)Thus, the jerk-induced discomfort is given by J [ s ] = Z T | ... r | dt = Z T (cid:20) ... s − κ ( s ) ˙ s ... s + 9 κ ( s ) ˙ s ¨ s + 6 κ ( s ) κ ′ ( s ) ˙ s ¨ s + (cid:16) κ ( s ) + κ ′ ( s ) + κ ( s ) τ ( s ) (cid:17) ˙ s (cid:21) dt. (55)The functional (55) is of the form (17) with L = ... s − κ ( s ) ˙ s ... s + 9 κ ( s ) ˙ s ¨ s + 6 κ ( s ) κ ′ ( s ) ˙ s ¨ s + (cid:16) κ ( s ) + κ ′ ( s ) + κ ( s ) τ ( s ) (cid:17) ˙ s . (56)The boundary conditions for the problem of minimizing the jerk-induced discomfort (55) are s (0) = 0 , s ( T ) = D, ˙ s (0) = 0 , ˙ s ( T ) = 0 . (57)Because ˙ s ( t ) vanishes both at t = 0 and t = T , the natural boundary conditions ∂L∂ ... s (cid:12)(cid:12)(cid:12)(cid:12)(cid:12) t =0 = 0 , ∂L∂ ... s (cid:12)(cid:12)(cid:12)(cid:12)(cid:12) t = T = 0 (58)9ake the same form as in the straight line case, namely... s (0) = 0 , ... s ( T ) = 0 . (59)The generalized Euler-Lagrange equation for the functional (55) — equation (18) with s substitutedfor x and L given by (56) — is terribly complicated and will not be written down here.Integration by parts with the use of (57) leads to Z T κ ( s ) ˙ s ... s dt = κ ( s ) ˙ s ¨ s (cid:12)(cid:12)(cid:12)(cid:12)(cid:12) T − Z T ddt h κ ( s ) ˙ s i ¨ sdt = − Z T h κ ( s ) κ ′ ( s ) ˙ s ¨ s + 3 κ ( s ) ˙ s ¨ s i dt. (60)With this result the jerk-induced discomfort (55) becomes J [ s ] = Z T h ... s + 15 κ ( s ) ˙ s ¨ s + 10 κ ( s ) κ ′ ( s ) ˙ s ¨ s + (cid:16) κ ( s ) + κ ′ ( s ) + κ ( s ) τ ( s ) (cid:17) ˙ s i dt. (61)If the curvature is constant, the discomfort for motion on a curved path is always larger thanthat for motion on a straight line, which is characterized by κ = τ = 0. However, since forvariable curvature the third term in the above integrand may be negative, the integral of the sumof all terms but the first may conceivably be negative and one might experience less discomfortby moving on a path with curvature and torsion than on a straight line, for which the discomfortwould be given by the integral of the first term alone. Torsion contributes a positive term, but if τ = 0 it is not clear that variable curvature necessarily adds to the jerk-induced discomfort, whichappears counterintuitive. This is the reason why the discomfort is seemingly better measured bythe acceleration than by the jerk. Let the path be an arc of a circle of radius R with the starting point of the journey at the origin.In terms of the angle θ shown in Figure 1, the parametric equation of the path is x = R sin θ, y = R (1 − cos θ ) . (62)Since θ = s/R , the parameterization of the circle in terms of the arc length is r ( s ) = R sin (cid:18) sR (cid:19) ˆ x + R (cid:20) − cos (cid:18) sR (cid:19)(cid:21) ˆ y . (63)Thus we have r ′′ ( s ) = − R (cid:20) sin (cid:18) sR (cid:19) ˆ x − cos (cid:18) sR (cid:19) ˆ y (cid:21) , (64)whence κ ( s ) = r ′′ ( s ) · r ′′ ( s ) = 1 R . (65)Consequently, the discomfort to be minimized is A [ s ] = Z T (cid:18) ¨ s + ˙ s R (cid:19) dt. (66)10 x sR θ y Figure 1: Circular arc path.We shall circunscribe our discussion to the acceleration-induced discomfort. Since the curvature κ = 1 /R is constant, equation (45) takes the simpler form d sdt − R dsdt ! d sdt = 0 (67)and its associated constant of the motion (47) is given by¨ s − s ... s − R ˙ s = cR (68)where the value of the constant of the motion has been written as c/R for future convenience. Asa consistency check, note that in the limit R → ∞ the circle turns into a straight line and equation(67) coincides with equation (12), as it should. Also, for very high curvature ( R → κ → ∞ ) thediscomfort (66) becomes enormous, as intuition suggests.Our task is to solve the fourth-order nonlinear differential equation (67) with the boundaryconditions (41) and (42). We start by taking advantage of the constant of the motion (68), whichwe write as ˙ u − u ¨ u + 3 R u = cR (69)in terms of u = ˙ s. (70)The standard trick to lower the order of equation (69) is to introduce a new variable w definedby w = ˙ u (71)and replace the independent variable t by u , so that¨ u = dwdt = dwdu dudt = w dwdu . (72)11hus, equation (69) is reduced to w − uw dwdu + 3 R u = cR . (73)Setting r = w (74)we are led to u drdu − r − R u + cR = 0 (75)or, equivalently, udr + (cid:18) cR − R u − r (cid:19) du = 0 . (76)Let us attempt to find an integrating factor for the above differential 1-form as a function F of u alone. To this end we write as ω = M ( u, r ) dr + N ( u, r ) du the 1-form obtained by multiplyingthe left-hand side of equation (76) by F ( u ). The necessary and sufficient condition for the 1-form ω to be exact is ∂M/∂u = ∂N/∂r . This leads to uF ′ ( u ) = − F ( u ), which is solved by F ( u ) = u − .Therefore, multiplication of equation (76) by u − leads to1 u dr + (cid:18) cR u − R u − ru (cid:19) du = d Φ = 0 (77)where Φ( r, u ) = ru − u R − cR u . (78)Thus, by combining this last equation with (77) we conclude that ru − u R − cR u = aR , (79)where a is a constant. Taking into account that r = ˙ u — see (71) and (74) —, equation (79) canbe rewritten as (cid:18) dudt (cid:19) = 1 R ( c + au + u ) . (80)Separating variables in the above equation and integrating we find Z du √ c + au + u = t + bR , (81)where b is a constant. This integral can be reduced to an elliptic integral, but this is not easy to doexplicitly [7]. This means that, by inversion, u ( t ) will be given by a very complicated combinationof elliptic functions. Since u = ˙ s , in order to find s ( t ) one will still have to compute the integralof this intricate combination of elliptic functions. This will give s ( t ) in a quite unmanageable andunilluminating form. 12 .1 Trial functions Since the exact solution is unwieldy, we shall first consider analytical approximate solutions to ourminimization problem. Let us first consider the function˜ s ( t ) = D sin πt T ! = D " − cos πtT ! . (82)It follows at once that ˙˜ s ( t ) = πD T sin πtT ! (83)and ¨˜ s ( t ) = π D T cos πtT ! . (84)It is clear from (82) and (83) that the boundary conditions (41) and (42) are fulfilled. Thediscomfort brought about by the trial function (82) is A [˜ s ] = Z T " π D T cos πtT ! + 1 R π D T sin πtT ! dt. (85)With the change of variable x = πt/T this simplifies to A [˜ s ] = π D T Z π cos xdx + π D R T Z π sin xdx. (86)With the use of Z π cos xdx = π , Z π sin xdx = 3 π A [˜ s ] = π D T D R ! . (88)This provides an upper bound on the minimum discomfort: A min ≤ π D T D R ! . (89)As a check, note that in the limit R → ∞ we have A [˜ s ] = π D / T . Since π / ≈ .
18, acomparison with (15) shows that for motion on a straight line the error committed is only 1 . R as compared to D .A better trial function for the straight line case is ¯ s ( t ) = D " − (1 + α ) cos (cid:18) πtT (cid:19) + α cos (cid:18) πtT (cid:19) (90)where the real parameter α is to be chosen so as to yield the least discomfort within this class oftrial functions. An elementary calculation yields A str [¯ s ] = Z T ¨¯ s dt = π D T h (1 + α ) + 81 α i . (91)13he minimum of the function of α within brackets is attained at α = − / . For this value of α we have A str [¯ s ] = 12 . D T , (92)which is only . larger than the true minimum (15).The computation of the discomfort associated with (90) for the circular path is a bit laboriousbut requires only the use of trigonometric identities such as sin 3 x = 3 sin x − x, cos 3 x = 4 cos x − x, (93)and the following definite integrals, where n is a natural number: Z π cos n xdx = Z π sin n xdx = π (2 n )!(2 n n !) . (94)The result for the discomfort (66) associated with the function (90) is A [¯ s ] = π D T ( α ) + 162 α + D R (cid:20)
38 (1 + α ) + 32 α (1 + α ) + 272 α (1 + α ) + 2438 α (cid:21)) . (95)Let f ( α ) be the function within braces, which is to be minimized. Setting f ′ ( α ) = 0 one gets a thirddegree algebraic equation to be solved, whose coefficients depend on the parameter D/R . Althougha formula in terms of radicals for the roots of a cubic equation is known, it is too complicated tobe useful here. Therefore, for a few values of
D/R we have numerically computed (for free at thewebsite https://keisan.casio.com) the real root of f ′ ( α ) = 0 and calculated the minimum value of A [¯ s ] . In the table below we make a comparison between A [˜ s ] , the discomforted generated by thetrial function (82), and A min [¯ s ] , the minimum discomfort brought about by the family of functions(90), with the values of the discomfort expressed in units of D /T . D/R
Optimal α A min [¯ s ] A [˜ s ] π -0.04913 30.96 34.71 π -0.07286 76.38 102.31This table shows that the best approximation provided by the family of functions (90) is system-atically better than the approximation furnished by the single function (82), and the improvementbecomes more and more significant as D increases beyond the semicircumference of the circle. Aphysical explanation of why, for D ≫ R , the optimal approximation within the family of functions(90) is much better than the approximation afforded by the function (82) might run as follows.For D big compared to R , which would also be the case for fixed D and a highly curved circle, thediscomfort (66) is dominated by the term involving the speed ˙ s rather than the one involving thetangential acceleration ¨ s . This means that comparatively smaller values of the speed may resultin less discomfort in spite of comparatively larger speed changes . This is because the pull on thepassenger towards the center of the trajectory, connected with the radial (centripetal) accelerationassociated with the speed and customarily felt as if being pressed against the wall of the vehicle,causes more discomfort than speed changes. This is illustrated in Figures 2 and 3 for the case14igure 2: Best speed ˙¯ s (solid line)) within the family (90) for α = − . (for the case D/R = 2 π ) compared with ˙˜ s (dashed line) given by (83). Speeds are displayed in units of D/T . D = 2 πR , in which the best approximation within the class (90) is compared with the approxi-mation (82). For the better approximation the maximum value attained by the speed is lower, asshown by the solid line in Figure 2, and the smaller contribution to the discomfort of the speedterm amply compensates the bigger contribution owing to the larger speed changes, representedby the solid line in Figure 3.Figure 3: Best tangential acceleration ¨¯ s (solid line) within the family (90) for α = − . compared with ¨˜ s (dashed line) given by (84). Accelerations are displayed in units of π D/ T . In order numerically to solve the ordinary differential equation (67) with the boundary conditions(41) and (42), lets us first reformulate the problem in dimensionless form. Let τ and σ ( τ ) be15imensionless quantities defined by s ( t ) = Dσ ( τ ) , τ = tT . (96)Note that both τ and σ ( τ ) take values in the closed interval [0 , . The chain rule gives dsdt = D dσdτ dτdt = DT dσdτ , d sdt = DT d σdτ , d sdt = DT d σdτ . (97)Substituting these results into (67), the dimensionless boundary-value problem to be numericallysolved consists of the fourth-order differential equation d σdτ − D R dσdτ ! d σdτ = 0 (98)together with the boundary conditions σ (0) = 0 , σ (1) = 1 , σ ′ (0) = 0 , σ ′ (1) = 0 . (99)By means of the Maple software we have numerically solved this boundary value problem for σ ( τ ) , and the figures below compare the speed for the exact (numerical) solution with the speedthat arises from the trial function (90) for the values of D/R considered in the table above.Figure 4: Cases D = R, α = − . and D = 2 R, α = − . : the numerically computedspeed (solid line) compared with the speed associated with the trial function (90). Speeds aredisplayed in units of D/T .Figure 4 shows that if
D/R ≤ the qualitative behavior of the numerically computed speed isnot too different from that of the straight-line case discussed in [2]. For D = R the trial function(90) provides a tolerable approximation to the exact solution, but for D = 2 R the discrepancy isalready significant.As can be seen from Figure 5, for D equal to or bigger than the semicircumference of the circlethe trial function (90) is a very bad approximation to the exact solution. As D approaches and16igure 5: Cases D = πR, α = − . and D = 2 πR, α = − , : the numerically computedspeed (solid line) compared with the speed associated with the trial function (90). Speeds aredisplayed in units of D/T .increases beyond the circumference of the circle, the strategy to minimize the discomfort becomesclear: accelerate quickly from rest to a speed a little above the average speed
D/T , keep this speednearly constant for most of the journey, then slow down quickly to a full stop.The trial function (90) provides a very poor approximation to the exact solution for
D/R ∼ and becomes worse and worse as the ratio D/R increases beyond two. An improvement wouldrequire a trial function depending on more than one parameter. But this would make it extremelycumbersome to compute the integral (66) and subsequently solve the problem of minimizing afunction of several variables. Let us note, nevertheless, that the trial function (90) provides anexcellent approximation to the exact solution for D ≤ R/ , as Figure 6 illustrates very well.Figure 6: Case D = R/ , α = − . : the numerically computed speed (solid line) comparedwith the speed associated with the trial function (90). Speeds are displayed in units of D/T .17
Final Remarks
The problem of the least uncomfortable journey affords the opportunity to acquaint advancedundergraduate or beginning graduate students with several useful techniques of the calculus ofvariations. It illustrates nicely that the appropriate choice of independent and dependent variablescan make a variational problem much more tractable, sometimes allowing us to get rid of con-straints. It also provides a nice example of a higher-order variational problem of physical interest.The generalization of the least uncomfortable journey problem to motion on an arbitrary pathmakes it possible to compare the measures of discomfort induced by acceleration and jerk. Theacceleration-induced discomfort is always larger for a curved path than for a straight line, asintuitively expected. This is not necessarily so for the jerk-induced discomfort, which suggests thatthe integral of the square of the acceleration provides a more reliable measure of the discomfortthan the one supplied by the jerk.
Acknowledgment
The author is thankful to the anonymous reviewer whose suggestions helped to improve themanuscript significantly.
References [1] D. Anderson, M. Desaix, and R. Nyqvist, “The least uncomfortable journey from A to B ,” Am. J. Phys. , 690-695 (2016).[2] N. A. Lemos, “On the least uncomfortable journey from A to B ,” Eur. J. Phys. , 055802(2019). arXiv:1910.11087.[3] M. Kot, A First Course in the Calculus of Variations (American Mathematical Society, Prov-idence, RI, 2014).[4] N. A. Lemos, “Addendum to ‘On the least uncomfortable journey from A to B ’ (2019 Eur. J.Phys.
40 055802),”
Eur. J. Phys. , 039401 (2020).[5] M. P. do Carmo, Geometria Diferencial de Curvas e Superfícies (Sociedade Brasileira deMatemática, Rio de Janeiro, 2005), Section 1.5; A. Pressley,
Elementary Differential Geometry (Springer, London, 2007), Chapter 2. Note that different authors adopt different conventionsregarding the sign of the torsion.[6] N. A. Lemos,
Analytical Mechanics (Cambridge University Press, Cambridge, 2018).[7] D. F. Lawden,
Elliptic Functions and Applications (Springer, New York, 1989); J. W. Armitageand W. F. Eberlein,
Elliptic Functions (Cambridge University Press, Cambridge, 2006); H.Hancock,