logo

Hamiltonian Equations Derived from Variational Calculus and Euler-Lagrange Equation 📂Partial Differential Equations

Hamiltonian Equations Derived from Variational Calculus and Euler-Lagrange Equation

  • For variables x and p, when emphasizing that they are variables in partial differential equations, they are denoted in regular font $x,p \in \mathbb{R}^{n}$, and when emphasizing as a function of $s$, they are denoted in bold $\mathbf{x}, \mathbf{p} \in \mathbb{R}^{n}$. Similarly, v is denoted in regular font $v \in \mathbb{R}^{n}$ to emphasize it as a variable, and in bold $\mathbf{v} \in \mathbb{R}^{n}$ to emphasize it as a function.

There are two methods to derive Hamilton’s equations. One is by finding the characteristic equation of the Hamilton-Jacobi equation, and the other is the method introduced in this article, which is derived from the Euler-Lagrange equation.

Definition1

Let’s say $\mathbf{x}(\cdot)\in \mathcal{A}$ is a stationary point of the action $I$. Then, based on the definition of the stationary point, $\mathbf{x}(\cdot)$ satisfies the following Euler-Lagrange equation.

$$ -\dfrac{d}{ds}D_{v} L\big( \dot{\mathbf{x}}(s), \mathbf{x}(s)\big)+D_{x}L\big( \dot{\mathbf{x}}(s), \mathbf{x}(s)\big)=0 \quad (0\le s \le t) $$

Let’s define $\mathbf{p}$ as follows.

$$ \begin{equation} \mathbf{p}(s) := D_{v}L\big( \dot{\mathbf{x}}(s), \mathbf{x}(s)\big) \quad (0 \le s \le t) \label{eq1} \end{equation} $$

$\mathbf{p}$ is referred to as the generalized momentum with respect to position $\mathbf{x}(s)$ and velocity $\dot{\mathbf{x}}(s)$.

And let’s assume that for all $p, x \in \mathbb{R}^n$, there exists a unique $v=\mathbf{v}(p,x) \in \mathbb{R}^n$ that satisfies $p=D_{v}L(v,x)$ and assume it as $v\in C^\infty$. Then, the Hamiltonian $H$ related to Lagrangian $L$ is defined as follows.

$$ H(p,x):=p \cdot \mathbf{v}(p,x) - L(\mathbf{v}(p,x), x) \quad (p,x\in \mathbb{R}^n) $$

Explanation

In classical mechanics, the Lagrangian is defined as the difference between kinetic energy and potential energy.

$$ L = T - V = \dfrac{1}{2}mv^{2} + V(x) $$

Given the calculation of $\mathbf{p}$, it is natural to call it generalized momentum as follows.

$$ \mathbf{p} = D_{v}L = \dfrac{d}{dv} \left( \dfrac{1}{2}mv^{2} + V(x) \right) = mv = p $$

In physics, the Hamiltonian specifically refers to the total energy, which is the sum of kinetic energy and potential energy. Therefore, the result of the theorem introduced below, ’the mapping $s \mapsto H\big( \mathbf{p}(s), \mathbf{x}(s)\big)$ is constant’, means that the total energy does not change over time, in other words, the total energy is conserved.

Also, the theorem below tells us that n second-order ordinary differential equations (Euler-Lagrange equations about $\mathbf{x}(s)$) can be expressed as 2n first-order ordinary differential equations (Hamilton’s equations about $\mathbf{p}(s)$ and $\mathbf{x}(s)$). It goes without saying that solving first-order differential equations is easier than solving second-order differential equations no matter how many there are.

Theorem

Functions $\mathbf{x}(\cdot)$ and $\mathbf{p}(\cdot)$ satisfy Hamilton’s equations.

$$ \begin{cases} \dot{\mathbf{x}}(s)=D_{p}H\big( \mathbf{p}(s), \mathbf{x}(s) \big) \\ \dot{\mathbf{p}}(s) = -D_{x}H \big( \mathbf{p}(s), \mathbf{x}(s) \big) \end{cases} \quad (0 \le s \le t) $$

Furthermore, the mapping $s \mapsto H\big( \mathbf{p}(s), \mathbf{x}(s)\big)$ is a constant function.

Proof

  • Part 1.

    Since $v$ is assumed to be a solution that satisfies $\eqref{eq1}$, the following holds.

    $$ \begin{equation} \dot{\mathbf{x}}(s)=\mathbf{v}\big( \mathbf{p}(s), \mathbf{x}(s) \big) \label{eq2} \end{equation} $$

    And let’s say $\mathbf{v}(\cdot)=\big( v^1(\cdot), \cdots, v^n(\cdot) \big)$. For each $i=1, \dots, n$, $H_{x_{i}}$ is as follows by the chain rule.

    $$ \begin{align*} H_{x_{i}}(p,x) &= \dfrac{\partial H}{\partial x_{i}} \\ &= \dfrac{\partial }{\partial x_{i}} \left( p \cdot \mathbf{v}(p,x) - L(\mathbf{v}(p,x), x) \right) \\ &= \sum_{k=1}^{n}p_{k}v^{k}_{x_{i}}(p,x) - \sum_{k=1}^{}L_{v_{k}}\big( \mathbf{v}(p,x), x\big)v^{k}_{x_{i}}(p,x) - L_{x_{i}}\big( \mathbf{v}(p,x), x\big) \end{align*} $$

    However, because of the assumption $p=D_{v}L(v,x)$, we have $p_{k}=L_{v_{k}}(\mathbf{v}(p,x), x)$. Therefore, the first term and the second term in the above equation cancel out, resulting in the following.

    $$ H_{x_{i}}(p,x)= - L_{x_{i}}\big( \mathbf{v}(p,x), x\big) $$

    Furthermore, if we solve for $H_{p_{i}}$, it is as follows.

    $$ \begin{align*} H_{p_{i}}(p,x) &= \dfrac{\partial H}{\partial p_{i}} \\ &= \dfrac{\partial }{\partial p_{i}} \left( p \cdot \mathbf{v}(p,x) - L(\mathbf{v}(p,x), x) \right) \\ &= v^{i} (p,x) + \sum_{k=1}^{n} p_{k}v^k_{p_{i}}(p,x) -\sum_{k=1}^{n} L_{v_{k}}(\mathbf{v}(p,x), x)v^{k}_{p_{i}}(p,x) \\ &= v^{i} (p,x) + \sum_{k=1}^{n} p_{k}v^k_{p_{i}}(p,x) -\sum_{k=1}^{n} p_{k} v^{k}_{p_{i}}(p,x) \\ &= v^{i} (p,x) \end{align*} $$

    Now, if we solve for $H_{x_{i}}\big( \mathbf{p}(s), \mathbf{x}(s) \big)$, it is as follows.

    $$ \begin{align*} H_{x_{i}}\big( \mathbf{p}(s), \mathbf{x}(s) \big) &= -L_{x_{i}}\big( \mathbf{v}(\mathbf{p}(s), \mathbf{x}(s) ), \mathbf{x}(s) \big) \\ &= -L_{x_{i}} \big( \dot{\mathbf{x}}(s), \mathbf{x}(s) \big) \\ &= -\dfrac{d}{ds}L_{v_{i}}\big( \dot {\mathbf{x}}(s), \mathbf{x}(s) \big) \\ &= -\dot{p}^i(s) \end{align*} $$

    The second equality holds because of $\eqref{eq2}$, the third because of the Euler-Lagrange equation, and the last one because of $\eqref{eq1}$. Therefore, the following is obtained.

    $$ \begin{equation} -D_{x}H \big( \mathbf{p}(s), \mathbf{x}(s)\big)=-\dot{\mathbf{p}}(s) \quad (0 \le s \le t) \label{eq3} \end{equation} $$

    Furthermore, if we solve for $H_{p_{i}}\big( \mathbf{p}(s), \mathbf{x}(s) \big)$, it is as follows.

    $$ \begin{align*} H_{p_{i}}\big( \mathbf{p}(s), \mathbf{x}(s) \big) &= v^i\big( \mathbf{p}(s), \mathbf{x}(s) \big) \\ &= \dot{x}^i(s) \end{align*} $$

    Therefore, the following is obtained.

    $$ \begin{equation} D_{p}H\big( \mathbf{p}(s), \mathbf{x}(s) \big)=\dot{\mathbf{x}}(s) \quad (0 \le s \le t) \label{eq4} \end{equation} $$

    Hence, organizing $\eqref{eq3}, \eqref{eq4}$ results in the following.

    $$ \begin{cases} \dot{\mathbf{x}}(s)=D_{p}H\big( \mathbf{p}(s), \mathbf{x}(s) \big) \\ \dot{\mathbf{p}}(s) = -D_{x}H \big( \mathbf{p}(s), \mathbf{x}(s) \big) \end{cases} \quad (0 \le s \le t) $$

  • Part 2. $H$ is independent of $s$

    $$ \begin{align*} \dfrac{d}{ds}H\big( \mathbf{p}(s), \mathbf{x}(s) \big) &= \sum_{i=1}^n H_{p_{i}}\big( \mathbf{p}(s), \mathbf{x}(s) \big)\dot{p}^i(s) + \sum_{i=1}^n H_{x_{i}} \big( \mathbf{p}(s), \mathbf{x}(s) \big) \dot {x}^i(s)) \\ &= \sum_{i=1}^n\dot{x}^i(s) \dot{p}^i(s) - \sum_{i=1}^n\dot{p}^i(s)\dot{x}^i(s) \\ &= 0 \end{align*} $$

    The second equality holds according to $\eqref{eq3}, \eqref{eq4}$.


  1. Lawrence C. Evans, Partial Differential Equations (2nd Edition, 2010), p118-119 ↩︎