Lagrangian &
Hamiltonian Mechanics

Reformulating classical mechanics through the elegant principles of stationary action, energy minimization, and phase space flow.

Lagrangian Dynamics

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$).

$$L = T - V \quad \text{and} \quad \frac{d}{dt}\left(\frac{\partial L}{\partial \dot{q}_i}\right) - \frac{\partial L}{\partial q_i} = 0$$

These Euler-Lagrange equations yield the equations of motion for any generalized coordinate ($q_i$) and velocity ($\dot{q}_i$), eliminating constraint forces natively.

Real World Analogy

The Path of Least Resistance

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 & Phase Space

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$).

$$\dot{q}_i = \frac{\partial H}{\partial p_i}, \quad \dot{p}_i = -\frac{\partial H}{\partial q_i}$$

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.

Deep Concept

Liouville's Theorem

Phase space acts like an incompressible fluid. As a system evolves, any volume of phase space coordinates remains constant in time, conserving state information.

The Double Pendulum

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**.

$$\text{Sensitivity: } \Delta \theta(t) \sim e^{\lambda t} \Delta \theta(0)$$

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.

Scientific Milestone

The Butterfly Effect

In chaotic systems, tiny discrepancies—like a rounded digit in starting values—grow exponentially, leading to entirely distinct long-term trajectories.

Academic References