<?xml version="1.0" encoding="UTF-8"?>

<record version="1" id="1066">
 <title>Hamiltonian form of Lagrange's equation</title>
 <name>HamiltonianFormOfLagrangesEquation</name>
 <created>2026-08-19 23:07:46</created>
 <modified>2026-08-19 23:07:46</modified>
 <type>Definition</type>
 <creator id="1" name="bloftin"/>
 <modifier id="1" name="bloftin"/>
 <author id="1" name="bloftin"/>
 <classification>
	<category scheme="pacs" code="45."/>
 </classification>
 <preamble>% this is the default PhysicsLibrary preamble.  as your knowledge
% of TeX increases, you will probably want to edit this, but
% it should be fine as is for beginners.

% almost certainly you want these
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{amsfonts}

% used for TeXing text within eps files
%\usepackage{psfrag}
% need this for including graphics (\includegraphics)
%\usepackage{graphicx}
% for neatly defining theorems and propositions
%\usepackage{amsthm}
% making logically defined graphics
%\usepackage{xypic}

% there are many more packages, add them here as you need them

% define commands here</preamble>
 <content>\subsection*{Modern conventions}
We use generalized coordinates $q_i$, generalized velocities $\dot q_i$, and
for a natural mechanical system the Lagrangian
\[
L(q,\dot q,t)=T(q,\dot q,t)-V(q,t).
\]
The canonical momenta are
\[
p_i=\frac{\partial L}{\partial \dot q_i}.
\]
When the Legendre transform is regular, the Hamiltonian is
\[
H(q,p,t)=\sum_{i=1}^{n} p_i\dot q_i-L,
\]
with the velocities expressed in terms of $(q,p,t)$.

If generalized nonconservative forces are present, they are denoted by
$Q_i^{\mathrm{nc}}$. Then Hamilton's equations take the form
\[
\dot q_i=\frac{\partial H}{\partial p_i},
\qquad
\dot p_i=-\frac{\partial H}{\partial q_i}+Q_i^{\mathrm{nc}}.
\]
In the conservative case $Q_i^{\mathrm{nc}}=0$.

\subsection*{Relation with Lagrange's equations}
Start from the Euler--Lagrange equations with nonconservative generalized
forces,
\[
\frac{d}{dt}\frac{\partial L}{\partial \dot q_i}-\frac{\partial L}{\partial q_i}
=Q_i^{\mathrm{nc}}.
\]
Because $p_i=\partial L/\partial \dot q_i$, these become
\[
\dot p_i-\frac{\partial L}{\partial q_i}=Q_i^{\mathrm{nc}}.
\tag{1}
\]
Now differentiate the Hamiltonian,
\[
dH=\sum_i \dot q_i\,dp_i-\sum_i \frac{\partial L}{\partial q_i}\,dq_i-
\frac{\partial L}{\partial t}\,dt.
\]
Therefore
\[
\frac{\partial H}{\partial p_i}=\dot q_i,
\qquad
\frac{\partial H}{\partial q_i}=-\frac{\partial L}{\partial q_i}.
\tag{2}
\]
Combining (1) and (2) yields Hamilton's equations
\[
\dot q_i=\frac{\partial H}{\partial p_i},
\qquad
\dot p_i=-\frac{\partial H}{\partial q_i}+Q_i^{\mathrm{nc}}.
\tag{3}
\]

\subsection*{Autonomous natural systems}
If the coordinate transformation is time-independent and
\[
L=T(q,\dot q)-V(q),
\]
then the Hamiltonian coincides with the total energy,
\[
H=T+V.
\]
This is the standard case behind many of Byerly's examples, even though he
originally formulated the discussion in terms of a momentum-version of the
kinetic energy alone.

\subsection*{Interpretation}
Hamilton's equations replace $n$ second-order Euler--Lagrange equations by
$2n$ first-order equations in phase-space variables $(q_i,p_i)$. They are not
usually computationally shorter for elementary problems, but they are the
natural entrance to canonical transformations, phase space, Poisson brackets,
and modern analytical mechanics.

\section*{Modern notation references}
The notation and terminology in this modernized transcription follow standard
analytical mechanics conventions, especially:
\begin{enumerate}
\item H. Goldstein, C. Poole, and J. Safko, \emph{Classical Mechanics}, 3rd ed., Addison--Wesley, 2002.
\item C. Lanczos, \emph{The Variational Principles of Mechanics}, 4th ed., Dover, 1986.
\item J. R. Taylor, \emph{Classical Mechanics}, University Science Books, 2005.
\end{enumerate}

\section*{Source}
This article is a modernized restatement of the corresponding portion of
William Elwood Byerly, \emph{An Introduction to the Use of Generalized
Co\"ordinates in Mechanics and Physics}, Ginn and Company, 1916, Chapter II.
The 1916 source work is in the public domain in the United States.</content>
</record>
