Solve the equation of motion for the one-dimensional harmonic oscillator by the Hamilton-Jacobi method.
Now H = p²/2m + mω²q²/2 and the Hamilton-Jacobi equation is written
\frac{1}{2m}\left(\frac{\partial S}{\partial q}\right)^{2} + \frac{m \omega^{2} }{2} q^{2} +\frac{\partial S}{\partial t}=0. (9.26)
As in the free particle case, Eq. (9.26) is separable in the form
S = W(q) − αt (9.27)
where W obeys
\frac{1}{2m}\left(\frac{dW}{d q}\right)^{2} + \frac{m \omega^{2} }{2} q^{2}=\alpha. (9.28)
The positive constant α coincides with the constant value of the Hamiltonian (equal to the total energy, in the present case) inasmuch as dW/dq = ∂S/∂q = p. A solution to (9.28) is
W =\int{\sqrt{2m\alpha- m^{2}\omega^{2}q^{2}} dq} . (9.29)
As a consequence,
S(q, α, t) =\int{\sqrt{2m\alpha- m^{2}\omega^{2}q^{2}} dq- \alpha t}, (9.30)
and the solution of the equation of motion for q is obtained from
\beta= \frac{\partial S}{\partial \alpha}= m \int{\frac{dq}{\sqrt{2m\alpha- m^{2}\omega^{2}q^{2}}}-t} = \frac{1}{\omega} \sin^{-1} \left(\sqrt{\frac{m\omega^{2}}{2\alpha}}q\right)-t. (9.31)
Solving this equation for q we find, with δ = ωβ,
q(t) =\sqrt{\frac{2\alpha}{m\omega^{2}}} \sin \left(\omega t +\delta\right), (9.32)
which is the well-known general solution to the oscillator equation of motion.