Simple Harmonic Oscillator: Conservative Dynamics & Phase Space Orbits
1. Core Principles & Theoretical Framework
2. Mathematical Formulation & Algorithmic Pipeline
Coupled first-order state-space system and mechanical energy invariant:
3. Numerical Mechanics & Implementation Logic
- Coupled Decomposition: Decompose the 2nd-order ODE into two coupled 1st-order equations.
- Euler-Cromer Stepping: Update velocity $v_{n+1} = v_n - \omega^2 x_n h$; then update position $x_{n+1} = x_n + v_{n+1} h$.
- Energy Monitoring: Calculate and log $E_n = \frac{1}{2}m v_n^2 + \frac{1}{2}k x_n^2$ at each step to verify stability.
4. Relevant Computational Practice Exercises
- David Morin, "Introduction to Classical Mechanics", Cambridge University Press (2008).
- Mark Newman, "Computational Physics", University of Michigan (2013).