Originally it was likely created to study constrained mechanical systems where you want to use some "custom convenient" variables to parametrize things instead of global x, y, z. Classical examples that you must have in mind include:lagrangian mechanics lectures by Michel van Biezen (2017) is a good starting point.

- compound Atwood machine. Here, we can use the coordinates as the heights of masses relative to the axles rather than absolute heights relative to the ground
- double pendulum, using two angles. The Lagrangian approach is simpler than using Newton's laws
- pendulum, use angle instead of x/y

- two-body problem, use the distance between the bodies

When doing lagrangian mechanics, we just lump together all generalized coordinates into a single vector $q (t):R→R_{n}$ that maps time to the full state:
where each component can be anything, either the x/y/z coordinates relative to the ground of different particles, or angles, or nay other crazy thing we want.

$q (t)=[q_{1}(t),q_{2}(t),q_{3}(t),...,q_{n}(t)]$

Then, the stationary action principle says that the actual path taken obeys the Euler-Lagrange equation:
This produces a system of partial differential equations with:

$∂q_{i}∂L(q (t),q ˙ (t),t) −dtd ∂q_{i}˙ ∂L(q (t),q ˙ (t),t) =0$

- $n$ equations
- $n$ unknown functions $q_{i}$
- at most second order derivatives of $q_{i}$. Those appear because of the chain rule on the second term.

The mixture of so many derivatives is a bit mind mending, so we can clarify them a bit further. At:
the $q_{i}$ is just identifying which argument of the Lagrangian we are differentiating by: the i-th according to the order of our definition of the Lagrangian. It is not the actual function, just a mnemonic.

$∂q_{i}∂L(q (t),q ˙ (t),t) $

Then at:

$dtd ∂q_{i}˙ ∂L(q (t),q ˙ (t),t) $

- the $∂q_{i}˙ ∂ $ part is just like the previous term, $q_{i}˙ $ just identifies the argument with index $n+i$ ($n$ because we have the $n$ non derivative arguments)
- after the partial derivative is taken and returns a new function $∂q_{i}˙ ∂L(q (t),q ˙ (t),t) $, then the multivariable chain rule comes in and expands everything into $2n+1$ terms

However, people later noticed that the Lagrangian had some nice properties related to Lie group continuous symmetries.

Basically it seems that the easiest way to come up with new quantum field theory models is to first find the Lagrangian, and then derive the equations of motion from them.

For every continuous symmetry in the system (modelled by a Lie group), there is a corresponding conservation law: local symmetries of the Lagrangian imply conserved currents.
Genius: Richard Feynman and Modern Physics by James Gleick (1994) chapter "The Best Path" mentions that Richard Feynman didn't like the Lagrangian mechanics approach when he started university at MIT, because he felt it was too magical. The reason is that the Lagrangian approach basically starts from the principle that "nature minimizes the action across time globally". This implies that things that will happen in the future are also taken into consideration when deciding what has to happen before them! Much like the lifeguard in the lifegard problem making global decisions about the future. However, chapter "Least Action in Quantum Mechanics" comments that Feynman later notice that this was indeed necessary while developping Wheeler-Feynman absorber theory into quantum electrodynamics, because they felt that it would make more sense to consider things that way while playing with ideas such as positrons are electrons travelling back in time. This is in contrast with Hamiltonian mechanics, where the idea of time moving foward is more directly present, e.g. as in the Schrödinger equation.

Furthermore, given the symmetry, we can calculate the derived conservation law, and vice versa.

And partly due to the above observations, it was noticed that the easiest way to describe the fundamental laws of particle physics and make calculations with them is to first formulate their Lagrangian somehow: why do symmetries such as SU(3), SU(2) and U(1) matter in particle physics?.

TODO advantages:

- https://physics.stackexchange.com/questions/254266/advantages-of-lagrangian-mechanics-over-newtonian-mechanics on Physics Stack Exchange, fucking closed question...
- https://www.quora.com/Why-was-Lagrangian-formalism-needed-in-the-presence-of-Newtonian-formalism
- https://www.researchgate.net/post/What_is_the_advantage_of_Lagrangian_formalism_over_Hamiltonian_formalism_in_QFT

Bibliography:

- http://www.physics.usu.edu/torre/6010_Fall_2010/Lectures.html Physics 6010 Classical Mechanics lecture notes by Charles Torre from Utah State University published on 2010,
- Classical physics only. The last lecture: http://www.physics.usu.edu/torre/6010_Fall_2010/Lectures/12.pdf mentions Lie algebra more or less briefly.

- http://www.damtp.cam.ac.uk/user/tong/dynamics/two.pdf by David Tong