# Are first Integrals the same in Lagrangian and Hamiltonian formalism?

A first integral in Lagrangian formalism is defined as a function which is constant along the solutions $$(q,\dot{q})$$ where $$q$$ are the generalized coordinates; while a first integral in Hamiltonian formalism is a function which is constant along the solutions $$(q,p)$$ where $$p$$ are the generalized momenta.

Do first integrals in Lagrangian formalism remain first integral in Hamiltonian formalism and viceversa? i.e do functions constant along solutions of Lagrange's Equations $$(q,\dot{q}$$ remain constant along solutions of Hamilton's Equations $$(q,p)$$?

At first guess I'd say yes, but I can't exactly think why; maybe it's just enough to apply the transformation rules?

$$q(q,\dot{q}) = q\\ p(q,\dot{q}) = \frac{\partial L(q,\dot{q})}{\partial\dot{q}}$$

It's just a doubt I had while studying the different versions of Noether's theorem in the Lagrangian and Hamiltonian case, since we are using very different coordinates.

• Possible duplicate: physics.stackexchange.com/q/352393/2451 – Qmechanic Aug 19 '19 at 12:52
• Unfortunately it goes beyond what I studied, I'm not sure I fully understand the contents of the answers. Hopefully someone is able to explain in more elementary terms. – Roberto Gargiulo Aug 19 '19 at 17:02