An Example of Lagrangian Mechanics
A planet is in motion around a central star. The star’s mass is so great in comparison to the planet that it is assumed not to move as the planet orbits around the star. In Cartesian coordinates, using Newtonian mechanics, the system would be described by the y and x components of the force vectors between the star and the planet. Alternatively, we can describe the system using the Lagrangian method, as follows.
First, generalized coordinates are defined. Instead of using Cartesian coordinates, we choose the distance between the planet and the star r, and the angle between the positive y axis and r, which here we call theta.