structural:scholar_edition, linguistic:voice_change, linguistic:paraphrasing
From Euler–Lagrange equation to Hamilton's equations

In phase space coordinates (p, q) {\displaystyle ({\boldsymbol {p}},{\boldsymbol {q}})}, the (n {\displaystyle n} -dimensional) Euler–Lagrange equation ∂ L ∂ q − d d t ∂ L ∂ q ˙ = 0 {\displaystyle {\frac {\partial {\mathcal {L}}}{\partial {\boldsymbol {q}}}}-{\frac {d}{dt}}{\frac {\partial {\mathcal {L}}}{\partial {\boldsymbol {\dot {q}}}}}=0} becomes Hamilton's equations in 2 n {\displaystyle 2n} dimensions

d q d t = ∂ H ∂ p, d p d t = − ∂ H ∂ q. {\displaystyle {\frac {\mathrm {d} {\boldsymbol {q}}}{\mathrm {d} t}}={\frac {\partial {\mathcal {H}}}{\partial {\boldsymbol {p}}}},\quad {\frac {\mathrm {d} {\boldsymbol {p}}}{\mathrm {d} t}}=-{\frac {\partial {\mathcal {H}}}{\partial {\boldsymbol {q}}}}.}

The Hamiltonian H (p, q) {\displaystyle {\mathcal {H}}({\boldsymbol {p}},{\boldsymbol {q}})} is the Legendre transform of the Lagrangian L (q, q ˙) {\displaystyle {\mathcal {L}}({\boldsymbol {q}},{\boldsymbol {\dot {q}}})}, thus one has

and thus

Besides, since p = ∂ L / ∂ q ˙ {\displaystyle {\boldsymbol {p}}=\partial {\mathcal {L}}/\partial {\boldsymbol {\dot {q}}}} the Euler-Lagrange equations yield d p / d t = ∂ L / ∂ q = − ∂ H / ∂ q. {\displaystyle \mathrm {d} {\boldsymbol {p}}/\mathrm {d} t=\partial {\mathcal {L}}/\partial {\boldsymbol {q}}=-\partial {\mathcal {H}}/\partial {\boldsymbol {q}}.}