pub fn simpson<F: Fn(f64) -> f64>(f: F, a: f64, b: f64, n: usize) -> f64
Simpson’s rule integration of f over [a, b] with n subintervals (n must be even).