Concept

basically

𝑏𝑎𝑓(𝑥)=𝑛𝑖𝑤𝑖(𝑥)𝑓(𝑥𝑖)

stability upper bound

|Δ𝑄|𝑤1max|Δ𝑓𝑖|

Implementation

Newton-Cotes Quadrature use uniformly spaced nodes, Gaussian Quadrature use optimal picked nodes