<<

Deriving Lagrange’s equations using elementary calculus Jozef Hanca) Technical University, Vysokoskolska 4, 042 00 Kosice, Slovakia Edwin F. Taylorb) Massachusetts Institute of Technology, Cambridge, Massachusetts 02139 Slavomir Tulejac) Gymnazium arm. gen. L. Svobodu, Komenskeho 4, 066 51 Humenne, Slovakia ͑Received 30 December 2002; accepted 20 June 2003͒ We derive Lagrange’s from the principle of least action using elementary calculus rather than the calculus of variations. We also demonstrate the conditions under which and are constants of the motion. © 2004 American Association of Physics Teachers. ͓DOI: 10.1119/1.1603270͔

I. INTRODUCTION The action S along a world line is defined as The equations of motion1 of a mechanical system can be Sϭ ͵ L͑x,v͒dt. ͑2͒ derived by two different mathematical methods—vectorial along the world line and analytical. Traditionally, introductory mechanics begins with Newton’s laws of motion which relate the , mo- The principle of least action requires that between a fixed mentum, and vectors. But we frequently need to initial event and a fixed final event the particle follow a describe systems, for example, systems subject to constraints world line such that the action S is a minimum. without friction, for which the use of vector is cum- The action S is an additive scalar quantity, and is the sum bersome. in the form of the Lagrange of contributions L⌬t from each segment along the entire equations provides an alternative and very powerful tool for world line between two events fixed in space and . Be- obtaining the equations of motion. Lagrange’s equations em- cause S is additive, it follows that the principle of least action ploy a single scalar function, and there are no annoying vec- must hold for each individual infinitesimal segment of the tor components or associated trigonometric manipulations. world line.6 This property allows us to pass from the integral Moreover, the analytical approach using Lagrange’s equa- equation for the principle of least action, Eq. ͑2͒,to tions provides other capabilities2 that allow us to analyze a Lagrange’s differential equation, valid anywhere along the wider range of systems than Newton’s second law. world line. It also allows us to use elementary calculus in The derivation of Lagrange’s equations in advanced me- this derivation. chanics texts3 typically applies the calculus of variations to We approximate a small section of the world line by two the principle of least action. The calculus of variation be- straight-line segments connected in the middle ͑Fig. 1͒ and longs to important branches of mathematics, but is not make the following approximations: The average widely taught or used at the college level. Students often coordinate in the Lagrangian along a segment is at the mid- encounter the variational calculus first in an advanced me- point of the segment.7 The average of the particle is chanics class, where they struggle to apply a new mathemati- equal to its displacement across the segment divided by the cal procedure to a new physical concept. This paper provides time interval of the segment. These approximations applied a derivation of Lagrange’s equations from the principle of to segment A in Fig. 1 yield the average Lagrangian LA and 4 least action using elementary calculus, which may be em- action SA contributed by this segment: ployed as an alternative to ͑or a preview of͒ the more ad- ϩ Ϫ vanced variational calculus derivation. x1 x2 x2 x1 L ϵLͩ , ͪ , ͑3a͒ In Sec. II we develop the mathematical background for A 2 ⌬t deriving Lagrange’s equations from elementary calculus. ϩ Ϫ Section III gives the derivation of the equations of motion x1 x2 x2 x1 S ϷL ⌬tϭLͩ , ͪ ⌬t, ͑3b͒ for a single particle. Section IV extends our approach to A A 2 ⌬t demonstrate that the energy and momentum are constants of the motion. The Appendix expands Lagrange’s equations to with similar expressions for LB and SB along segment B. multiparticle systems and adds angular momentum as an ex- ample of generalized momentum. III. DERIVATION OF LAGRANGE’S EQUATION II. DIFFERENTIAL APPROXIMATION TO THE We employ the approximations of Sec. II to derive PRINCIPLE OF LEAST ACTION Lagrange’s equations for the special case introduced there. A particle moves along the x axis with potential energy As shown in Fig. 2, we fix events 1 and 3 and vary the x coordinate of the intermediate event to minimize the action V(x) which is time independent. For this special case the 5 between the outer two events. Lagrange function or Lagrangian L has the form: For simplicity, but without loss of generality, we choose ͑ ͒ϭ Ϫ ϭ 1 2Ϫ ͑ ͒ ͑ ͒ ⌬ L x,v T V 2mv V x . 1 the time increment t to be the same for each segment,

510 Am. J. Phys. 72 ͑4͒, April 2004 http://aapt.org/ajp © 2004 American Association of Physics Teachers 510 ϭ ⌬ ϩ ⌬ ͑ ͒ SAB LA t LB t. 6 The principle of least action requires that the coordinates of the middle event x be chosen to yield the smallest value of the action between the fixed events 1 and 3. If we set the 8 of SAB with respect to x equal to zero and use the chain rule, we obtain L dxץ L dvץ L dxץ dS AB ϭ ϭ A A ⌬ ϩ A A ⌬ ϩ B B ⌬ t ץ t ץ t ץ 0 dx xA dx vA dx xB dx L dvץ ϩ B B ⌬ ͑ ͒ t. 7 ץ vB dx We substitute Eq. ͑5͒ into Eq. ͑7͒, divide through by ⌬t, and regroup the terms to obtain Lץ Lץ L 1ץ Lץ 1 Fig. 1. An infinitesimal section of the world line approximated by two A ϩ B Ϫ BϪ A ϭ ͑ ͒ 8 .0 ͪ ץ ץ ͩ ⌬ ͪ ץ ץ ͩ .straight line segments 2 xA xB t vB vA To first order, the first term in Eq. ͑8͒ is the average value x on the two segments A and B. In the limit ⌬tץ/Lץ which also equals the time between the midpoints of the two of segments. The average positions and along seg- →0, this term approaches the value of the partial derivative ments A and B are at x. In the same limit, the second term in Eq. ͑8͒ becomes the time derivative of the partial derivative of the Lagrangian x ϩx xϪx v)/dt. Therefore in the limitץ/Lץ)ϭ 1 ϭ 1 ͑ ͒ with respect to velocity d xA , vA ⌬ , 4a 2 t ⌬t→0, Eq. ͑8͒ becomes the Lagrange equation in x: ץ ץ xϩx x Ϫx ϭ 3 ϭ 3 ͑ ͒ L d L xB , vB ⌬ . 4b Ϫ ͩ ͪ ϭ0. ͑9͒ vץ x dtץ t 2 ͑ ͒ The expressions in Eq. 4 are all functions of the single We did not specify the location of segments A and B along ͑ ͒ variable x. For later use we take the of Eq. 4 the world line. The additive property of the action implies with respect to x: that Eq. ͑9͒ is valid for every adjacent pair of segments. dx 1 dv 1 An essentially identical derivation applies to any particle A ϭ A ϭϩ ͑ ͒ , ⌬ , 5a with one degree of freedom in any potential. For example, dx 2 dx t the single angle ␸ tracks the motion of a simple pendulum, so its equation of motion follows from Eq. ͑9͒ by replacing x dxB 1 dvB 1 ϭ , ϭϪ . ͑5b͒ with ␸ without the need to take vector components. dx 2 dx ⌬t Let L and L be the values of the Lagrangian on segments A B IV. MOMENTUM AND ENERGY AS CONSTANTS A and B, respectively, using Eq. ͑4͒, and label the summed OF THE MOTION action across these two segments as SAB : A. Momentum We consider the case in which the Lagrangian does not depend explicitly on the x coordinate of the particle ͑for ex- ample, the potential is zero or independent of position͒. Be- cause it does not appear in the Lagrangian, the x coordinate is ‘‘ignorable’’ or ‘‘cyclic.’’ In this case a simple and well- known conclusion from Lagrange’s equation leads to the mo- mentum as a conserved quantity, that is, a constant of mo- tion. Here we provide an outline of the derivation. For a Lagrangian that is only a function of the velocity, LϭL(v), Lagrange’s equation ͑9͒ tells us that the time de- v is zero. From Eq. ͑1͒, we find thatץ/Lץ rivative of vϭmv, which implies that the x momentum, pϭmv,isץ/Lץ a constant of the motion. This usual consideration can be supplemented or replaced by our approach. If we repeat the derivation in Sec. III with LϭL(v) ͑perhaps as a student exercise to reinforce under- ͒ Fig. 2. Derivation of Lagrange’s equations from the principle of least action. standing of the previous derivation , we obtain from the prin- Points 1 and 3 are on the true world line. The world line between them is ciple of least action ͑ ͒ L dvץ L dvץ approximated by two straight line segments as in Fig. 1 . The arrows show dS that the x coordinate of the middle event is varied. All other coordinates are AB ϭ ϭ A A ⌬ ϩ B B ⌬ ͑ ͒ t. 10 ץ t ץ 0 fixed. dx vA dx vB dx

511 Am. J. Phys., Vol. 72, No. 4, April 2004 Hanc, Taylor, and Tuleja 511 Despite the form of Eq. ͑13͒, the derivatives of velocities are not , because the x separations are held constant while the time is varied. As before ͓see Eq. ͑6͔͒, ϭ Ϫ ͒ϩ Ϫ ͒ ͑ ͒ SAB LA͑t t1 LB͑t3 t . 14 Note that students sometimes misinterpret the time differ- ences in parentheses in Eq. ͑14͒ as arguments of L. We find the value of the time t for the action to be a minimum by setting the derivative of SAB equal to zero: L dvץ L dvץ dS AB ϭ ϭ A A ͑ Ϫ ͒ϩ ϩ B B ͑ Ϫ ͒Ϫ . t3 t LB ץ t t1 LA ץ 0 dt vA dt vB dt ͑15͒

Fig. 3. A derivation showing that the energy is a constant of the motion. If we substitute Eq. ͑13͒ into Eq. ͑15͒ and rearrange the Points 1 and 3 are on the true world line, which is approximated by two result, we find straight line segments ͑as in Figs. 1 and 2͒. The arrows show that the t Lץ Lץ coordinate of the middle event is varied. All other coordinates are fixed. A Ϫ ϭ B Ϫ ͑ ͒ vB LB . 16 ץ vA LA ץ vA vB ͑ ͒ We substitute Eq. ͑5͒ into Eq. ͑10͒ and rearrange the terms to Because the action is additive, Eq. 16 is valid for every find: segment of the world line and identifies the function .vϪL as a constant of the motion. By substituting Eqץ/Lץv Lץ Lץ vϪL and carrying out theץ/LץA ϭ B ͑1͒ for the Lagrangian into v ץ ץ vA vB partial derivatives, we can show that the constant of the mo- ϭ ϩ or tion corresponds to the total energy E T V. ϭ ͑ ͒ pA pB . 11 V. SUMMARY Again we can use the arbitrary location of segments A and B along the world line to conclude that the momentum p is a Our derivation and the extension to multiple degrees of constant of the motion everywhere on the world line. freedom in the Appendix allow the introduction of Lagrange’s equations and its connection to the principle of B. Energy least action without the apparatus of the calculus of varia- 9 tions. The derivations also may be employed as a preview of Standard texts obtain conservation of energy by examin- before its more formal derivation us- ing the time derivative of a Lagrangian that does not depend ing variational calculus. explicitly on time. As pointed out in Ref. 9, this lack of One of us ͑ST͒ has successfully employed these deriva- dependence of the Lagrangian implies the homogeneity of tions and the resulting Lagrange equations with a small time: temporal translation has no influence on the form of the group of talented high school students. They used the equa- Lagrangian. Thus conservation of energy is closely con- 10 tions to solve problems presented in the Physics Olympiad. nected to the symmetry properties of nature. As we will The excitement and enthusiasm of these students leads us to see, our elementary calculus approach offers an alternative 11 hope that others will undertake trials with larger numbers way to derive energy conservation. and a greater variety of students. Consider a particle in a time-independent potential V(x). Now we vary the time of the middle event ͑Fig. 3͒, rather than its position, requiring that this time be chosen to mini- ACKNOWLEDGMENT mize the action. For simplicity, we choose the x increments to be equal, The authors would like to express thanks to an anonymous with the value ⌬x. We keep the spatial coordinates of all referee for his or her valuable criticisms and suggestions, three events fixed while varying the time coordinate of the which improved this paper. middle event and obtain ⌬x ⌬x APPENDIX: EXTENSION TO MULTIPLE DEGREES ϭ ϭ ͑ ͒ vA Ϫ , vB Ϫ . 12 OF FREEDOM t t1 t3 t These expressions are functions of the single variable t, with We discuss Lagrange’s equations for a system with mul- respect to which we take the derivatives tiple degrees of freedom, without pausing to discuss the usual conditions assumed in the derivations, because these ⌬ 3 dvA x vA can be found in standard advanced mechanics texts. ϭϪ ϭϪ , ͑13a͒ 2 Ϫ dt ͑tϪt ͒ t t1 Consider a mechanical system described by the following 1 Lagrangian: and ϭ ͒ ͑ ͒ L L͑q1 ,q2 ,...,qs ,q˙ 1 ,q˙ 2 ,...,q˙ s ,t , 17 ⌬ dvB x vB ϭ ϭ . ͑13b͒ where the q are independent and the dt Ϫ ͒2 t Ϫt ͑t3 t 3 dot over q indicates a derivative with respect to time. The

512 Am. J. Phys., Vol. 72, No. 4, April 2004 Hanc, Taylor, and Tuleja 512 ͒ subscript s indicates the number of degrees of freedom of the a Electronic mail: [email protected] b͒ system. Note that we have generalized to a Lagrangian that is Electronic mail: [email protected]; http://www.eftaylor.com c͒Electronic mail: [email protected] an explicit function of time t. The specification of all the 1 ͑ ͒ We take ‘‘equations of motion’’ to mean relations between the accelera- values of all the generalized coordinates qi in Eq. 17 de- tions, velocities, and coordinates of a mechanical system. See L. D. Lan- fines a configuration of the system. The action S summarizes dau and E. M. Lifshitz, Mechanics ͑Butterworth-Heinemann, Oxford, the evolution of the system as a whole from an initial con- 1976͒, Chap. 1, Sec. 1. figuration to a final configuration, along what might be called 2Besides its expression in scalar quantities ͑such as kinetic and potential a world line through multidimensional space–time. Symboli- energy͒, Lagrangian quantities lead to the reduction of dimensionality of a cally we write: problem, employ the invariance of the equations under point transforma- tions, and lead directly to constants of the motion using Noether’s theo- rem. More detailed explanation of these features, with a comparison of ϭ ͵ ͑ ˙ ˙ ˙ ͒ analytical mechanics to vectorial mechanics, can be found in Cornelius S initial configuration L q1 ,q2 ...qs ,q1 ,q2 ...qs ,t dt. to final configuration Lanczos, The Variational Principles of Mechanics ͑Dover, New York, ͑18͒ 1986͒, pp. xxi–xxix. 3Chapter 1 in Ref. 1 and Chap. V in Ref. 2; Gerald J. Sussman and Jack The generalized principle of least action requires that Wisdom, Structure and Interpretation of Classical Mechanics ͑MIT, Cam- the value of S be a minimum for the actual evolution of bridge, 2001͒, Chap. 1; Herbert Goldstein, Charles Poole, and John Safko, the system symbolized in Eq. ͑18͒. We make an argu- Classical Mechanics ͑Addison–Wesley, Reading, MA, 2002͒, 3rd ed., ment similar to that in Sec. III for the one-dimensional Chap. 2. An alternative method derives Lagrange’s equations from motion of a particle in a potential. If the principle of least D’Alambert principle; see Goldstein, Sec. 1.4. 4 action holds for the entire world line through the inter- Our derivation is a modification of the finite difference technique em- ͑ ͒ ployed by Euler in his path-breaking 1744 , ‘‘The method of finding mediate configurations of L in Eq. 18 , it also holds for an plane curves that show some property of maximum and minimum.’’ Com- infinitesimal change in configuration anywhere on this world plete references and a description of Euler’s original treatment can be line. found in Herman H. Goldstine, A History of the Calculus of Variations Let the system pass through three infinitesimally close from the 17th Through the 19th Century ͑Springer-Verlag, New York, configurations in the ordered sequence 1, 2, 3 such that all 1980͒, Chap. 2. Cornelius Lanczos ͑Ref. 2, pp. 49–54͒ presents an abbre- generalized coordinates remain fixed except for a single viated version of Euler’s original derivation using contemporary math- coordinate q at configuration 2. Then the increment of ematical notation. 5R. P. Feynman, R. B. Leighton, and M. Sands, The Feynman Lectures on the action from configuration 1 to configuration 3 can be Physics ͑Addison–Wesley, Reading, MA, 1964͒, Vol. 2, Chap. 19. considered to be a function of the single variable q.Asa 6See Ref. 5, p. 19-8 or in more detail, J. Hanc, S. Tuleja, and M. Hancova, consequence, for each of the s degrees of freedom, we ‘‘Simple derivation of Newtonian mechanics from the principle of least can make an argument formally identical to that carried action,’’ Am. J. Phys. 71 ͑4͒, 386–391 ͑2003͒. out from Eq. ͑3͒ through Eq. ͑9͒. Repeated s , once for 7There is no particular reason to use the midpoint of the segment in the each generalized coordinate q , this derivation leads to s Lagrangian of Eq. ͑2͒. In Riemann integrals we can use any point on the i given segment. For example, all our results will be the same if we used the scalar Lagrange equations that describe the motion of the coordinates of either end of each segment instead of the coordinates of the system: midpoint. The repositioning of this point can be the basis of an exercise to .L test student understanding of the derivations given hereץ L dץ Ϫ ϭ ͑ ϭ ͒ ͑ ͒ 8A zero value of the derivative most often leads to the world line of mini- i 1,2,3,...,s . 19 0 ͪ ץ ͩ ץ qi dt q˙ i mum action. It is possible also to have a zero derivative at an inflection ͑ ͑ ͒ point or saddle point in the action or the multidimensional equivalent in The inclusion of time explicitly in the Lagrangian 17 does configuration space͒. So the most general term for our basic law is the not affect these derivations, because the time coordinate is principle of stationary action. The conditions that guarantee the existence held fixed in each equation. of a minimum can be found in I. M. Gelfand and S. V. Fomin, Calculus of Suppose that the Lagrangian ͑17͒ is not a function of a Variations ͑Prentice–Hall, Englewood Cliffs, NJ, 1963͒. 9Reference 1, Chap. 2 and Ref. 3, Goldstein et al., Sec. 2.7. given coordinate qk . An argument similar to that in Sec. 10 IV A tells us that the corresponding generalized momentum The most fundamental justification of conservation laws comes from sym- -metry properties of nature as described by Noether’s theorem. Hence en ץ ץ L/ q˙ k is a constant of the motion. As a simple example of ergy conservation can be derived from the invariance of the action by such a generalized momentum, we consider the angular mo- temporal translation and conservation of momentum from invariance un- mentum of a particle in a central potential. If we use polar der space translation. See N. C. Bobillo-Ares, ‘‘Noether’s theorem in dis- coordinates r, ␪ to describe the motion of a single particle in crete classical mechanics,’’ Am. J. Phys. 56 ͑2͒, 174–177 ͑1988͒ or C. M. ϭ Ϫ Giordano and A. R. Plastino, ‘‘Noether’s theorem, rotating potentials, and the plane, then the Lagrangian has the form L T V Jacobi’s integral of motion,’’ ibid. 66 ͑11͒, 989–995 ͑1998͒. 2 2 2 ϭm(r˙ ϩr ␪˙ )/2ϪV(r), and the angular momentum of the 11Our approach also can be related to symmetries and Noether’s theorem, -␪˙ . which is the main subject of J. Hanc, S. Tuleja, and M. Hancova, ‘‘Symץ/Lץ system is represented by ͑ ͒ metries and conservation laws: Consequences of Noether’s theorem,’’ Am. If the Lagrangian 17 is not an explicit function of time, J. Phys. ͑to be published͒. then a derivation formally equivalent to that in Sec. IVB 12Reference 3, Goldstein et al., Sec. 2.7. ͑with time as the single variable͒ shows that the function 13For the case of generalized coordinates, the energy function h is generally Ϫ 12 ץ ץ ͚ ( q˙ 1 L/ q˙ i) L, sometimes called the energy function h, not the same as the total energy. The conditions for conservation of the is a constant of the motion of the system, which in the simple energy function h are distinct from those that identify h as the total energy. cases we cover13 can be interpreted as the total energy E of For a detailed discussion see Ref. 12. Pedagogically useful comments on a particular example can be found in A. S. de Castro, ‘‘Exploring a rheon- the system. omic system,’’ Eur. J. Phys. 21, 23–26 ͑2000͒ and C. Ferrario and A. If the Lagrangian ͑17͒ depends explicitly on time, then Passerini, ‘‘Comment on Exploring a rheonomic system,’’ ibid. 22,L11– .t. L14 ͑2001͒ץ/Lץthis derivation yields the equation dh/dtϭϪ

513 Am. J. Phys., Vol. 72, No. 4, April 2004 Hanc, Taylor, and Tuleja 513