# 12. The Hamilton-Jacobi Equation

Michael Fowler

## Back to Configuration Space…

We’ve established that the action, regarded as a function of its coordinate endpoints and time, satisfies

$\partial S\left({q}_{i},t\right)/\partial t+H\left(q,p,t\right)=0,$

and at the same time ${p}_{i}=\partial S\left({q}_{i},t\right)/\partial {q}_{i},$ so $S\left({q}_{i},t\right)$ obeys the first-order differential equation

$\frac{\partial S}{\partial t}+H\left({q}_{1},\dots ,{q}_{s};\frac{\partial S}{\partial {q}_{1}},\dots ,\frac{\partial S}{\partial {q}_{s}};t\right)=0.$

This is the Hamilton-Jacobi equation.

Notice that we’re now back in configuration space!

For example, the Hamilton-Jacobi equation for the simple harmonic oscillator in one dimension is

$\frac{\partial S\left(x,t\right)}{\partial t}+\frac{1}{2}{x}^{2}+\frac{1}{2}{\left(\frac{\partial S\left(x,t\right)}{\partial x}\right)}^{2}=0.$

(Notice that this has some resemblance to the Schrödinger equation for the same system.)

If the Hamiltonian has no explicit time dependence $\partial S/\partial t+H\left(q,p\right)=0$ becomes just $\partial S/\partial t=-E,$ so the action has the form $S={S}_{0}\left(q\right)-Et$, and the Hamilton-Jacobi equation is

$H\left({q}_{1},\dots ,{q}_{s};\frac{\partial S}{\partial {q}_{1}},\dots ,\frac{\partial S}{\partial {q}_{s}}\right)=E.$

(This is analogous to the time independent Schrödinger equation for energy eigenstates.)

The Hamilton-Jacobi equation is therefore a third complete description of the dynamics, equivalent to Lagrange’s equations and to Hamilton’s equations.

Since $S$ only appears differentiated, if we have a solution to the equation, we can always add an arbitrary constant term, to give an equally valid solution.  For the general case, there will be a further $s$ constants of integration, so a complete solution has the form

$S\left({q}_{i},t\right)=f\left(t,{q}_{1},\dots ,{q}_{s};\text{ }\text{ }{\alpha }_{1},\dots ,{\alpha }_{s}\right)+A,$

the $\alpha \text{'s}$ and $A$ being the constants of integration.  We're not saying it's easy to solve this differential in general, just that we know how many constants of integration there must be in a final solution. Since the action determines the motion of the system completely, the constants of integration will be determined by the given initial and final coordinates, or, they could equally be regarded as functions of the initial coordinates and momenta (the initial momenta themselves being determined by the given initial and final coordinates).

## The Central Role of These Constants of Integration

To describe the time development of a dynamical system in the simplest way possible, it is desirable to find parameters that are constant or change in a simple way.  For example, motion in a spherically symmetric potential is described in terms of (constant) angular momentum components.

Now, these constant $\alpha \text{'s}$ are functions of the initial coordinates and momenta. Since they remain constant during the motion, they are evidently among the "variables" that describe the dynamical development in the simplest possible way.  So, we need to construct a canonical transformation from our current set of variables (final coordinates and momenta) to a new set of variables that includes these constant of integration "momenta".  (The corresponding canonical "positions" will then be given by differentiating the generating function with respect to the "momenta".)

How do we find the generating function for this transformation?  A clue comes from one we’ve already discussed: that corresponding to development in time, going from the initial set of variables to the final set, or back. That transformation was generated by the action itself, expressed in terms of the two sets of positions. That is, we allowed both ends of the action integral path to vary, and wrote the action as a function of the final $\left(2\right)$ and initial $\left(1\right)$ endpoint variables and times:

$dS\left({q}_{i}^{\left(2\right)},\text{\hspace{0.17em}}\text{\hspace{0.17em}}{t}_{2},\text{\hspace{0.17em}}\text{\hspace{0.17em}}{q}_{i}^{\left(1\right)},\text{ }\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}{t}_{1}\right)=\sum _{i}{p}_{i}^{\left(2\right)}d{q}_{i}^{\left(2\right)}-{H}^{\left(2\right)}d{t}_{2}-\sum _{i}{p}_{i}^{\left(1\right)}d{q}_{i}^{\left(1\right)}+{H}^{\left(1\right)}d{t}_{1}.$

In the present section, the final endpoint positions are denoted simply by $t,{q}_{1},\dots ,{q}_{s}$ these are the same as the earlier ${t}_{2},{q}_{1}^{\left(2\right)},\dots ,{q}_{s}^{\left(2\right)}$ .  Explicitly, we're writing

Compare this expression for the action with the formal expression we just derived from the Hamilton Jacobi equation,

$S\left({q}_{1},\dots ,{q}_{s},t\right)=f\left({q}_{1},\dots ,{q}_{s},t;\text{ }\text{ }{\alpha }_{1},\dots ,{\alpha }_{s}\right)+A.$

These two expressions for $S$ have just the same form: the action is expressed as a function of the endpoint position variables, plus another $s$ variables needed to determine the motion uniquely.  This time, instead of the original position variables, though, the second set of variables is these constants of integration, the ${\alpha }_{i}$ 's.

Now, just as we showed the action generated the transformation (either way) between the initial set of coordinates and momenta and the final set, it will also generate a canonical transformation from the final set of coordinates and momenta to another canonical set, having the $\alpha$ 's as the new "momenta".    We'll label the new "coordinates" (the canonical conjugates of the $\alpha$ 's) ${\beta }_{1},\dots ,{\beta }_{s}$ .

Taking then the action (neglecting the constant $A$ which does nothing) $S=f\left(t,{q}_{1},\dots ,{q}_{s};\text{ }\text{ }{\alpha }_{1},\dots ,{\alpha }_{s}\right)$ as the generating function, it depends on the old coordinates ${q}_{i}$ and the new momenta ${\alpha }_{i}$.  This is the same set of variables—old coordinates and new momenta—as those of the (previously discussed) generating function $\Phi \left(q,P,t\right).$

Recall

$d\Phi \left(q,P,t\right)=pdq+QdP+\left({H}^{\prime }-H\right)dt$,

so here

$df\left({q}_{i},{\alpha }_{i},t\right)={p}_{i}d{q}_{i}+{\beta }_{i}d{\alpha }_{i}+\left({H}^{\prime }-H\right)dt$,

and

${p}_{i}=\partial f/\partial {q}_{i},\text{ }{\beta }_{i}=\partial f/\partial {\alpha }_{i},\text{ }{H}^{\prime }=H+\partial f/\partial t.$

This defines the new "coordinates" ${\beta }_{i}$, and ensures that the transformation is canonical.

To find the new Hamiltonian ${H}^{\prime }$, we need to find $\partial f/\partial t$ and add it to $H.$

But

$S\left({q}_{i},t\right)=f\left(t,{q}_{1},\dots ,{q}_{s};\text{ }\text{ }{\alpha }_{1},\dots ,{\alpha }_{s}\right)+A,$

where $A$ is just a constant, so

$\partial f/\partial \text{ }t=\partial S/\partial \text{\hspace{0.17em}}t.$

The first equation in this section was

$\partial S/\partial t+H\left(q,p,t\right)=0,$

so the new Hamiltonian

${H}^{\prime }=H+\partial f/\partial t=H+\partial S/\partial t=0.$

We have made a canonical transformation that has led to a zero Hamiltonian!

What does that mean?  It means that the neither the new momenta nor the new coordinates vary in time:

${\stackrel{˙}{\alpha }}_{i}=\left[H,{\alpha }_{i}\right]=0,\text{ }{\stackrel{˙}{\beta }}_{i}=\left[H,{\beta }_{i}\right]=0$.

(The fact that all momenta and coordinates are fixed in this representation does not mean that the system doesn’t move—as will become evident in the following simple example, the original coordinates are functions of these new (nonvarying!) variables and time.)

The $s$ equations $\partial f/\partial {\alpha }_{i}={\beta }_{i}$ can then be used to find the ${q}_{i}$ as functions of ${\alpha }_{i},{\beta }_{i},t$. To see how all this works, it is necessary to work through an example.

### A Simple Example of the Hamilton-Jacobi Equation: Motion Under Gravity

The Hamiltonian for motion under gravity in a vertical plane is

$H=\frac{1}{2m}\left({p}_{x}^{2}+{p}_{z}^{2}\right)+mgz$

so the Hamilton-Jacobi equation is

$\frac{1}{2m}\left({\left(\frac{\partial S\left(x,z,t\right)}{\partial x}\right)}^{2}+{\left(\frac{\partial S\left(x,z,t\right)}{\partial z}\right)}^{2}\right)+mgz+\frac{\partial S\left(x,z,t\right)}{\partial t}=0$

First, this Hamiltonian has no explicit time dependence (gravity isn't changing!), so from $\partial S/\partial t+H\left(q,p\right)=0=\partial S/\partial t+E,$ we can replace the last term in the equation by $-E.$

### A Simple Separation of Variables

Since the potential energy term depends only on $z,$ the equation is solvable using separation of variables. To see this works, try

$S\left(x,z,t\right)={W}_{x}\left(x\right)+{W}_{z}\left(z\right)-Et.$

Putting this form into the equation, the resulting first term depends only on the variable $x,$ the second plus third depend only on $z$, the last term is just the constant $-E.$ A function depending only on $x$ can only equal a function independent of $x$ if both are constants, similarly for $z.$

Labeling the constants ${\alpha }_{x},{\alpha }_{z}$,

$\frac{1}{2m}{\left(\frac{d{W}_{x}\left(x\right)}{dx}\right)}^{2}={\alpha }_{x},\text{ }\frac{1}{2m}{\left(\frac{d{W}_{z}\left(z\right)}{dz}\right)}^{2}+mgz={\alpha }_{z},\text{ }E={\alpha }_{x}+{\alpha }_{z}.$

So these $\alpha$ 's are constants of the motion, they are our new "momenta" (although they have dimensions of energy).

Solving,

${W}_{x}\left(x\right)=±x\sqrt{2m{\alpha }_{x}},\text{ }{W}_{z}\left(z\right)=±\sqrt{\frac{8}{9m{g}^{2}}}{\left({\alpha }_{z}-mgz\right)}^{3/2}.$

(We could add in constants of integration, but adding constants to the action changes nothing.)

So now we have $S=S\left(x,z,{\alpha }_{x},{\alpha }_{z},t\right)={W}_{x}\left(x,{\alpha }_{x}\right)+{W}_{z}\left(z,{\alpha }_{z}\right)-\left({\alpha }_{x}+{\alpha }_{z}\right)t.$   This is our generating function (equivalent to $\Phi \left(q,P,t\right)$ ), in terms of old coordinates and these new “momenta”,  ${\alpha }_{x},{\alpha }_{z}.$ Following the Hamilton-Jacobi analysis, this action will generate a canonical transformation which reduces the Hamiltonian to zero, meaning that not only these new momenta stay constant, but so do their conjugate “coordinate” variables,

${\beta }_{x}=\frac{\partial S}{\partial {\alpha }_{x}}=±x\sqrt{\frac{m}{2{\alpha }_{x}}}-t,\text{ }{\beta }_{z}=\frac{\partial S}{\partial {\alpha }_{z}}=±\sqrt{\frac{2\left({\alpha }_{z}-mgz\right)}{m{g}^{2}}}-t$

These equations solve the problem. Rearranging, the trajectory is

$x=±\sqrt{\frac{2{\alpha }_{x}}{m}}\left({\beta }_{x}+t\right),\text{ }z=\frac{{\alpha }_{z}}{mg}-\frac{g}{2}{\left({\beta }_{z}+t\right)}^{2}.$

The four “constants of motion” ${\alpha }_{x},{\alpha }_{z},{\beta }_{x},{\beta }_{z}$ are uniquely fixed by the initial coordinates and velocities, and they parameterize the subsequent time evolution of the system.

## Separation of Variables for a Central Potential; Cyclic Variables

Landau presents in some details the separation of variables method for a $1/r$ potential, interesting here because it results in equations you’ve met before—those arising in the standard quantum treatment of the hydrogen atom.

How do we make any progress with these formidable differential equations? One possibility is that some coordinates are cyclic, meaning that ${q}_{1},$ say, does not appear explicitly in the Hamiltonian—for example, an angle variable in a spherically symmetric field.  Then we have immediately that the corresponding momentum, ${p}_{1}=\partial S/\partial {q}_{1}={\alpha }_{1},$ a constant.

The Hamiltonian for a central potential is:

$H=\frac{1}{2m}\left({p}_{r}^{2}+\frac{{p}_{\theta }^{2}}{{r}^{2}}+\frac{{p}_{\varphi }^{2}}{{r}^{2}{\mathrm{sin}}^{2}\theta }\right)+V\left(r\right).$

The Hamilton-Jacobi equation is therefore

$\frac{1}{2m}{\left(\frac{\partial {S}_{0}}{\partial r}\right)}^{2}+V\left(r\right)+\frac{1}{2m{r}^{2}}{\left(\frac{\partial {S}_{0}}{\partial \theta }\right)}^{2}+\frac{1}{2m{r}^{2}{\mathrm{sin}}^{2}\theta }{\left(\frac{\partial {S}_{0}}{\partial \varphi }\right)}^{2}=E.$

The first thing to note is that $\varphi$ is cyclic (it doesn't appear in the Hamiltonian), so we can immediately replace $\partial {S}_{0}/\partial \varphi$ with a constant ${p}_{\varphi }.$

Then we have:

$\frac{1}{2m}{\left(\frac{\partial {S}_{0}}{\partial r}\right)}^{2}+V\left(r\right)+\frac{1}{2m{r}^{2}}\left[{\left(\frac{\partial {S}_{0}}{\partial \theta }\right)}^{2}+\frac{{p}_{\varphi }^{2}}{{\mathrm{sin}}^{2}\theta }\right]=E.$

Now we seek a solution of the form

${S}_{0}\left(r,\theta ,\varphi \right)={S}_{r}\left(r\right)+{S}_{\theta }\left(\theta \right)+{p}_{\varphi }\varphi .$  Substituting in the equation, notice that the expression in square brackets will become

${\left(\frac{\partial {S}_{\theta }}{\partial \theta }\right)}^{2}+\frac{{p}_{\varphi }^{2}}{{\mathrm{sin}}^{2}\theta },$ independent of $r,$ but on multiplying the full equation by ${r}^{2}$, and staring at the result, we see that in fact it is purely a function of $r.$ This means that it’s a constant, say

${\left(\frac{\partial {S}_{\theta }}{\partial \theta }\right)}^{2}+\frac{{p}_{\varphi }^{2}}{{\mathrm{sin}}^{2}\theta }=\beta ,$  and then

$\frac{1}{2m}{\left(\frac{\partial {S}_{r}}{\partial r}\right)}^{2}+V\left(r\right)+\frac{\beta }{2m{r}^{2}}=E.$  These first-order equations can then be solved, at least numerically (and of course exactly for some cases).  Physically, $\beta ={\mathcal{\ell }}^{2},\text{ }\text{ }\mathcal{\ell }$ being the total angular momentum, and $E$ is the total energy.

Note: recall that in quantum mechanics, for example in solving the Schrödinger equation for the hydrogen atom, the separation of variables was achieved by writing the wave function as a product of functions belonging to the different variables.  Here we use a sum$—$remember that the action corresponds closely to the phase of a quantum mechanical system, so a sum of actions is analogous to a product of wave functions.