1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

What is the difference between Langrangian, Hamiltonian and Newtonian Mechanics?

  1. Dec 19, 2011 #1
    What is the main difference between Langrangian, Hamiltonian, and Netwonian Mechanics in physics, and what are the most important uses of them?

    I'm currently a high school senior, with knowledge in calculus based physics, what would the prerequisites be in order for me to begin Langrangian and Hamiltonian Mechanics?

    I have general knowledge in Single and Multi-variable Calculus, and I'm starting Ordinary Differential Equations.
  2. jcsd
  3. Dec 19, 2011 #2
    Different ways of obtaining the equations of motion. Lagrangian/Hamiltonian is more "elegant", and I guess you can say "a different way of looking at mechanics".

    I'd say finish differential equations before you look into this, and also study numerical methods of integrating ODEs (Euler and Runge-Kutta) if you want to ever use L.M. for practical applications.
  4. Dec 19, 2011 #3
    That's a tall order, but in a nutshell:

    1. Newtonian mechanics develops equations of motion based on forces and acceleration as described by Newton's three laws.
    2. Lagrangian mechanics develops equations of motion by minimizing the integral of a function of a system's coordinates and time derivatives of those coordinates.
    3. Hamiltonian mechanics is a refinement of Lagrangian mechanics in which the time derivatives of a system's coordinates are replaced by "generalized momenta" (time derivatives of the system's Lagrangian).

    The three formulations are 100% equivalent, but one or the other may be more convenient to use, depending on the system you wish to describe. Generally, a set of 1-dimensional springs & masses is best approached with Newtonian mechanics. Anything else, best with one of the other formulations.

    You'll need a foundation in systems of ordinary differential equations in order to understand any of the formulations. It is best to have a good grounding in Newtonian mechanics before approaching Lagrangian or Hamiltonian mechanics; Lagrangian and Hamiltonian mechanics also require knowledge of partial differential equations and variational calculus, though variation calculus is often taught within advanced mechanics courses.

    You might try checking the Wikipedia articles on those topics. Also check for "action integral" and "principle of least action."
  5. Dec 20, 2011 #4
    I don't really agree with the last two posts regarding the math requirements.You can certainly begin to understand the basics of the Lagrangian/Hamiltonian formalism if you understand:partial derivatives,multivariate chain rule some very basic ODE's and strong Newtonian mechanics.
    Of course the more math you know the easier it will be and the more problems you can approach. A full course in PDEs or numerical analysis is not required though.
  6. Dec 21, 2011 #5
    He hasn't finished ODE class, which means at the moment he's probably studying first order ODEs in his math class, that's why I said finish that first. Lagrangian ODEs are 2nd order almost all the time.

    Also you need to study numerical techniques if you want to do more than 3 problems in L.M. because most of the time the solutions are not elementary or extremely hard to solve. You'll need to learn to use computers unless all you want is to stare at the ODEs. Also for nasty constrained systems or nonholonomic constrained systems youll get DAEs which are hard even for computers.
  7. Dec 21, 2011 #6

    D H

    User Avatar
    Staff Emeritus
    Science Advisor

    There are plenty of applications of classical physics that can only be expressed in terms of Newtonian mechanics. Finite element analysis, computational fluid dynamics, rockets, jets, cars, machinery, most anything subject to nonconservative forces.

    Where Lagrangian and Hamiltonian mechanics shine is in systems with constraint forces and torques, and of course as a prequel to quantum mechanics. The concept of force just doesn't carry over into quantum mechanics.
  8. Dec 22, 2011 #7
    Lagrangian techniques can apply to systems with non-conservative forces easily.
  9. Dec 22, 2011 #8
    Not so -- the formulations are entirely equivalent. Nonconservative forces are easily and routinely accommodated. See "Classical Mechanics" by H. Goldstein for a brief description of generalized or velocity-dependent potentials.
  10. Dec 22, 2011 #9

    D H

    User Avatar
    Staff Emeritus
    Science Advisor

    In theory, yes. In practice, no. There are many applications in engineering, meteorology, and other areas of applied classical physics where one has no choice but to use an F=ma type formulation. How are you going to express in Lagrangian/Hamiltonian form the forces and torques exerted by a rocket that fires intermittently based on the whims of a control system, the atmospheric drag on a complex-shaped vehicle as it moves through an atmosphere with seemingly random winds, the behavior of a hurricane as it moves over a mountainous Caribbean island?
  11. Dec 22, 2011 #10
    For that matter, how do you plan to use Newton's equations of motion to describe your control system? I think you may be confounding derivation of equations of motion with their solutions. In any case, compressible flows and other continuous systems are easily described in a Lagrangian formulation. See Goldstein's text, for example.
  12. Dec 23, 2011 #11
    Well, just like the choice of coordinate system (rectangular or polar? fixed or rotating?), there are situations where a Newtonian analysis yields the equations of motion more easily, and situations where a Lagrangian or Hamiltonian analysis works better. In practice a Newtonian analysis is limited by the analyst's ability to guess the forces acting on the system elements, whereas the Lagrangianist (is that a word?) "merely" has to enumerate the energies.

    Just as an example, consider a cylindrical tank of diameter D with rigid walls and a uniform flexible bottom, filled with water to a height H. Suppose the elastic parameters of the bottom are known, i.e. thickness, Young's modulus, Poisson ratio, boundary conditions, etc. Assuming the amplitude is small and therefore the resulting flow is a potential flow, what is the natural frequency of oscillation under gravity? In my view it is straightforward to write down the Lagrangian and to calculate the mass and spring terms (the coefficients of [itex]\frac{1}{2}\dot{x}^2[/itex] and [itex]\frac{1}{2}x^2[/itex] where x is the tank bottom coordinate). And though the problem can be solved in the Newtonian framework, one has to be fairly painstaking in computing and integrating the pressure distribution on the tank bottom, which varies with time and radial location. And since the water does not move at a uniform velocity, one has to be careful to compute the center-of-mass motion correctly. And in the Newtonian method one has to account for the distribution of inertia and elastic forces in the tank bottom, as well, while in the Lagrangian method one need merely know the elastic and kinetic energies of the bottom as a whole.

    On the other hand, I've had to do force accounting for aeropropulsive interactions on supersonic aircraft. It's a bear to do correctly using Newtonian mechanics -- but I can't conceive of how one would do it using Lagrangian methods. Only by estimating the force first and then using the method of virtual work can this be hammered into the Lagrangian method.

  13. Dec 23, 2011 #12

    D H

    User Avatar
    Staff Emeritus
    Science Advisor

    I fully understand the advantages of a Lagrangian or Hamiltonian formulation. They let one look at state as being something other than position and momentum, they naturally capture things such as constraints, and they are absolutely essential in quantum mechanics. However, that "merely" of yours is a big problem in many practical applications of classical physics.

    First of all, this is pretty much mandatory at this point.


    My degree is in physics, but I have been working as an engineer for thirty some years. One of the first things I had to do was to overcome that tendency toward oversimplification that physicists are wont to do.

    As for the question you asked, "how do you plan to use Newton's equations of motion to describe your control system," the answer is simple: simulate. The equations of motion describe the true behavior of the rocket (or airplane). The control system: You run that as-is as a part of the simulation. You don't describe the control system in terms of any equations of motion. The control system actuates effectors. The behaviors of those effectors is described in terms of the equations of motion, but the control system itself is not. The control system is what it is, nowadays typically a part of the flight software.
  14. Dec 23, 2011 #13
    In my case, my bachelor's and master's degrees are in mechanical engineering, and my doctorate is in theoretical physics. At the moment I'm a "rocket scientist" in Huntsville.

    For the last several years I've been helping to develop a system that is essentially a fluid-structure coupling damper for launch vehicles. So, amusing anecdote along these lines: I am the "analytical guy" on the team, which is to say, I write down the equations of motion and solve them. We also have a "CFD guy" and several "FEM guys". Now, the funny thing is, it was the FEM guys who first pointed out to us that there is a "virtual" fluid mass in the system which has to be included in the equations of motion, though they had no idea how to compute it. Once this was pointed out, it didn't take long (though longer than it should have) for me to write down the appropriate volume integral to use to evaluate the virtual mass. The FEM guys and myself both used the Lagrangian formulation to arrive at the equation of motion. However, the CFD guy is apparently uncomfortable with the Lagrangian method. So he insists on deriving the equations of motion using "first principles" Newtonian mechanics. And for the longest time he insisted that the virtual mass was not real, so he didn't need to include it in the equations of motion. Finally I started calling it the "radiative mass" and showing evidence from the test data reduction that the radiative mass was pretty much exactly as estimated. So eventually he started giving it lip service, but he is still clearly very foggy about how it shows up in the Newtonian method (it shows up as a contribution to the pressure distribution on the moving part of the damper). But since the mass that shows up in the Lagrangian is essentially just the volume integral of the dynamic pressure, divided by [itex]\frac{1}{2}\dot{x}^2[/itex], it almost literally falls out in the Lagrangian method.

    BTW I think his doctorate is in engineering, and not physics. My experience has been that it is engineers, and not physicists, who are wont to simplify things until they get to a system they understand. My approach has been to write down something I know is correct and then to figure out how to estimate the terms involved. Sometimes that means simplifications. Sometimes it means turning to test data to find empirical correlations. Sometimes it means writing down the correct Bessel function expansion for the fluid motion and then writing a code to compute the expansion coefficients for however many hundreds of terms are needed to achieve a desired level of accuracy. Only rarely does it involve a broom and a rug. ;-)

    But it's all good, right?

  15. Dec 23, 2011 #14
    I'm not sure we've given you a decent answer. Newtonian mechanics proceeds by identifying forces acting on masses and then applying F=dp/dt=ma and τ=dL/dt=Iα to find the accelerations of those masses. Lagrangian mechanics finds the equations of motions in terms of generalized coordinates and their time derivatives, by finding a functional called the Lagrangian [itex]L(q,\dot{q})=T-U[/itex], which is just the kinetic energy T minus the potential energy U written in terms of [itex]q[/itex] and [itex]\dot{q}[/itex]). The Lagrangian is then dropped into the Euler-Lagrange equation

    [itex]\frac{d}{dt}\frac{\partial L}{\partial \dot{q}}-\frac{\partial L}{\partial q}=0[/itex]

    to find the equations of motion.

    The Hamiltonian method is similar to the Lagrangian method, except that we write the dynamics in terms of a generalized coordinate and a momentum (instead of a velocity), using a functional called the Hamiltonian [itex]H(q,p)=T+U[/itex], and then we apply Hamilton's equations

    [itex]\dot{p}=-\frac{\partial H}{\partial q}[/itex]

    [itex]\dot{q}=\frac{\partial H}{\partial p}[/itex]

    To see how these work, consider the simple case of a mass connected to a spring which provides a restoring force [itex]F = -k x[/itex] that is proportional to the amount of spring stretch, "x".

    In Newtonian mechanics we write

    [itex]m \ddot{x}= -k x[/itex]

    In Lagrangian mechanics we write

    [itex]L = \frac{1}{2} m \dot{x}^2 - \frac{1}{2}k x^2[/itex]

    and the Euler-Lagrange equation gives

    [itex]\frac{d}{dt} m \dot{x} + k x = 0[/itex]

    which obviously gives the same result.

    For the Hamiltonian, you have to write the kinetic energy in terms of the momentum [itex]p=m\dot{x}[/itex], that is, [itex]T=p^2/2 m[/itex]. So

    [itex]H = \frac{p^2}{2 m} + \frac{1}{2}k x^2[/itex]

    and Hamilton's first equation gives

    [itex]\dot{p} = - k x[/itex]

    which again is the same equation of motion.

    Once you get the idea of each of these methods, you can start to discover the advantages and disadvantages of each. One of the primary advantages of the Lagrangian and Hamiltonian methods, for example, is that they work for "generalized" coordinates, not just displacements in Cartesian coordinates. The coordinate q can be an angle, for example, and [itex]\dot{q}[/itex] the associated angular velocity. Or q could be a volumetric displacement (by a piston, say) and [itex]\dot{q}[/itex] a volumetric flow rate.

    If you understand all the manipulations above, then you probably have enough math to get started. Note, however, that actually understanding where the Euler-Lagrange equations come from requires variational calculus, which is a bit beyond high-school calculus.

Share this great discussion with others via Reddit, Google+, Twitter, or Facebook