# Formulating the correct least action expression

I am trying to understand how, for a given physical system it is possible to come up with the correct expression for the lagrangian and thence the least action formulation from which the governing equations can be derived by application of the euler lagrange equation. From what I have seen so far (and I may be mistaken) this seems to involve some intelligent guesswork. So I conclude as follows :

- the lagrangian (or if not the lagrangian then the least action) must be chosen so that it is gauge invariant

- the lagrangian should contain terms like (dx/dt) squared for single particles where x represents phase space and correspondingly for a field ∅, with terms in d∅/dt squared

- for relativistic systems the lagrangian (or the least action?) should also be lorenz invariant

Then through a process of experimentation the lagrangian and corresponding least action can be found.

This is my understanding so far and I am asking if this (ie any of the above) is correct.

Many thanks

Matterwave