The one-dimensional simple harmonic oscillator (SHO) is an ideal single example for seeing the full conceptual progression of classical mechanics. The system is a mass $m$ attached to a spring of force constant $k$, moving along a line with coordinate $x$, with potential energy $V(x)=\frac{1}{2}kx^2$ and $\omega=\sqrt{\frac{k}{m}}$. Every formalism must yield the same motion:

\[x(t)=A\cos(\omega t+\phi)\] \[x(t)=C_1\cos\omega t+C_2\sin\omega t\]
Conceptual Shift 1
Force-first view $\rightarrow$ constraint-aware view: D’Alembert’s virtual-work filter removes constraint forces by restricting attention to allowed virtual displacements.

From Force to Action

Newtonian mechanics: Force produces acceleration
The force law $F=-kx$ inserted into $F=m\ddot x$ gives
$$ m\ddot{x}+kx=0 $$ $$ \ddot{x}+\omega^2x=0 $$ $$ x(t)=C_1\cos\omega t+C_2\sin\omega t $$
Logic: Force $\rightarrow$ Acceleration $\rightarrow$ Motion.
D’Alembert’s principle: Dynamics as virtual work
Rewrite Newton’s law as $F-m\ddot x=0$ and test it against an allowed virtual displacement $\delta x$:
$$ (F-m\ddot{x})\delta x=0 $$
With $F=-kx$,
$$ (-kx-m\ddot{x})\delta x=0 $$
Since $\delta x$ is arbitrary for allowed motion here, the factor must vanish:
$$ m\ddot{x}+kx=0 $$
Logic: Force law $\rightarrow$ allowed virtual displacement $\rightarrow$ equation of motion. In constrained systems this step removes constraint forces automatically.
Conceptual Shift 2
Force laws $\rightarrow$ energy structure: dynamics is encoded by $L=T-V$ and extracted by the Euler–Lagrange operator.
Lagrangian mechanics: Motion from $L=T-V$
$$ T=\frac{1}{2}m\dot{x}^2 $$ $$ V=\frac{1}{2}kx^2 $$ $$ L=T-V=\frac{1}{2}m\dot{x}^2-\frac{1}{2}kx^2 $$ $$ \frac{d}{dt}\left(\frac{\partial L}{\partial \dot{x}}\right)-\frac{\partial L}{\partial x}=0 $$ $$ \frac{\partial L}{\partial \dot{x}}=m\dot{x}, \qquad \frac{\partial L}{\partial x}=-kx $$ $$ m\ddot{x}+kx=0 $$
Logic: energies $\rightarrow$ $L$ $\rightarrow$ Euler–Lagrange equation $\rightarrow$ motion.
Conceptual Shift 3
Local equations $\rightarrow$ global path principle: the physical trajectory is the one that makes the action stationary.
Hamilton’s principle: Stationary action
$$ S=\int_{t_1}^{t_2}L\,dt = \int_{t_1}^{t_2}\left(\frac{1}{2}m\dot{x}^2-\frac{1}{2}kx^2\right)\,dt $$ $$ \delta S=\int_{t_1}^{t_2}\left(m\dot{x}\,\delta\dot{x}-kx\,\delta x\right)\,dt $$ $$ \delta S = -\int_{t_1}^{t_2}(m\ddot{x}+kx)\,\delta x\,dt $$ $$ \delta S=0 \quad\Rightarrow\quad m\ddot{x}+kx=0 $$
Logic: compare nearby paths $\rightarrow$ stationary action $\rightarrow$ Euler–Lagrange equation.
Conceptual Shift 4
Configuration space $\rightarrow$ phase space: replace velocity by conjugate momentum via a Legendre transform and view dynamics as a flow on $(x,p)$.

From Phase Space to Generators

Hamiltonian mechanics: Legendre transform and Hamilton’s equations
$$ p=\frac{\partial L}{\partial \dot{x}}=m\dot{x}, \qquad \dot{x}=\frac{p}{m} $$ $$ H=p\dot{x}-L=\frac{p^2}{2m}+\frac{1}{2}kx^2=\frac{p^2}{2m}+\frac{1}{2}m\omega^2x^2 $$ $$ \dot{x}=\frac{\partial H}{\partial p}=\frac{p}{m}, \qquad \dot{p}=-\frac{\partial H}{\partial x}=-kx=-m\omega^2x $$
Logic: $(x,\dot x)$ $\rightarrow$ $(x,p)$ and flow in phase space.
Phase-space orbit: geometry of motion
$$ E=\frac{p^2}{2m}+\frac{1}{2}kx^2 $$ $$ \frac{p^2}{2mE}+\frac{kx^2}{2E}=1 $$
The trajectory in phase space is a closed ellipse, turning oscillation into geometry.
Conceptual Shift 5
Hard equations $\rightarrow$ smart variables: canonical transformations choose coordinates where the Hamiltonian and the motion simplify drastically.
Canonical transformation: action–angle variables
$$ x=\sqrt{\frac{2J}{m\omega}}\sin\theta, \qquad p=\sqrt{2m\omega J}\cos\theta $$ $$ H=\frac{p^2}{2m}+\frac{1}{2}m\omega^2x^2=\omega J $$ $$ \dot{\theta}=\frac{\partial H}{\partial J}=\omega, \qquad \dot{J}=-\frac{\partial H}{\partial \theta}=0 $$ $$ J=\text{constant}, \qquad \theta=\omega t+\theta_0 $$ $$ x(t)=\sqrt{\frac{2J}{m\omega}}\sin(\omega t+\theta_0) $$
In $(J,\theta)$ the oscillator becomes almost trivial: one constant and one uniformly advancing angle.
Conceptual Shift 6
Integrate ODEs $\rightarrow$ solve one PDE: Hamilton–Jacobi replaces trajectories by an action function that generates the motion.
Generating function and Hamilton–Jacobi recovery of $x(t)$
$$ S(x,E,t)=W(x,E)-Et, \qquad p=\frac{\partial W}{\partial x} $$ $$ \frac{p^2}{2m}+\frac{1}{2}m\omega^2x^2=E \quad\Rightarrow\quad \frac{\partial W}{\partial x}=\sqrt{2mE-m^2\omega^2x^2} $$ $$ W(x,E)=\int \sqrt{2mE-m^2\omega^2x^2}\,dx $$ $$ \frac{\partial S}{\partial E}=\beta \quad\Rightarrow\quad \frac{\partial W}{\partial E}=t+\beta $$ $$ \frac{\partial W}{\partial E} = \int \frac{m\,dx}{\sqrt{2mE-m^2\omega^2x^2}} = \frac{1}{\omega}\sin^{-1}\left(\frac{x}{\sqrt{\frac{2E}{m\omega^2}}}\right) $$ $$ \sin^{-1}\left(\frac{x}{\sqrt{\frac{2E}{m\omega^2}}}\right)=\omega t+\omega\beta $$ $$ x(t)=\sqrt{\frac{2E}{m\omega^2}}\sin(\omega t+\phi), \qquad \phi=\omega\beta $$
The trajectory is extracted from the action function rather than obtained by directly integrating $\ddot x+\omega^2x=0$.
Conceptual Shift 7
Dynamics $\rightarrow$ algebra of transformations: infinitesimal generators produce canonical flows, and Poisson brackets compute their action on any quantity.
Infinitesimal generators: motion as Hamiltonian-generated flow
$$ \delta x=\varepsilon \frac{\partial G}{\partial p}, \qquad \delta p=-\varepsilon \frac{\partial G}{\partial x} $$
Choosing $G=H$ produces time evolution over a small time step $\varepsilon$:
$$ \delta x=\varepsilon \frac{\partial H}{\partial p}=\varepsilon\dot{x}, \qquad \delta p=-\varepsilon \frac{\partial H}{\partial x}=\varepsilon\dot{p} $$ $$ H=\frac{p^2}{2m}+\frac{1}{2}m\omega^2x^2 \quad\Rightarrow\quad \delta x=\varepsilon\frac{p}{m}, \qquad \delta p=-\varepsilon m\omega^2x $$
Poisson brackets: the algebra of change
$$ \{f,g\}=\frac{\partial f}{\partial x}\frac{\partial g}{\partial p}-\frac{\partial f}{\partial p}\frac{\partial g}{\partial x} $$ $$ \frac{df}{dt}=\{f,H\}+\frac{\partial f}{\partial t} $$ $$ \dot{x}=\{x,H\}=\frac{\partial H}{\partial p}=\frac{p}{m} $$ $$ \dot{p}=\{p,H\}=-\frac{\partial H}{\partial x}=-m\omega^2x $$ $$ \ddot{x}+\omega^2x=0 $$
Brackets unify equations of motion with symmetry-generation: “how $f$ changes under the flow generated by $H$”.
Conservation: time-translation symmetry implies $E$ is constant
$$ \frac{dH}{dt}=\{H,H\}+\frac{\partial H}{\partial t} $$ $$ \{H,H\}=0, \qquad \frac{\partial H}{\partial t}=0 \quad\Rightarrow\quad \frac{dH}{dt}=0 $$ $$ H=E=\text{constant} $$ $$ \frac{p^2}{2m}+\frac{1}{2}m\omega^2x^2=E $$
Symmetry $\rightarrow$ conserved quantity: time-translation invariance $\rightarrow$ energy conservation.
All stages, one invariant physics
Each formalism reorganizes the same SHO into a new “language”: forces, virtual work, energies, action, phase-space flow, canonical simplification, action-as-generator, and finally bracket algebra. The physical trajectory remains $x(t)=A\cos(\omega t+\phi)$, but the meaning of “solving the problem” progressively shifts from computing $\ddot x$ to identifying structure, symmetries, and generators.
Stage Starting idea Mathematical object Main output
Newton Force causes acceleration F=m ẍ ẍ+ω²x=0
D’Alembert Virtual work filter (F-m ẍ)δx=0 same equation
Lagrange Energy structure L=T−V Euler–Lagrange → same equation
Hamilton principle Stationary action δS=0 same equation
Hamilton Phase-space dynamics H=p²/2m + ½mω²x² Hamilton’s equations
Phase space Geometry of motion energy contour ellipse in (x,p)
Canonical map Better variables (x,p)→(J,θ) J const, θ=ωt+θ₀
Generating function One-function control S or W p=∂W/∂x
Hamilton–Jacobi Action solves motion H(x,∂S/∂x)+∂S/∂t=0 x(t) recovered
Generator view Motion as flow G=H δf=ε{f,H}
Poisson bracket Algebra of change {f,g} ḟ={f,H}+∂f/∂t
Conservation Symmetry → constant {H,H}=0 E constant