# Finding the Hamilton-Jacobi Equation

Suppose that we are given an extremal problem:

$$\begin{cases}J(x)=\int_{t_0}^{t_1} L(t,x,x') dt \rightarrow inf\\ x(t_0)=x_0 \\ x(t_1)=x_1 \end{cases}$$

And we are asked to find the corresponding Hamilton-Jacobi equation.

I know that the Hamilton-Jacobi equation is of the form:$H + \frac{\partial S}{\partial t}= 0$

My questions are:

1. In order to find the Hamiltonian in the past, I have used a process to transform the Euler-Lagrange function into a Hamiltonian system. In the case of this problem, would it be required for me to transform the Jacobi equation into a Hamiltonian system?:

$$-\frac{d}{dt}(Ah' + Ch) +Ch' + Bh = 0\\A=L_{x'x'}\\B=L_{x'x}\\C=L_{xx}\\\vec{h}$$

1. I am also not exactly sure how to go about formulating the Hamilton principal function either. If someone could give me a better idea of the process on how to approach this problem that would be great. Thanks.

To make formulas a little bit cleaner, at some points I'll use the notation $f_t$ to represent the value $f(t)$ of a function $f$ at $t$. It's convenient to consider the $J$ as both a function of $x$ and the upper limit of the integral $t$: $$J(x,t)=\int_{t_0}^tL(x_\tau,x'_\tau,\tau)d\tau.$$ Define the conjugate momentum to be $$p_t=\frac{\partial L}{\partial x'_t}(x_t,x'_t,t)$$ From here, $x'_t$ can be determined as an implicit function $x'_t=\theta(x_t,p_t,t)$. The Hamiltonian is defined to be the Legendre transform $$H(x_t,p_t,t)=\theta(x_t,p_t,t)\,p_t- L\left(x_t,\,\theta(x_t,p_t,t),\,t\right).$$ Now notice that \begin{align} L(x_t,x'_t,t) &= \frac{d}{dt}J(x,t) = \frac{\partial J}{\partial t}(x,t) + x'_t\frac{\partial J}{\partial x}(x,t). \end{align}
For a stationary point $x$ of $J(-,t)$ it is satisfied that $\partial J/\partial x=\partial L/\partial x'_t=p_t$. Subtituting in the last equation and then in the definition of $H$ we get: $$H(x_t,\frac{\partial J}{\partial x},t)+\frac{\partial J}{\partial t}(x,t) = 0,$$ the Hamilton-Jacobi equation.