TITLE: What kind of Lagrangians can we have?
QUESTION [25 upvotes]: In any physics book I've read the Lagrangian is introuced as as a functional whose critical points govern the dynamics of the system. It is then usually shown that a finite collection of non-interacting particles has a Lagrangian $\frac{1}{2}(m_1\dot{x}_1^2 + \cdots + m_n \dot{x}_n^2)$. It is then generally argued that $L=T-U$. I feel like something is missing here. 
What exactly are the physical hypotheses that go into this? Can we have other forms of the Lagrangian? How do we know those are "right"? Do we always have to compare them to the form of the equations we derived previously? For example, the Lagrangian formalism seems to be justified usually in so far as it 'works' for a finite collection of particles. Then you can solve any dynamics problem involving a collection of particles.
I have been vague so let me try to be more precise in my question.
Is the principle of least action an experimental hypothesis? Is it always true that $L=T-U$? When we don't know what the Lagrangian is, do we have to just guess and hope it is compatible with the dynamical equations we had already? Or can we perhaps start with the ansatz of a Lagrangian in some cases?
I hope this is sufficiently precise.

REPLY [2 votes]: The Lagrangians in physics usually take the form $L=m\dot{x}^2/2+...$ (or $\mathcal{L}=(\partial \phi)^2/2+...$ in field theory), i.e. the velocity dependence is quadratic.
An important consequence of this form can be seen in the path integral formulation of quantum mechanics. The amplitude as a path integral in the phase space is $\int \mathcal{D}x \ \mathcal{D}p \ e^{i\int(p \ dx - H \ dt)}$ where the Hamlitonian $H$ is a function of $p, x$ and $t$. The thing is, this amplitude is in general NOT equal to the form we usually use $\int \mathcal{D}x \ e^{i\int L \ dt}$. The two forms are equal when $H$ depends on $p$ as $p^2$, i.e. when $L$ depends on $\dot{x}$ as $\dot{x}^2$. (the derivation can be found in Polchinski, Peskin etc., basically $e^{ip^2}$ will give a constant by Gaussian integration)
I am not sure if this is the reason that physical Lagrangian must take the form $L=m\dot{x}^2/2+...$, but at least I feel this shows some deep connection between the Lagrangian formulation and Hamiltonian formulation in quantum theory.