A variational principle for Hamilton's equations Consider the functional
J[q(t),p(t)]=∫t0t1(H(q,p,t)+q⋅p˙−q˙⋅p)dt
of the 2n independent functions q1(t),…,qn(t), p1(t),…,pn(t). Show that the extremals of J satisfy Hamilton's equations with Hamiltonian H.