\subsection{Separation of Variables in the Hamilton-Jacobi Equation}

This subsection develops the method of separation of variables for the Hamilton--Jacobi equation, showing how the choice of coordinate system determines whether the PDE reduces to a set of ordinary quadratures.

\dfn{Separation of variables for the HJ equation}{
Suppose the Hamiltonian has no explicit time dependence and the Hamilton--Jacobi equation is $\mcH(q_1,\dots,q_n,\pdv{\mcS}{q_1},\dots,\pdv{\mcS}{q_n}) = E$. The time variable is separated by setting
\[
\mcS(q_1,\dots,q_n,t) = W(q_1,\dots,q_n) - Et,
\]
reducing the equation to $\mcH(q_1,\dots,q_n,\pdv{W}{q_1},\dots,\pdv{W}{q_n}) = E$. The HJ equation is said to be separable if the characteristic function $W$ can be written as an additive sum of single-variable functions, $W = W_1(q_1) + \cdots + W_n(q_n)$, where each $W_i$ depends on only one coordinate and a set of separation constants. If such a form exists, the solution reduces to evaluating $n$ independent quadratures.}

The first step is always the time-independent reduction. When $\pdv{\mcH}{t} = 0$, the Hamiltonian is conserved: $\mcH = E$. Substituting $\mcS = W(q_1,\dots,q_n) - Et$ into the full Hamilton--Jacobi equation, the time derivative contributes $-E$ and the equation becomes
\[
\mcH\!\left(q_1,\dots,q_n,\pdv{W}{q_1},\dots,\pdv{W}{q_n}\right) = E.
\]
This is the time-independent Hamilton--Jacobi equation. It contains $n$ partial derivatives of $W$ and determines the spatial part of the action. The total principal function is $\mcS = W - Et$ once $W$ is found.

\nt{The condition $\pdv{\mcH}{t} = 0$ is necessary for the simple time separation $\mcS = W - Et$. When the Hamiltonian depends explicitly on time, a different separation ansatz or a time-dependent canonical transformation is required. In the time-independent case, energy is a constant of motion and serves as the first separation constant.}

A particularly simple situation arises when one or more coordinates are cyclic. A generalized coordinate $q_i$ is cyclic, or ignorable, when it is absent from the Hamiltonian, which means $\pdv{\mcH}{q_i} = 0$. For such a coordinate, Hamilton's equation gives $\dot{p}_i = 0$, so the conjugate momentum is conserved. Within the Hamilton--Jacobi framework this translates directly: since $p_i = \pdv{\mcS}{q_i}$ and $\pdv{\mcH}{q_i} = 0$, the derivative
\[
\pdv{\mcS}{q_i} = \alpha_i
\]
is a constant. The contribution of the cyclic coordinate to the characteristic function is simply $W_i(q_i) = \alpha_i\,q_i$, which is immediately integrated.

When more than one coordinate is cyclic the separations are independent and each contributes a linear term to $W$. The remaining non-cyclic coordinates carry the entire nontrivial structure of the problem and must be separated by additional ansatze.

\thm{Additive separation theorem}{
Let the Hamiltonian take the form $\mcH = T + V$ where the kinetic energy $T$ is a quadratic form in the momenta and the potential energy $V$ is a sum of single-coordinate terms, $V = V_1(q_1) + \cdots + V_n(q_n)$. If the metric coefficients of the kinetic energy depend on only one coordinate each, then the time-independent Hamilton--Jacobi equation
\[
\mcH\!\left(q_1,\dots,q_n,\pdv{W}{q_1},\dots,\pdv{W}{q_n}\right) = E
\]
admits an additive separation ansatz
\[
W(q_1,\dots,q_n) = W_1(q_1) + W_2(q_2) + \cdots + W_n(q_n).
\]
Each function $W_i(q_i)$ satisfies an ordinary differential equation involving one separation constant, and the complete integral is obtained by evaluating $n$ quadratures.}

\nt{The additive separation theorem gives a sufficient condition for separability. A more general theory was developed by Levi-Civita and later refined by Stackel. The Levi-Civita separability conditions state that the Hamilton--Jacobi equation is separable in a given orthogonal coordinate system if and only if the Hamiltonian can be written as a sum, each term depending on only one coordinate and its conjugate momentum. Equivalently, the coefficient matrix of the quadratic kinetic-energy form, when written in these coordinates, must be a Stackel matrix. A Stackel matrix $S_{ij}$ is an $n\times n$ matrix whose $(i,j)$ entry depends only on the single coordinate $q_i$, and whose determinant is nonzero almost everywhere. The inverse of the Stackel matrix then relates the separation constants to the Hamiltonian components, producing the $n$ separated ODEs.}

Several standard orthogonal coordinate systems admit separable Hamilton--Jacobi equations for important classes of potentials. The gradient-squared operator takes different forms in each system, and the metric coefficients determine whether a given potential allows additive separation.

\mprop{Coordinate systems and separability for the HJ equation}{
The table below summarizes the gradient operator squared $|\nabla W|^2$ in commonly used orthogonal coordinate systems, and the classes of potentials that permit additive separation of the Hamilton--Jacobi equation with $\mcH = |\nabla W|^2/(2m) + V = E$:

\begin{center}
\begin{tabular}{p{3.5cm}p{5.2cm}p{4.8cm}}
\hline
\textbf{Coordinates} & \textbf{Gradient squared $|\nabla W|^2$} & \textbf{Separable potentials} \\
\hline
Cartesian $(x,y,z)$ & $(\pdv{W}{x})^2 + (\pdv{W}{y})^2 + (\pdv{W}{z})^2$ & $V = V_x(x) + V_y(y) + V_z(z)$ \\
Spherical $(r,\theta,\phi)$ & $(\pdv{W}{r})^2 + \frac{1}{r^2}(\pdv{W}{\theta})^2 + \frac{1}{r^2\sin^2\theta}(\pdv{W}{\phi})^2$ & $V = V(r)$ (central); $V(r,\theta)$ with $1/r^2$ separability \\
Cylindrical $(\rho,\phi,z)$ & $(\pdv{W}{\rho})^2 + \frac{1}{\rho^2}(\pdv{W}{\phi})^2 + (\pdv{W}{z})^2$ & $V = V_\rho(\rho) + V_z(z)$; $V(\rho)$ \\
Parabolic $(\xi,\eta,\phi)$ & \multicolumn{2}{p{10cm}}{$|\nabla W|^2 = \frac{1}{\xi^2+\eta^2}\bigl[(\xi^2+\eta^2)(\pdv{W}{\xi})^2 + (\xi^2+\eta^2)(\pdv{W}{\eta})^2 + \frac{\xi^2\eta^2}{\xi\eta}(\pdv{W}{\phi})^2\bigr]$, separable for Kepler $V=-k/r$ and Stark potentials} \\
\hline
\end{tabular}
\end{center}

Parabolic coordinates are defined by $\xi = \sqrt{r(r-z)}$ and $\eta = \sqrt{r+r_{\!z}}$, with $z = (\eta^2-\xi^2)/2$ and $r = (\xi^2+\eta^2)/2$. The Kepler potential $V = -k/r = -2k/(\xi^2+\eta^2)$ separates in parabolic coordinates because $1/r$ can be split into a function of $\xi$ plus a function of $\eta$ after substituting into the HJ equation and multiplying by the metric factor. Parabolic coordinates are especially useful for the hydrogen atom in quantum mechanics and for analyzing the Stark effect, where a uniform electric field along the $z$-axis is added to the Coulomb potential while preserving separability.

The additive separation ansatz $W(q_1,\dots,q_n) = W_1(q_1) + \cdots + W_n(q_n)$ is the standard starting point. Substituting this form into the Hamilton--Jacobi equation and multiplying by appropriate metric factors produces a sum, with each term depending on a single coordinate. The equation
\[
f_1(q_1, W_1') + f_2(q_2, W_2') + \cdots + f_n(q_n, W_n') = E
\]
can only hold for all values of the independent coordinates if each term is itself a constant. These constants are the separation constants $\alpha_1,\dots,\alpha_n$, constrained by one relation that fixes the total energy. The remaining equations are first-order ODEs for the individual functions $W_i(q_i)$, each solvable by quadrature.

\ex{Free particle in spherical coordinates}{
Consider a free particle of mass $m$ in spherical coordinates $(r,\theta,\phi)$. The Hamiltonian is $\mcH = p^2/(2m)$ and the time-independent HJ equation is $|\nabla W|^2/(2m) = E$, or equivalently
\[
\left(\der{W_r}{r}\right)^2 + \frac{1}{r^2}\left(\der{W_\theta}{\theta}\right)^2 + \frac{1}{r^2\sin^2\phi}\left(\der{W_\phi}{\phi}\right)^2 = 2mE.
\]
Using the ansatz $W = W_r(r) + W_\theta(\theta) + W_\phi(\phi)$, the coordinate $\phi$ is cyclic and $dW_\phi/d\phi = \alpha_\phi$. Multiply the equation by $r^2$:
\[
r^2\left(\der{W_r}{r}\right)^2 + \left(\der{W_\theta}{\theta}\right)^2 + \frac{\alpha_\phi^2}{\sin^2\theta} = 2mEr^2.
\]
The last two terms depend only on $\theta$ while the first and rightmost terms depend only on $r$. Equating both sides to a constant $\alpha^2$ gives
\[
\left(\der{W_\theta}{\theta}\right)^2 + \frac{\alpha_\phi^2}{\sin^2\theta} = \alpha^2,
\qquad
\der{W_r}{r} = \sqrt{2mE - \frac{\alpha^2}{r^2}}.
\]
Each equation integrates by quadrature, and $W_\phi(\phi) = \alpha_\phi\,\phi$. These three quadratures constitute the complete integral for the free particle in spherical coordinates.}

\qs{Separation for a particle in a uniform gravitational field}{
A particle of mass $m$ moves in the $xy$-plane under a uniform gravitational field $g$ acting in the negative $y$-direction. The Hamiltonian is
\[
\mcH = \frac{p_x^2 + p_y^2}{2m} + mgy.
\]

\begin{enumerate}[label=(\alph*)]
\item Write the time-independent Hamilton--Jacobi equation and apply the separation ansatz $\mcS = W_x(x) + W_y(y) - Et$. Show that $x$ is a cyclic coordinate and that $\der{W_x}{x} = \alpha_x$, a constant.
\item Find $\der{W_y}{y}$ in terms of the separation constants. Define the transverse energy $E_y = E - \alpha_x^2/(2m)$ and write the quadrature integral for $W_y(y)$.
\item A projectile of mass $m = 0.100\,\mathrm{kg}$ is launched from $y = 0$ with speed $v_0 = 25.0\,\mathrm{m/s}$ at angle $\theta_0 = 45.0^\circ$ above the horizontal. Take $g = 9.81\,\mathrm{m/s^2}$. Compute the $x$-momentum $p_x = m v_0\cos\theta_0$ and the transverse energy $E_y = \tfrac{1}{2}m v_0^2\sin^2\theta_0$ in SI units.
\end{enumerate}}

\sol \textbf{Part (a).} The time-independent Hamilton--Jacobi equation is obtained by setting $\mcH = E$. With the given Hamiltonian this reads
\[
\frac{1}{2m}\left[\left(\pdv{\mcS}{x}\right)^2 + \left(\pdv{\mcS}{y}\right)^2\right] + mgy = E.
\]
Substitute the separation ansatz $\mcS(x,y,t) = W_x(x) + W_y(y) - Et$. The spatial partial derivatives become ordinary derivatives: $\pdv{\mcS}{x} = \der{W_x}{x}$ and $\pdv{\mcS}{y} = \der{W_y}{y}$. Substituting gives
\[
\frac{1}{2m}\left(\der{W_x}{x}\right)^2 + \frac{1}{2m}\left(\der{W_y}{y}\right)^2 + mgy = E.
\]
Multiply both sides by $2m$:
\[
\left(\der{W_x}{x}\right)^2 + \left(\der{W_y}{y}\right)^2 + 2m^2gy = 2mE.
\]
The coordinate $x$ does not appear in the Hamiltonian, so $x$ is cyclic. The first term depends only on $x$ while the remaining terms depend only on $y$. Separating gives
\[
\left(\der{W_x}{x}\right)^2 = \alpha_x^2,
\]
where $\alpha_x$ is a separation constant. Therefore,
\[
\der{W_x}{x} = \alpha_x,
\]
which integrates to $W_x(x) = \alpha_x\,x$. The constant $\alpha_x$ is identified with the constant $x$-component of the canonical momentum.

\textbf{Part (b).} Substitute $(dW_x/dx)^2 = \alpha_x^2$ back into the HJ equation:
\[
\left(\der{W_y}{y}\right)^2 + 2m^2gy = 2mE - \alpha_x^2.
\]
Define the transverse energy $E_y = E - \alpha_x^2/(2m)$. Then $2mE - \alpha_x^2 = 2mE_y$, and the $y$-equation becomes
\[
\left(\der{W_y}{y}\right)^2 + 2m^2gy = 2mE_y.
\]
Solve for the derivative:
\[
\der{W_y}{y} = \pm\sqrt{2mE_y - 2m^2gy}.
\]
Factor $2m$ from the radicand:
\[
\der{W_y}{y} = \pm\sqrt{2m\left(E_y - mgy\right)}.
\]
The quadrature for $W_y(y)$ is
\[
W_y(y) = \pm\int\sqrt{2m\left(E_y - mgy\right)}\,dy.
\]

\textbf{Part (c).} The initial conditions specify mass $m = 0.100\,\mathrm{kg}$, launch speed $v_0 = 25.0\,\mathrm{m/s}$, and launch angle $\theta_0 = 45.0^\circ$. Compute the $x$-momentum:
\[
p_x = m v_0\cos\theta_0.
\]
Substitute the numerical values:
\[
p_x = (0.100)(25.0)\cos(45.0^\circ)\,\mathrm{kg\!\cdot\!m/s}.
\]
Since $\cos(45.0^\circ) = \sqrt{2}/2 \approx 0.7071$,
\[
p_x = (0.100)(25.0)(0.7071)\,\mathrm{kg\!\cdot\!m/s} = 1.77\,\mathrm{kg\!\cdot\!m/s}.
\]
The transverse energy is $E_y = \tfrac{1}{2}m v_0^2\sin^2\theta_0$. The vertical speed is
\[
v_{0y} = v_0\sin(45.0^\circ) = (25.0)(0.7071)\,\mathrm{m/s} = 17.68\,\mathrm{m/s}.
\]
Evaluate $E_y$:
\[
E_y = \tfrac{1}{2}(0.100)(25.0)^2(0.7071)^2\,\mathrm{J}.
\]
This gives
\[
E_y = \tfrac{1}{2}(0.100)(625)(0.500)\,\mathrm{J} = 15.6\,\mathrm{J}.
\]

Therefore,
\[
p_x = 1.77\,\mathrm{kg\!\cdot\!m/s},
\qquad
E_y = 15.6\,\mathrm{J}.
\]
}
