The transition between the Hamiltonian and Lagrangian formalisms in mechanicsMechanics can be accomplished by means of the Hamilton-JacobiHamilton-Jacobi theory.
Consider for example a classical statistical ensemble on a phase space $(x,p)$ defined by:
A.A. The (initial) state of this ensemble is defined by a distribution function $f(x_0,p_0)$ satisfying the normalization condition:
$\displaystyle{\int f(x_0,p_0) dx_0dp_0 = 1}$$$\displaystyle{\int f(x_0,p_0) dx_0dp_0 = 1}$$
($(x_0,p_0)$ are the initial conditions)
B.B. The time evolution is governed by the Hamiltonian function $H(x,p, t)$.
According to the Hamilton-Jacobi theory, there exists Hamilton-Jacobi phase function $S(x_0, x_1, t_0, t_1)$ satisfying the Hamilton-Jacobi equation:
$\displaystyle{\frac{\partial S}{\partial t}+H\left(x_1,\frac{\partial S}{\partial x_1}, t\right) = 0}$$$\displaystyle{\frac{\partial S}{\partial t}+H\left(x_1,\frac{\partial S}{\partial x_1}, t\right) = 0}$$
(where $(x_1,p_1)$ are the coordinates and momenta at time $t$)
The momenta can be derived from the Hamilton-Jacobi phase function:
$\displaystyle{p_i = \frac{\partial S}{\partial x_i}}$$$\displaystyle{p_i = \frac{\partial S}{\partial x_i}}$$
The problem of expressing the state of the system in terms of the initial and final coordinates is rendered to a problem of transformation of probability distributions. We can define the state of the system in the initial and final coordinates as:
$\displaystyle{F_t(x_0, x_1) = f\left(x_0,\frac{\partial S}{\partial x_1}(x_0, x_1, t) \right)}$$$\displaystyle{F_t(x_0, x_1) = f\left(x_0,\frac{\partial S}{\partial x_1}(x_0, x_1, t) \right)}$$
The trasnsformationtransformation Jacobian is given by:
$ \displaystyle{dx_0 dp_0 = \frac{\partial^2 S}{\partial x_0\partial x_1}}dx_0 dx_1 $$$ \displaystyle{dx_0 dp_0 = \frac{\partial^2 S}{\partial x_0\partial x_1}}dx_0 dx_1 $$
And the normalization condition:
$\displaystyle{\int F_t(x_0, x_1) \frac{\partial^2 S}{\partial x_0\partial x_1}(x_0, x_1, t)dx_0dx_1 = 1}$$$\displaystyle{\int F_t(x_0, x_1) \frac{\partial^2 S}{\partial x_0\partial x_1}(x_0, x_1, t)dx_0dx_1 = 1}$$
In the general case, the joint distribution $F_t(x_0, x_1)$ will not be separable