Back

Lagrangian Sandbox

Analytical mechanics in action. Pick a system and its Euler-Lagrange equations, derived from L=TVL=T-V, are integrated by RK4 (the verified shared engine). The left panel animates the mechanism; the right is the phase portrait (q,q˙)(q,\dot q). The readouts are the conserved quantities Noether's theorem guarantees: the Hamiltonian, because the Lagrangian has no explicit time dependence, and the angular momentum whenever the potential is rotationally symmetric, which the Kepler and gravity-free spring obey but the gravity-loaded pendulum does not. Watch the energy readout sit still while a chaotic double pendulum thrashes.

Figure 1. A Lagrangian system animated beside its phase portrait, with the Noether-conserved quantities. Method: closed-form Euler-Lagrange right-hand sides, integrated by the shared RK4 engine.
system
gravity g9.81
amplitude1.40
speed1.00

WHAT TO TRY

  • Vary each control and watch the rail readouts respond.
  • Compare the diagnostic plot against the live scene.