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,pRnx,p \in \mathbb{R}^{n}, and when emphasizing as a function of ss, they are denoted in bold x,pRn\mathbf{x}, \mathbf{p} \in \mathbb{R}^{n}. Similarly, v is denoted in regular font vRnv \in \mathbb{R}^{n} to emphasize it as a variable, and in bold vRn\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 x()A\mathbf{x}(\cdot)\in \mathcal{A} is a stationary point of the action II. Then, based on the definition of the stationary point, x()\mathbf{x}(\cdot) satisfies the following Euler-Lagrange equation.

ddsDvL(x˙(s),x(s))+DxL(x˙(s),x(s))=0(0st) -\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 p\mathbf{p} as follows.

p(s):=DvL(x˙(s),x(s))(0st) \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}

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

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

H(p,x):=pv(p,x)L(v(p,x),x)(p,xRn) 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=TV=12mv2+V(x) L = T - V = \dfrac{1}{2}mv^{2} + V(x)

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

p=DvL=ddv(12mv2+V(x))=mv=p \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 sH(p(s),x(s))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 x(s)\mathbf{x}(s)) can be expressed as 2n first-order ordinary differential equations (Hamilton’s equations about p(s)\mathbf{p}(s) and x(s)\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 x()\mathbf{x}(\cdot) and p()\mathbf{p}(\cdot) satisfy Hamilton’s equations.

{x˙(s)=DpH(p(s),x(s))p˙(s)=DxH(p(s),x(s))(0st) \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 sH(p(s),x(s))s \mapsto H\big( \mathbf{p}(s), \mathbf{x}(s)\big) is a constant function.

Proof

  • Part 1.

    Since vv is assumed to be a solution that satisfies (eq1)\eqref{eq1}, the following holds.

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

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

    Hxi(p,x)=Hxi=xi(pv(p,x)L(v(p,x),x))=k=1npkvxik(p,x)k=1Lvk(v(p,x),x)vxik(p,x)Lxi(v(p,x),x) \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=DvL(v,x)p=D_{v}L(v,x), we have pk=Lvk(v(p,x),x)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.

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

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

    Hpi(p,x)=Hpi=pi(pv(p,x)L(v(p,x),x))=vi(p,x)+k=1npkvpik(p,x)k=1nLvk(v(p,x),x)vpik(p,x)=vi(p,x)+k=1npkvpik(p,x)k=1npkvpik(p,x)=vi(p,x) \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 Hxi(p(s),x(s))H_{x_{i}}\big( \mathbf{p}(s), \mathbf{x}(s) \big), it is as follows.

    Hxi(p(s),x(s))=Lxi(v(p(s),x(s)),x(s))=Lxi(x˙(s),x(s))=ddsLvi(x˙(s),x(s))=p˙i(s) \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 (eq2)\eqref{eq2}, the third because of the Euler-Lagrange equation, and the last one because of (eq1)\eqref{eq1}. Therefore, the following is obtained.

    DxH(p(s),x(s))=p˙(s)(0st) \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 Hpi(p(s),x(s))H_{p_{i}}\big( \mathbf{p}(s), \mathbf{x}(s) \big), it is as follows.

    Hpi(p(s),x(s))=vi(p(s),x(s))=x˙i(s) \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.

    DpH(p(s),x(s))=x˙(s)(0st) \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 (eq3),(eq4)\eqref{eq3}, \eqref{eq4} results in the following.

    {x˙(s)=DpH(p(s),x(s))p˙(s)=DxH(p(s),x(s))(0st) \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. HH is independent of ss

    ddsH(p(s),x(s))=i=1nHpi(p(s),x(s))p˙i(s)+i=1nHxi(p(s),x(s))x˙i(s))=i=1nx˙i(s)p˙i(s)i=1np˙i(s)x˙i(s)=0 \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 (eq3),(eq4)\eqref{eq3}, \eqref{eq4}.


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