pub fn rk2<F>( f: F, t0: f64, y0: Vec<f64>, t_end: f64, dt: f64, ) -> Vec<(f64, Vec<f64>)>where F: Fn(f64, &[f64]) -> Vec<f64>,
Runge-Kutta 2nd order (Heun’s method).