<<

1

1 The original Euler’s -of-variations method: 2 Key to Lagrangian mechanics for beginners 3 Jozef Hanca) 4 Technical University, Vysokoskolska 4, 042 00 Kosice, Slovakia

5 ABSTRACT 6 's original version of the calculus of variations was geometric and easily visualized. Euler (1707- 7 1783) abandoned his version because of the absence in his day of the exact definition of a , adopting instead 8 the algebraic method of Lagrange. Lagrange’s elegant technique not only bypassed the need for intuition about 9 passage to the limit in calculus but also eliminated Euler’s geometrical insight. More recently, Euler's method 10 has been resurrected, shown to be rigorous and more general than Lagrange's, and employed in computer 11 solutions of physical processes. In our classrooms the study of advanced mechanics is still dominated by 12 Lagrange's method, which students often apply uncritically using "variational recipes". We describe an 13 adaptation of Euler's method that restores intuition and geometric visualization and has applications in almost all 14 of undergraduate , especially modern physics. Finally, we present Euler's method as a natural 15 introduction to computer-executed of boundary value problems and the finite element 16 method. 17 18 I. INTRODUCTION 19 In his pioneering 1744 work The method of finding plane curves that show some property of 20 maximum and minimum,1 Leonhard Euler introduced a general mathematical procedure or 21 method for the systematic investigation of variational problems. Along the way he formulated 22 the variational principle for mechanics, his version of the principle of least action.2 23 Mathematicians consider this event to be the beginning of one of the most important branches 24 of , the calculus of variations. Physicists also regard it as the first variational 25 treatment of mechanics, which later contributed significantly to analytic mechanics and 26 ultimately to the fundamental underpinnings of twentieth-century physics: general relativity 27 and quantum mechanics. 28 It is not certain3 when Euler first became seriously interested in variational problems and 29 properties. We know that he was influenced by and Leibniz, but primarily by James 30 and who were also attracted to the subject. The best known examples of 31 variational calculus include Fermat’s principle of least time ("between fixed endpoints, light 32 takes the path for which the travel time is shortest"), Bernoulli’s brachistochrone problem4 33 ("find a plane curve between two points along which a particle descends in the shortest time 34 under the influence of gravity"), and the so-called isoperimetric problem ("find the curve 35 which encloses the greatest area for a given perimeter"). 36 While each of Euler's contemporaries devised a special method of solution depending on the 37 character of the particular variational problem, Euler's own approach was purely mathematical 38 and therefore much more general. Employing geometrical considerations and his phenomenal 39 intuition for the limit-taking process of calculus, Euler established a method that allows us to 40 solve problems using only elementary calculus. 41 In 1755, the 19-year-old Joseph-Louis Lagrange wrote Euler a brief letter to which he 42 attached a mathematical appendix with a revolutionary technique of variations. Euler 43 immediately dropped his method, espoused that of Lagrange, and renamed the subject the 44 calculus of variations.5 Lagrange’s elegant techniques eliminated from Euler’s methods not 45 only the need for intuition about passage to the limit in calculus but also Euler’s geometrical 46 insight. It reduced the entire process to a quite general analytical manipulation which to this 2

1 day characterizes the calculus of variations. Since in Euler’s time the exact proof of the 2 passage to the limit could not be carried out,6 his method fell into disuse. 3 However, at the beginning of the twentieth century there was an interest in approximate 4 solutions of variational problems and partial differential equations. Euler’s method again 5 attracted the attention of mathematicians, and in the end the modern numerical analysis of 6 variational problems and differential equations7,8 fully vindicated Euler’s intuition. Euler’s 7 method rose like a phoenix and became one of the first direct variational methods.7 At 8 approximately the same time another direct methods were devised, the well-known Rayleigh- 9 Ritz method (1908) and its extension called Galerkin’s method (1915). Finally, all these 10 methods for solving differential equations led to the formulation of the very powerful Finite 11 Element Method (FEM) (1943, 1956)9,10 for carrying out accurate computer predictions of 12 physical processes. 13 For more than a century students in upper undergraduate classes in mechanics have been 14 taught to use Lagrange’s calculus of variations to derive the Lagrange equations of motion 15 from Hamilton’s principle, which is also known as the principle of least action (so renamed by 16 Landau and Feynman). However, there appears to be a conflict between the larger view of 17 theoretical physics and the pedagogy of upper level physics classes: (1) From the viewpoint of 18 modern theoretical physics, variational treatments such as the principle of least action with 19 Lagrangian formalism are "core technology” that can be extended to describe systems beyond 20 mechanics.11 (2) Because the calculus of variations is not widely taught in upper level physics 21 classes, students often meet it first in an advanced mechanics class, find the manipulations 22 daunting, do not develop a deep conceptual understanding of either the new (to them) 23 mathematics or the new physics, and end up memorizing "variational recipes." 24 Is there a strategy or method that allows us to introduce important variational treatments of 25 mechanics and physical laws as "core technology" while at the same time teaching students to 26 apply it with understanding and insight? 27 In the present paper we propose that Euler’s method be used as an introductory procedure 28 instead of the Lagrangian technique of variations. Section II is devoted to a detailed 29 description of Euler’s method from his 1744 work, together with notes for its pedagogic use. 30 We will see that Euler's method permits visualization useful for learning physics and requires 31 only elementary calculus. 32 In Sec. III we illustrate the computer application of Euler's method using interactive software 33 which allows students to carry out their own investigations of the principle of least action and 34 Lagrangian mechanics. Contemporary education research demonstrates that student-directed 35 exploration of a subject helps to develop genuine understanding of concepts and their 36 applications. 37 The final Sec. IV gives a list of other applications of the method which apply it to almost all 38 of undergraduate physics, especially modern physics. 39 40 II. BASIC IDEAS OF EULER’S METHOD

41 A. Euler’s original considerations 42 The exact transcription of original Euler’s derivations from his 1744 work is reproduced in 43 Goldstine’s book3. Several other mathematics and physics books offer somewhat modified 44 versions.12 Here we present only the essential considerations of the Euler approach.13 3

1 Euler’s starting point was his ingenious reduction of the variety of variational problems to a 2 single abstract mathematical form. He recognized that solving the variational problem means 3 finding an extremal (or more strictly stationary) value of a definite . 4 As a first example Euler presents a solution of the simplest variational problem: A function 5 F = F(x, y, y′) has three variables: the independent coordinate x, the dependent coordinate y, 6 and its y′ with respect to the independent coordinate. Our problem is to determine a 7 the curve y = y(x), with 0 ≤ x ≤ a , which will make the definite integral ∫ F(x, y, y′)dx 0 8 extremal. Such an integral occurs in the brachistrochrone problem or in the description of 9 motion using the principle of least action.

10 Euler presents three crucial ideas which allowed him to solve the problem using only 11 elementary calculus: 12 (1) divide the interval between x = 0 and x = a into many small subintervals, each of width 13 ∆x ; 14 (2) replace the given integral by a sum ∑ F(x, y, y′)∆x . In each term of this sum evaluate 15 the function F at the initial point x, y of the corresponding subinterval and approximate the 16 derivative dy/dx by the of the straight line between initial and final points of the 17 subinterval; 18 (3) employ a visualized “geometrical” way of thinking. 19 Goldstine’s book3 displays (p.69) the original Euler’s figure (Fig. 1) in which the curve anz 20 represents the unknown extremal curve y = y(x): 21

22 23 Fig. 1. Original Euler’s figure used in his derivation 24 25 Figure 1 illustrates the fact that if we shift an arbitrarily chosen point on the curve, for 26 example point n, up or down by an increment nv, then in addition to the obvious change in the 27 ordinate yn of the point n, there are also changes in neighboring segments mn and no and their 28 . All other points and slopes remain unchanged. These changes mean that only two 29 terms in the integral sum ∑ F(x, y, y′)∆x are affected, the first corresponding to segment mn 4

1 and the second to segment no. We can also say the variation of yn causes the integral sum to 2 be a function of single variable yn . Because the curve anz is assumed to be extremal already, 3 this function of the variable yn must have a stationary value at n. 4 But this new problem can be solved easily using the ordinary calculus of . 5 The condition for the sum to be stationary corresponds to a zero value of its derivative with 6 respect yn. To calculate this derivative Euler derives the changes in both affected terms 7 corresponding to segment mn and no caused by varying yn and demands that these changes 8 result in zero net change in the sum. From the zero total change Euler finally extracts the 9 required zero derivative of the sum and obtains the equation: ∂F  ∂F ∂F  10 0 = −  −  ∆x (1) ∂  ∂ ′ ∂ ′  yn  yn ym  ′ ′ 11 where yn is again the ordinate of the point n and yn is its derivative and ym is the similar 12 derivative corresponding to the point m. 13 In the limit as ∆x approaches zero, the sum returns to the original integral and Eq. (1) 14 becomes a at point m. Moreover, since points m, n, o were chosen 15 arbitrarily, the differential equation holds for the entire interval between x = 0 and x = a: ∂F d  ∂F  16 0= −   for 0 ≤ x ≤ a (2) ∂y dx  ∂y′  17 This final result is usually called the Euler-Lagrange equation and it expresses the first 18 necessary condition for an extremal value of the integral. Euler gives a number of other 19 examples (specific and general) that illustrate how to use his method. All these procedures are 20 conceptually the same as that outlined above. 21 To prepare for later sections of the present paper, we recall the standard physical notation 22 used in the variational treatment of based on the principle of least action. 23 The description of motion in one dimension includes as independent variable the time t 24 (instead of x) along with the time-dependent generalized coordinate q (instead of y). As a 25 generalized coordinate q one can choose not only one of the Cartesian coordinates x, y, z but 26 also any other coordinate that describes position, such as ϕ or r. The role of the function F is 27 played by the Lagrangian function, L = K − U, the difference between kinetic and potential 28 energy. The definite integral t t 29 ∫ 2 Ldt =∫ 2 (K −U )dt (3) t1 t1 30 is called the action integral, or in short the action and is assigned the symbol S. According to 31 this notation, the Euler-Lagrange equation (2) has the well-known form: ∂L d  ∂L  32 −   = 0 . (4) ∂  ∂  q dt  q  33 where a dot over the q represents differentiation with respect to time. 34 If we consider x as coordinate q, Euler’s diagram (Fig. 1) is simply the spacetime diagram, 35 and the unknown curve x(t) is called the worldline. Finally, the variational principle of least 36 action says that the real path followed by particle is the one for which the action S is minimal 37 (or more precisely stationary). 38 5

1 B. Advantages and disadvantages of the method 2 Two major objections can be made to the Euler procedure: 3 (1) There are two limit-taking processes: partial with respect to coordinates and 4 passage to the limit ∆x → 0. From the mathematical viewpoint the use of partial derivatives is 5 justified, but one must demonstrate the legitimacy of the limit-taking passage ∆x→ 0. Euler 6 neither established6 the existence of this limit nor proved the fact that the limit converges to 7 the real extremal curve. The Lagrange method of variations is free from such limit-taking 8 processes but also does not contain any geometrical insights, since geometrical examples 9 typically cannot represent the generality of results. Therefore after Lagrange’s discovery of 10 variations Euler himself stopped using his own method. 11 (2) Although the basic ideas of Euler's method are conceptually simple and familiar, 12 nevertheless applying the method in detail requires manipulation3,12 of sums containing many 13 symbols and subscripts. As a result, this method becomes cumbersome and less transparent 14 than the elegant Lagrange technique used in the one-dimensional case.14

15 In response to the first criticism, we recall that 20th century numerical analysis provided an 16 exact proof of Euler’s method, along with additional results15 that turn out to be more general 17 than the results of Lagrange’s method. In light of these modern advances, we can now declare 18 that Euler’s phenomenal imaginative use of his procedure did not fail, and his geometrical 19 emphasis caused no loss in generality. Moreover, although Lagrange was proud of the fact 20 that his great work Mécanique Analytique (1788) contained no figures or geometrical 21 considerations, contemporary instruction in physics and modern physics itself have the 22 opposite character, for example using Feynman diagrams in quantum physics and phase 23 diagrams in . 24 We have to agree with the second objection, that Euler's method is formally less transparent 25 than that of Lagrange. Many subscripts and the use of sums decreases the power and 26 usefulness of the method for teaching purposes. Happily it is possible to remove this 27 weakness, modifying Euler’s method to make it more accessible and simple. Our recent 28 paper16 describes such modification. Here we mention only the key steps which simplify and 29 clarify the method. 30 (a) Euler’s diagram (Fig.1) and the geometrical method tell us that only two terms of the 31 integral sum are affected; all the rest remain and need not enter the derivation. 32 Because the definite action integral is a , one can conclude that “if the action 33 integral is extremal along the entire worldline, then it is also extremal for every subsection of 34 the wordline.”17 Therefore it is sufficient to consider only an subsection of any 35 unknown worldline: three points near to one another connected by two straight-line segments 36 (analogous to mno in Fig.1). Then the action contains only the two required terms and there is 37 no need to use subscripts and formal sums. 38 (b) We do not need to calculate the two terms of our Riemann integral using initial points of 39 the subintervals. Instead we take the midpoints. The midpoint approximation leads to the 40 same symmetrical structure for both terms of the action and is quite natural from the student’s 41 viewpoint. 42 Another way to increase the power and clarity of Euler’s method is to spend some time 43 applying it intuitively and inductively before moving on to the Lagrange formalism. 44 Advanced textbooks typically apply the deductive approach: first they derive the general 45 Lagrange equations of motion from the principle of least action and then apply the Lagrange 6

1 formalism to particular problems. If instead we pause to work out examples using the Euler 2 method, we achieve a remarkable simplification and reinforce the later introduction of 3 Lagrange's equations.16 4 As an example that illustrates the simplifications and improvements already described, we 5 analyze the motion of a particle in a uniform gravitational field. Think of a particle thrown 6 vertically near Earth’s surface and choose arbitrarily three infinitesimally close events 1, 2, 3 7 on two segments A and B of the particle’s worldline (see Fig. 2). Let x1, x2, x3 be the spatial 8 coordinates of these three events and ∆t be the time separation between them. 9

segment B segment A 2 x 2 x 3 3 x 1 1

t 1 t 2 t 3 10 11 Fig. 2 Two segments of the worldline (dependence of height on the time) of a 12 particle thrown vertically near Earth's surface. Points 1, 2 and 3 are three 13 successive events on the worldline. All coordinates with the exception of x2 14 are fixed. We change x2 to satisfy the principle of least action. 15 16 The action S in Eq. (3) has two contributions:  2  1  x − x  x + x  17 S =  m 2 1  − mg 1 2 ∆t (5) A ∆ 2  t  2 

 2  1  x − x  x + x  18 S =  m 3 2  − mg 2 3 ∆t (6) B ∆ 2  t  2  19 where the two terms in each curly bracket are kinetic and potential energy respectively. All 20 space and time coordinates are fixed with the exception of the position x2 of the middle event, 21 which we vary to satisfy the principle of least action. Taking the ordinary derivative of the 22 total action S = SA + SB and setting the result equal to zero, we obtain after rearrangement: x − 2x + x 23 − mg = m 3 2 1 (7) ∆t 2 24 In the limit ∆t→ 0 Eq. (7) reduces to Newton's second law of motion18 F=ma. 7

1 The same result can also be obtained by direct use of Lagrange's equation, but in our 2 experience when students start with the Lagrange equation they concentrate on learning the 3 "recipe" or the "problem solving strategy," often without considering the physical 4 interpretation. 5 6 III. THE AS A NUMERICAL TOOL 7 A. Euler’s method in numerical analysis 8 Unlike Lagrange’s purely analytic method, the Euler method provides a basis for computer 9 modeling. Computer implementation of the method in appropriate interactive software allows 10 students to employ basic concepts of the principle of least action and Lagrangian mechanics to 11 visualize the variational problem, to focus on physical ideas and concepts, and to develop 12 physical intuition. No algebraic or analytic manipulations or differential equation overlays the 13 student’s activity. 14 We now recapitulate Euler’s procedure briefly and more precisely as a numerical 2 15 method.19,20,21 To find the stationary value of a functional S = ∫ Ldt , Euler’s procedure is as 1 16 follows: 17 (1) We divide the interval into n small subintervals of equal time duration ∆t, replacing the 18 unknown curve with a piecewise-. In other words, we replace the curve by a 19 broken line of n connected segments (see Fig.3). x

x0 x1 x2 xn-1 xn

t0 t1 tn−1 tn t 20 21 Fig. 3. Example of a piecewise-linear function approximating a smooth curve.

22 (2) We approximate the action integral S by the sum S ≈ ∑ L∆t with terms calculated at 23 initial points of subintervals or we can apply the more useful midpoint approximation. The 24 derivative is given by a difference coefficient, the slope of the straight line between initial 25 and final points of the given subinterval.

26 (3) Since we fix all times t0, t1, t2, ...., tn-1, tn and the two endpoints x0 and xn, therefore S is 27 a functionS(x1, x2..., xn−1 ) . To find the stationary value S, we choose the values of x1, x2, 28 ...., xn-1 to satisfy the following equations: ∂S ∂S ∂S 29 = 0, = 0, ..., = 0 (8) ∂ ∂ ∂ x1 x2 xn−1 8

1 (4) Solving the system of equations (8), with or without the help of a computer, we obtain 2 an approximate solution of the variational problem. 3 Today Euler’s method belongs to the so-called direct variational methods for solving 4 boundary value problems, and as we will see in Sec. IV it can be regarded as a special case of 5 the . 6 Technical detail: In the second step of the Euler method we could use the for 7 the approximation of the action integral S, which is as efficient as the midpoint 8 approximation.22 9 10 B. Visualization of Euler’s method. Hunting for the least-action worldline 11 Our one-dimensional version of Euler's numerical method offers a great opportunity to 12 visualize the whole process of finding the stationary curve (worldline) by minimizing the 13 action integral. For simplicity consider a particle moving in a one dimensional potential 14 energy U(x). Then the action integral (3) has the form

2 1 2  15 S = ∫  mv −U (x)dt (9) 2  1 16 The computer23 can display a trial broken worldline of the particle as shown in Fig. 3. If we 17 calculate the action S with the help of the trapezoidal rule,22 the result is: n  − 2 +  1  xi xi−1  U (xi ) U (xi−1) 18 S(x , ... , x − ) = ∑ m  − ∆t (10) 1 n 1  ∆  i=12 t 2 

19 The student uses the computer mouse to select an arbitrary moveable point k with ordinate xk 20 on the worldline, then drags the point up and down while monitoring the displayed value of 21 the total action in order to find the minimal (stationary) action for the time value of that point. 22 Mathematically this procedure corresponds to finding the solution of the equation ∂ ∂ = 23 S / xk 0 . If we take the derivative of action (10), with respect xk, the equation is:

dU (x) x + − 2x + x − 24 − = m k 1 k k 1 . (11) dx ∆ 2 xk t 25 This is the version of Newton’s law of motion. 26 The student then drags the remaining intermediate points up and down, cycling repeatedly 27 through all the moveable points until the time value of every point results in the least 28 (stationary) value of the total action. This condition implies that all equations (8) or (11) are 29 satisfied. According to the principle of least action, the resulting worldline approximates the 30 one taken by the particle. This method of successive displacements or hunting for the least- 31 action worldline is straightforward but is tedious when many intermediate points are 32 involved. After students have experienced this insightful but tiresome manual process, the 33 computer can be deployed to find automatically the minimum-action location of intermediate 34 events. This process of using the principle of least action directly to predict the motion of 35 mechanical systems24 encourages students to think critically as they manipulate the 36 mathematical machinery interactively. 37 Technical details: The system of equations (8) is frequently a system of linear equations (for 38 example for a linear potential function). In that case the method of successive displacements 9

1 becomes the well-known Gauss-Seidel iterative method or Gauss-Seidel relaxation. This 2 method is one of the basic linear iterative methods of numerical analysis and can be found in 3 almost every introductory textbook of numerical analysis.25,26 We do not discuss the question 4 of convergence here, since it goes beyond the scope of the present paper. 5 6 IV. APPLICATIONS OF EULER’S METHOD 7 This section describes applications of Euler’s method to many branches of physics, each with 8 an appropriate variational principle. The section includes references to works using Euler’s 9 method. For comparison of the Euler approach with Lagrange’s, we also provide references to 10 publications that treat the same problems using Lagrange’s approach.

11 A. Classical mechanics: Newton’s laws of motion 12 B. Symmetries and constants of motion: Noether’s theorem 13 C. Special Relativity: Motion and conservation laws 14 D. General relativity: Black holes 15 E. Electromagnetism: Motion of a charged particle 16 F. Hamilton’s : Hamilton’s equations and phase curves 17 G. Liquids and Solids: An equilibrium state 18 H. Quantum mechanics: Feynman’s sum over path theory 19 I. Ray Optics: Fermat’s principle 20 J. Calculus of variations: Introductory elementary problems 21 K. Numerical mathematics: Boundary value problems & FEM 22 23 A. Classical mechanics: Newton’s laws 24 As mentioned in Sec. II.A, Newtonian mechanics can be reformulated as a single unifying 25 principle, the principle of least action. A recent article in this Journal27 spells out in detail the 26 derivation of Newton's laws of motion from the principle of least action using Euler’s method. 27 28 B. Symmetries and constants of the motion: Noether’s theorem 29 The simple demonstration of the fundamental relation between symmetries of nature and 30 conservation laws described by Noether’s theorem is given in Refs. 28. That article uses 31 Euler's method and the principle of least action, along with elementary calculus. 32 33 C. Special Relativity: Motion and conservation laws 34 In special relativity the principle of least action defines action for a free particle with mass m 35 as29 2 36 S = −mc∫ ds (12) 1 37 where ds represents the spacetime interval (“line element”) between two events that are 38 infinitesimally close on the particle’s world line in flat space-time. We note that the action 39 integral (12) does not depend on our choice of inertial reference system, because the interval 40 ds is invariant under Lorentz transformation. Hence the principle of least action automatically 41 satisfies the core of special relativity—the principle of relativity. 42 Since the interval ds also corresponds to wristwatch or proper time recorded by the clock 43 moving with the particle (ds = cdτ), the action (12) is equal to the integral 10

2 1 S = −mc 2 ∫ dτ (13) 1 2 Minimal (or stationary) action (13) along a real worldline makes the total proper 2 3 time τ = ∫ dτ maximal (or stationary). Therefore, because of the minus sign in front of the 1 4 integral in equation (13), the relativistic principle of least action implies the principle of 5 maximal proper time, sometimes called maximal aging. 6 Simple use of the principle of least action (or maximal proper time) employing our adapted 7 Euler method28,30 immediately yields well-known relativistic forms of momentum and energy 8 and verifies them to be constants of the motion. 9 10 D. General relativity: Black holes 11 Einstein tells us that there is no gravitational force, but only curved space-time. His general 12 relativity theory always allows us to create a local inertial frame with respect to which a 13 particle moves along a worldline that is incrementally straight. Therefore it should not be 14 surprising that the same31 expressions (12) and (13) for action and the same principle of least 15 action describes the motion of a particle in general relativity (theory of gravitation) as in 16 special relativity. In this case, however, the expression for the incremental proper time dτ of 17 equation (13) (or ds) is provided by the metric, the solution to Einstein's field equations that 18 describes any non-varying curved space-time such as that around spinning or nonspinning 19 centers of gravitational attraction: planets, stars, quasars, neutron stars, and black holes. The 20 same general32 Euler method again allows us to describe and explore the motion of free 21 particles, satellites, and light in the vicinity of these astronomical structures. 22 23 E. Electromagnetism: Motion of a charged particle 24 The principle of least action with the S = ∫ ()K −U dt can also be applied to the motion of a 25 particle with charge q in the electromagnetic field. 26 If we assume an electrostatic field E described by the scalar potential ϕ(x, y, z), then the 27 potential energy of the particle is U = qϕ. Therefore the performance of the Euler method is 28 identical with the three dimensional case in Sec. IV A and leads to the equation of motion 29 ma = F , where F = −q∇ϕ = −qE .

30 For a charge q moving at a velocity v in a uniform magnetic field B, which according to the 31 classical electromagnetic theory is derivable from a vector potential A(x, y, z) by B = ∇ × A , 32 then U = −qv ⋅ A. We interpret this quantity as the "interaction potential energy“. Direct 33 application of Euler's method33 again gives ma = F but this time with F = qv × B . 34 Because action is additive, the previous results can also be used to describe particle motion in 35 a variable electromagnetic field with U = qϕ − qv ⋅ A . Combining the previous results with 36 small rearrangement leads to a single Lorentz force equation of motion ma = F , where 37 F = q(E + v × B) . 38 These considerations can also be extended to the relativistic motion of a charged particle by 39 replacing formally only the Newtonian expression for kinetic energy (1/2)mv2 in the action 40 with the relativistic expression: − mc2 1− v2 / c2 . But the term − mc2 1− v2 / c2 in the 41 relativistic formula for the action S is not what we have called the kinetic energy (see 42 Feynman Ref. 17). 11

1 F. Hamilton’s dynamics: Hamilton’s equations and phase curves 2 Instead of using Lagrangian mechanics, it often proves convenient to use the Hamiltonian 3 approach.34 Here is a brief outline of how to use Euler’s method in that case. As we will see, 4 the results permit not only derivation of Hamilton’s equations but also investigation of such 5 concepts as phase point, curve, and diagram. 6 (a) From the application of Euler’s method in Ref.16 we know that in many circumstances the ∂ ∂ − 7 quantity q L / q L is conserved. This expression is more general that total energy, but in the ≡ ∂ ∂ 8 cases we examine it represents total energy. If we introduce the new variable p L / q then − 9 our conserved quantity has the form pq L . If this quantity is treated as a function of the 10 independent variables p, q it is called the Hamiltonian H of the system. (b) We form the 2 11 action integral (3) in terms of the Hamiltonian H(p, q): S = ∫ []pq − H ( p,q) dt . 1  12 (c) The evolution of the system is described by the unknown phase curve [q(t), p(t)] in the 13 phase diagram. (d) Think of three infinitesimally close phase points 1, 2 and 3 on the real 14 phase curve of our particle. 15 (e) Since variations of p, q, t can be treated independently, the triple use35 of the Euler method = ∂ ∂ = −∂ ∂ = 16 leads to three equations: q H / p , p H / q , H const . 17 The first two equations are Hamilton’s equations of motion for one particle, equivalent to the 18 single Lagrange’s equation (4). The last equation is a special case of Noether’s theorem 19 expressed in Hamiltonian formalism. Because of our assumption that H does not contain time 20 explicitly (it is symmetric or invariant under time displacement), we obtain the conservation 21 of energy H = const . 22 23 G. Liquids and Solids: An Equilibrium state 24 If we apply the principle of least action to a conservative mechanical system described by a 25 potential U(x) in an equilibrium state at rest, then the Euler method immediately provides the 26 principle of least (stationary) potential energy. Here is a simple proof.36 The state of 27 equilibrium is described by constant coordinates. In our simple case of a three-point worldline 28 this means x1 = x2 = x3. Application of the Euler method to the principle of least action gives 29 the same condition as (11) at point 2: dU (x) x − 2x + x 30 − = m 3 2 1 (14) dx ∆ 2 x2 t

31 Since x1 = x2 = x3 , we have: dU (x) 32 = 0 (15) dx x2 33 Equation (15) means that U is an extremum, or rather has a stationary value, at equilibrium. 34 The principle of least potential energy has many applications37,38,39 such as the statics of 35 structures (theory of elasticity) and surface phenomena (liquids). 36 37 H. Quantum mechanics: Feynman’s sum over paths theory 38 Classical action plays a fundamental role in Feynman’s quantum mechanics,40 a third 39 formulation of the subject in addition those of Schrödinger and Heisenberg. As we can see in 40 Ref. 23, some of the ideas of Euler’s computer method can be used in student exploration of 12

1 the microworld, leading to an understanding of the basic concepts of quantum physics (such 2 as the wave function, quantum interference, evolution of quantum states, boundary states) 3 without using complex functions or partial differential equations. 4 5 I. Ray Optics: Fermat's principle 6 Euler’s method, particularly the interactive computer application (Sec. III B), permits a highly 41 7 visual demonstration of Fermat’s principle, the earliest extremal principle that still survives 8 in modern physics. Since Fermat's principle accounts for every feature of classical ray optics, 9 hunting for the minimum-time path allows exploration and understanding of for example 10 reflection, refraction (at a plane surface, in layers of glass, or in the atmosphere), mirage, or 11 ray tracing in optical systems. 12 13 J. Introduction to the calculus of variations 14 Euler’s method is used in some mathematics texts to introduce the calculus of variations.8,39 15 Lagrange's variational techniques can be applied to problems in parallel with interactive 16 computer exploration of the same problems using Euler's method, leading to a deeper 17 understanding of both and of the physical systems that they describe. 18 19 K. Numerical mathematics: Boundary value problems and Finite Element Method 20 Euler’s method can be used to introduce the theory and basic concepts of the Finite Element 21 Method (FEM).42 22 The first step of Euler’s method consists in dividing the interval over which the solution is 23 defined into a number of small subintervals. In the FEM these subintervals are called 24 elements. The second basic step is to replace the unknown curve with a piecewise-linear 25 function (Fig.3). Label this function ϕ. If we take an initial trial broken worldline ϕ given by 26 x0, x1, ..., xn , it is not difficult to show that ϕ can be expressed as a linear combination of the ϕ ϕ ϕ ϕ = ϕ + ϕ + + ϕ 27 functions 0, 1, ..., n shown in Fig. 4: x0 0 x1 1 .... xn n . 28

1 1 ϕ ϕ0 1

t0 t1 tn-1 tn t0 t1 tn-1 tn

1 1 ϕ ϕn-1 n

t0 t1 tn-1 tn t0 t1 tn-1 tn 29 30 31 Fig.4 “Hat functions,” an example of basis functions used in the FEM. 32 33 Such a set of so-called basis functions ϕ0, ϕ1, ... , ϕn (also called elements) represents the 34 simplest type used for one-dimensional applications of the FEM. These functions are zero 35 except on a very small number of segments, a general feature of basis functions. 13

1 The next step of the FEM is finding positions x1, ... , xn-1 for the given boundary conditions 2 x0 = a, xn = b that minimize the action integral S. The integral is calculated approximately with 3 the help of methods of (such as the trapezoidal rule). Since the basis 4 functions ϕ0, ϕ1, ... , ϕn, and endpoints x0 and xn are fixed, the action S due to varying ϕ is 5 only a function of x1, ..., xn-1. Finding the minimum value of the function S corresponds to 6 solving a system of equations (8) with respect to unknowns x1, ..., xn-1. The solution of the 7 system (8) is regarded as an approximate solution to the variational problem obtained by 8 FEM. 9 Note that generally, the last two procedures in the FEM, approximating a function with a 10 linear combination of basis functions and finding coefficients of a linear combination of these 11 functions which minimizes the action integral, are known as the Rayleigh-Ritz method.43 12 The accuracy of the FEM can be increased by (1) increasing the number of elements, (2) 13 changing the set of basis functions or (3) changing the numerical integration formula. Such 14 improvements often employ quadratic basis functions and the Gauss-Legendre numerical 15 integration. Such refinements permit us to solve more general problems than those in 16 mechanics, for example heat diffusion or quantum systems described by Schrödinger’s wave 17 equation.44 18 Euler’s method is the simplest and most fundamental example of finite element analysis . Its 19 importance equals that of Euler's one-step method for solving initial value problems in the 20 field of ordinary differential equations. Like Euler’s one-step method, the Euler variational 21 method can be implemented simply and transparently, and every individual step is clearly 22 visible and easy to understand. It illustrates all essential features of finite element analysis and 23 numerical solutions of variational problems. 24 25 V. CONCLUSIONS 26 The Euler variational method provides a conceptually and mathematically simple introduction 27 to the principle of least action and Lagrangian mechanics. Even introductory examples offer 28 dramatic simplification compared with the traditional Lagrange approach. Euler’s method, 29 based on elementary calculus, provides important geometric-visual insights, and its computer 30 adaptation gives students a powerful tool to explore least-action mechanics without 31 manipulation of equations. For beginners, Euler's method promises to be the key that unlocks 32 the gate to the central variational treatments of physics. 33 The overwhelming majority of applications of Euler’s method is connected to the principle of 34 least action and demonstrates the generality of this principle and its power to illuminate 35 almost all of undergraduate physics. Simultaneously the method presents the principle of least 36 action as a bridge between classical and contemporary physics. 37 Applying the computer adaptation of the method permits a natural introduction to numerical 38 analysis of boundary value problems and the powerful finite element method. 39 Although Euler's legacy is more than 250 years old, it remains centrally important for 40 mathematicians and physicists and richly deserves the accolade of Pierre-Simon Laplace: 41 "Lisez Euler, Lisez Euler, c'est notre maître à tous." ("Read Euler, read Euler, he is our master 42 in everything.").45 43 44 45 14

1 a) email: 2 1L. Euler, Methodus Inveniendi Lineas Curvas Maximi Minimive Proprietate Gaudentes sive 3 Solutio Problematis Isoperimetrici Latissimo Sensu Accepti (The Method of Finding Plane 4 Curves that Show Some Property of Maximum or Minimum... ), Laussanne and Geneva, 5 1744, also in L. Euler, Opera Omnia I, Vol. XXIV, C. Carathéodory, ed. Bern, 1952 6 2C. Lanczos, The Variational Principles of Mechanics (Dover, New York, 1986), Introduction 7 3H. H. Goldstine, A History of the Calculus of Variations from the 17th Through the 19th 8 Century (Springer-Verlag, New York, 1980), Chap. 2. 9 4H. Erlichson, “Johann Bernoulli’s brachistochrone solution using Fermat’s principle of least 10 time”, Eur. J. Phys. 20 (1999), 299-304 11 5Goldstine Ref.3, Chap.3 12 6The proof was impossible because of the absence of the exact definition of a limit. Only in 13 the closing third of the nineteenth century was the German mathematician Karl Weierstrass 14 able to establish the purely arithmetical formulation of the limit concept involving only real 15 numbers, which now is taught in mathematical analysis classes. See C.H. Edwards, Jr., The 16 Historical Development of the Calculus, (Springer-Verlag, Berlin 1979), Chap. 11 17 7L.E. Elsgolc, Calculus of variations, (Pergamon Press, London, 1961), Sec. 5.1 18 8M.A. Lavrentjev, and L.A. Ljusternik, The Course of Variational Calculus (in Russian, 19 Moscow, 1959), Sec. 2.6 20 9Finite element analysis was first developed in R.Courant, “Variational method for the 21 solution of problems equilibrium and vibrations”, Bulletin of the AMS, 49,1-23,1943. 22 10M.J. Turner et al, “Stiffness and deflection analysis of complex structures”, Journal of the 23 Aeronautical Sciences 23, 805-824 (1956), the publication widely regarded as the beginning 24 of FEM. 25 11Further examples: the elastic field, electromagnetic field, field properties of elementary 26 particles, special and general relativity, the deep relation between symmetries and 27 conservation laws (Noether’s theorem). Almost every fundamental law can be expressed in 28 the form of a variational principle. Numerical variational methods (e.g. FEM) represent 29 powerful tools for understanding and simulating complex phenomena. 30 12Lanczos Ref.2, Sec.2.7; Elsgolc Ref. 7, Sec 5.2; Lavrentjev and Ljusternik Ref. 8, Sec. 1.2 31 13We employ a slightly modified notation, because Euler uses dashes instead of subscripts, 32 which could lead to confusion with the standard notation of derivative. However, the logical 33 development is not changed by this notation. 34 14see L.D. Landau and E. M. Lifshitz, Mechanics (Butterworth-Heinemann, London, 1976), 35 3rd ed., Chap. 1; H. Goldstein, Ch. Poole, and J. Safko, Classical Mechanics, 3rd 36 ed.(Addison-Wesley, Reading, MA 2002), Chap. 2; Lanczos Ref. 2, Chap. 2 37 15The rigorous proof of limit ∆t→0 passage for Euler’s method requires subtle and careful 38 considerations (See Lavrentjev and Ljusternik, Ref.8). However, these considerations not only 39 lead to Euler-Lagrange’s differential equation, but also provide an approximate solution of 40 this partial differential equation. The general theoretical approach to the convergence of direct 41 methods such as that of Euler can be found in works on functional analysis of the Russian 42 mathematician S.L. Sobolev. 15

1 16J. Hanc, E. F. Taylor, and S. Tuleja, "Deriving Lagrange's Equations Using Elementary 2 Calculus," accepted for publication in Am. J. Phys. The application of the Euler method in the = ∂ ∂ = ⋅ ∂ ∂ − 3 article provides also the constants of the motion p L /x and h x L / x L . 4 17The first formulation of this statement comes from Johann Bernoulli in his brachistochrone 5 problem, see Erlichson Ref. 4. It is also mentioned in R.P.Feynman, R.B. Leighton, and 6 M.Sands, The Feynman Lectures on Physics (Addison Wesley, Reading, MA, 1964), Vol. 2, 7 Chap. 19 and Landau Ref.14 8 18J. Hanc, S.Tuleja, and M. Hancova, “Simple derivation of Newtonian mechanics from the 9 principle of least action”, Am. J. Phys. 71(4), 386-391 (2003) 10 19See Elsgolc Ref. 7, Sec 5.2; Lavrentjev and Ljusternik Ref.8, Chap. 1 11 20M. J. Forray, Variational Calculus in Science and Engineering, (McGraw-Hill Book 12 Company, NJ, 1968). 13 21I. M. Gelfand and S. V. Fomin, Calculus of variations (Prentice–Hall, Englewood Cliffs, 14 NJ, 1963), Sec. 1.6 and Sec. 8.36 u 15 22The midpoint approximation approximates to the definite integral ∫ 1 f (u)du over the small u0 + u + (u0 u1 )⋅∆ 1 ≈ f (u0) f (u1) ⋅ ∆ 16 interval [u0, u1] by f u and the trapezoidal rule ∫ f (u)du 2 u . 2 u0 17 23See E. F. Taylor, S. Vokos, J. M. O´Meara, and N. S. Thornber, “Teaching Feynman’s sum 18 over paths quantum theory,” Comp. Phys. 12 (2), 190-199 (1998), available at 19 . 20 24S. Tuleja, E. F. Taylor, Software: Principle of Least Action Interactive, 2003, available at 21 the website . This sample of interactive software 22 with pedagogical instruction of the principle of least action can be freely downloaded. 23 25See J. Tobochnik, H. Gould, An Introduction to Computer Simulation Methods: 24 Applications to Physical Systems, 2d edition, Addison-Wesley (1996), Drafts of the third 25 edition are available at , Chap. 10. 26 26Mathematical approach to Gauss-Seidel method is in C.D. Meyer, Matrix Analysis and 27 Applied Linear Algebra, SIAM, 2000; available for free downloading at 28 29 27See Hanc Ref.18; the same problem is analyzed in terms of Lagrange’s technique of 30 variations in Feynman Ref. 17 31 28J. Hanc, S. Tuleja, M. Hancova, "Symmetries and Conservations Laws: Consequences of 32 Noether's Theorem," accepted for publication in Am. J. Phys.; Lagrange’s approach to this 33 subject can be found in N. C. Bobillo-Ares, “Noether’s theorem in discrete classical 34 mechanics,” Am. J. Phys. 56 (2), 174-177 (1988). 35 29L. D. Landau and E.M. Lifshitz, The Classical Theory of Fields, (Pergamon Press, London, 36 1975), Sec.2.8 37 30E. F. Taylor and J. A. Wheeler, Exploring Black Holes: Introduction to General Relativity, 38 Addison-Wesley Longman, New York, 2000, Sec. 1.5,1.6; Hanc et al Ref. 28 on the use of the 39 Euler method start from the principle of least action, whereas Taylor and Wheeler begin with 40 the corresponding principle of maximal aging. 41 31Landau Ref.29, Sec.10.87 16

1 32Taylor Ref. 30, Sec. 3.3 and Sec. 4.2; The Lagrangian approach to the same problem is 2 demonstrated in M. Berry, Principles of Cosmology and Gravitation (Institute of Physics 3 Publishing, Bristol, 1989), Sec 5.3 4 33In that case the performance of the Euler method exceeds the simplicity of previous cases. 5 Its difficulty is comparable with the Goldstein derivation based on Lagrange’s equations. See 6 Ref. 14, Sec. 1.5 7 34Lanczos Ref. 2, Chap. VI 8 35The derivation is simpler if we return to the initial-interval values of p, q in approximation 9 of the action integral sum. 10 36D. ter Haar, Elements of Hamiltonian Mechanics (Pergamon Press, Oxford, 1971), Sec. 3.1. 11 This section contains a similar proof based on the Lagrange approach. 12 37D. S. Lemons, Perfect Form (Princeton University Press, Princeton, 1997), Chap. 4. 13 38L.D. Landau and E.M. Lifshitz, The , (Pergamon Press, London, 1979), 14 Sec. 12.61 15 39Ya. B. Zeldovich and A. D. Myskis, Elements of , tr. George 16 Yankovsky (MIR Publishers, Moscow, 1976). Sec. 12.1. These authors use the Euler method 17 and the principle of least potential energy in the introductory variational problem, particles 18 (e.g.beads) on a string. 19 40R. P. Feynman and A. R. Hibbs, Quantum Mechanics and Path (McGraw-Hill, 20 New York, 1965), Chap. 2 21 41R.P.Feynman, R.B. Leighton, and M.Sands, The Feynman Lectures on Physics (Addison 22 Wesley, Reading, MA, 1964), Vol. 1, Chaps. 26, 27 23 42O.C.Zienkiewicz and K. Morgan, Finite Elements and Approximation, John Wiley and 24 Sons, New York, 1983 or A. Stahel, Calculus of variations and Finite elements, Chap. 4, 25 2002, . 26 43Simple example of the Ritz method - calculation of the capacity of two conductors in the 27 form of a cylinder condenser is in Feynman Ref. 17 28 44D. J. Searles and E.I. von Nagy-Felsobuki: “Numerical experiments in quantum physics: 29 Finite-element method“, Am. J. Phys. 56(5), 444-448 (1988). This article establishes the fact 30 that the finite-element method can achieve the same order of accuracy more easily than the 31 better-known Numerov–Cooley method. 32 45P. Beckmann, A History of Pi (Dorset Press, New York, 1989), Chap. 14.