Does anyone know if there is a function in xAct that can output the Hamiltonian density for a field given its Lagrangian density? As I mentioned in an earlier post, the Lagrangian density I'm working with is very long and complicated, so doing the Legandre transform by hand wouldn't be very feasible in this case.
In trying to find the Hamiltonian density, I also tried calculating the conjugate momentum through differentiation. But since I'm differentiating with respect to a "field derivative", neither the standard covariant derivative nor the VarD helped me much here.
Any help would be greatly appreciated! Thanks in advance! Thanks Jose for answer my previous question.