pub fn panel_midpoints(a: f64, b: f64, n: usize) -> (Vec<f64>, f64)
The midpoints of n equal panels of [a, b], a + (i + ½) h with h = (b − a)/n, and h: the nodes of the composite midpoint rule.
n
[a, b]
a + (i + ½) h
h = (b − a)/n
h