Structure and Interpretation of Classical Mechanics
groups.csail.mit.edu
groups.csail.mit.edu
In it, Sussman shows you how to:
* Write a Lagrangian
* Symbolically convert it into Lagrange's Equations
* Compile those into native code
* Numerically integrate the with an optimized numerical algorithm to get a path of motion.
And all of this, with beautiful, clean, concise, simple code.
A-fing-mazing.
The Lagrangian approach is kinda great. If you can describe the potential energy and the kinetic energy of a system as two functions of whatever variables, Lagrangian mechanics allows you to derive the differential equations that govern the evolution of that system for free.
There's absolutely zero fucking around with forces, torques, etc. to get yourself a set of equations with which to model system behavior. You do have to add one constraint equation for every constraint on the system, but this is way easier than trying to formulate a set of differential equations that just happens to satisfy an arbitrary set of constraints.
I don't know of a reason why Lagrangian mechanics would tie one to a particular algorithm or class of algorithm; pretty much no matter how you do it, if you're modeling a mechanical system, you're solving some differential equations in one way or another.
TL:DR; can't confirm at this time
However, they are cumbersome to work with for some complex, compound phenomena, such as friction.
[1] https://en.wikipedia.org/wiki/Lagrangian#Selected_fields