Three samples define the panel
CMNA's simp() divides the interval into m panels. For each panel it evaluates the function at the left endpoint, midpoint, and right endpoint. Those three values determine a quadratic approximation, whose area is
h / 6 × [f(x₀) + 4f(xₘ) + f(x₁)]
The factor of four on the midpoint is not decoration: it is exactly the weight produced by integrating the interpolating quadratic.