# 11.1: Lagrangian and Hamiltonian

- Page ID
- 19317

Consider a process which converts energy from one form to another. We are interested in how some quantity evolves during the energy conversion process, and we call this quantity the generalized path, \(y(t)\). For simplicity, we consider only the case where this path has one independent variable \(t\) and one dependent variable \(y\). In this chapter, \(t\) represents time, but it can also represent position or another independent variable. These ideas generalize directly to situations with multiple independent and dependent variables [163] [164], but the multiple variable problem requires more involved mathematics. The units of generalized path depend on the energy conversion process under consideration. In the mass spring example of Sec. 11.4, it represents position of a mass. In the capacitor inductor example of Sec. 11.5, it represents the charge built up on the plates of the capacitor. Aside from the energy conversion process under consideration, assume that no other energy conversion processes occur, even though this situation is unlikely. The system goes from having all energy in the first form to having all energy in the second form following the path \(y(t)\).

Define the Lagrangian \(\mathcal{L}\) as the difference between the first and second forms of energy under consideration. The Lagrangian is a function of \(t\), \(y\), and \(\frac{dy}{dt}\), and it has the units of joules.

\[\mathcal{L} \left(t, y, \frac{dy}{dt} \right) = \text{(First form of energy) - (Second form of energy)}\]

At any time, the total energy of the system is the sum. Define the Hamiltonian \(H\), also in joules, as the total energy.

\[H \left(t, y, \frac{dy}{dt} \right) = \text{(First form of energy) + (Second form of energy)}\]

Some forms of energy cannot be described by a Lagrangian of the form \(\mathcal{L} \left(t, y, \frac{dy}{dt} \right)\) and instead require a Lagrangian of the form

\[\mathcal{L} \left(t, y, \frac{dy}{dt}, \frac{d^2y}{dt^2}, \frac{d^3y}{dt^3}, ... \right).\]

[163, p. 56]. Such forms of energy will not be considered here. Energy is conserved in any energy conversion process. Conservation of energy can be expressed as

\[\frac{dH}{dt} = \frac{\partial H}{\partial t} = 0.\]

Derivatives of the Lagrangian will be useful in the discussion below. Define the generalized potential as the partial derivative of the Lagrangian with respect to the path, \( \frac{\partial \mathcal{L}}{\partial y} \). The units of the generalized potential depend on the units of the path. More specifically, the units of the generalized potential are joules divided by the units of the path. Note that generalized potential and potential energy are different ideas. Potential energy has units of joules while the units of generalized potential vary. Some authors use the term potential as a synonym for voltage, but this definition of generalized potential is more broad. For more information on the distinction between potential, generalized potential, and potential energy see Appendix C.

Define the generalized momentum \(\mathbb{M}\) as the partial derivative of the Lagrangian with respect to the time derivative of the path.

\[ \mathbb{M} = \frac{\partial \mathcal{L}}{\partial \left( \frac{dy}{dt} \right)}. \]

Many authors use the variable \(p\) for generalized momentum. However, \(\mathbb{M}\) will be used here because the variable \(p\) is already too overloaded. Define the generalized capacity as the ratio of the generalized path to the generalized potential.

\[\text{Generalized capacity} = \frac{\text{Generalized path}} {\text{Generalized potential}}\]

Capacity is also discussed in Appendix C.