Definition B.2.1.
The Hamiltonian (\(H\)) in classical mechanics is a function representing the total energy of a system. It is expressed in terms of generalized coordinates (\(q_i\)) and conjugate momenta (\(p_i=\frac{\partial L}{\partial \dot{q}_i}\)). Unlike the Lagrangian (\(L=T-V\)), the Hamiltonian is the generator of time evolution in phase space.
General Definition: Derived via the Legendre transform of the Lagrangian:
\begin{equation*}
H(p,q,t) = \sum_i {p_i \dot{q}_i - L(q_i, \dot{q}_i, t) }
\end{equation*}
Common Case: For a simple system with kinetic energy \(T=\frac{p^2}{2m}\) and potential energy \(V(q)\text{:}\)
\begin{equation*}
H(q,p) = \frac{p^2}{2m} + V(q) .
\end{equation*}