# softmatter:Lagrangian

From NSDL Materials Digital Library Wiki

The Lagrangian of a dynamical system is defined as the Kinetic Energy *T* minus the Potential Energy *U*, or

- .

To acquire equations of motion for a dynamical system, one simply computes the Lagrange Equation,

for each generalized coordinate q_{i}. When q_{i} = r_{i} (i.e. the generalized coordinates are simply the Cartesian coordinates), Lagrange's equations reduce to Newton's
second law.

The *n* generalized coordinates are the coordinates associated with the *n* degrees of freedom of the system. For example,

- The rotation angles θ
_{1}and θ_{2}in a double pendulum system - The 3N spatial coordinates for N particles in three-dimensional space
- The 6N spatial plus rotational coordinates for N rigid bodies in three-dimensional space
- The θ and φ of a particle confined to the surface of a sphere