by Nikolai V. Shokhirev

ABC Tutorials

Up: Physics

- Mechanics
- Hard-sphere dynamics
- MD Simulation
- Kinetics


All the presentation below are equivalent. The choice depends on the convenience and the simplicity of the equations of motion.

Lagrangian mechanics

The definition of the Lagrangian is


Here K is the kinetic energy and U is the potential energy. In the Cartesian coordinates


The dot denotes the time derivative.

Using the following transformation


the Lagrangian can be expressed in terms of the generalized coordinates q and their derivatives:


The generalized momentum pi corresponding to a generalized coordinate qi is


The generalized forces


The equations of motion in Lagrangian mechanics are Lagrange's equations:




Hamiltonian mechanics

The Hamiltonian is defined as


The Hamiltonian is the otal energy of the system as a function of the generalized coordinates and momentums (5).  The Hamilton equations of motion are written as follows:


Energy conservation

If the potential U does not directly depend on time


This conservation law is the advantage of the Hamiltonian presentation.

Cartesian coordinates

In the Cartesian coordinates both (7) and (9) reduce to the well-known equation of motion


Let us consider the example.

Spring pendulum

This is a spring-mass system in a uniform gravitational field along the z-axis

1. Cartesian coordinates


The kinetic and potential energies are


here g is the acceleration constant, k is the spring constant. The momentums (5) are simple


However, the forces are complex and inconvenient for calculations


2. Polar coordinates


The coordinates and velocities are defined as


Now the kinetic and potential energies are


The forces are much simpler now


The momentums are now more complex


3. Discussion

Despite of the complexity of Eq. (20) it is more suitable for the analysis of limiting cases. In particular, for a stiff spring,   


Only the equation for the angle is necessary, which can be obtained from the second components of (19, 20)


The analysis of small angles is also simpler in this coordinates.


  1. Lagrangian mechanics.
  2. Hamiltonian mechanics.


ABC Tutorials

Up: Physics

- Mechanics
- Hard-sphere dynamics
- MD Simulation
- Kinetics


Please e-mail me at


ABC Tutorials | Data Processing | Indirect Measurements | NMR Tutorials

Home | Resumé | |  Computing |  Links |  Publications

ŠNikolai V. Shokhirev, 2001-2009