Reformulating classical mechanics through the elegant principles of stationary action, energy minimization, and phase space flow.
Rather than analyzing forces vectorially, Lagrangian mechanics reformulates physics in terms of scalar energy. By defining the Lagrangian ($L$) as kinetic minus potential energy, we state that physical systems follow paths that extremize the total Action ($S$).
These Euler-Lagrange equations yield the equations of motion for any generalized coordinate ($q_i$) and velocity ($\dot{q}_i$), eliminating constraint forces natively.
Similar to how a ray of light finds the path that minimizes travel time (Fermat's Principle), a physical object moves along the path that makes its cumulative "action" stationary.
Hamiltonian mechanics shifts the description from generalized velocity to **generalized momentum** ($p_i = \partial L / \partial \dot{q}_i$). The **Hamiltonian** ($H$) represents the total energy ($T + V$).
These first-order differential equations map the system's state onto a **Phase Space** grid of position vs. momentum. The evolution trace forms loops showing conserved energy curves.
Phase space acts like an incompressible fluid. As a system evolves, any volume of phase space coordinates remains constant in time, conserving state information.
Adding a second coordinates axis introduces coupling. In a double pendulum, the Euler-Lagrange equations produce highly non-linear differential dynamics that are extremely sensitive to initial states, generating **deterministic chaos**.
Even with exact equations, the system's long-term motion is unpredictable. The simulation below uses a 4th-order Runge-Kutta (RK4) integrator to calculate coordinate evolution in real time.
In chaotic systems, tiny discrepancies—like a rounded digit in starting values—grow exponentially, leading to entirely distinct long-term trajectories.