Hi Michael,
I asked Kenny Erleben for advise on f(x) and g(x) and here is some of his response:
Kenny wrote:
f(x)
would be the free energy of the system that is the kinetic energy minus the potential energy
and
g(x) = c
would be a holonomic scleronomic constraint function
So how do you get from those f(x) and g(x) to our JMJt?
Kenny wrote:
Oh, pain:-) Define
L(t,x,v) = 1/2 m v(t)^T v(t) + 1/2 w(t)^T I(x(t)) w - m g h(x(t))
Solve the variational problem (Hamiltons principle)
delta S(t,x,v) = 0 subject to C(x(t)) = 0
where the total "free" energy is given as
S = int_0^T L(t,x,v) dt
and the scleronomic constraint is defined as
C(x) = h(x)
Using Lagrange multipliers we now solve for
delta S^prime = 0
where
S^prime = int_0^T L(t,x,v) - lambda C(x) dt
and we have
L^prime(x,v) = L(t,x,v) - lambda C(x)
Then the Euler-Lagrange equations are given by (this is hairy so trust me on this)
d_x L^prime - d_t ( d_v L^prime ) = 0
where d_x and d_v and d_t are partial derivatives wrt. x, v and t respectively. Any solution to the EL equations will be a first order minimizer to the functional S^\prime and that is all what you care about in physics, If you do the calculus and work the algebra you should get the formula answer you are looking for.
The first text book example is often to throw a single unconstrained particle through this machinery and then one will rederive Newtons second law of motion.
Kenny wrote:
The best source for it that I ever have read is the book variational mechanics by Cornelius Lanczos. If you don't not care about non-holonomic constraints then you can pick up a physics book such as Goldstein's analytical mechanics that will explain the ideas too. In our STAR paper we took a different approach (vectorial mechanics instead of variational mechanics) in deriving all this.
If you are not scared of math you can dig into some of the papers by Claude Lacoursiere, his PhD thesis might be a good place to start. I seem to remember that Claude explains these details quite well and detailed.
Does that help?
Erwin