# How do I show that there exists variational/action principle for a given classical system?

We see variational principles coming into play in different places such as Classical Mechanics (Hamilton's principle which gives rise to the Euler-Lagrange equations), Optics (in the form of Fermat's principle) and even General Relativity (we get Einstein's equation from the Einstein-Hilbert action). However, how do we explain this very principle, i.e., more mathematically, I want to ask the following:

If I am given a set of generalized positions and velocities, say, $\{q_{i}, \dot{q}_{i}\}$, which describes a classical system with known dynamics (equations of motion), then, how do I rigorously show that there always exists an action functional $A$, where $$A ~=~ \int L(q_{i}, \dot{q}_{i})dt,$$ such that $\delta A = 0$ gives the correct equations of motion and trajectory of the system?

I presume historically, the motivation came from Optics: i.e., light rays travel along a path where $S = \int_{A}^{B} n ds$ is minimized (or at least stationary). (Here, $ds$ is the differential element along the path). I don't mind some symplectic geometry talk if that is needed at all.

-

I) Not all equations of motion (eom) are variational. A famous example is the self-dual five-form in type IIB superstring theory. In classical point mechanics, frictional forces typically lead to non-variational problems.

II) Consider for instance $n$ variable $q^i$ and $n$ eoms,

$$\tag{1} E_i~\approx~ 0, \qquad i~\in~\{1, \ldots, n\}.$$

A simplified version of OP's problem (v3) is the following:

Does there exist an action $$\tag{2} S[q] ~=~\int{\rm d}t~L$$ such that the Euler-Lagrange derivatives $$\tag{3} \frac{\delta S}{\delta q^i}~=~E_i$$ precisely become the given $E_i$-functions?

The above restricted problem is relatively easy to answer once and for all, because one may differentiate the known $E_i$-functions to arrive at a set of consistency conditions. Let us for simplicity assume that the functions $E_i=E_i(q)$ do not involve generalized velocities $\dot{q}^i$, accelerations $\ddot{q}^i$, and so forth. Then we may assume that the Lagrangian $L$ does not depend on time derivatives of $q^i$ as well. So the question becomes if

$$\tag{4} \frac{\partial L}{\partial q^i}~=~E_i ?$$

We can collect the information of the eoms in a one-form

$$\tag{5} E~:=~E_i ~{\rm d}q^i.$$

The question rewrites as

$$\tag{6} {\rm d}L~=~E?$$

Hence the Lagrangian $L$ exists if $E$ is an exact one-form.

III) However, the above discussion is in many ways oversimplified. The eoms (1) do not have a unique form! E.g. one may multiply the given $E_i$-functions with an invertible $q$-dependent matrix $A^i{}_j$ such that the eoms (1) equivalently read

$$\tag{7} \sum_{i=1}^n E_i A^i{}_j~\approx~ 0.$$

Or perhaps the system variables $q^i$ should be viewed as a subsystem of a larger system with more dynamical or auxiliary variables?

Ultimately, the main question is whether the eoms have an action principle or not; the particular form of the eoms (that the Euler-Lagrange equations spit out) is not important in this context.

This opens up a lot of possibilities, and it can be very difficult to systematically find an action principle; or conversely, to prove a no-go theorem that a given set of eoms is not variational.

-