Lagrangian exists as the difference between kinetic and potential energy.
Lagrangian is found by the Italian mathematician in the year 1788.
Lagrangian represented by cartesian coordinates.
Hamiltonian is the mathematically sophisticated formulation of classical mechanics.
BASIC PRINCIPLES
This theorem states that the total kinetic energy of a rigid body of mass M is the kinetic energy of a particle of mass M that moves with the center of gravity of the body, plus the kinetic energy of the motion relative to the center of gravity of the body (as if it were fixed).
Now the kinetic energy of a system is given by T=12∑ipi˙qi (for example, 12mνν), and the hamiltonian (Equation 14.3. 6) is defined as H=∑ipi˙qi−L.
For a conservative system, L=T−V, and hence, for a conservative system, H=T+V.