Direction fields, Euler/RK4 methods, and phase planes.
Simulates Initial Value Problems \(\frac{d\mathbf{y}}{dt} = \mathbf{f}(t, \mathbf{y}), \mathbf{y}(t_0) = \mathbf{y}_0\). Numerical time-stepping integrators: (1) Forward Euler: \(\mathbf{y}_{n+1} = \mathbf{y}_n + h\mathbf{f}(t_n, \mathbf{y}_n)\) (first-order \(\mathcal{O}(h)\)); (2) Runge-Kutta 4th Order (RK4): \(\mathbf{y}_{n+1} = \mathbf{y}_n + \frac{h}{6}(\mathbf{k}_1 + 2\mathbf{k}_2 + 2\mathbf{k}_3 + \mathbf{k}_4)\) (fourth-order \(\mathcal{O}(h^4)\)). 2nd-order nonlinear systems (Damped Pendulum, Lotka-Volterra Predator-Prey, Van der Pol oscillator) analyzed in 2D phase space \((x, \dot{x})\).
Initial Condition
| x | Euler y | RK4 y |
|---|