I've been studying the calculus of variations and optimal control theory, and I often read about the "Hamiltonian formalism".
I've been hearing about "Hamiltonian mechanics" for a while, and I don't really understand what the advantage is of Hamiltonian mechanics compared to Lagrangian mechanics.
It always seemed to me that the Hamiltonian is just a different way of formulating the Lagrangian, without any real advantage. This is ofcourse because of my ignorance, because if that were really true, it wouldn't be used.
However, now I'm reading a book that sort of suggests that the Hamiltonian is merely a "mnemonic", in order to better remember the optimality conditions for a variational problem.
The book defines the variational problem and the corresponding optimal control problem:
Then it states the optimality conditions in terms of the Lagrangian:
And finally, it states that conditions on the Hamiltonian are effectively mnemonics, to easier remember the conditions on the Lagrangian:
Is my interpretation correct that the Hamiltonian is merely a mnemonic for the Lagrangian? This seems absurd to me.


